aboutsummaryrefslogtreecommitdiffstats
path: root/adapters/mso-adapters-rest-interface/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'adapters/mso-adapters-rest-interface/src/main')
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/network/beans/ContrailPolicyRef.java45
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/network/beans/ContrailPolicyRefSeq.java65
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/network/beans/ContrailSubnet.java128
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/network/beans/ContrailSubnetHostRoute.java54
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/network/beans/ContrailSubnetHostRoutes.java53
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/network/beans/ContrailSubnetIp.java55
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/network/beans/ContrailSubnetPool.java55
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/network/mappers/ContrailSubnetHostRouteMapper.java44
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/network/mappers/ContrailSubnetMapper.java135
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/network/mappers/ContrailSubnetPoolMapper.java43
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/nwrest/ContrailNetwork.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/ContrailNetwork.java)14
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/nwrest/CreateNetworkError.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/CreateNetworkError.java)4
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/nwrest/CreateNetworkRequest.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/CreateNetworkRequest.java)34
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/nwrest/CreateNetworkResponse.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/CreateNetworkResponse.java)9
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/nwrest/DeleteNetworkError.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/DeleteNetworkError.java)4
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/nwrest/DeleteNetworkRequest.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/DeleteNetworkRequest.java)12
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/nwrest/DeleteNetworkResponse.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/DeleteNetworkResponse.java)6
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/nwrest/NetworkExceptionResponse.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/NetworkExceptionResponse.java)10
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/nwrest/NetworkRequestCommon.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/NetworkRequestCommon.java)21
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/nwrest/NetworkResponseCommon.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/NetworkResponseCommon.java)12
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/nwrest/NetworkTechnology.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/NetworkTechnology.java)2
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/nwrest/ProviderVlanNetwork.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/ProviderVlanNetwork.java)9
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/nwrest/QueryNetworkError.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/QueryNetworkError.java)2
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/nwrest/QueryNetworkResponse.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/QueryNetworkResponse.java)14
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/nwrest/RollbackNetworkError.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/RollbackNetworkError.java)4
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/nwrest/RollbackNetworkRequest.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/RollbackNetworkRequest.java)9
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/nwrest/RollbackNetworkResponse.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/RollbackNetworkResponse.java)6
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/nwrest/UpdateNetworkError.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/UpdateNetworkError.java)4
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/nwrest/UpdateNetworkRequest.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/UpdateNetworkRequest.java)45
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/nwrest/UpdateNetworkResponse.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/UpdateNetworkResponse.java)10
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/sdncrest/RequestInformation.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/sdncrest/RequestInformation.java)38
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/sdncrest/SDNCErrorCommon.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/sdncrest/SDNCErrorCommon.java)7
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/sdncrest/SDNCEvent.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/sdncrest/SDNCEvent.java)13
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/sdncrest/SDNCRequestCommon.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/sdncrest/SDNCRequestCommon.java)15
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/sdncrest/SDNCResponseCommon.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/sdncrest/SDNCResponseCommon.java)15
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/sdncrest/SDNCServiceError.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/sdncrest/SDNCServiceError.java)7
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/sdncrest/SDNCServiceRequest.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/sdncrest/SDNCServiceRequest.java)34
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/sdncrest/SDNCServiceResponse.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/sdncrest/SDNCServiceResponse.java)9
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/sdncrest/ServiceInformation.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/sdncrest/ServiceInformation.java)12
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/tenantrest/CreateTenantError.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/CreateTenantError.java)6
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/tenantrest/CreateTenantRequest.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/CreateTenantRequest.java)8
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/tenantrest/CreateTenantResponse.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/CreateTenantResponse.java)3
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/tenantrest/DeleteTenantError.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/DeleteTenantError.java)6
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/tenantrest/DeleteTenantRequest.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/DeleteTenantRequest.java)5
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/tenantrest/DeleteTenantResponse.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/DeleteTenantResponse.java)2
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/tenantrest/QueryTenantError.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/QueryTenantError.java)6
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/tenantrest/QueryTenantResponse.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/QueryTenantResponse.java)3
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/tenantrest/RollbackTenantError.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/RollbackTenantError.java)6
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/tenantrest/RollbackTenantRequest.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/RollbackTenantRequest.java)2
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/tenantrest/RollbackTenantResponse.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/RollbackTenantResponse.java)2
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/tenantrest/TenantExceptionResponse.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/TenantExceptionResponse.java)8
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/tenantrest/TenantRequestCommon.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/TenantRequestCommon.java)11
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/tenantrest/TenantRollback.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/TenantRollback.java)5
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vdu/CloudInfo.java69
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vdu/PluginAction.java63
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vdu/VduArtifact.java80
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vdu/VduException.java60
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vdu/VduInstance.java80
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vdu/VduModelInfo.java50
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vdu/VduStateType.java36
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vdu/VduStatus.java58
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vnfrest/CreateVfModuleRequest.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/CreateVfModuleRequest.java)23
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vnfrest/CreateVfModuleResponse.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/CreateVfModuleResponse.java)2
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vnfrest/CreateVolumeGroupRequest.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/CreateVolumeGroupRequest.java)17
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vnfrest/CreateVolumeGroupResponse.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/CreateVolumeGroupResponse.java)2
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vnfrest/DeleteVfModuleRequest.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/DeleteVfModuleRequest.java)12
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vnfrest/DeleteVfModuleResponse.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/DeleteVfModuleResponse.java)6
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vnfrest/DeleteVolumeGroupRequest.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/DeleteVolumeGroupRequest.java)12
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vnfrest/DeleteVolumeGroupResponse.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/DeleteVolumeGroupResponse.java)2
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vnfrest/QueryVfModuleResponse.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/QueryVfModuleResponse.java)8
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vnfrest/QueryVolumeGroupResponse.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/QueryVolumeGroupResponse.java)8
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vnfrest/RollbackVfModuleRequest.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/RollbackVfModuleRequest.java)2
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vnfrest/RollbackVfModuleResponse.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/RollbackVfModuleResponse.java)2
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vnfrest/RollbackVolumeGroupRequest.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/RollbackVolumeGroupRequest.java)2
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vnfrest/RollbackVolumeGroupResponse.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/RollbackVolumeGroupResponse.java)2
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vnfrest/UpdateVfModuleRequest.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/UpdateVfModuleRequest.java)8
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vnfrest/UpdateVfModuleResponse.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/UpdateVfModuleResponse.java)2
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vnfrest/UpdateVolumeGroupRequest.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/UpdateVolumeGroupRequest.java)8
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vnfrest/UpdateVolumeGroupResponse.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/UpdateVolumeGroupResponse.java)2
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vnfrest/VfModuleExceptionResponse.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/VfModuleExceptionResponse.java)4
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vnfrest/VfModuleRollback.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/VfModuleRollback.java)6
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vnfrest/VfRequestCommon.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/VfRequestCommon.java)10
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vnfrest/VfResponseCommon.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/VfResponseCommon.java)6
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vnfrest/VolumeGroupExceptionResponse.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/VolumeGroupExceptionResponse.java)4
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vnfrest/VolumeGroupRollback.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/VolumeGroupRollback.java)4
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/HeatStatus.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/beans/HeatStatus.java)2
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/HostRoute.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/beans/HostRoute.java)2
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/MsoTenant.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/beans/MsoTenant.java)2
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/NetworkInfo.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/beans/NetworkInfo.java)79
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/NetworkRollback.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/beans/NetworkRollback.java)15
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/NetworkStatus.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/beans/NetworkStatus.java)2
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/Pool.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/beans/Pool.java)11
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/RouteTarget.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/beans/RouteTarget.java)12
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/StackInfo.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/beans/StackInfo.java)50
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/Subnet.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/beans/Subnet.java)12
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/VnfRollback.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/beans/VnfRollback.java)9
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/VnfStatus.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/beans/VnfStatus.java)2
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/exceptions/MsoAdapterException.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/exceptions/MsoAdapterException.java)2
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/exceptions/MsoCloudIdentityNotFound.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/exceptions/MsoCloudIdentityNotFound.java)17
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/exceptions/MsoCloudSiteNotFound.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/exceptions/MsoCloudSiteNotFound.java)14
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/exceptions/MsoException.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/exceptions/MsoException.java)2
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/exceptions/MsoExceptionCategory.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/exceptions/MsoExceptionCategory.java)2
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/exceptions/MsoHeatNotFoundException.java54
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/exceptions/MsoIOException.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/exceptions/MsoIOException.java)2
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/exceptions/MsoNetworkAlreadyExists.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/exceptions/MsoNetworkAlreadyExists.java)4
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/exceptions/MsoNetworkNotFound.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/exceptions/MsoNetworkNotFound.java)2
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/exceptions/MsoOpenstackException.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/exceptions/MsoOpenstackException.java)2
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/exceptions/MsoStackAlreadyExists.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/exceptions/MsoStackAlreadyExists.java)4
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/exceptions/MsoStackNotFound.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/exceptions/MsoStackNotFound.java)2
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/exceptions/MsoTenantAlreadyExists.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/exceptions/MsoTenantAlreadyExists.java)11
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/exceptions/MsoTenantNotFound.java (renamed from adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/exceptions/MsoTenantNotFound.java)2
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/mappers/NetworkInfoMapper.java107
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/mappers/StackInfoMapper.java99
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/json/MapDeserializer.java67
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/json/MapSerializer.java63
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/providers/JettisonStyleMapperProvider.java53
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/HealthCheckHandler.java51
117 files changed, 1928 insertions, 611 deletions
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/network/beans/ContrailPolicyRef.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/network/beans/ContrailPolicyRef.java
new file mode 100644
index 0000000000..f207c6185e
--- /dev/null
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/network/beans/ContrailPolicyRef.java
@@ -0,0 +1,45 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.adapters.network.beans;
+
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class ContrailPolicyRef {
+
+ @JsonProperty("network_policy_refs_data_sequence")
+ private ContrailPolicyRefSeq seq;
+
+
+ public ContrailPolicyRefSeq getSeq() {
+ return seq;
+ }
+
+ public void setSeq(ContrailPolicyRefSeq seq) {
+ this.seq = seq;
+ }
+
+ public ContrailPolicyRef withRefSeq(ContrailPolicyRefSeq seq) {
+ this.seq = seq;
+ return this;
+ }
+
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/network/beans/ContrailPolicyRefSeq.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/network/beans/ContrailPolicyRefSeq.java
new file mode 100644
index 0000000000..a3a5a710ed
--- /dev/null
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/network/beans/ContrailPolicyRefSeq.java
@@ -0,0 +1,65 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.adapters.network.beans;
+
+
+import com.fasterxml.jackson.annotation.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-adapters-rest-interface/src/main/java/org/onap/so/adapters/network/beans/ContrailSubnet.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/network/beans/ContrailSubnet.java
new file mode 100644
index 0000000000..fc674a0416
--- /dev/null
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/network/beans/ContrailSubnet.java
@@ -0,0 +1,128 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.adapters.network.beans;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class ContrailSubnet {
+
+ @JsonProperty("network_ipam_refs_data_ipam_subnets_subnet")
+ private ContrailSubnetIp subnet = new ContrailSubnetIp();
+
+ @JsonProperty("network_ipam_refs_data_ipam_subnets_default_gateway")
+ private String defaultGateway;
+
+ @JsonProperty("network_ipam_refs_data_ipam_subnets_subnet_name")
+ private String subnetName;
+
+ @JsonProperty("network_ipam_refs_data_ipam_subnets_enable_dhcp")
+ private Boolean enableDhcp;
+
+ @JsonProperty("network_ipam_refs_data_ipam_subnets_addr_from_start")
+ private Boolean addrFromStart = true;
+ /** future - leave this commented
+ private String subnet_uuid;
+ private String dns_server_address;
+ private List<String> dns_nameservers;
+ private String dhcp_option_list;
+ **/
+
+ @JsonProperty("network_ipam_refs_data_ipam_subnets_allocation_pools")
+ private List<ContrailSubnetPool> allocationPools = new ArrayList<>();
+
+ @JsonProperty("network_ipam_refs_data_ipam_subnets_host_routes")
+ private ContrailSubnetHostRoutes hostRoutes = new ContrailSubnetHostRoutes();
+
+ public ContrailSubnet() {
+ super();
+ }
+
+ public String getDefaultGateway() {
+ return defaultGateway;
+ }
+
+ public void setDefaultGateway(String defaultGateway) {
+ this.defaultGateway = defaultGateway;
+ }
+
+ public ContrailSubnetIp getSubnet() {
+ return subnet;
+ }
+
+ public void setSubnet(ContrailSubnetIp subnet) {
+ this.subnet = subnet;
+ }
+
+ public Boolean isEnableDhcp() {
+ return enableDhcp;
+ }
+
+ public void setEnableDhcp(Boolean enableDhcp) {
+ this.enableDhcp = enableDhcp;
+ }
+
+ public String getSubnetName() {
+ return subnetName;
+ }
+
+ public void setSubnetName(String subnetName) {
+ this.subnetName = subnetName;
+ }
+
+ public List<ContrailSubnetPool> getAllocationPools() {
+ return allocationPools;
+ }
+
+ public void setAllocationPools(List<ContrailSubnetPool> allocationPools) {
+ this.allocationPools = allocationPools;
+ }
+
+ public Boolean isAddrFromStart() {
+ return addrFromStart;
+ }
+
+ public void setAddrFromStart(Boolean addrFromStart) {
+ this.addrFromStart = addrFromStart;
+ }
+
+ public ContrailSubnetHostRoutes getHostRoutes() {
+ return hostRoutes;
+ }
+
+ public void setHostRoutes(ContrailSubnetHostRoutes hostRoutes) {
+ this.hostRoutes = hostRoutes;
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder buf = new StringBuilder ();
+ for (ContrailSubnetPool pool : allocationPools)
+ {
+ buf.append(pool.toString());
+ }
+ return "ContrailSubnet [subnet=" + subnet.toString() + " default_gateway=" + defaultGateway
+ + " enable_dhcp=" + enableDhcp + " addr_from_start=" + addrFromStart + " subnet_name=" + subnetName + " allocation_pools=" + buf + " ]";
+ }
+
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/network/beans/ContrailSubnetHostRoute.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/network/beans/ContrailSubnetHostRoute.java
new file mode 100644
index 0000000000..7d53715e3c
--- /dev/null
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/network/beans/ContrailSubnetHostRoute.java
@@ -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.onap.so.adapters.network.beans;
+
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+public class ContrailSubnetHostRoute {
+
+ @JsonProperty("network_ipam_refs_data_ipam_subnets_host_routes_route_prefix")
+ private String prefix;
+
+ @JsonProperty("network_ipam_refs_data_ipam_subnets_host_routes_route_next_hop")
+ private String nextHop;
+
+ public String getPrefix() {
+ return prefix;
+ }
+
+ public void setPrefix(String prefix) {
+ this.prefix = prefix;
+ }
+
+ public String getNextHop() {
+ return nextHop;
+ }
+
+ public void setNextHop(String nextHop) {
+ this.nextHop = nextHop;
+ }
+
+ @Override
+ public String toString() {
+ return "ContrailSubnetHostRoute [prefix=" + prefix + ", nextHop=" + nextHop + "]";
+ }
+
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/network/beans/ContrailSubnetHostRoutes.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/network/beans/ContrailSubnetHostRoutes.java
new file mode 100644
index 0000000000..cd7192b6e2
--- /dev/null
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/network/beans/ContrailSubnetHostRoutes.java
@@ -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.onap.so.adapters.network.beans;
+
+
+import java.util.ArrayList;
+import java.util.List;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+public class ContrailSubnetHostRoutes {
+
+ @JsonProperty("network_ipam_refs_data_ipam_subnets_host_routes_route")
+ private List<ContrailSubnetHostRoute> hostRoutes = new ArrayList<>();
+
+ public List<ContrailSubnetHostRoute> getHostRoutes() {
+ return hostRoutes;
+ }
+
+ public void setHostRoutes(List<ContrailSubnetHostRoute> hostRoutes) {
+ this.hostRoutes = hostRoutes;
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder buf = new StringBuilder ();
+ if (hostRoutes != null)
+ {
+ for (ContrailSubnetHostRoute hr : hostRoutes)
+ {
+ buf.append(hr.toString());
+ }
+ }
+ return "ContrailSubnetHostRoutes [" + buf.toString() + "]";
+ }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/network/beans/ContrailSubnetIp.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/network/beans/ContrailSubnetIp.java
new file mode 100644
index 0000000000..3986592dde
--- /dev/null
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/network/beans/ContrailSubnetIp.java
@@ -0,0 +1,55 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.adapters.network.beans;
+
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class ContrailSubnetIp {
+
+ @JsonProperty("network_ipam_refs_data_ipam_subnets_subnet_ip_prefix")
+ private String ipPrefix;
+
+ @JsonProperty("network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len")
+ private String ipPrefixLen;
+
+ public String getIpPrefix() {
+ return ipPrefix;
+ }
+
+ public void setIpPrefix(String ipPrefix) {
+ this.ipPrefix = ipPrefix;
+ }
+
+ public String getIpPrefixLen() {
+ return ipPrefixLen;
+ }
+
+ public void setIpPrefixLen(String ipPrefixLen) {
+ this.ipPrefixLen = ipPrefixLen;
+ }
+
+ @Override
+ public String toString() {
+ return "ContrailSubnetIp [ip_prefix=" + ipPrefix + ", ip_prefix_len=" + ipPrefixLen + "]";
+ }
+
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/network/beans/ContrailSubnetPool.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/network/beans/ContrailSubnetPool.java
new file mode 100644
index 0000000000..11a06c69d5
--- /dev/null
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/network/beans/ContrailSubnetPool.java
@@ -0,0 +1,55 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.adapters.network.beans;
+
+
+import com.fasterxml.jackson.annotation.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 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;
+ }
+
+ @Override
+ public String toString() {
+ return "ContrailSubnetPool [start=" + start + ", end=" + end + "]";
+ }
+
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/network/mappers/ContrailSubnetHostRouteMapper.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/network/mappers/ContrailSubnetHostRouteMapper.java
new file mode 100644
index 0000000000..03800de5b8
--- /dev/null
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/network/mappers/ContrailSubnetHostRouteMapper.java
@@ -0,0 +1,44 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.adapters.network.mappers;
+
+import org.onap.so.adapters.network.beans.ContrailSubnetHostRoute;
+import org.onap.so.openstack.beans.HostRoute;
+
+public class ContrailSubnetHostRouteMapper {
+
+ private final HostRoute hostRoute;
+ public ContrailSubnetHostRouteMapper(HostRoute hostRoute) {
+ this.hostRoute = hostRoute;
+ }
+
+ public ContrailSubnetHostRoute map() {
+
+ final ContrailSubnetHostRoute contrailSubnetHostRoute = new ContrailSubnetHostRoute();
+
+ if (hostRoute != null) {
+ contrailSubnetHostRoute.setNextHop(hostRoute.getNextHop());
+ contrailSubnetHostRoute.setPrefix(hostRoute.getPrefix());
+ }
+ return contrailSubnetHostRoute;
+ }
+
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/network/mappers/ContrailSubnetMapper.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/network/mappers/ContrailSubnetMapper.java
new file mode 100644
index 0000000000..d3ccb35a60
--- /dev/null
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/network/mappers/ContrailSubnetMapper.java
@@ -0,0 +1,135 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.adapters.network.mappers;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Optional;
+
+import org.onap.so.adapters.network.beans.ContrailSubnet;
+import org.onap.so.adapters.network.beans.ContrailSubnetHostRoute;
+import org.onap.so.adapters.network.beans.ContrailSubnetHostRoutes;
+import org.onap.so.adapters.network.beans.ContrailSubnetIp;
+import org.onap.so.adapters.network.beans.ContrailSubnetPool;
+import org.onap.so.openstack.beans.HostRoute;
+import org.onap.so.openstack.beans.Pool;
+import org.onap.so.openstack.beans.Subnet;
+
+public class ContrailSubnetMapper {
+
+ private final Subnet inputSubnet;
+ public ContrailSubnetMapper(Subnet inputSubnet) {
+ this.inputSubnet = inputSubnet;
+ }
+
+ public ContrailSubnet map() {
+
+ final ContrailSubnet result = new ContrailSubnet();
+ if (inputSubnet != null) {
+ final String subnetname = this.getSubnetName(inputSubnet);
+ result.setSubnetName(subnetname);
+ result.setEnableDhcp(inputSubnet.getEnableDHCP());
+ result.setDefaultGateway(inputSubnet.getGatewayIp());
+
+ Optional<ContrailSubnetIp> csIp = createSubnet(inputSubnet);
+ if (csIp.isPresent()) {
+ result.setSubnet(csIp.get());
+ }
+ Optional<List<ContrailSubnetPool>> pools = this.createContrailSubnetPool(inputSubnet);
+ if (pools.isPresent()) {
+ result.setAllocationPools(pools.get());
+ }
+ Optional<ContrailSubnetHostRoutes> routes = this.createContrailSubnetHostRoutes(inputSubnet);
+ if (routes.isPresent()) {
+ result.setHostRoutes(routes.get());
+ }
+ }
+
+ return result;
+ }
+
+ protected String getSubnetName(Subnet subnet) {
+ final String result;
+ if (!isNullOrEmpty(subnet.getSubnetName())) {
+ result = subnet.getSubnetName();
+ } else {
+ result = subnet.getSubnetId();
+ }
+
+ return result;
+ }
+
+ protected Optional<List<ContrailSubnetPool>> createContrailSubnetPool(final Subnet subnet) {
+ Optional<List<ContrailSubnetPool>> result = Optional.empty();
+ if (subnet.getAllocationPools() != null) {
+ List<ContrailSubnetPool> pools = new ArrayList<>();
+ for (Pool pool : subnet.getAllocationPools()) {
+ if ( !isNullOrEmpty(pool.getStart()) && !isNullOrEmpty(pool.getEnd()) ) {
+
+ pools.add(new ContrailSubnetPoolMapper(pool).map());
+ }
+ }
+ if (!pools.isEmpty()) {
+ result = Optional.of(pools);
+ }
+ }
+
+ return result;
+ }
+
+ protected Optional<ContrailSubnetHostRoutes> createContrailSubnetHostRoutes(final Subnet subnet) {
+ Optional<ContrailSubnetHostRoutes> result = Optional.empty();
+ if (subnet.getHostRoutes() != null) {
+ ContrailSubnetHostRoutes hostRoutesObj = new ContrailSubnetHostRoutes();
+ List<ContrailSubnetHostRoute> hrList = new ArrayList<>();
+ for (HostRoute hr : subnet.getHostRoutes()) {
+ if ( !isNullOrEmpty(hr.getPrefix()) || !isNullOrEmpty(hr.getNextHop()) ) {
+ hrList.add(new ContrailSubnetHostRouteMapper(hr).map());
+ }
+ }
+ if (!hrList.isEmpty()) {
+ hostRoutesObj.setHostRoutes(hrList);
+ result = Optional.of(hostRoutesObj);
+ }
+ }
+
+ return result;
+
+ }
+ protected Optional<ContrailSubnetIp> createSubnet(final Subnet subnet) {
+ Optional<ContrailSubnetIp> result = Optional.empty();
+ if (!isNullOrEmpty(subnet.getCidr()) ) {
+ int idx = subnet.getCidr().indexOf("/");
+ final ContrailSubnetIp csIp = new ContrailSubnetIp();
+ if (idx != -1) {
+ csIp.setIpPrefix(subnet.getCidr().substring(0, idx));
+ csIp.setIpPrefixLen(subnet.getCidr().substring(idx+1));
+ result = Optional.of(csIp);
+ }
+ }
+
+ return result;
+ }
+
+ protected boolean isNullOrEmpty (String s) {
+ return s == null || s.isEmpty();
+ }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/network/mappers/ContrailSubnetPoolMapper.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/network/mappers/ContrailSubnetPoolMapper.java
new file mode 100644
index 0000000000..a492cd30c0
--- /dev/null
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/network/mappers/ContrailSubnetPoolMapper.java
@@ -0,0 +1,43 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.adapters.network.mappers;
+
+import org.onap.so.adapters.network.beans.ContrailSubnetPool;
+import org.onap.so.openstack.beans.Pool;
+
+public class ContrailSubnetPoolMapper {
+
+ private final Pool pool;
+
+ public ContrailSubnetPoolMapper(Pool pool) {
+ this.pool = pool;
+ }
+
+ public ContrailSubnetPool map() {
+
+ ContrailSubnetPool result = new ContrailSubnetPool();
+ if (pool != null) {
+ result.setStart(pool.getStart());
+ result.setEnd(pool.getEnd());
+ }
+ return result;
+ }
+}
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/onap/so/adapters/nwrest/ContrailNetwork.java
index 60684a3599..9a7431130d 100644
--- 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/onap/so/adapters/nwrest/ContrailNetwork.java
@@ -18,16 +18,24 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.nwrest;
+package org.onap.so.adapters.nwrest;
+import java.io.Serializable;
import java.util.List;
-import org.openecomp.mso.openstack.beans.RouteTarget;
+
+import org.onap.so.openstack.beans.RouteTarget;
import com.fasterxml.jackson.annotation.JsonRootName;
@JsonRootName("contrailNetwork")
-public class ContrailNetwork {
+public class ContrailNetwork implements Serializable{
+
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 6879356795950005963L;
private String shared = "false";
private String external = "false";
private List<RouteTarget> routeTargets;
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/onap/so/adapters/nwrest/CreateNetworkError.java
index 4b105cce92..fec9b474dd 100644
--- 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/onap/so/adapters/nwrest/CreateNetworkError.java
@@ -18,14 +18,14 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.nwrest;
+package org.onap.so.adapters.nwrest;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlRootElement;
-import org.openecomp.mso.openstack.exceptions.MsoExceptionCategory;
+import org.onap.so.openstack.exceptions.MsoExceptionCategory;
@XmlRootElement(name = "createNetworkError")
public class CreateNetworkError extends NetworkExceptionResponse implements Serializable {
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/onap/so/adapters/nwrest/CreateNetworkRequest.java
index 4c2cc36c83..3e4d18cb1b 100644
--- 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/onap/so/adapters/nwrest/CreateNetworkRequest.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.nwrest;
+package org.onap.so.adapters.nwrest;
@@ -28,8 +28,8 @@ import java.util.Map;
import javax.xml.bind.annotation.XmlRootElement;
-import org.openecomp.mso.entity.MsoRequest;
-import org.openecomp.mso.openstack.beans.Subnet;
+import org.onap.so.entity.MsoRequest;
+import org.onap.so.openstack.beans.Subnet;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -37,12 +37,16 @@ import com.fasterxml.jackson.annotation.JsonRootName;
/* README
- Map<String, String> elements when marshalled to XML produce a list of <entry><key>${key}</key><value>${value}</value></entry> elements.
+ Map<String, String> elements when marshalled to XML produce a list of <entry><key>${MsoUtils.xmlEscape(key)}</key><value>${MsoUtils.xmlEscape(value)}</value></entry> elements.
When marshalling to JSON they create a list of "${key}" : "${value}" pairs with no extra wrappers.
*/
@JsonRootName("createNetworkRequest")
@XmlRootElement(name = "createNetworkRequest")
public class CreateNetworkRequest extends NetworkRequestCommon {
+ /**
+ *
+ */
+ private static final long serialVersionUID = -8984362978831333521L;
private String cloudSiteId;
private String tenantId;
private String networkId;
@@ -121,12 +125,13 @@ public class CreateNetworkRequest extends NetworkRequestCommon {
this.networkTypeVersion = networkTypeVersion;
}
- public String getNetworkTechnology() {
- return networkTechnology.toString();
+ public NetworkTechnology getNetworkTechnology() {
+ return networkTechnology;
}
- public void setNetworkTechnology(String networkTechnology) {
- this.networkTechnology = NetworkTechnology.valueOf(networkTechnology);
+ public void setNetworkTechnology(NetworkTechnology networkTechnology) {
+ this.networkTechnology = networkTechnology;
+ this.contrailRequest = determineContrail();
}
public List<Subnet> getSubnets() {
@@ -151,6 +156,7 @@ public class CreateNetworkRequest extends NetworkRequestCommon {
public void setContrailNetwork(ContrailNetwork contrailNetwork) {
this.contrailNetwork = contrailNetwork;
+ this.contrailRequest = determineContrail();
}
public Boolean getFailIfExists() {
@@ -186,11 +192,15 @@ public class CreateNetworkRequest extends NetworkRequestCommon {
}
public boolean isContrailRequest() {
- return (networkTechnology == NetworkTechnology.CONTRAIL) && (contrailNetwork != null);
+ return this.contrailRequest;
}
@JsonIgnore
- public void setContrailRequest(boolean contrailRequest) {
+ protected void setContrailRequest(boolean contrailRequest) {
this.contrailRequest = contrailRequest;
}
+
+ private boolean determineContrail() {
+ 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/onap/so/adapters/nwrest/CreateNetworkResponse.java
index 6db7661905..763732213d 100644
--- 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/onap/so/adapters/nwrest/CreateNetworkResponse.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.nwrest;
+package org.onap.so.adapters.nwrest;
@@ -26,7 +26,7 @@ import java.util.Map;
import javax.xml.bind.annotation.XmlRootElement;
-import org.openecomp.mso.openstack.beans.NetworkRollback;
+import org.onap.so.openstack.beans.NetworkRollback;
import com.fasterxml.jackson.annotation.JsonRootName;
@@ -34,6 +34,11 @@ import com.fasterxml.jackson.annotation.JsonRootName;
@XmlRootElement(name = "createNetworkResponse")
public class CreateNetworkResponse extends NetworkResponseCommon {
+ /**
+ *
+ */
+ private static final long serialVersionUID = -7730406297031948309L;
+
private String networkId;
private String neutronNetworkId;
private String networkStackId;
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/onap/so/adapters/nwrest/DeleteNetworkError.java
index 6a5e354f87..f874be56a3 100644
--- 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/onap/so/adapters/nwrest/DeleteNetworkError.java
@@ -18,14 +18,14 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.nwrest;
+package org.onap.so.adapters.nwrest;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlRootElement;
-import org.openecomp.mso.openstack.exceptions.MsoExceptionCategory;
+import org.onap.so.openstack.exceptions.MsoExceptionCategory;
@XmlRootElement(name = "deleteNetworkError")
public class DeleteNetworkError extends NetworkExceptionResponse implements Serializable {
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/onap/so/adapters/nwrest/DeleteNetworkRequest.java
index d899ac921e..f069bf2ed2 100644
--- 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/onap/so/adapters/nwrest/DeleteNetworkRequest.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -18,13 +18,13 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.nwrest;
+package org.onap.so.adapters.nwrest;
import javax.xml.bind.annotation.XmlRootElement;
-import org.openecomp.mso.entity.MsoRequest;
+import org.onap.so.entity.MsoRequest;
import com.fasterxml.jackson.annotation.JsonRootName;
@@ -33,6 +33,10 @@ import com.fasterxml.jackson.annotation.JsonRootName;
@XmlRootElement(name = "deleteNetworkRequest")
public class DeleteNetworkRequest extends NetworkRequestCommon {
+ /**
+ *
+ */
+ private static final long serialVersionUID = -2445072708572065058L;
private String cloudSiteId;
private String tenantId;
private String networkId;
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/onap/so/adapters/nwrest/DeleteNetworkResponse.java
index ee62751edb..1de7f8be76 100644
--- 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/onap/so/adapters/nwrest/DeleteNetworkResponse.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.nwrest;
+package org.onap.so.adapters.nwrest;
@@ -30,6 +30,10 @@ import com.fasterxml.jackson.annotation.JsonRootName;
@XmlRootElement(name = "deleteNetworkResponse")
public class DeleteNetworkResponse extends NetworkResponseCommon {
+ /**
+ *
+ */
+ private static final long serialVersionUID = 68336086339501537L;
private String networkId;
private Boolean 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/onap/so/adapters/nwrest/NetworkExceptionResponse.java
index 195d6da176..4b9f283e20 100644
--- 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/onap/so/adapters/nwrest/NetworkExceptionResponse.java
@@ -18,14 +18,18 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.nwrest;
+package org.onap.so.adapters.nwrest;
-import org.openecomp.mso.openstack.exceptions.MsoExceptionCategory;
+import org.onap.so.openstack.exceptions.MsoExceptionCategory;
public class NetworkExceptionResponse extends NetworkResponseCommon {
- private String message;
+ /**
+ *
+ */
+ private static final long serialVersionUID = -7160401922983004097L;
+ private String message;
private MsoExceptionCategory category;
private Boolean 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/onap/so/adapters/nwrest/NetworkRequestCommon.java
index 56fc19870c..3d66da3a2d 100644
--- 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/onap/so/adapters/nwrest/NetworkRequestCommon.java
@@ -19,32 +19,34 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.nwrest;
+package org.onap.so.adapters.nwrest;
import java.io.ByteArrayOutputStream;
+import java.io.Serializable;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.Marshaller;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.databind.SerializationFeature;
-import org.openecomp.mso.logger.MsoLogger;
+import org.onap.so.logger.MsoLogger;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializationFeature;
/**
* Everything that is common between all Network Requests.
*/
-public abstract class NetworkRequestCommon {
- private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
+public abstract class NetworkRequestCommon implements Serializable {
+ private static final long serialVersionUID = -6732431343649282079L;
+ private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA, NetworkRequestCommon.class);
private Boolean skipAAI = false;
private String messageId;
private String notificationUrl;
@JsonProperty
- private boolean synchronous;
+ private boolean synchronous = true;
public Boolean getSkipAAI() {
return skipAAI;
}
@@ -67,14 +69,15 @@ public abstract class NetworkRequestCommon {
public void setNotificationUrl(String notificationUrl) {
this.notificationUrl = notificationUrl;
+ this.synchronous = notificationUrl == null || (notificationUrl.isEmpty());
}
public boolean isSynchronous() {
- return notificationUrl == null || (notificationUrl.isEmpty());
+ return this.synchronous;
}
@JsonIgnore
- public void setSynchronous(boolean synchronous) {
+ protected void setSynchronous(boolean synchronous) {
this.synchronous = synchronous;
}
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/onap/so/adapters/nwrest/NetworkResponseCommon.java
index f92f4ea769..d626f26aa6 100644
--- 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/onap/so/adapters/nwrest/NetworkResponseCommon.java
@@ -19,24 +19,28 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.nwrest;
+package org.onap.so.adapters.nwrest;
import java.io.ByteArrayOutputStream;
+import java.io.Serializable;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.Marshaller;
+import org.onap.so.logger.MsoLogger;
+
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
-import org.openecomp.mso.logger.MsoLogger;
/**
* Everything that is common between all Volume Group Responses, except for QueryVolumeGroupResponse.
*/
-public abstract class NetworkResponseCommon {
+public abstract class NetworkResponseCommon implements Serializable {
+
+ private static final long serialVersionUID = 1233520856935129726L;
private String messageId;
- private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
+ private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA, NetworkResponseCommon.class);
public NetworkResponseCommon() {
messageId = null;
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/onap/so/adapters/nwrest/NetworkTechnology.java
index 83eddbc33d..cade9b44c8 100644
--- 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/onap/so/adapters/nwrest/NetworkTechnology.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.nwrest;
+package org.onap.so.adapters.nwrest;
public enum NetworkTechnology {
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/onap/so/adapters/nwrest/ProviderVlanNetwork.java
index 7525da9049..fbd21b8197 100644
--- 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/onap/so/adapters/nwrest/ProviderVlanNetwork.java
@@ -18,13 +18,18 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.nwrest;
+package org.onap.so.adapters.nwrest;
+import java.io.Serializable;
import java.util.List;
-public class ProviderVlanNetwork {
+public class ProviderVlanNetwork implements Serializable{
+ /**
+ *
+ */
+ private static final long serialVersionUID = 6744949861614446315L;
private String physicalNetworkName;
private List<Integer> 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/onap/so/adapters/nwrest/QueryNetworkError.java
index 5ff64a47a2..6e8ace9cf0 100644
--- 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/onap/so/adapters/nwrest/QueryNetworkError.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.nwrest;
+package org.onap.so.adapters.nwrest;
import java.io.Serializable;
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/onap/so/adapters/nwrest/QueryNetworkResponse.java
index 7df5472607..6953dfe7e5 100644
--- 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/onap/so/adapters/nwrest/QueryNetworkResponse.java
@@ -19,19 +19,23 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.nwrest;
+package org.onap.so.adapters.nwrest;
import java.util.List;
import java.util.Map;
import javax.xml.bind.annotation.XmlRootElement;
-import org.openecomp.mso.logger.MsoLogger;
-import org.openecomp.mso.openstack.beans.NetworkStatus;
-import org.openecomp.mso.openstack.beans.RouteTarget;
+import org.onap.so.logger.MsoLogger;
+import org.onap.so.openstack.beans.NetworkStatus;
+import org.onap.so.openstack.beans.RouteTarget;
@XmlRootElement(name = "queryNetworkResponse")
public class QueryNetworkResponse extends NetworkResponseCommon {
+ /**
+ *
+ */
+ private static final long serialVersionUID = -5251191073081795026L;
private String networkId;
private String neutronNetworkId;
private String networkStackId;
@@ -41,7 +45,7 @@ public class QueryNetworkResponse extends NetworkResponseCommon {
private List<RouteTarget> routeTargets;
private Map<String, String> subnetIdMap;
private Map<String, String> networkOutputs;
- private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
+ private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA, QueryNetworkResponse.class);
public QueryNetworkResponse() {
super();
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/nwrest/RollbackNetworkError.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/nwrest/RollbackNetworkError.java
index 67a4b906c7..cb148dfcef 100644
--- 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/onap/so/adapters/nwrest/RollbackNetworkError.java
@@ -18,14 +18,14 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.nwrest;
+package org.onap.so.adapters.nwrest;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlRootElement;
-import org.openecomp.mso.openstack.exceptions.MsoExceptionCategory;
+import org.onap.so.openstack.exceptions.MsoExceptionCategory;
@XmlRootElement(name = "rollbackNetworkError")
public class RollbackNetworkError extends NetworkExceptionResponse implements Serializable {
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/onap/so/adapters/nwrest/RollbackNetworkRequest.java
index 03b4123d06..494d3123d1 100644
--- 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/onap/so/adapters/nwrest/RollbackNetworkRequest.java
@@ -18,18 +18,23 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.nwrest;
+package org.onap.so.adapters.nwrest;
import javax.xml.bind.annotation.XmlRootElement;
+import org.onap.so.openstack.beans.NetworkRollback;
+
import com.fasterxml.jackson.annotation.JsonRootName;
-import org.openecomp.mso.openstack.beans.NetworkRollback;
@JsonRootName("rollbackNetworkRequest")
@XmlRootElement(name = "rollbackNetworkRequest")
public class RollbackNetworkRequest extends NetworkRequestCommon {
+ /**
+ *
+ */
+ private static final long serialVersionUID = -8705660877263749940L;
private NetworkRollback networkRollback;
public RollbackNetworkRequest() {
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/onap/so/adapters/nwrest/RollbackNetworkResponse.java
index f7b80bd63e..9be8bb3a69 100644
--- 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/onap/so/adapters/nwrest/RollbackNetworkResponse.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.nwrest;
+package org.onap.so.adapters.nwrest;
@@ -31,6 +31,10 @@ import com.fasterxml.jackson.annotation.JsonRootName;
@XmlRootElement(name = "rollbackNetworkResponse")
public class RollbackNetworkResponse extends NetworkResponseCommon {
+ /**
+ *
+ */
+ private static final long serialVersionUID = 3115905123337163846L;
private Boolean networkRolledBack;
public RollbackNetworkResponse() {
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/onap/so/adapters/nwrest/UpdateNetworkError.java
index 3385167f60..642ac4cc64 100644
--- 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/onap/so/adapters/nwrest/UpdateNetworkError.java
@@ -18,14 +18,14 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.nwrest;
+package org.onap.so.adapters.nwrest;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlRootElement;
-import org.openecomp.mso.openstack.exceptions.MsoExceptionCategory;
+import org.onap.so.openstack.exceptions.MsoExceptionCategory;
@XmlRootElement(name = "updateNetworkError")
public class UpdateNetworkError extends NetworkExceptionResponse implements Serializable {
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/onap/so/adapters/nwrest/UpdateNetworkRequest.java
index 7b3236efa5..c1c8258a6a 100644
--- 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/onap/so/adapters/nwrest/UpdateNetworkRequest.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.nwrest;
+package org.onap.so.adapters.nwrest;
@@ -28,9 +28,9 @@ import java.util.Map;
import javax.xml.bind.annotation.XmlRootElement;
-import org.openecomp.mso.entity.MsoRequest;
-import org.openecomp.mso.logger.MsoLogger;
-import org.openecomp.mso.openstack.beans.Subnet;
+import org.onap.so.entity.MsoRequest;
+import org.onap.so.logger.MsoLogger;
+import org.onap.so.openstack.beans.Subnet;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -39,6 +39,10 @@ import com.fasterxml.jackson.annotation.JsonRootName;
@JsonRootName("updateNetworkRequest")
@XmlRootElement(name = "updateNetworkRequest")
public class UpdateNetworkRequest extends NetworkRequestCommon {
+ /**
+ *
+ */
+ private static final long serialVersionUID = -1219693235726357143L;
private String cloudSiteId;
private String tenantId;
private String networkId;
@@ -54,7 +58,7 @@ public class UpdateNetworkRequest extends NetworkRequestCommon {
private Boolean backout = true;
private Map<String,String> networkParams = new HashMap<>();
private MsoRequest msoRequest = new MsoRequest();
- private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
+ private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA, UpdateNetworkRequest.class);
@JsonProperty
private boolean contrailRequest;
public UpdateNetworkRequest() {
@@ -125,16 +129,13 @@ public class UpdateNetworkRequest extends NetworkRequestCommon {
this.networkTypeVersion = networkTypeVersion;
}
- public String getNetworkTechnology() {
- return networkTechnology.toString();
+ public NetworkTechnology getNetworkTechnology() {
+ return networkTechnology;
}
- public void setNetworkTechnology(String networkTechnology) {
- try {
- this.networkTechnology = NetworkTechnology.valueOf(networkTechnology.toUpperCase());
- } catch (IllegalArgumentException e) {
- LOGGER.debug("Exception:", e);
- }
+ public void setNetworkTechnology(NetworkTechnology networkTechnology) {
+ this.networkTechnology = networkTechnology;
+ this.contrailRequest = determineContrail();
}
public List<Subnet> getSubnets() {
@@ -159,6 +160,7 @@ public class UpdateNetworkRequest extends NetworkRequestCommon {
public void setContrailNetwork(ContrailNetwork contrailNetwork) {
this.contrailNetwork = contrailNetwork;
+ this.contrailRequest = determineContrail();
}
public Boolean getBackout() {
@@ -184,13 +186,16 @@ public class UpdateNetworkRequest extends NetworkRequestCommon {
public void setMsoRequest(MsoRequest msoRequest) {
this.msoRequest = msoRequest;
}
-
+ @JsonIgnore
+ protected void setContrailRequest(boolean contrailRequest) {
+ this.contrailRequest = contrailRequest;
+ }
public boolean isContrailRequest() {
- return (networkTechnology == NetworkTechnology.CONTRAIL) && (contrailNetwork != null);
+ return contrailRequest;
}
- @JsonIgnore
- public void setContrailRequest() {
- this.contrailRequest = contrailRequest;
+ private boolean determineContrail() {
+ 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/onap/so/adapters/nwrest/UpdateNetworkResponse.java
index 3ca6824a49..7ce66ba58e 100644
--- 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/onap/so/adapters/nwrest/UpdateNetworkResponse.java
@@ -18,20 +18,24 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.nwrest;
+package org.onap.so.adapters.nwrest;
import java.util.Map;
+
import javax.xml.bind.annotation.XmlRootElement;
-import org.jboss.resteasy.annotations.providers.NoJackson;
+
import com.fasterxml.jackson.annotation.JsonRootName;
@JsonRootName("updateNetworkResponse")
@XmlRootElement(name = "updateNetworkResponse")
-@NoJackson
public class UpdateNetworkResponse extends NetworkResponseCommon {
+ /**
+ *
+ */
+ private static final long serialVersionUID = -7528214382414366136L;
private String networkId;
private String neutronNetworkId;
private Map<String, String> subnetMap;
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/sdncrest/RequestInformation.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/sdncrest/RequestInformation.java
index 3dc81fbdda..ae7ff27bed 100644
--- a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/sdncrest/RequestInformation.java
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/sdncrest/RequestInformation.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -17,13 +17,15 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.sdncrest;
-import com.fasterxml.jackson.annotation.JsonProperty;
+package org.onap.so.adapters.sdncrest;
-import javax.xml.bind.annotation.XmlElement;
import java.io.Serializable;
+import javax.xml.bind.annotation.XmlElement;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
/**
* Request Information specified by the SDNC "agnostic" API.
*/
@@ -49,6 +51,14 @@ public class RequestInformation implements Serializable {
// Identifies the request sub action
private String requestSubAction;
+ @JsonProperty("orderNumber")
+ @XmlElement(name = "orderNumber")
+ private String orderNumber;
+
+ @JsonProperty("orderVersion")
+ @XmlElement(name = "orderVersion")
+ private String orderVersion;
+
public RequestInformation(String requestId, String source, String notificationUrl) {
this.requestId = requestId;
this.source = source;
@@ -112,4 +122,22 @@ public class RequestInformation implements Serializable {
public void setRequestSubAction(String requestSubAction) {
this.requestSubAction = requestSubAction;
}
+
+ public String getOrderNumber() {
+ return orderNumber;
+ }
+
+ public void setOrderNumber(String orderNumber) {
+ this.orderNumber = orderNumber;
+ }
+
+ public String getOrderVersion() {
+ return orderVersion;
+ }
+
+ public void setOrderVersion(String orderVersion) {
+ this.orderVersion = orderVersion;
+ }
+
+
} \ No newline at end of file
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/sdncrest/SDNCErrorCommon.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/sdncrest/SDNCErrorCommon.java
index 280703a534..b6cd6a1eed 100644
--- a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/sdncrest/SDNCErrorCommon.java
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/sdncrest/SDNCErrorCommon.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -17,7 +17,8 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.sdncrest;
+
+package org.onap.so.adapters.sdncrest;
import java.io.Serializable;
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/sdncrest/SDNCEvent.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/sdncrest/SDNCEvent.java
index 3dbeaef17f..7d6aebdf16 100644
--- a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/sdncrest/SDNCEvent.java
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/sdncrest/SDNCEvent.java
@@ -8,9 +8,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -18,7 +18,8 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.sdncrest;
+
+package org.onap.so.adapters.sdncrest;
import java.io.IOException;
import java.io.Serializable;
@@ -28,7 +29,7 @@ import java.util.Map;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
-import org.openecomp.mso.logger.MsoLogger;
+import org.onap.so.logger.MsoLogger;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
@@ -42,7 +43,7 @@ import com.fasterxml.jackson.databind.SerializationFeature;
// is also required in this environment.
/**
- Map<String, String> elements when marshalled to XML produce a list of <entry><key>${key}</key><value>${value}</value></entry> elements.
+ Map<String, String> elements when marshalled to XML produce a list of <entry><key>${MsoUtils.xmlEscape(key)}</key><value>${MsoUtils.xmlEscape(value)}</value></entry> elements.
When marshalling to JSON they create a list of "${key}" : "${value}" pairs with no extra wrappers.
* </pre>
*/
@@ -52,7 +53,7 @@ import com.fasterxml.jackson.databind.SerializationFeature;
public class SDNCEvent implements Serializable {
private static final long serialVersionUID = 1L;
- private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
+ private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA, SDNCEvent.class);
// Event type
private String eventType;
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/sdncrest/SDNCRequestCommon.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/sdncrest/SDNCRequestCommon.java
index e1ee9894e2..9ddf55cc21 100644
--- a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/sdncrest/SDNCRequestCommon.java
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/sdncrest/SDNCRequestCommon.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -17,14 +17,15 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.sdncrest;
+
+package org.onap.so.adapters.sdncrest;
import java.io.IOException;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlElement;
-import org.openecomp.mso.logger.MsoLogger;
+import org.onap.so.logger.MsoLogger;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
@@ -38,7 +39,7 @@ import com.fasterxml.jackson.databind.SerializationFeature;
public abstract class SDNCRequestCommon implements Serializable {
private static final long serialVersionUID = 1L;
- private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
+ private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA, SDNCRequestCommon.class);
// Endpoint on which BPMN can receive notifications from the SDNC adapter.
private String bpNotificationUrl;
@@ -85,12 +86,12 @@ public abstract class SDNCRequestCommon implements Serializable {
@JsonProperty("sdncRequestId")
@XmlElement(name = "sdncRequestId")
- public String getSDNCRequestId() {
+ public String getSdncRequestId() {
return sdncRequestId;
}
@JsonProperty("sdncRequestId")
- public void setSDNCRequestId(String sdncRequestId) {
+ public void setSdncRequestId(String sdncRequestId) {
this.sdncRequestId = sdncRequestId;
}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/sdncrest/SDNCResponseCommon.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/sdncrest/SDNCResponseCommon.java
index 7265d67923..2da94017ca 100644
--- a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/sdncrest/SDNCResponseCommon.java
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/sdncrest/SDNCResponseCommon.java
@@ -8,9 +8,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -18,14 +18,15 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.sdncrest;
+
+package org.onap.so.adapters.sdncrest;
import java.io.IOException;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlElement;
-import org.openecomp.mso.logger.MsoLogger;
+import org.onap.so.logger.MsoLogger;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -38,7 +39,7 @@ import com.fasterxml.jackson.databind.SerializationFeature;
public abstract class SDNCResponseCommon implements Serializable {
private static final long serialVersionUID = 1L;
- private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
+ private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA, SDNCResponseCommon.class);
// Identifies the MSO transaction with SDNC.
private String sdncRequestId;
@@ -66,12 +67,12 @@ public abstract class SDNCResponseCommon implements Serializable {
@JsonProperty("sdncRequestId")
@XmlElement(name = "sdncRequestId")
- public String getSDNCRequestId() {
+ public String getSdncRequestId() {
return sdncRequestId;
}
@JsonProperty("sdncRequestId")
- public void setSDNCRequestId(String sdncRequestId) {
+ public void setSdncRequestId(String sdncRequestId) {
this.sdncRequestId = sdncRequestId;
}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/sdncrest/SDNCServiceError.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/sdncrest/SDNCServiceError.java
index 8d693e932a..fdb735891c 100644
--- a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/sdncrest/SDNCServiceError.java
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/sdncrest/SDNCServiceError.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -17,7 +17,8 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.sdncrest;
+
+package org.onap.so.adapters.sdncrest;
import java.io.Serializable;
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/sdncrest/SDNCServiceRequest.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/sdncrest/SDNCServiceRequest.java
index a21585764f..b271af2f9b 100644
--- a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/sdncrest/SDNCServiceRequest.java
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/sdncrest/SDNCServiceRequest.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -17,10 +17,14 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.sdncrest;
+
+package org.onap.so.adapters.sdncrest;
import java.io.Serializable;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@@ -59,7 +63,7 @@ public class SDNCServiceRequest extends SDNCRequestCommon implements Serializabl
private String sdncServiceDataType;
// The SDNC service data specified by SDNC "agnostic" API
- private String sndcServiceData;
+ private String sdncServiceData;
public SDNCServiceRequest() {
}
@@ -75,7 +79,7 @@ public class SDNCServiceRequest extends SDNCRequestCommon implements Serializabl
this.sdncService = sdncService;
this.sdncOperation = sdncOperation;
this.sdncServiceDataType = sdncServiceDataType;
- this.sndcServiceData = sndcServiceData;
+ this.sdncServiceData = sndcServiceData;
}
@JsonProperty("requestInformation")
@@ -102,45 +106,45 @@ public class SDNCServiceRequest extends SDNCRequestCommon implements Serializabl
@JsonProperty("sdncService")
@XmlElement(name = "sdncService")
- public String getSDNCService() {
+ public String getSdncService() {
return sdncService;
}
@JsonProperty("sdncService")
- public void setSDNCService(String sdncService) {
+ public void setSdncService(String sdncService) {
this.sdncService = sdncService;
}
@JsonProperty("sdncOperation")
@XmlElement(name = "sdncOperation")
- public String getSDNCOperation() {
+ public String getSdncOperation() {
return sdncOperation;
}
@JsonProperty("sdncOperation")
- public void setSDNCOperation(String sdncOperation) {
+ public void setSdncOperation(String sdncOperation) {
this.sdncOperation = sdncOperation;
}
@JsonProperty("sdncServiceDataType")
@XmlElement(name = "sdncServiceDataType")
- public String getSDNCServiceDataType() {
+ public String getSdncServiceDataType() {
return sdncServiceDataType;
}
@JsonProperty("sdncServiceDataType")
- public void setSDNCServiceDataType(String sdncServiceDataType) {
+ public void setSdncServiceDataType(String sdncServiceDataType) {
this.sdncServiceDataType = sdncServiceDataType;
}
@JsonProperty("sdncServiceData")
@XmlElement(name = "sdncServiceData")
- public String getSDNCServiceData() {
- return sndcServiceData;
+ public String getSdncServiceData() {
+ return sdncServiceData;
}
@JsonProperty("sdncServiceData")
- public void setSDNCServiceData(String sndcServiceData) {
- this.sndcServiceData = sndcServiceData;
+ public void setSdncServiceData(String sndcServiceData) {
+ this.sdncServiceData = sndcServiceData;
}
} \ No newline at end of file
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/sdncrest/SDNCServiceResponse.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/sdncrest/SDNCServiceResponse.java
index c74fb08972..18c9d49939 100644
--- a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/sdncrest/SDNCServiceResponse.java
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/sdncrest/SDNCServiceResponse.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -17,7 +17,8 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.sdncrest;
+
+package org.onap.so.adapters.sdncrest;
import java.io.Serializable;
import java.util.LinkedHashMap;
@@ -36,7 +37,7 @@ import com.fasterxml.jackson.annotation.JsonRootName;
// is also required in this environment.
/**
- Map<String, String> elements when marshalled to XML produce a list of <entry><key>${key}</key><value>${value}</value></entry> elements.
+ Map<String, String> elements when marshalled to XML produce a list of <entry><key>${MsoUtils.xmlEscape(key)}</key><value>${MsoUtils.xmlEscape(value)}</value></entry> elements.
When marshalling to JSON they create a list of "${key}" : "${value}" pairs with no extra wrappers.
* </pre>
*/
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/sdncrest/ServiceInformation.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/sdncrest/ServiceInformation.java
index 1cdea6518a..b4fe26ac00 100644
--- a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/sdncrest/ServiceInformation.java
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/sdncrest/ServiceInformation.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -17,13 +17,15 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.sdncrest;
-import com.fasterxml.jackson.annotation.JsonProperty;
+package org.onap.so.adapters.sdncrest;
-import javax.xml.bind.annotation.XmlElement;
import java.io.Serializable;
+import javax.xml.bind.annotation.XmlElement;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
/**
* Service Information specified by the SDNC "agnostic" API.
*/
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/onap/so/adapters/tenantrest/CreateTenantError.java
index 38fb4ac3f8..34da8c6292 100644
--- 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/onap/so/adapters/tenantrest/CreateTenantError.java
@@ -18,13 +18,15 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.tenantrest;
+package org.onap.so.adapters.tenantrest;
import java.io.Serializable;
+
import javax.xml.bind.annotation.XmlRootElement;
-import org.openecomp.mso.openstack.exceptions.MsoExceptionCategory;
+
+import org.onap.so.openstack.exceptions.MsoExceptionCategory;
@XmlRootElement(name = "createTenantError")
public class CreateTenantError implements Serializable {
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/onap/so/adapters/tenantrest/CreateTenantRequest.java
index 227e58338d..d52e714f70 100644
--- 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/onap/so/adapters/tenantrest/CreateTenantRequest.java
@@ -18,15 +18,17 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.tenantrest;
+package org.onap.so.adapters.tenantrest;
-import org.openecomp.mso.entity.MsoRequest;
-import java.util.Map;
import java.util.HashMap;
+import java.util.Map;
+
import javax.xml.bind.annotation.XmlRootElement;
+import org.onap.so.entity.MsoRequest;
+
@XmlRootElement(name = "createTenantRequest")
public class CreateTenantRequest extends TenantRequestCommon {
private String cloudSiteId;
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/onap/so/adapters/tenantrest/CreateTenantResponse.java
index f091a22bcb..ec304cec41 100644
--- 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/onap/so/adapters/tenantrest/CreateTenantResponse.java
@@ -18,11 +18,12 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.tenantrest;
+package org.onap.so.adapters.tenantrest;
import java.io.Serializable;
+
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement(name = "createTenantResponse")
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/onap/so/adapters/tenantrest/DeleteTenantError.java
index 17af950f3f..d2c22e8506 100644
--- 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/onap/so/adapters/tenantrest/DeleteTenantError.java
@@ -18,13 +18,15 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.tenantrest;
+package org.onap.so.adapters.tenantrest;
import java.io.Serializable;
+
import javax.xml.bind.annotation.XmlRootElement;
-import org.openecomp.mso.openstack.exceptions.MsoExceptionCategory;
+
+import org.onap.so.openstack.exceptions.MsoExceptionCategory;
@XmlRootElement(name = "deleteTenantError")
public class DeleteTenantError implements Serializable {
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/onap/so/adapters/tenantrest/DeleteTenantRequest.java
index 47761ce086..a39b7164e2 100644
--- 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/onap/so/adapters/tenantrest/DeleteTenantRequest.java
@@ -18,13 +18,14 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.tenantrest;
+package org.onap.so.adapters.tenantrest;
-import org.openecomp.mso.entity.MsoRequest;
import javax.xml.bind.annotation.XmlRootElement;
+import org.onap.so.entity.MsoRequest;
+
@XmlRootElement(name = "deleteTenantRequest")
public class DeleteTenantRequest extends TenantRequestCommon {
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/onap/so/adapters/tenantrest/DeleteTenantResponse.java
index 9c18734a17..e7961d4607 100644
--- 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/onap/so/adapters/tenantrest/DeleteTenantResponse.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.tenantrest;
+package org.onap.so.adapters.tenantrest;
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/onap/so/adapters/tenantrest/QueryTenantError.java
index 1347f78fbe..10f4b70a07 100644
--- 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/onap/so/adapters/tenantrest/QueryTenantError.java
@@ -18,13 +18,15 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.tenantrest;
+package org.onap.so.adapters.tenantrest;
import java.io.Serializable;
+
import javax.xml.bind.annotation.XmlRootElement;
-import org.openecomp.mso.openstack.exceptions.MsoExceptionCategory;
+
+import org.onap.so.openstack.exceptions.MsoExceptionCategory;
@XmlRootElement(name = "queryTenantError")
public class QueryTenantError implements Serializable {
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/onap/so/adapters/tenantrest/QueryTenantResponse.java
index 4d667b6a0e..8d478cd393 100644
--- 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/onap/so/adapters/tenantrest/QueryTenantResponse.java
@@ -18,11 +18,12 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.tenantrest;
+package org.onap.so.adapters.tenantrest;
import java.util.Map;
+
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement(name = "queryTenantResponse")
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/onap/so/adapters/tenantrest/RollbackTenantError.java
index af76d689fe..725b40549d 100644
--- 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/onap/so/adapters/tenantrest/RollbackTenantError.java
@@ -18,13 +18,15 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.tenantrest;
+package org.onap.so.adapters.tenantrest;
import java.io.Serializable;
+
import javax.xml.bind.annotation.XmlRootElement;
-import org.openecomp.mso.openstack.exceptions.MsoExceptionCategory;
+
+import org.onap.so.openstack.exceptions.MsoExceptionCategory;
@XmlRootElement(name = "rollbackTenantError")
public class RollbackTenantError implements Serializable {
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/onap/so/adapters/tenantrest/RollbackTenantRequest.java
index 7a67ffeaaa..d99150fc47 100644
--- 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/onap/so/adapters/tenantrest/RollbackTenantRequest.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.tenantrest;
+package org.onap.so.adapters.tenantrest;
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/onap/so/adapters/tenantrest/RollbackTenantResponse.java
index da329b8a29..25b77b3490 100644
--- 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/onap/so/adapters/tenantrest/RollbackTenantResponse.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.tenantrest;
+package org.onap.so.adapters.tenantrest;
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/onap/so/adapters/tenantrest/TenantExceptionResponse.java
index 930f46271b..f4dd7f9499 100644
--- 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/onap/so/adapters/tenantrest/TenantExceptionResponse.java
@@ -18,12 +18,16 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.tenantrest;
+package org.onap.so.adapters.tenantrest;
+
+
-import org.openecomp.mso.openstack.exceptions.MsoExceptionCategory;
import java.io.Serializable;
+
import javax.xml.bind.annotation.XmlRootElement;
+import org.onap.so.openstack.exceptions.MsoExceptionCategory;
+
@XmlRootElement(name = "createTenantResponse")
public class TenantExceptionResponse implements Serializable {
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/onap/so/adapters/tenantrest/TenantRequestCommon.java
index b00b98ef3e..168200e477 100644
--- 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/onap/so/adapters/tenantrest/TenantRequestCommon.java
@@ -19,21 +19,24 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.tenantrest;
+package org.onap.so.adapters.tenantrest;
import java.io.ByteArrayOutputStream;
+import java.io.Serializable;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.Marshaller;
+import org.onap.so.logger.MsoLogger;
+
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
-import org.openecomp.mso.logger.MsoLogger;
+public abstract class TenantRequestCommon implements Serializable {
-public class TenantRequestCommon {
- private static MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
+ private static final long serialVersionUID = 1486834308868170854L;
+ private static MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA, TenantRequestCommon.class);
public String toJsonString() {
try {
String jsonString;
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/onap/so/adapters/tenantrest/TenantRollback.java
index 27aab8d3ff..195628167e 100644
--- 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/onap/so/adapters/tenantrest/TenantRollback.java
@@ -18,13 +18,13 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.tenantrest;
+package org.onap.so.adapters.tenantrest;
import javax.xml.bind.annotation.XmlRootElement;
-import org.openecomp.mso.entity.MsoRequest;
+import org.onap.so.entity.MsoRequest;
/**
* Javabean representing the rollback criteria following a "Create Tenant"
@@ -36,6 +36,7 @@ import org.openecomp.mso.entity.MsoRequest;
@XmlRootElement(name = "rollbackTenantRequest")
public class TenantRollback extends TenantRequestCommon {
+ private static final long serialVersionUID = -4540810517355635993L;
private String tenantId;
private String cloudId;
private boolean tenantCreated = false;
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vdu/CloudInfo.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vdu/CloudInfo.java
new file mode 100644
index 0000000000..a56a6929a9
--- /dev/null
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vdu/CloudInfo.java
@@ -0,0 +1,69 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.adapters.vdu;
+
+/**
+ * Cloud information structure for deploying/managing a VDU. Includes the cloud site
+ * as well as tenant information within the site. Currently this is defined as a
+ * cloud site ID. which would map to a CloudConfig entry.
+ * Perhaps the CloudConfig entry itself should be provided, instead of requiring each
+ * plug-in to query it.
+ *
+ * The meaning of 'tenant' may differ by cloud provider, but every cloud supports some
+ * sort of tenant partitioning.
+ *
+ */
+public class CloudInfo {
+
+ private String cloudSiteId;
+ private String tenantId;
+ private String tenantName;//bpmn query and pass
+
+ public CloudInfo() {
+ }
+
+ public CloudInfo (String cloudSiteId, String tenantId, String tenantName) {
+ this.cloudSiteId = cloudSiteId;
+ this.tenantId = tenantId;
+ this.tenantName = tenantName;
+ }
+
+ 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 getTenantName() {
+ return tenantName;
+ }
+ public void setTenantName(String tenantName) {
+ this.tenantName = tenantName;
+ }
+
+
+} \ No newline at end of file
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vdu/PluginAction.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vdu/PluginAction.java
new file mode 100644
index 0000000000..1f097ddd68
--- /dev/null
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vdu/PluginAction.java
@@ -0,0 +1,63 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.adapters.vdu;
+
+/**
+ * Java beam representing a detailed action performed within a plugin during VDU
+ * orchestration. This allows the plugin to convey more detailed information about
+ * recent activities it has performed. It is primarily intended for logging and
+ * troubleshooting, so plugins are free to populate this as desired.
+ */
+public class PluginAction {
+
+ private String action;
+ private String status;
+ private String rawMessage;
+
+ public PluginAction () {
+ }
+
+ public PluginAction (String action, String status, String rawMessage) {
+ this.action = action;
+ this.status = status;
+ this.rawMessage = rawMessage;
+ }
+
+ public String getAction() {
+ return action;
+ }
+ public void setAction(String action) {
+ this.action = action;
+ }
+ public String getStatus() {
+ return status;
+ }
+ public void setStatus(String status) {
+ this.status = status;
+ }
+ public String getRawMessage() {
+ return rawMessage;
+ }
+ public void setRawMessage(String rawMessage) {
+ this.rawMessage = rawMessage;
+ }
+
+} \ No newline at end of file
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vdu/VduArtifact.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vdu/VduArtifact.java
new file mode 100644
index 0000000000..a53cd0ce49
--- /dev/null
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vdu/VduArtifact.java
@@ -0,0 +1,80 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.adapters.vdu;
+
+import java.util.Arrays;
+import java.util.Objects;
+
+public class VduArtifact {
+
+ // Enumerate the types of artifacts permitted. This may need to be a variable string
+ // value if arbitrary (cloud-specific) artifacts may be attached to VDUs in ASDC.
+ public enum ArtifactType {
+ MAIN_TEMPLATE, NESTED_TEMPLATE, CONFIG_FILE, SCRIPT_FILE, TEXT_FILE, ENVIRONMENT
+ }
+
+ private String name;
+ private byte[] content;
+ private ArtifactType type;
+
+ // Default constructor
+ public VduArtifact() {}
+
+ // Fully specified constructor
+ public VduArtifact (String name, byte[] content, ArtifactType type) {
+ this.name = name;
+ this.content = content;
+ this.type = type;
+ }
+
+ public String getName() {
+ return name;
+ }
+ public void setName (String name) {
+ this.name = name;
+ }
+ public byte[] getContent() {
+ return content;
+ }
+ public void setContent(byte[] content) {
+ this.content = content;
+ }
+ public ArtifactType getType() {
+ return type;
+ }
+ public void setType(ArtifactType type) {
+ this.type = type;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ VduArtifact that = (VduArtifact) o;
+ return Objects.equals(name, that.name) &&
+ Arrays.equals(content, that.content) &&
+ type == that.type;
+ }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vdu/VduException.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vdu/VduException.java
new file mode 100644
index 0000000000..c611b87e5c
--- /dev/null
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vdu/VduException.java
@@ -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.onap.so.adapters.vdu;
+
+import org.onap.so.openstack.exceptions.MsoException;
+import org.onap.so.openstack.exceptions.MsoExceptionCategory;
+
+/**
+ * OpenStack exception.
+ */
+public class VduException extends MsoException
+{
+
+ /**
+ * Serialization id.
+ */
+ private static final long serialVersionUID = 3313636124141766495L;
+
+ /**
+ * Constructor to create a new VduException instance
+ * @param detail error details
+ */
+ public VduException (String detail) {
+ // Set the detailed error as the Exception 'message'
+ super(detail);
+ // TODO: Need a more generic category than OPENSTACK
+ super.category = MsoExceptionCategory.OPENSTACK;
+ }
+
+ /**
+ * Constructor to create a new VduException instance
+ * @param detail error details
+ * @param e the cause
+ */
+ public VduException (String detail, Exception e) {
+ // Set the detailed error as the Exception 'message'
+ super(detail, e);
+ // TODO: Need a more generic category than OPENSTACK
+ super.category = MsoExceptionCategory.OPENSTACK;
+ }
+
+} \ No newline at end of file
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vdu/VduInstance.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vdu/VduInstance.java
new file mode 100644
index 0000000000..8f5f0f9745
--- /dev/null
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vdu/VduInstance.java
@@ -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.onap.so.adapters.vdu;
+
+import java.util.Map;
+import java.util.HashMap;
+
+/*
+ * This Java bean class relays VDU status information in a cloud-agnostic format.
+ *
+ * This bean is returned by all implementors of the VduPlugin interface operations
+ * (instantiate, query, delete).
+ */
+
+public class VduInstance {
+ // Set defaults for everything
+ protected String vduInstanceId;
+ protected String vduInstanceName;
+ protected VduStatus status;
+ protected Map<String, Object> outputs = new HashMap<>();
+ protected Map<String, Object> inputs = new HashMap<>();
+
+ public String getVduInstanceId() {
+ return vduInstanceId;
+ }
+
+ public void setVduInstanceId(String vduInstanceId) {
+ this.vduInstanceId = vduInstanceId;
+ }
+
+ public String getVduInstanceName() {
+ return vduInstanceName;
+ }
+
+ public void setVduInstanceName(String vduInstanceName) {
+ this.vduInstanceName = vduInstanceName;
+ }
+
+ public VduStatus getStatus() {
+ return status;
+ }
+
+ public void setStatus(VduStatus status) {
+ this.status = status;
+ }
+
+ public Map<String, Object> getOutputs() {
+ return outputs;
+ }
+
+ public void setOutputs(Map<String, Object> outputs) {
+ this.outputs = outputs;
+ }
+
+ public Map<String, Object> getInputs() {
+ return inputs;
+ }
+
+ public void setInputs(Map<String, Object> inputs) {
+ this.inputs = inputs;
+ }
+} \ No newline at end of file
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vdu/VduModelInfo.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vdu/VduModelInfo.java
new file mode 100644
index 0000000000..47f4c74aae
--- /dev/null
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vdu/VduModelInfo.java
@@ -0,0 +1,50 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.adapters.vdu;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class VduModelInfo {
+ private String modelCustomizationUUID;
+ private int timeoutMinutes;
+ private List<VduArtifact> artifacts = new ArrayList<>();
+
+ public String getModelCustomizationUUID() {
+ return modelCustomizationUUID;
+ }
+ public void setModelCustomizationUUID(String modelCustomizationUUID) {
+ this.modelCustomizationUUID = modelCustomizationUUID;
+ }
+ public int getTimeoutMinutes() {
+ return timeoutMinutes;
+ }
+ public void setTimeoutMinutes(int timeoutMinutes) {
+ this.timeoutMinutes = timeoutMinutes;
+ }
+ public List<VduArtifact> getArtifacts() {
+ return artifacts;
+ }
+ public void setArtifacts(List<VduArtifact> artifacts) {
+ this.artifacts = artifacts;
+ }
+
+} \ No newline at end of file
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vdu/VduStateType.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vdu/VduStateType.java
new file mode 100644
index 0000000000..0b95b392f6
--- /dev/null
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vdu/VduStateType.java
@@ -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.onap.so.adapters.vdu;
+
+
+/*
+ * Enum status values to capture the state of a generic (cloud-agnostic) VDU.
+ */
+public enum VduStateType {
+ NOTFOUND,
+ INSTANTIATING,
+ INSTANTIATED,
+ DELETING,
+ DELETED, // Note - only returned in success response to deleteVdu call.
+ UPDATING,
+ FAILED,
+ UNKNOWN
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vdu/VduStatus.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vdu/VduStatus.java
new file mode 100644
index 0000000000..7797c997a5
--- /dev/null
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/adapters/vdu/VduStatus.java
@@ -0,0 +1,58 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.adapters.vdu;
+
+public class VduStatus {
+
+ private VduStateType state;
+ private String errorMessage;
+ private PluginAction lastAction;
+
+ public VduStatus(){}
+ public VduStatus( VduStateType state) {
+ this.state = state;
+ }
+ public VduStateType getState() {
+ return state;
+ }
+ public void setState(VduStateType state) {
+ this.state = state;
+ }
+ public String getErrorMessage() {
+ return errorMessage;
+ }
+ public void setErrorMessage(String errorMessage) {
+ this.errorMessage = errorMessage;
+ }
+ public PluginAction getLastAction() {
+ return lastAction;
+ }
+ public void setLastAction(PluginAction lastAction) {
+ this.lastAction = lastAction;
+ }
+ public void setLastAction (String action, String status, String rawCloudMessage) {
+ lastAction = new PluginAction();
+ lastAction.setAction (action);
+ lastAction.setStatus (status);
+ lastAction.setRawMessage(rawCloudMessage);
+ }
+
+} \ No newline at end of file
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/onap/so/adapters/vnfrest/CreateVfModuleRequest.java
index dac09d4cd1..d0caef33e4 100644
--- 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/onap/so/adapters/vnfrest/CreateVfModuleRequest.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -18,21 +18,19 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.vnfrest;
-
+package org.onap.so.adapters.vnfrest;
import java.util.HashMap;
import java.util.Map;
import javax.xml.bind.annotation.XmlRootElement;
-import org.openecomp.mso.entity.MsoRequest;
+import org.onap.so.entity.MsoRequest;
import com.fasterxml.jackson.annotation.JsonRootName;
-
/* README
- Map<String, String> elements when marshalled to XML produce a list of <entry><key>${key}</key><value>${value}</value></entry> elements.
+ Map<String, String> elements when marshalled to XML produce a list of <entry><key>${MsoUtils.xmlEscape(key)}</key><value>${MsoUtils.xmlEscape(value)}</value></entry> elements.
When marshalling to JSON they create a list of "${key}" : "${value}" pairs with no extra wrappers.
*/
@JsonRootName("createVfModuleRequest")
@@ -58,8 +56,9 @@ public class CreateVfModuleRequest extends VfRequestCommon {
private String requestType;
private Boolean failIfExists;
private Boolean backout;
+ private Boolean enableBridge;
- private Map<String,String> vfModuleParams = new HashMap<>();
+ private Map<String, String> vfModuleParams = new HashMap<>();
private MsoRequest msoRequest = new MsoRequest();
public String getCloudSiteId() {
@@ -205,4 +204,12 @@ public class CreateVfModuleRequest extends VfRequestCommon {
public void setMsoRequest(MsoRequest msoRequest) {
this.msoRequest = msoRequest;
}
+
+ public Boolean getEnableBridge() {
+ return this.enableBridge;
+ }
+
+ public void setEnableBridge(Boolean enableBridge) {
+ this.enableBridge = enableBridge;
+ }
}
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/onap/so/adapters/vnfrest/CreateVfModuleResponse.java
index 70c9535a32..b9d1f4c376 100644
--- 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/onap/so/adapters/vnfrest/CreateVfModuleResponse.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.vnfrest;
+package org.onap.so.adapters.vnfrest;
import java.util.HashMap;
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/onap/so/adapters/vnfrest/CreateVolumeGroupRequest.java
index 2c684e0aa4..698b2ccebe 100644
--- 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/onap/so/adapters/vnfrest/CreateVolumeGroupRequest.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.vnfrest;
+package org.onap.so.adapters.vnfrest;
import java.util.HashMap;
@@ -26,7 +26,7 @@ import java.util.Map;
import javax.xml.bind.annotation.XmlRootElement;
-import org.openecomp.mso.entity.MsoRequest;
+import org.onap.so.entity.MsoRequest;
import com.fasterxml.jackson.annotation.JsonRootName;
@@ -43,6 +43,7 @@ public class CreateVolumeGroupRequest extends VfRequestCommon {
private String modelCustomizationUuid;
private Map<String,String> volumeGroupParams = new HashMap<>();
private Boolean failIfExists;
+ private Boolean enableBridge;
private Boolean suppressBackout;
private MsoRequest msoRequest = new MsoRequest();
@@ -145,4 +146,12 @@ public class CreateVolumeGroupRequest extends VfRequestCommon {
public void setMsoRequest(MsoRequest msoRequest) {
this.msoRequest = msoRequest;
}
+
+ public Boolean getEnableBridge() {
+ return enableBridge;
+ }
+
+ public void setEnableBridge(Boolean enableBridge) {
+ this.enableBridge = enableBridge;
+ }
}
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/onap/so/adapters/vnfrest/CreateVolumeGroupResponse.java
index 18a348aa05..d98318d3e6 100644
--- 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/onap/so/adapters/vnfrest/CreateVolumeGroupResponse.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.vnfrest;
+package org.onap.so.adapters.vnfrest;
import java.util.HashMap;
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/onap/so/adapters/vnfrest/DeleteVfModuleRequest.java
index b2b602ae33..6ce9b2fa4c 100644
--- 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/onap/so/adapters/vnfrest/DeleteVfModuleRequest.java
@@ -18,18 +18,24 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.vnfrest;
+package org.onap.so.adapters.vnfrest;
+import java.io.Serializable;
+
import javax.xml.bind.annotation.XmlRootElement;
-import org.openecomp.mso.entity.MsoRequest;
+import org.onap.so.entity.MsoRequest;
import com.fasterxml.jackson.annotation.JsonRootName;
@JsonRootName("deleteVfModuleRequest")
@XmlRootElement(name = "deleteVfModuleRequest")
-public class DeleteVfModuleRequest extends VfRequestCommon {
+public class DeleteVfModuleRequest extends VfRequestCommon implements Serializable {
+ /**
+ *
+ */
+ private static final long serialVersionUID = -8504083539107392561L;
private String cloudSiteId;
private String tenantId;
private String vnfId;
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/onap/so/adapters/vnfrest/DeleteVfModuleResponse.java
index db04d5b20c..ca713d36a0 100644
--- 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/onap/so/adapters/vnfrest/DeleteVfModuleResponse.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.vnfrest;
+package org.onap.so.adapters.vnfrest;
import java.util.HashMap;
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/onap/so/adapters/vnfrest/DeleteVolumeGroupRequest.java
index fc600e2d75..d17c5dd0de 100644
--- 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/onap/so/adapters/vnfrest/DeleteVolumeGroupRequest.java
@@ -18,14 +18,15 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.vnfrest;
+package org.onap.so.adapters.vnfrest;
import javax.xml.bind.annotation.XmlRootElement;
-import org.openecomp.mso.entity.MsoRequest;
+import org.onap.so.entity.MsoRequest;
import com.fasterxml.jackson.annotation.JsonRootName;
+import org.apache.commons.lang3.builder.ToStringBuilder;
@JsonRootName("deleteVolumeGroupRequest")
@XmlRootElement(name = "deleteVolumeGroupRequest")
@@ -79,4 +80,11 @@ public class DeleteVolumeGroupRequest extends VfRequestCommon {
public void setMsoRequest(MsoRequest msoRequest) {
this.msoRequest = msoRequest;
}
+
+ @Override
+ public String toString() {
+ return new ToStringBuilder(this).appendSuper(super.toString()).append("cloudSiteId", cloudSiteId)
+ .append("tenantId", tenantId).append("volumeGroupId", volumeGroupId)
+ .append("volumeGroupStackId", volumeGroupStackId).append("msoRequest", msoRequest).toString();
+ }
}
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/onap/so/adapters/vnfrest/DeleteVolumeGroupResponse.java
index 553cc0e8e0..4a7442108a 100644
--- 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/onap/so/adapters/vnfrest/DeleteVolumeGroupResponse.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.vnfrest;
+package org.onap.so.adapters.vnfrest;
import javax.xml.bind.annotation.XmlRootElement;
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/onap/so/adapters/vnfrest/QueryVfModuleResponse.java
index 222644ca1c..0214d15ee8 100644
--- 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/onap/so/adapters/vnfrest/QueryVfModuleResponse.java
@@ -19,21 +19,21 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.vnfrest;
+package org.onap.so.adapters.vnfrest;
import java.util.Map;
import javax.xml.bind.annotation.XmlRootElement;
-import org.openecomp.mso.logger.MsoLogger;
-import org.openecomp.mso.openstack.beans.VnfStatus;
+import org.onap.so.logger.MsoLogger;
+import org.onap.so.openstack.beans.VnfStatus;
import com.fasterxml.jackson.annotation.JsonRootName;
@JsonRootName("queryVfModuleResponse")
@XmlRootElement(name = "queryVfModuleResponse")
public class QueryVfModuleResponse extends VfResponseCommon{
- private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
+ private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA, QueryVfModuleResponse.class);
private String vnfId;
private String vfModuleId;
private String vfModuleStackId;
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/onap/so/adapters/vnfrest/QueryVolumeGroupResponse.java
index 41226c3696..6e8027c689 100644
--- 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/onap/so/adapters/vnfrest/QueryVolumeGroupResponse.java
@@ -19,22 +19,22 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.vnfrest;
+package org.onap.so.adapters.vnfrest;
import java.util.Map;
import javax.xml.bind.annotation.XmlRootElement;
-import org.openecomp.mso.logger.MsoLogger;
-import org.openecomp.mso.openstack.beans.VnfStatus;
+import org.onap.so.logger.MsoLogger;
+import org.onap.so.openstack.beans.VnfStatus;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
@XmlRootElement(name = "queryVolumeGroupResponse")
public class QueryVolumeGroupResponse {
- private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
+ private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA, QueryVolumeGroupResponse.class);
private String volumeGroupId;
private String volumeGroupStackId;
private VnfStatus volumeGroupStatus;
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/onap/so/adapters/vnfrest/RollbackVfModuleRequest.java
index aa9b35bb98..4ad7a7a417 100644
--- 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/onap/so/adapters/vnfrest/RollbackVfModuleRequest.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.vnfrest;
+package org.onap.so.adapters.vnfrest;
import javax.xml.bind.annotation.XmlRootElement;
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/onap/so/adapters/vnfrest/RollbackVfModuleResponse.java
index c77155fe81..43db90c566 100644
--- 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/onap/so/adapters/vnfrest/RollbackVfModuleResponse.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.vnfrest;
+package org.onap.so.adapters.vnfrest;
import javax.xml.bind.annotation.XmlRootElement;
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/onap/so/adapters/vnfrest/RollbackVolumeGroupRequest.java
index d7f49fd530..14c2c2a3d9 100644
--- 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/onap/so/adapters/vnfrest/RollbackVolumeGroupRequest.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.vnfrest;
+package org.onap.so.adapters.vnfrest;
import javax.xml.bind.annotation.XmlRootElement;
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/onap/so/adapters/vnfrest/RollbackVolumeGroupResponse.java
index 22164d9508..46ac26825c 100644
--- 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/onap/so/adapters/vnfrest/RollbackVolumeGroupResponse.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.vnfrest;
+package org.onap.so.adapters.vnfrest;
import javax.xml.bind.annotation.XmlRootElement;
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/onap/so/adapters/vnfrest/UpdateVfModuleRequest.java
index c52cc60b35..0fb5c05e2a 100644
--- 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/onap/so/adapters/vnfrest/UpdateVfModuleRequest.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.vnfrest;
+package org.onap.so.adapters.vnfrest;
import java.util.HashMap;
@@ -26,7 +26,7 @@ import java.util.Map;
import javax.xml.bind.annotation.XmlRootElement;
-import org.openecomp.mso.entity.MsoRequest;
+import org.onap.so.entity.MsoRequest;
import com.fasterxml.jackson.annotation.JsonRootName;
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/onap/so/adapters/vnfrest/UpdateVfModuleResponse.java
index aa9a3aad31..4504bf3461 100644
--- 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/onap/so/adapters/vnfrest/UpdateVfModuleResponse.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.vnfrest;
+package org.onap.so.adapters.vnfrest;
import java.util.HashMap;
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/onap/so/adapters/vnfrest/UpdateVolumeGroupRequest.java
index 983e81602c..d9f83aad2f 100644
--- 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/onap/so/adapters/vnfrest/UpdateVolumeGroupRequest.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.vnfrest;
+package org.onap.so.adapters.vnfrest;
import java.util.HashMap;
@@ -26,7 +26,7 @@ import java.util.Map;
import javax.xml.bind.annotation.XmlRootElement;
-import org.openecomp.mso.entity.MsoRequest;
+import org.onap.so.entity.MsoRequest;
import com.fasterxml.jackson.annotation.JsonRootName;
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/onap/so/adapters/vnfrest/UpdateVolumeGroupResponse.java
index d71ef275e1..8c003b1835 100644
--- 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/onap/so/adapters/vnfrest/UpdateVolumeGroupResponse.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.vnfrest;
+package org.onap.so.adapters.vnfrest;
import java.util.HashMap;
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/onap/so/adapters/vnfrest/VfModuleExceptionResponse.java
index 6416d2df5e..4f53531585 100644
--- 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/onap/so/adapters/vnfrest/VfModuleExceptionResponse.java
@@ -18,14 +18,14 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.vnfrest;
+package org.onap.so.adapters.vnfrest;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlRootElement;
-import org.openecomp.mso.openstack.exceptions.MsoExceptionCategory;
+import org.onap.so.openstack.exceptions.MsoExceptionCategory;
@XmlRootElement(name = "vfModuleException")
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/onap/so/adapters/vnfrest/VfModuleRollback.java
index 59bd5020d2..0e716e5924 100644
--- 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/onap/so/adapters/vnfrest/VfModuleRollback.java
@@ -18,13 +18,13 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.vnfrest;
+package org.onap.so.adapters.vnfrest;
import javax.xml.bind.annotation.XmlRootElement;
-import org.openecomp.mso.entity.MsoRequest;
-import org.openecomp.mso.openstack.beans.VnfRollback;
+import org.onap.so.entity.MsoRequest;
+import org.onap.so.openstack.beans.VnfRollback;
import com.fasterxml.jackson.annotation.JsonRootName;
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/onap/so/adapters/vnfrest/VfRequestCommon.java
index aa6af56082..f934bc63d8 100644
--- 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/onap/so/adapters/vnfrest/VfRequestCommon.java
@@ -19,7 +19,9 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.vnfrest;
+package org.onap.so.adapters.vnfrest;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
/**
@@ -49,5 +51,11 @@ public abstract class VfRequestCommon extends VfResponseCommon {
return notificationUrl == null || notificationUrl.isEmpty();
}
+ @Override
+ public String toString() {
+ return new ToStringBuilder(this).append("skipAAI", skipAAI).append("notificationUrl", notificationUrl)
+ .toString();
+ }
+
// 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/onap/so/adapters/vnfrest/VfResponseCommon.java
index 4f55c5a615..2828ac3d43 100644
--- 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/onap/so/adapters/vnfrest/VfResponseCommon.java
@@ -19,7 +19,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.vnfrest;
+package org.onap.so.adapters.vnfrest;
import java.io.ByteArrayOutputStream;
@@ -27,7 +27,7 @@ import java.io.ByteArrayOutputStream;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.Marshaller;
-import org.openecomp.mso.logger.MsoLogger;
+import org.onap.so.logger.MsoLogger;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
@@ -37,7 +37,7 @@ import com.fasterxml.jackson.databind.SerializationFeature;
* except for QueryVfModuleResponse and QueryVolumeGroupResponse.
*/
public abstract class VfResponseCommon {
- private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
+ private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA, VfResponseCommon.class);
private String messageId;
public VfResponseCommon() {
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/onap/so/adapters/vnfrest/VolumeGroupExceptionResponse.java
index 4c3a0a6d60..2e5801b4ae 100644
--- 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/onap/so/adapters/vnfrest/VolumeGroupExceptionResponse.java
@@ -18,12 +18,12 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.vnfrest;
+package org.onap.so.adapters.vnfrest;
import javax.xml.bind.annotation.XmlRootElement;
-import org.openecomp.mso.openstack.exceptions.MsoExceptionCategory;
+import org.onap.so.openstack.exceptions.MsoExceptionCategory;
@XmlRootElement(name = "volumeGroupException")
public class VolumeGroupExceptionResponse extends VfModuleExceptionResponse {
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/onap/so/adapters/vnfrest/VolumeGroupRollback.java
index c815a7658c..2795ba0de3 100644
--- 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/onap/so/adapters/vnfrest/VolumeGroupRollback.java
@@ -18,12 +18,12 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.adapters.vnfrest;
+package org.onap.so.adapters.vnfrest;
import javax.xml.bind.annotation.XmlRootElement;
-import org.openecomp.mso.entity.MsoRequest;
+import org.onap.so.entity.MsoRequest;
import com.fasterxml.jackson.annotation.JsonRootName;
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/beans/HeatStatus.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/HeatStatus.java
index 8e223b7bcb..dd68d37736 100644
--- a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/beans/HeatStatus.java
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/HeatStatus.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.openstack.beans;
+package org.onap.so.openstack.beans;
/*
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/beans/HostRoute.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/HostRoute.java
index 4d9dc0009e..228bb2c03d 100644
--- a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/beans/HostRoute.java
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/HostRoute.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.openstack.beans;
+package org.onap.so.openstack.beans;
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/beans/MsoTenant.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/MsoTenant.java
index 5e037096df..b06ea0e59f 100644
--- a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/beans/MsoTenant.java
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/MsoTenant.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.openstack.beans;
+package org.onap.so.openstack.beans;
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/beans/NetworkInfo.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/NetworkInfo.java
index 64460b20bb..6110fa5073 100644
--- a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/beans/NetworkInfo.java
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/NetworkInfo.java
@@ -18,21 +18,19 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.openstack.beans;
+package org.onap.so.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 = "";
@@ -41,56 +39,15 @@ public class NetworkInfo {
private String provider = "";
private List<Integer> vlans = new ArrayList<>();
private List<String> subnets = new ArrayList<>();
+ private String shared = "";
- static Map<String,NetworkStatus> NetworkStatusMap;
- static {
- NetworkStatusMap = new HashMap<>();
- NetworkStatusMap.put("ACTIVE", NetworkStatus.ACTIVE);
- NetworkStatusMap.put("DOWN", NetworkStatus.DOWN);
- NetworkStatusMap.put("BUILD", NetworkStatus.BUILD);
- NetworkStatusMap.put("ERROR", NetworkStatus.ERROR);
- }
-
- /**
- * 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) {
- initFieldsWithDataFromNetwork(network);
- } else {
- status = NetworkStatus.NOTFOUND;
- }
- }
-
- private void initFieldsWithDataFromNetwork(Network network){
- name = network.getName();
- id = network.getId();
-
- if (network.getStatus() != null && NetworkStatusMap.containsKey(network.getStatus())) {
- status = NetworkStatusMap.get(network.getStatus());
- }
- if (network.getProviderPhysicalNetwork() != null) {
- provider = network.getProviderPhysicalNetwork();
- if ("vlan".equals(network.getProviderNetworkType())) {
- vlans.add(network.getProviderSegmentationId());
- }
- }
- else if (network.getSegments() != null && !network.getSegments().isEmpty()) {
- Segment s = network.getSegments().get(0);
- provider = s.getProviderPhysicalNetwork();
- if ("vlan".equals(s.getProviderNetworkType())) {
- network.getSegments().forEach(segment -> vlans.add(segment.getProviderSegmentationId()));
- }
- }
- subnets = network.getSubnets();
+ 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;
}
public String getName() {
@@ -137,6 +94,18 @@ public class NetworkInfo {
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 "NetworkInfo{" + "name='" + name + '\'' +
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/beans/NetworkRollback.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/NetworkRollback.java
index a965122921..e95c564f27 100644
--- a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/beans/NetworkRollback.java
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/NetworkRollback.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -18,12 +18,13 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.openstack.beans;
+package org.onap.so.openstack.beans;
+import java.io.Serializable;
import java.util.List;
-import org.openecomp.mso.entity.MsoRequest;
+import org.onap.so.entity.MsoRequest;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
@@ -40,7 +41,11 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include;
*
*/
@JsonInclude(Include.NON_EMPTY)
-public class NetworkRollback {
+public class NetworkRollback implements Serializable{
+ /**
+ *
+ */
+ private static final long serialVersionUID = 11949663223019185L;
private String networkId;
private String neutronNetworkId;
private String networkStackId;
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/beans/NetworkStatus.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/NetworkStatus.java
index 199028e56c..b7b1366562 100644
--- a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/beans/NetworkStatus.java
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/NetworkStatus.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.openstack.beans;
+package org.onap.so.openstack.beans;
/**
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/beans/Pool.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/Pool.java
index a3a04abc60..1c82907f80 100644
--- a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/beans/Pool.java
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/Pool.java
@@ -18,19 +18,12 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.openstack.beans;
+package org.onap.so.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;
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/beans/RouteTarget.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/RouteTarget.java
index 7903b08ff9..fcea8796c2 100644
--- a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/beans/RouteTarget.java
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/RouteTarget.java
@@ -18,7 +18,9 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.openstack.beans;
+package org.onap.so.openstack.beans;
+
+import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
@@ -29,8 +31,12 @@ import javax.xml.bind.annotation.XmlType;
"routeTarget",
"routeTargetRole"
})
-public class RouteTarget {
+public class RouteTarget implements Serializable{
+ /**
+ *
+ */
+ private static final long serialVersionUID = 5425083030715789604L;
private String routeTarget;
private String routeTargetRole;
@@ -43,7 +49,7 @@ public class RouteTarget {
public String getRouteTargetRole() {
return routeTargetRole;
}
- public void setRole(String routeTargetRole) {
+ public void setRouteTargetRole(String routeTargetRole) {
this.routeTargetRole = routeTargetRole;
}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/beans/StackInfo.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/StackInfo.java
index e88b5f87a0..028ec9ec8d 100644
--- a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/beans/StackInfo.java
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/StackInfo.java
@@ -18,13 +18,11 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.openstack.beans;
+package org.onap.so.openstack.beans;
-import java.util.Map;
import java.util.HashMap;
-
-import com.woorea.openstack.heat.model.Stack;
+import java.util.Map;
/*
* This Java bean class relays Heat stack status information to ActiveVOS processes.
@@ -40,20 +38,6 @@ public class StackInfo {
private String statusMessage = "";
private Map<String,Object> outputs = new HashMap<>();
private Map<String,Object> parameters = new HashMap<>();
-
- static Map<String,HeatStatus> HeatStatusMap;
- static {
- HeatStatusMap = new HashMap<>();
- 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 () {
}
@@ -73,36 +57,6 @@ public class StackInfo {
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 = HeatStatusMap.getOrDefault(stack.getStackStatus(), HeatStatus.UNKNOWN);
- }
-
- this.statusMessage = stack.getStackStatusReason();
-
- if (stack.getOutputs() != null) {
- this.outputs = new HashMap<>();
- for (Stack.Output output : stack.getOutputs()) {
- this.outputs.put(output.getOutputKey(), output.getOutputValue());
- }
- }
-
- this.parameters = stack.getParameters();
- }
-
public String getName() {
return name;
}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/beans/Subnet.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/Subnet.java
index 086395cc93..3213323101 100644
--- a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/beans/Subnet.java
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/Subnet.java
@@ -18,15 +18,21 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.openstack.beans;
+package org.onap.so.openstack.beans;
+import java.io.Serializable;
import java.util.List;
import javax.xml.bind.annotation.XmlTransient;
-public class Subnet {
+public class Subnet implements Serializable {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -530027355187604839L;
private String subnetName;
@@ -36,7 +42,7 @@ public class Subnet {
private String cidr; //Only field required
- private String gatewayIp="";
+ private String gatewayIp;
private String ipVersion="4";
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/beans/VnfRollback.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/VnfRollback.java
index c4f63138e0..ba7f6532e1 100644
--- a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/beans/VnfRollback.java
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/VnfRollback.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -18,9 +18,9 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.openstack.beans;
+package org.onap.so.openstack.beans;
-import org.openecomp.mso.entity.MsoRequest;
+import org.onap.so.entity.MsoRequest;
/**
* Javabean representing the rollback criteria following a "Create VNF"
* operation. This structure can be passed back to the "Rollback VNF"
@@ -79,7 +79,6 @@ public class VnfRollback {
}
/**
- * For backwards compatibility... orchestration mode defaults to HEAT
*
* @param vnfId
* @param tenantId
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/beans/VnfStatus.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/VnfStatus.java
index cc7e66eecb..9f1ae8813d 100644
--- a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/beans/VnfStatus.java
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/VnfStatus.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.openstack.beans;
+package org.onap.so.openstack.beans;
/*
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/exceptions/MsoAdapterException.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/exceptions/MsoAdapterException.java
index 454880cee1..31c4727934 100644
--- a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/exceptions/MsoAdapterException.java
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/exceptions/MsoAdapterException.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.openstack.exceptions;
+package org.onap.so.openstack.exceptions;
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/exceptions/MsoCloudIdentityNotFound.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/exceptions/MsoCloudIdentityNotFound.java
index 7e21d9d15a..31f3f6f7dd 100644
--- a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/exceptions/MsoCloudIdentityNotFound.java
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/exceptions/MsoCloudIdentityNotFound.java
@@ -18,24 +18,31 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.openstack.exceptions;
+package org.onap.so.openstack.exceptions;
+
/**
- * Signals that an attempt to find a specific mso cloud identity has failed.
+ * Cloud site not found exception.
*/
public class MsoCloudIdentityNotFound extends MsoException {
+ /**
+ * Serialization id.
+ */
private static final long serialVersionUID = 2583769056266415665L;
-
/**
* Default constructor (needed for BPEL/JAXB)
*/
public MsoCloudIdentityNotFound () {
super("Cloud Identity not found");
super.category=MsoExceptionCategory.USERDATA;
- }
-
+ }
+
+ /**
+ * Constructor to create a new MsoOpenstackException instance
+ * @param cloudSite the cloud site
+ */
public MsoCloudIdentityNotFound (String cloudIdentity) {
// Set the detailed error as the Exception 'message'
super("Cloud Identity [" + cloudIdentity + "] not found");
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/exceptions/MsoCloudSiteNotFound.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/exceptions/MsoCloudSiteNotFound.java
index 7c6e98d55f..ceb08d8ccb 100644
--- a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/exceptions/MsoCloudSiteNotFound.java
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/exceptions/MsoCloudSiteNotFound.java
@@ -18,13 +18,17 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.openstack.exceptions;
+package org.onap.so.openstack.exceptions;
+
/**
- * Signals that an attempt to find a specific mso cloud site has failed.
+ * Cloud site not found exception.
*/
public class MsoCloudSiteNotFound extends MsoException {
+ /**
+ * Serialization id.
+ */
private static final long serialVersionUID = 2583769056266415664L;
/**
@@ -34,7 +38,11 @@ public class MsoCloudSiteNotFound extends MsoException {
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");
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/exceptions/MsoException.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/exceptions/MsoException.java
index b8a7a5571c..625914e820 100644
--- a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/exceptions/MsoException.java
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/exceptions/MsoException.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.openstack.exceptions;
+package org.onap.so.openstack.exceptions;
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/exceptions/MsoExceptionCategory.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/exceptions/MsoExceptionCategory.java
index 81a0edc2d3..ed57488301 100644
--- a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/exceptions/MsoExceptionCategory.java
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/exceptions/MsoExceptionCategory.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.openstack.exceptions;
+package org.onap.so.openstack.exceptions;
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/exceptions/MsoHeatNotFoundException.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/exceptions/MsoHeatNotFoundException.java
new file mode 100644
index 0000000000..dda7384d9e
--- /dev/null
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/exceptions/MsoHeatNotFoundException.java
@@ -0,0 +1,54 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.openstack.exceptions;
+
+/**
+ * MSO Heat not found exception.
+ */
+public class MsoHeatNotFoundException extends MsoException {
+ /**
+ * Serialization id.
+ */
+ private static final long serialVersionUID = 6547134336163166841L;
+
+ /**
+ * Default constructor (needed for BPEL/JAXB)
+ */
+ public MsoHeatNotFoundException() {
+ super("Heat not found");
+ super.category = MsoExceptionCategory.USERDATA;
+ }
+
+ /**
+ * Constructor to create a new MsoHeatNotFoundException instance
+ * @param heat the heat parameter
+ */
+ public MsoHeatNotFoundException(String heat) {
+ // Set the detailed error as the Exception 'message'
+ super("Heat [" + heat + "] not found");
+ super.category = MsoExceptionCategory.USERDATA;
+ }
+
+ @Override
+ public String toString() {
+ return getMessage();
+ }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/exceptions/MsoIOException.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/exceptions/MsoIOException.java
index 9c7f6fa91a..35f2445d41 100644
--- a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/exceptions/MsoIOException.java
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/exceptions/MsoIOException.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.openstack.exceptions;
+package org.onap.so.openstack.exceptions;
/**
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/exceptions/MsoNetworkAlreadyExists.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/exceptions/MsoNetworkAlreadyExists.java
index 98b85394be..dd7817d310 100644
--- a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/exceptions/MsoNetworkAlreadyExists.java
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/exceptions/MsoNetworkAlreadyExists.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.openstack.exceptions;
+package org.onap.so.openstack.exceptions;
@@ -29,7 +29,7 @@ public class MsoNetworkAlreadyExists extends MsoOpenstackException {
// 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);
+ super(409, "Conflict", "Stack " + stack + " already exists in Tenant " + tenant + " in Cloud " + cloud);
}
}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/exceptions/MsoNetworkNotFound.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/exceptions/MsoNetworkNotFound.java
index 5802aa1208..7306142cd0 100644
--- a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/exceptions/MsoNetworkNotFound.java
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/exceptions/MsoNetworkNotFound.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.openstack.exceptions;
+package org.onap.so.openstack.exceptions;
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/exceptions/MsoOpenstackException.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/exceptions/MsoOpenstackException.java
index eead8439d4..1410650dd2 100644
--- a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/exceptions/MsoOpenstackException.java
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/exceptions/MsoOpenstackException.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.openstack.exceptions;
+package org.onap.so.openstack.exceptions;
/**
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/exceptions/MsoStackAlreadyExists.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/exceptions/MsoStackAlreadyExists.java
index 2901b6b3a7..fc98ee95ed 100644
--- a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/exceptions/MsoStackAlreadyExists.java
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/exceptions/MsoStackAlreadyExists.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.openstack.exceptions;
+package org.onap.so.openstack.exceptions;
@@ -29,7 +29,7 @@ public class MsoStackAlreadyExists extends MsoOpenstackException {
// 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);
+ super(409, "Conflict", "Stack " + stack + " already exists in Tenant " + tenant + " in Cloud " + cloud);
}
}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/exceptions/MsoStackNotFound.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/exceptions/MsoStackNotFound.java
index 21082a28c9..1cd6b9650a 100644
--- a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/exceptions/MsoStackNotFound.java
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/exceptions/MsoStackNotFound.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.openstack.exceptions;
+package org.onap.so.openstack.exceptions;
/**
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/exceptions/MsoTenantAlreadyExists.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/exceptions/MsoTenantAlreadyExists.java
index 7a597d6f4d..5da32847b1 100644
--- a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/exceptions/MsoTenantAlreadyExists.java
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/exceptions/MsoTenantAlreadyExists.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -18,15 +18,18 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.openstack.exceptions;
+package org.onap.so.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-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/exceptions/MsoTenantNotFound.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/exceptions/MsoTenantNotFound.java
index f26d6b6d49..9b135b61b2 100644
--- a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/openstack/exceptions/MsoTenantNotFound.java
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/exceptions/MsoTenantNotFound.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.openstack.exceptions;
+package org.onap.so.openstack.exceptions;
/**
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/mappers/NetworkInfoMapper.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/mappers/NetworkInfoMapper.java
new file mode 100644
index 0000000000..aa0f17810e
--- /dev/null
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/mappers/NetworkInfoMapper.java
@@ -0,0 +1,107 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.openstack.mappers;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+
+import org.javatuples.Pair;
+import org.onap.so.openstack.beans.NetworkInfo;
+import org.onap.so.openstack.beans.NetworkStatus;
+
+import com.woorea.openstack.quantum.model.Network;
+import com.woorea.openstack.quantum.model.Segment;
+
+public class NetworkInfoMapper {
+
+ private final Network network;
+ private final Map<String,NetworkStatus> networkStatusMap = new HashMap<>();
+
+ public NetworkInfoMapper(Network network) {
+ this.network = network;
+ configureNetworkStatusMap();
+ }
+
+ /**
+ * 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 map() {
+ final NetworkInfo info = new NetworkInfo();
+ if (network == null) {
+ info.setStatus(NetworkStatus.NOTFOUND);
+ } else {
+ info.setName(network.getName());
+ info.setId(network.getId());
+ info.setStatus(this.mapStatus(network.getStatus()));
+ Pair<Optional<String>, List<Integer>> result = locateVlanInformation(network);
+ Optional<String> value0 = result.getValue0();
+ if (value0.isPresent()) {
+ info.setProvider(value0.get());
+ }
+ info.setVlans(result.getValue1());
+ info.setSubnets(network.getSubnets());
+ }
+ return info;
+ }
+
+ protected NetworkStatus mapStatus(String status) {
+ return networkStatusMap.getOrDefault(status, NetworkStatus.UNKNOWN);
+ }
+
+ protected Pair<Optional<String>, List<Integer>> locateVlanInformation(Network network) {
+ final List<Integer> vlans = new ArrayList<>();
+ Optional<String> provider = Optional.empty();
+ if (network.getProviderPhysicalNetwork() != null) {
+ provider = Optional.ofNullable(network.getProviderPhysicalNetwork());
+ if ("vlan".equals(network.getProviderNetworkType())) {
+ vlans.add(network.getProviderSegmentationId());
+ }
+ } else if (network.getSegments() != null && !network.getSegments().isEmpty()) {
+ Segment s = network.getSegments().get(0);
+ provider = Optional.ofNullable(s.getProviderPhysicalNetwork());
+ if ("vlan".equals(s.getProviderNetworkType())) {
+ for (Segment s1 : network.getSegments()) {
+ vlans.add(s1.getProviderSegmentationId());
+ }
+ }
+ }
+
+ return Pair.with(provider, vlans);
+ }
+
+ private void configureNetworkStatusMap() {
+ networkStatusMap.put("ACTIVE", NetworkStatus.ACTIVE);
+ networkStatusMap.put("DOWN", NetworkStatus.DOWN);
+ networkStatusMap.put("BUILD", NetworkStatus.BUILD);
+ networkStatusMap.put("ERROR", NetworkStatus.ERROR);
+ }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/mappers/StackInfoMapper.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/mappers/StackInfoMapper.java
new file mode 100644
index 0000000000..85fd6cc279
--- /dev/null
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/mappers/StackInfoMapper.java
@@ -0,0 +1,99 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.openstack.mappers;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+
+import org.onap.so.openstack.beans.HeatStatus;
+import org.onap.so.openstack.beans.StackInfo;
+
+import com.woorea.openstack.heat.model.Stack;
+import com.woorea.openstack.heat.model.Stack.Output;
+
+public class StackInfoMapper {
+
+ private final Stack stack;
+ private final Map<String,HeatStatus> heatStatusMap = new HashMap<>();
+ public StackInfoMapper(Stack stack) {
+ this.stack = stack;
+ configureHeatStatusMap();
+ }
+
+ public StackInfo map() {
+ final StackInfo info = new StackInfo();
+ if (stack == null) {
+ info.setStatus(HeatStatus.NOTFOUND);
+ } else {
+ info.setName(stack.getStackName());
+ info.setCanonicalName(stack.getStackName() + "/" + stack.getId());
+ info.setStatus(this.mapStatus(stack.getStackStatus()));
+
+ info.setStatusMessage(stack.getStackStatusReason());
+
+ Optional<Map<String, Object>> result = this.mapOutputToMap(stack.getOutputs());
+ if (result.isPresent()) {
+ info.setOutputs(result.get());
+ }
+
+ info.setParameters(stack.getParameters());
+ }
+
+ return info;
+ }
+
+ protected HeatStatus mapStatus(String status) {
+ final HeatStatus result;
+ if (status == null) {
+ result = HeatStatus.INIT;
+ } else {
+ result = heatStatusMap.getOrDefault(status, HeatStatus.UNKNOWN);
+ }
+
+ return result;
+ }
+
+ protected Optional<Map<String, Object>> mapOutputToMap(List<Output> outputs) {
+ Optional<Map<String, Object>> result = Optional.empty();
+ if (outputs != null) {
+ final HashMap<String, Object> map = new HashMap<>();
+ for (Output output : outputs) {
+ map.put(output.getOutputKey(), output.getOutputValue());
+ }
+ result = Optional.of(map);
+ }
+
+ return result;
+ }
+ private void configureHeatStatusMap() {
+ 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);
+ }
+}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/json/MapDeserializer.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/json/MapDeserializer.java
deleted file mode 100644
index 5bb1dacb4a..0000000000
--- a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/json/MapDeserializer.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-package org.openecomp.mso.adapters.json;
-
-import org.codehaus.jackson.JsonNode;
-import org.codehaus.jackson.JsonParser;
-import org.codehaus.jackson.map.DeserializationContext;
-import org.codehaus.jackson.map.JsonDeserializer;
-import org.codehaus.jackson.map.ObjectMapper;
-
-import java.io.IOException;
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-/**
- * Custom JSON Deserializer for Map<String, String>.
- * In MSO with Jackson 1.9.12 and RestEasy 3.0.8, maps in JSON are serialized as
- * follows:
- * <pre>
- * "params": {
- * "entry": [
- * {"key": "P1", "value": "V1"},
- * {"key": "P2", "value": "V2"},
- * ...
- * {"key": "PN", "value": "VN"}
- * ]
- * }
- * The implementation uses a LinkedHashMap to preserve the ordering of entries.
- * </pre>
- */
-public class MapDeserializer extends JsonDeserializer<Map<String, String>> {
-
- @Override
- public Map<String, String> deserialize(JsonParser parser,
- DeserializationContext context) throws IOException {
- ObjectMapper mapper = new ObjectMapper();
- JsonNode tree = mapper.readTree(parser);
- Map<String, String> map = new LinkedHashMap<>();
- if (tree == null)
- return map;
- for (JsonNode element : tree) {
- for (JsonNode arrayElement : element) {
- String key = arrayElement.get("key").getTextValue();
- String value = arrayElement.get("value").getTextValue();
- map.put(key, value);
- }
- }
- return map;
- }
-}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/json/MapSerializer.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/json/MapSerializer.java
deleted file mode 100644
index 3e9f5c6b58..0000000000
--- a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/json/MapSerializer.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-package org.openecomp.mso.adapters.json;
-
-import org.codehaus.jackson.JsonGenerator;
-import org.codehaus.jackson.map.JsonSerializer;
-import org.codehaus.jackson.map.SerializerProvider;
-
-import java.io.IOException;
-import java.util.Map;
-
-/**
- * Custom JSON Serializer for Map<String, String>.
- * In MSO with Jackson 1.9.12 and RestEasy 3.0.8, maps in JSON are serialized as
- * follows:
- * <pre>
- * "params": {
- * "entry": [
- * {"key": "P1", "value": "V1"},
- * {"key": "P2", "value": "V2"},
- * ...
- * {"key": "PN", "value": "VN"}
- * ]
- * }
- * </pre>
- * The implementation uses a TreeMap, so entries are always sorted according
- * to the natural ordering of the keys.
- */
-public class MapSerializer extends JsonSerializer<Map<String, String>> {
- @Override
- public void serialize(Map<String, String> map, JsonGenerator jsonGenerator,
- SerializerProvider serializerProvider) throws IOException {
- jsonGenerator.writeStartObject();
- jsonGenerator.writeArrayFieldStart("entry");
- for (Map.Entry<String,String> entry : map.entrySet()) {
- String key = entry.getKey();
- String value = entry.getValue();
- jsonGenerator.writeStartObject();
- jsonGenerator.writeStringField("key", key);
- jsonGenerator.writeStringField("value", value);
- jsonGenerator.writeEndObject();
- }
- jsonGenerator.writeEndArray();
- jsonGenerator.writeEndObject();
- }
-}
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/providers/JettisonStyleMapperProvider.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/providers/JettisonStyleMapperProvider.java
deleted file mode 100644
index aa55c6349d..0000000000
--- a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/providers/JettisonStyleMapperProvider.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.mso.adapters.providers;
-
-import javax.ws.rs.Produces;
-import javax.ws.rs.ext.ContextResolver;
-import javax.ws.rs.ext.Provider;
-
-import com.fasterxml.jackson.annotation.JsonInclude.Include;
-import com.fasterxml.jackson.databind.DeserializationFeature;
-import com.fasterxml.jackson.databind.MapperFeature;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.databind.SerializationFeature;
-
-@Provider
-@Produces("application/json")
-public class JettisonStyleMapperProvider implements ContextResolver<ObjectMapper> {
-
- final ObjectMapper mapper;
-
- public JettisonStyleMapperProvider() {
-
- mapper = new ObjectMapper();
- mapper.setSerializationInclusion(Include.NON_NULL);
- mapper.enable(MapperFeature.USE_ANNOTATIONS);
- mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, true);
- mapper.configure(DeserializationFeature.UNWRAP_ROOT_VALUE, true);
- mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
- }
-
- @Override
- public ObjectMapper getContext(Class<?> type) {
- return mapper;
- }
-} \ No newline at end of file
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
deleted file mode 100644
index dac3b9ea3c..0000000000
--- a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/tenantrest/HealthCheckHandler.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.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;
- }
-}