From 1cfb08779ea0e00be69e072a940b3063e049fe6b Mon Sep 17 00:00:00 2001 From: Ofir Sonsino Date: Wed, 31 Jan 2018 17:19:00 +0200 Subject: [PATCH] org.onap migration Change-Id: I52f0b2851f2c765752b6d21f49b32136d7d72a3d Issue-ID: VID-86 Signed-off-by: Ofir Sonsino --- deliveries/pom.xml | 6 +- .../main/docker/docker-files/docker-compose.yml | 2 +- epsdk-app-onap/pom.xml | 2 +- .../org/onap/portalapp/conf/ExternalAppConfig.java | 248 + .../portalapp/conf/ExternalAppInitializer.java | 47 + .../portalapp/conf/HibernateMappingLocations.java | 57 + .../portalapp/lm/FusionLicenseManagerImpl.java | 70 + .../onap/portalapp/lm/LicenseableClassImpl.java | 62 + .../onap/portalapp/login/LoginStrategyImpl.java | 69 + .../org/onap/portalapp/scheduler/Register.java | 72 + .../onap/portalapp/scheduler/RegistryAdapter.java | 92 + .../onap/portalapp/service/AdminAuthExtension.java | 65 + .../portalapp/conf/ExternalAppConfig.java | 249 - .../portalapp/conf/ExternalAppInitializer.java | 47 - .../portalapp/conf/HibernateMappingLocations.java | 57 - .../portalapp/lm/FusionLicenseManagerImpl.java | 70 - .../portalapp/lm/LicenseableClassImpl.java | 62 - .../portalapp/login/LoginStrategyImpl.java | 69 - .../openecomp/portalapp/scheduler/Register.java | 71 - .../portalapp/scheduler/RegistryAdapter.java | 92 - .../portalapp/service/AdminAuthExtension.java | 64 - .../src/main/resources/portal.properties | 2 +- .../src/main/resources/portal_template.properties | 2 +- epsdk-app-onap/src/main/resources/vid-data.sql | 386 + epsdk-app-onap/src/main/resources/vid-schema.sql | 492 +- epsdk-app-onap/src/main/swm/common/common.sh | 35 - epsdk-app-onap/src/main/swm/common/localize.sh | 33 - .../src/main/swm/common/localize_asdc.sh | 68 - .../src/main/swm/common/localize_cache.sh | 41 - .../src/main/swm/common/localize_log4j.sh | 54 - .../src/main/swm/common/localize_logback.sh | 46 - .../src/main/swm/common/localize_portal.sh | 84 - .../src/main/swm/common/localize_quartz.sh | 67 - .../src/main/swm/common/localize_system.sh | 178 - .../src/main/swm/deinstall/postproc/post_proc | 4 - .../src/main/swm/deinstall/preproc/pre_proc | 4 - epsdk-app-onap/src/main/swm/descriptor.xml | 34 - .../src/main/swm/fallback/postproc/post_proc | 1 - .../src/main/swm/fallback/preproc/pre_proc | 1 - .../src/main/swm/initinst/postproc/post_proc | 7 - .../src/main/swm/initinst/preproc/pre_proc | 7 - .../src/main/swm/install/postproc/post_proc | 38 - .../src/main/swm/install/preproc/pre_proc | 18 - epsdk-app-onap/src/main/swm/notes.txt | 52 - .../src/main/webapp/WEB-INF/conf/system.properties | 1 - .../main/webapp/WEB-INF/fusion/jsp/ds2/footer.jsp | 31 +- .../main/webapp/WEB-INF/fusion/jsp/ds2/header.jsp | 236 +- .../webapp/WEB-INF/fusion/jsp/ebz/ebz_header.jsp | 837 ++ .../WEB-INF/jsp/createnewserviceinstance.jsp | 146 + .../main/webapp/WEB-INF/jsp/searchexistingsi.jsp | 81 + .../src/main/webapp/WEB-INF/jsp/serviceModels.jsp | 63 +- .../main/webapp/WEB-INF/jsp/subscriberdetails.jsp | 184 + .../src/main/webapp/WEB-INF/jsp/testViewEdit.jsp | 6 +- .../src/main/webapp/WEB-INF/jsp/welcome.jsp | 19 +- .../app/fusion/external/ebz/angular_js/app.js | 2 +- .../angular-bootstrap-multiselect.min.js | 1 - pom.xml | 5 +- vid-app-common/pom.xml | 23 +- .../org/ecomp/aai/model/AaiAICZones/AicZones.java | 10 - .../java/org/ecomp/aai/model/AaiAICZones/Zone.java | 13 - .../src/main/java/org/onap/vid/RelatedTo.java | 39 + .../src/main/java/org/onap/vid/aai/AaiClient.java | 489 ++ .../java/org/onap/vid/aai/AaiClientInterface.java | 58 + .../java/org/onap/vid/aai/AaiGetVnfResponse.java | 39 + .../main/java/org/onap/vid/aai/AaiResponse.java | 34 + .../org/onap/vid/aai/OperationalEnvironment.java | 107 + .../java/org/onap/vid/aai/ServiceInstance.java | 33 + .../java/org/onap/vid/aai/ServiceInstances.java | 14 + .../vid/aai/ServiceInstancesSearchResults.java | 14 + .../java/org/onap/vid/aai/ServiceSubscription.java | 20 + .../org/onap/vid/aai/ServiceSubscriptions.java | 17 + .../src/main/java/org/onap/vid/aai/Services.java | 24 + .../org/onap/vid/aai/SubscriberAaiResponse.java | 24 + .../main/java/org/onap/vid/aai/SubscriberData.java | 7 + .../onap/vid/aai/SubscriberFilteredResults.java | 29 + .../onap/vid/aai/SubscriberListWithFilterData.java | 31 + .../org/onap/vid/aai/SubscriberWithFilter.java | 21 + .../exceptions/InvalidAAIResponseException.java | 7 + .../vid/aai/exceptions/RoleParsingException.java | 7 + .../onap/vid/aai/model/AaiGetAicZone/AicZones.java | 10 + .../org/onap/vid/aai/model/AaiGetAicZone/Zone.java | 13 + .../OperationalEnvironmentList.java | 30 + .../org/onap/vid/aai/model/AaiGetPnfResponse.java | 42 + .../org/onap/vid/aai/model/AaiGetPnfs/Pnf.java | 77 + .../GetServicesAAIRespone.java | 11 + .../model/AaiGetServicesRequestModel/Service.java | 21 + .../model/AaiGetTenatns/GetTenantsResponse.java | 33 + .../onap/vid/aai/model/AaiRelationResponse.java | 45 + ...tServiceModelsByDistributionStatusResponse.java | 29 + .../onap/vid/aai/model/LogicalLinkResponse.java | 72 + .../main/java/org/onap/vid/aai/model/Model.java | 61 + .../main/java/org/onap/vid/aai/model/ModelVer.java | 84 + .../java/org/onap/vid/aai/model/ModelVers.java | 28 + .../java/org/onap/vid/aai/model/OwningEntity.java | 36 + .../onap/vid/aai/model/OwningEntityResponse.java | 28 + .../java/org/onap/vid/aai/model/PnfProperties.java | 51 + .../java/org/onap/vid/aai/model/PnfResult.java | 49 + .../main/java/org/onap/vid/aai/model/Project.java | 21 + .../org/onap/vid/aai/model/ProjectResponse.java | 28 + .../org/onap/vid/aai/model/RelatedToProperty.java | 35 + .../java/org/onap/vid/aai/model/Relationship.java | 67 + .../org/onap/vid/aai/model/RelationshipData.java | 30 + .../org/onap/vid/aai/model/RelationshipList.java | 26 + .../main/java/org/onap/vid/aai/model/Result.java | 26 + .../org/onap/vid/aai/model/ServiceInstance.java | 26 + .../org/onap/vid/aai/model/ServiceInstances.java | 12 + .../org/onap/vid/aai/model/ServiceProperties.java | 113 + .../onap/vid/aai/model/ServiceRelationships.java | 102 + .../onap/vid/aai/model/ServiceSubscription.java | 17 + .../main/java/org/onap/vid/aai/model/Services.java | 24 + .../java/org/onap/vid/aai/model/VnfResult.java | 46 + .../java/org/onap/vid/aai/util/AAIProperties.java | 68 + .../org/onap/vid/aai/util/AAIRestInterface.java | 373 + .../aai/util/CustomJacksonJaxBJsonProvider.java | 73 + .../org/onap/vid/aai/util/HttpsAuthClient.java | 140 + .../onap/vid/aai/util/HttpsComponentsClient.java | 99 + .../JettyObfuscationConversionCommandLineUtil.java | 78 + .../org/onap/vid/asdc/AsdcCatalogException.java | 58 + .../main/java/org/onap/vid/asdc/AsdcClient.java | 129 + .../java/org/onap/vid/asdc/beans/Artifact.java | 314 + .../java/org/onap/vid/asdc/beans/Resource.java | 429 + .../org/onap/vid/asdc/beans/SecureService.java | 9 + .../org/onap/vid/asdc/beans/SecureServices.java | 30 + .../main/java/org/onap/vid/asdc/beans/Service.java | 354 + .../java/org/onap/vid/asdc/beans/SubResource.java | 175 + .../org/onap/vid/asdc/beans/tosca/Capability.java | 140 + .../org/onap/vid/asdc/beans/tosca/Constraint.java | 199 + .../java/org/onap/vid/asdc/beans/tosca/Group.java | 135 + .../java/org/onap/vid/asdc/beans/tosca/Import.java | 48 + .../java/org/onap/vid/asdc/beans/tosca/Input.java | 168 + .../onap/vid/asdc/beans/tosca/NodeTemplate.java | 117 + .../org/onap/vid/asdc/beans/tosca/Property.java | 157 + .../org/onap/vid/asdc/beans/tosca/Requirement.java | 120 + .../java/org/onap/vid/asdc/beans/tosca/Schema.java | 53 + .../vid/asdc/beans/tosca/SubstitutionMappings.java | 101 + .../vid/asdc/beans/tosca/TopologyTemplate.java | 124 + .../org/onap/vid/asdc/beans/tosca/ToscaCsar.java | 101 + .../org/onap/vid/asdc/beans/tosca/ToscaMeta.java | 124 + .../onap/vid/asdc/beans/tosca/ToscaMetadata.java | 461 ++ .../org/onap/vid/asdc/beans/tosca/ToscaModel.java | 166 + .../org/onap/vid/asdc/local/LocalAsdcClient.java | 394 + .../onap/vid/asdc/memory/InMemoryAsdcClient.java | 372 + .../java/org/onap/vid/asdc/parser/ToscaParser.java | 15 + .../org/onap/vid/asdc/parser/ToscaParserImpl.java | 226 + .../org/onap/vid/asdc/parser/ToscaParserImpl2.java | 354 + .../org/onap/vid/asdc/rest/RestfulAsdcClient.java | 480 ++ .../vid/category/AddCategoryOptionResponse.java | 15 + .../vid/category/AddCategoryOptionsRequest.java | 13 + .../vid/category/CategoryParameterOptionRep.java | 31 + .../vid/category/CategoryParametersResponse.java | 27 + .../changeManagement/ChangeManagementRequest.java | 73 + .../changeManagement/ChangeManagementResponse.java | 19 + .../vid/changeManagement/CloudConfiguration.java | 55 + .../org/onap/vid/changeManagement/CmResponse.java | 17 + .../GetVnfWorkflowRelationRequest.java | 28 + .../vid/changeManagement/GetWorkflowsResponse.java | 24 + .../changeManagement/LeanCloudConfiguration.java | 20 + .../org/onap/vid/changeManagement/ModelInfo.java | 138 + .../ModelInfoOfRelatedInstance.java | 122 + .../vid/changeManagement/MsoRequestDetails.java | 32 + .../onap/vid/changeManagement/RelatedInstance.java | 29 + .../vid/changeManagement/RelatedInstanceList.java | 23 + .../onap/vid/changeManagement/RequestDetails.java | 56 + .../changeManagement/RequestDetailsWrapper.java | 16 + .../org/onap/vid/changeManagement/RequestInfo.java | 69 + .../vid/changeManagement/UpdateRequestInfo.java | 26 + .../org/onap/vid/changeManagement/VnfDetails.java | 67 + .../changeManagement/VnfDetailsWithWorkflows.java | 36 + .../VnfWorkflowRelationAllResponse.java | 23 + .../VnfWorkflowRelationRequest.java | 31 + .../VnfWorkflowRelationResponse.java | 15 + .../onap/vid/changeManagement/WorkflowsDetail.java | 44 + .../java/org/onap/vid/client/FakeHttpSession.java | 224 + .../java/org/onap/vid/client/HttpBasicClient.java | 67 + .../java/org/onap/vid/client/HttpsBasicClient.java | 143 + .../org/onap/vid/controller/AaiController.java | 750 ++ .../vid/controller/ChangeManagementController.java | 193 + .../org/onap/vid/controller/ControllersUtils.java | 40 + .../onap/vid/controller/HealthCheckController.java | 192 + .../org/onap/vid/controller/LoggerController.java | 115 + .../onap/vid/controller/MaintenanceController.java | 135 + .../java/org/onap/vid/controller/MsoConfig.java | 42 + .../org/onap/vid/controller/MsoController.java | 655 ++ .../OperationalEnvironmentController.java | 354 + .../org/onap/vid/controller/PolicyController.java | 84 + .../onap/vid/controller/PropertyController.java | 132 + .../vid/controller/RoleGeneratorController.java | 31 + .../org/onap/vid/controller/VidController.java | 149 + .../org/onap/vid/controller/ViewLogController.java | 65 + .../java/org/onap/vid/controller/WebConfig.java | 123 + .../filter/PromiseEcompRequestIdFilter.java | 94 + .../vid/controller/filter/TempFilterForCORS.java | 48 + .../vid/controller/test/TestAaiController.java | 87 + .../vid/controller/test/TestAsdcController.java | 106 + .../vid/controller/test/TestMsoController.java | 723 ++ .../vid/controller/test/TestPageController.java | 55 + .../main/java/org/onap/vid/dao/FnAppDoaImpl.java | 112 + .../src/main/java/org/onap/vid/dao/ProfileDao.java | 45 + .../org/onap/vid/exceptions/NotFoundException.java | 12 + .../exceptions/VidServiceUnavailableException.java | 69 + .../org/onap/vid/factories/MsoRequestFactory.java | 15 + .../java/org/onap/vid/logging/VidLoggerAspect.java | 85 + .../java/org/onap/vid/model/CategoryParameter.java | 120 + .../onap/vid/model/CategoryParameterOption.java | 139 + .../java/org/onap/vid/model/CommandProperty.java | 93 + .../java/org/onap/vid/model/ExceptionResponse.java | 91 + .../org/onap/vid/model/ExceptionTranslator.java | 39 + .../org/onap/vid/model/ListOfErrorsResponse.java | 24 + .../java/org/onap/vid/model/ModelConstants.java | 44 + .../main/java/org/onap/vid/model/ModelUtil.java | 45 + .../org/onap/vid/model/MsoExceptionResponse.java | 32 + .../src/main/java/org/onap/vid/model/Network.java | 62 + .../main/java/org/onap/vid/model/NewNetwork.java | 56 + .../src/main/java/org/onap/vid/model/NewNode.java | 209 + .../main/java/org/onap/vid/model/NewService.java | 252 + .../java/org/onap/vid/model/NewServiceModel.java | 288 + .../src/main/java/org/onap/vid/model/NewVNF.java | 123 + .../src/main/java/org/onap/vid/model/Node.java | 322 + .../org/onap/vid/model/PortMirroringConfig.java | 77 + .../java/org/onap/vid/model/ProxyResponse.java | 30 + .../onap/vid/model/RequestReferencesContainer.java | 42 + .../src/main/java/org/onap/vid/model/Resource.java | 28 + .../src/main/java/org/onap/vid/model/Result.java | 58 + .../src/main/java/org/onap/vid/model/Service.java | 283 + .../vid/model/ServiceInstanceSearchResult.java | 139 + .../main/java/org/onap/vid/model/ServiceModel.java | 330 + .../main/java/org/onap/vid/model/ServiceProxy.java | 46 + .../main/java/org/onap/vid/model/Subscriber.java | 26 + .../java/org/onap/vid/model/SubscriberList.java | 15 + .../src/main/java/org/onap/vid/model/VNF.java | 165 + .../src/main/java/org/onap/vid/model/VNFDao.java | 105 + .../vid/model/VersionByInvariantIdsRequest.java | 11 + .../src/main/java/org/onap/vid/model/VfModule.java | 308 + .../main/java/org/onap/vid/model/VidWorkflow.java | 83 + .../main/java/org/onap/vid/model/VolumeGroup.java | 196 + .../src/main/java/org/onap/vid/model/Workflow.java | 47 + .../java/org/onap/vid/mso/MsoBusinessLogic.java | 99 + .../org/onap/vid/mso/MsoBusinessLogicImpl.java | 800 ++ .../main/java/org/onap/vid/mso/MsoInterface.java | 85 + .../main/java/org/onap/vid/mso/MsoProperties.java | 119 + .../java/org/onap/vid/mso/MsoResponseWrapper.java | 129 + .../java/org/onap/vid/mso/MsoResponseWrapper2.java | 60 + .../onap/vid/mso/MsoResponseWrapperInterface.java | 15 + .../src/main/java/org/onap/vid/mso/MsoUtil.java | 126 + .../org/onap/vid/mso/RestMsoImplementation.java | 380 + .../src/main/java/org/onap/vid/mso/RestObject.java | 131 + .../model/OperationalEnvironmentActivateInfo.java | 33 + .../OperationalEnvironmentDeactivateInfo.java | 29 + .../org/onap/vid/mso/rest/AsyncRequestStatus.java | 123 + .../org/onap/vid/mso/rest/MsoRestClientNew.java | 435 + .../OperationEnvironmentRequestDetails.java | 120 + .../org/onap/vid/mso/rest/RelatedInstance.java | 125 + .../java/org/onap/vid/mso/rest/RelatedModel.java | 125 + .../main/java/org/onap/vid/mso/rest/Request.java | 146 + .../java/org/onap/vid/mso/rest/RequestDetails.java | 235 + .../java/org/onap/vid/mso/rest/RequestList.java | 137 + .../java/org/onap/vid/mso/rest/RequestWrapper.java | 35 + .../main/java/org/onap/vid/mso/rest/Response.java | 54 + .../java/org/onap/vid/mso/rest/RestInterface.java | 68 + .../src/main/java/org/onap/vid/mso/rest/Task.java | 119 + .../main/java/org/onap/vid/mso/rest/TaskList.java | 16 + .../java/org/onap/vid/policy/PolicyProperties.java | 26 + .../org/onap/vid/policy/PolicyResponseWrapper.java | 56 + .../java/org/onap/vid/policy/PolicyRestInt.java | 66 + .../org/onap/vid/policy/PolicyRestInterface.java | 233 + .../vid/policy/PolicyRestInterfaceFactory.java | 14 + .../onap/vid/policy/PolicyRestInterfaceIfc.java | 58 + .../main/java/org/onap/vid/policy/PolicyUtil.java | 71 + .../main/java/org/onap/vid/policy/RestObject.java | 68 + .../org/onap/vid/policy/rest/RequestDetails.java | 107 + .../vid/properties/AsdcClientConfiguration.java | 124 + .../vid/properties/MsoClientConfiguration.java | 9 + .../org/onap/vid/properties/VidProperties.java | 93 + .../main/java/org/onap/vid/roles/EcompRole.java | 5 + .../src/main/java/org/onap/vid/roles/Role.java | 48 + .../main/java/org/onap/vid/roles/RoleProvider.java | 138 + .../java/org/onap/vid/roles/RoleValidator.java | 57 + .../java/org/onap/vid/scheduler/RestObject.java | 44 + .../onap/vid/scheduler/RestObjects/RestObject.java | 39 + .../onap/vid/scheduler/SchedulerProperties.java | 19 + .../onap/vid/scheduler/SchedulerRestInterface.java | 214 + .../scheduler/SchedulerRestInterfaceFactory.java | 15 + .../vid/scheduler/SchedulerRestInterfaceIfc.java | 23 + .../java/org/onap/vid/services/AaiService.java | 63 + .../java/org/onap/vid/services/AaiServiceImpl.java | 435 + .../vid/services/CategoryParameterService.java | 18 + .../vid/services/CategoryParameterServiceImpl.java | 144 + .../onap/vid/services/ChangeManagementService.java | 32 + .../vid/services/ChangeManagementServiceImpl.java | 303 + .../java/org/onap/vid/services/CsvService.java | 15 + .../java/org/onap/vid/services/CsvServiceImpl.java | 250 + .../vid/services/RoleGenaratorServiceImpl.java | 164 + .../onap/vid/services/RoleGeneratorService.java | 5 + .../java/org/onap/vid/services/VidService.java | 17 + .../java/org/onap/vid/services/VidServiceImpl.java | 79 + .../org/onap/vid/services/WorkflowService.java | 9 + .../org/onap/vid/services/WorkflowServiceImpl.java | 40 + .../main/java/org/onap/vid/utils/Intersection.java | 31 + .../src/main/java/org/onap/vid/utils/Logging.java | 105 + .../src/main/java/org/onap/vid/utils/Streams.java | 47 + .../java/org/openecomp/aai/util/AAIProperties.java | 68 - .../org/openecomp/aai/util/AAIRestInterface.java | 356 - .../aai/util/CustomJacksonJaxBJsonProvider.java | 73 - .../org/openecomp/aai/util/HttpsAuthClient.java | 140 - .../openecomp/aai/util/HttpsComponentsClient.java | 99 - .../JettyObfuscationConversionCommandLineUtil.java | 78 - .../src/main/java/org/openecomp/vid/RelatedTo.java | 36 - .../main/java/org/openecomp/vid/aai/AaiClient.java | 352 - .../org/openecomp/vid/aai/AaiClientInterface.java | 33 - .../org/openecomp/vid/aai/AaiGetVnfResponse.java | 28 - .../java/org/openecomp/vid/aai/AaiResponse.java | 21 - .../org/openecomp/vid/aai/ServiceInstance.java | 33 - .../org/openecomp/vid/aai/ServiceInstances.java | 14 - .../org/openecomp/vid/aai/ServiceProperties.java | 90 - .../org/openecomp/vid/aai/ServiceSubscription.java | 20 - .../openecomp/vid/aai/ServiceSubscriptions.java | 17 - .../main/java/org/openecomp/vid/aai/Services.java | 24 - .../openecomp/vid/aai/SubscriberAaiResponse.java | 24 - .../java/org/openecomp/vid/aai/SubscriberData.java | 7 - .../vid/aai/SubscriberFilteredResults.java | 29 - .../vid/aai/SubscriberListWithFilterData.java | 31 - .../openecomp/vid/aai/SubscriberWithFilter.java | 21 - .../main/java/org/openecomp/vid/aai/VnfResult.java | 44 - .../exceptions/InvalidAAIResponseException.java | 7 - .../GetServicesAAIRespone.java | 11 - .../model/AaiGetServicesRequestModel/Service.java | 21 - .../model/AaiGetTenatns/GetTenantsResponse.java | 26 - .../openecomp/vid/aai/model/RelatedToProperty.java | 34 - .../org/openecomp/vid/aai/model/Relationship.java | 55 - .../openecomp/vid/aai/model/RelationshipData.java | 29 - .../openecomp/vid/aai/model/RelationshipList.java | 24 - .../openecomp/vid/aai/model/ServiceInstance.java | 26 - .../openecomp/vid/aai/model/ServiceInstances.java | 12 - .../vid/aai/model/ServiceRelationships.java | 90 - .../vid/aai/model/ServiceSubscription.java | 17 - .../java/org/openecomp/vid/aai/model/Services.java | 24 - .../openecomp/vid/asdc/AsdcCatalogException.java | 58 - .../java/org/openecomp/vid/asdc/AsdcClient.java | 129 - .../org/openecomp/vid/asdc/beans/Artifact.java | 314 - .../org/openecomp/vid/asdc/beans/Resource.java | 429 - .../openecomp/vid/asdc/beans/SecureService.java | 9 - .../openecomp/vid/asdc/beans/SecureServices.java | 31 - .../java/org/openecomp/vid/asdc/beans/Service.java | 351 - .../org/openecomp/vid/asdc/beans/SubResource.java | 175 - .../openecomp/vid/asdc/beans/tosca/Capability.java | 140 - .../openecomp/vid/asdc/beans/tosca/Constraint.java | 199 - .../org/openecomp/vid/asdc/beans/tosca/Group.java | 135 - .../org/openecomp/vid/asdc/beans/tosca/Import.java | 48 - .../org/openecomp/vid/asdc/beans/tosca/Input.java | 168 - .../vid/asdc/beans/tosca/NodeTemplate.java | 117 - .../openecomp/vid/asdc/beans/tosca/Property.java | 157 - .../vid/asdc/beans/tosca/Requirement.java | 120 - .../org/openecomp/vid/asdc/beans/tosca/Schema.java | 53 - .../vid/asdc/beans/tosca/SubstitutionMappings.java | 101 - .../vid/asdc/beans/tosca/TopologyTemplate.java | 124 - .../openecomp/vid/asdc/beans/tosca/ToscaCsar.java | 101 - .../openecomp/vid/asdc/beans/tosca/ToscaMeta.java | 124 - .../vid/asdc/beans/tosca/ToscaMetadata.java | 461 -- .../openecomp/vid/asdc/beans/tosca/ToscaModel.java | 166 - .../openecomp/vid/asdc/local/LocalAsdcClient.java | 393 - .../vid/asdc/memory/InMemoryAsdcClient.java | 372 - .../org/openecomp/vid/asdc/parser/ToscaParser.java | 15 - .../openecomp/vid/asdc/parser/ToscaParserImpl.java | 225 - .../vid/asdc/parser/ToscaParserImpl2.java | 254 - .../openecomp/vid/asdc/rest/RestfulAsdcClient.java | 467 -- .../changeManagement/ChangeManagementRequest.java | 63 - .../changeManagement/ChangeManagementResponse.java | 19 - .../vid/changeManagement/CloudConfiguration.java | 55 - .../openecomp/vid/changeManagement/CmResponse.java | 17 - .../changeManagement/LeanCloudConfiguration.java | 20 - .../openecomp/vid/changeManagement/ModelInfo.java | 138 - .../ModelInfoOfRelatedInstance.java | 122 - .../vid/changeManagement/MsoRequestDetails.java | 31 - .../vid/changeManagement/RelatedInstance.java | 29 - .../vid/changeManagement/RelatedInstanceList.java | 23 - .../vid/changeManagement/RequestDetails.java | 56 - .../changeManagement/RequestDetailsWrapper.java | 9 - .../vid/changeManagement/RequestInfo.java | 69 - .../vid/changeManagement/RequestParameters.java | 44 - .../vid/changeManagement/UpdateRequestInfo.java | 26 - .../org/openecomp/vid/client/FakeHttpSession.java | 224 - .../org/openecomp/vid/client/HttpBasicClient.java | 67 - .../org/openecomp/vid/client/HttpsBasicClient.java | 143 - .../openecomp/vid/controller/AaiController.java | 952 --- .../controller/BrowseServiceTypesController.java | 87 - .../vid/controller/ChangeManagementController.java | 71 - .../vid/controller/HealthCheckController.java | 196 - .../org/openecomp/vid/controller/MsoConfig.java | 29 - .../openecomp/vid/controller/MsoController.java | 770 -- .../openecomp/vid/controller/PolicyController.java | 90 - .../vid/controller/PropertyController.java | 122 - .../vid/controller/SchedulerController.java | 244 - .../openecomp/vid/controller/VidController.java | 119 - .../vid/controller/ViewEditSubController.java | 107 - .../vid/controller/ViewLogController.java | 84 - .../org/openecomp/vid/controller/WebConfig.java | 122 - .../vid/controller/test/TestAaiController.java | 93 - .../vid/controller/test/TestAsdcController.java | 112 - .../vid/controller/test/TestMsoController.java | 729 -- .../vid/controller/test/TestPageController.java | 57 - .../java/org/openecomp/vid/dao/FnAppDoaImpl.java | 112 - .../java/org/openecomp/vid/dao/ProfileDao.java | 45 - .../exceptions/VidServiceUnavailableException.java | 69 - .../openecomp/vid/factories/MsoRequestFactory.java | 15 - .../org/openecomp/vid/model/CommandProperty.java | 93 - .../org/openecomp/vid/model/ExceptionResponse.java | 70 - .../org/openecomp/vid/model/ModelConstants.java | 42 - .../java/org/openecomp/vid/model/ModelUtil.java | 45 - .../main/java/org/openecomp/vid/model/Network.java | 62 - .../java/org/openecomp/vid/model/NewNetwork.java | 56 - .../main/java/org/openecomp/vid/model/NewNode.java | 209 - .../java/org/openecomp/vid/model/NewService.java | 252 - .../org/openecomp/vid/model/NewServiceModel.java | 259 - .../main/java/org/openecomp/vid/model/NewVNF.java | 123 - .../main/java/org/openecomp/vid/model/Node.java | 301 - .../org/openecomp/vid/model/ProxyResponse.java | 21 - .../java/org/openecomp/vid/model/Resource.java | 28 - .../main/java/org/openecomp/vid/model/Result.java | 58 - .../main/java/org/openecomp/vid/model/Service.java | 276 - .../java/org/openecomp/vid/model/ServiceModel.java | 261 - .../java/org/openecomp/vid/model/Subscriber.java | 26 - .../org/openecomp/vid/model/SubscriberList.java | 15 - .../src/main/java/org/openecomp/vid/model/VNF.java | 165 - .../vid/model/VersionByInvariantIdsRequest.java | 11 - .../java/org/openecomp/vid/model/VfModule.java | 308 - .../java/org/openecomp/vid/model/VolumeGroup.java | 196 - .../java/org/openecomp/vid/model/Workflow.java | 47 - .../org/openecomp/vid/mso/MsoBusinessLogic.java | 416 - .../org/openecomp/vid/mso/MsoClientFactory.java | 37 - .../java/org/openecomp/vid/mso/MsoInterface.java | 75 - .../java/org/openecomp/vid/mso/MsoLocalClient.java | 85 - .../org/openecomp/vid/mso/MsoLocalClientNew.java | 216 - .../java/org/openecomp/vid/mso/MsoProperties.java | 105 - .../org/openecomp/vid/mso/MsoResponseWrapper.java | 107 - .../java/org/openecomp/vid/mso/MsoRestInt.java | 71 - .../org/openecomp/vid/mso/MsoRestInterface.java | 352 - .../openecomp/vid/mso/MsoRestInterfaceFactory.java | 44 - .../org/openecomp/vid/mso/MsoRestInterfaceIfc.java | 92 - .../main/java/org/openecomp/vid/mso/MsoUtil.java | 125 - .../openecomp/vid/mso/RestMsoImplementation.java | 326 - .../java/org/openecomp/vid/mso/RestObject.java | 68 - .../openecomp/vid/mso/rest/AsyncRequestStatus.java | 123 - .../vid/mso/rest/MsoBusinessLogicNew.java | 67 - .../openecomp/vid/mso/rest/MsoRestClientNew.java | 333 - .../openecomp/vid/mso/rest/RelatedInstance.java | 125 - .../org/openecomp/vid/mso/rest/RelatedModel.java | 125 - .../java/org/openecomp/vid/mso/rest/Request.java | 140 - .../org/openecomp/vid/mso/rest/RequestDetails.java | 232 - .../org/openecomp/vid/mso/rest/RequestList.java | 137 - .../org/openecomp/vid/mso/rest/RequestWrapper.java | 35 - .../java/org/openecomp/vid/mso/rest/Response.java | 54 - .../org/openecomp/vid/mso/rest/RestInterface.java | 81 - .../main/java/org/openecomp/vid/mso/rest/Task.java | 119 - .../java/org/openecomp/vid/mso/rest/TaskList.java | 16 - .../org/openecomp/vid/policy/PolicyProperties.java | 26 - .../vid/policy/PolicyResponseWrapper.java | 56 - .../org/openecomp/vid/policy/PolicyRestInt.java | 67 - .../openecomp/vid/policy/PolicyRestInterface.java | 234 - .../vid/policy/PolicyRestInterfaceFactory.java | 14 - .../vid/policy/PolicyRestInterfaceIfc.java | 58 - .../java/org/openecomp/vid/policy/PolicyUtil.java | 71 - .../java/org/openecomp/vid/policy/RestObject.java | 68 - .../openecomp/vid/policy/rest/RequestDetails.java | 107 - .../vid/properties/AsdcClientConfiguration.java | 124 - .../vid/properties/MsoClientConfiguration.java | 9 - .../openecomp/vid/properties/VidProperties.java | 93 - .../java/org/openecomp/vid/roles/EcompRole.java | 5 - .../main/java/org/openecomp/vid/roles/Role.java | 48 - .../java/org/openecomp/vid/roles/RoleProvider.java | 64 - .../org/openecomp/vid/roles/RoleValidator.java | 67 - .../org/openecomp/vid/scheduler/RestObject.java | 44 - .../RestObjects/GetTimeSlotsRestObject.java | 11 - .../RestObjects/PostCreateNewVnfRestObject.java | 10 - .../RestObjects/PostSubmitVnfChangeRestObject.java | 10 - .../vid/scheduler/RestObjects/RestObject.java | 39 - .../vid/scheduler/SchedulerProperties.java | 24 - .../vid/scheduler/SchedulerResponseWrapper.java | 71 - .../GetTimeSlotsWrapper.java | 5 - .../PostCreateNewVnfWrapper.java | 39 - .../PostSubmitVnfChangeTimeSlotsWrapper.java | 38 - .../SchedulerResponseWrapper.java | 57 - .../openecomp/vid/scheduler/SchedulerRestInt.java | 42 - .../vid/scheduler/SchedulerRestInterface.java | 208 - .../scheduler/SchedulerRestInterfaceFactory.java | 15 - .../vid/scheduler/SchedulerRestInterfaceIfc.java | 21 - .../org/openecomp/vid/scheduler/SchedulerUtil.java | 100 - .../vid/scheduler/rest/RequestDetails.java | 106 - .../org/openecomp/vid/services/AaiService.java | 34 - .../org/openecomp/vid/services/AaiServiceImpl.java | 101 - .../vid/services/ChangeManagementService.java | 14 - .../vid/services/ChangeManagementServiceImpl.java | 109 - .../org/openecomp/vid/services/VidService.java | 17 - .../org/openecomp/vid/services/VidServiceImpl.java | 77 - .../openecomp/vid/services/WorkflowService.java | 9 - .../vid/services/WorkflowServiceImpl.java | 40 - vid-app-common/src/main/resources/2f80c596.zip | Bin 0 -> 86923 bytes .../resources/aai_config_instance_view_edit.json | 81 + .../resources/aai_get_node_template_instances.json | 101 + vid-app-common/src/main/resources/adiod.zip | Bin 0 -> 81489 bytes .../src/main/resources/csar317927061915233480.zip | Bin 0 -> 63368 bytes .../src/main/resources/generateRoleScript.sh | 3 + .../src/main/resources/json/mso/modelInfo | 1 + .../src/main/resources/json/mso/requestStatus | 9 - .../main/resources/owning-entity-properties.JSON | 17 + .../src/main/resources/{pnf.csar => pnf.zip} | Bin .../main/resources/scripts/category_parameter.sh | 64 + .../scripts/update_category_option_name.sh | 34 + .../src/main/resources/scripts/vnf_wf.sh | 49 + vid-app-common/src/main/resources/sdcservices.json | 80 +- .../src/main/resources/service-AmpPhSvc-csar.zip | Bin 0 -> 68824 bytes .../src/main/resources/service-David-csar.csar | Bin 0 -> 29894 bytes .../main/resources/service-DemoService1-csar.csar | Bin 0 -> 37635 bytes ...rvice-Servicecontainermultiplepprobes-csar.csar | Bin 0 -> 31331 bytes vid-app-common/src/main/resources/test.csv | 5 + .../vid/external/upload-file/ng-file-upload.min.js | 3 + .../app/vid/icons/collapse-change-managment.svg | 16 + .../app/vid/icons/expand-change-managment.svg | 18 + .../app/vid/icons/refresh-change-managment.svg | 15 + .../src/main/webapp/app/vid/images/attach.svg | 20 + .../webapp/app/vid/images/elipsis_menu_icon.svg | 7 + .../src/main/webapp/app/vid/images/emptyData.svg | 31 + .../webapp/app/vid/images/icon_noconnection.svg | 17 + .../src/main/webapp/app/vid/images/refresh.svg | 19 + .../src/main/webapp/app/vid/images/search.svg | 16 + .../src/main/webapp/app/vid/images/sort_down.svg | 14 + .../src/main/webapp/app/vid/images/sort_up.svg | 14 + .../src/main/webapp/app/vid/images/sprite.png | Bin 0 -> 83746 bytes .../src/main/webapp/app/vid/images/v.svg | 14 + .../vid/scripts/constants/componentConstants.js | 90 +- .../app/vid/scripts/constants/fieldConstants.js | 171 +- .../vid/scripts/constants/parameterConstants.js | 1 + .../webapp/app/vid/scripts/constants/version.json | 1 + .../app/vid/scripts/constants/vidConfiguration.js | 15 +- .../scripts/controller/AddNetworkNodeController.js | 78 + .../scripts/controller/InstantiationController.js | 438 +- .../scripts/controller/ServiceModelController.js | 83 +- .../controller/ServiceProxyConfigController.js | 342 + .../webapp/app/vid/scripts/controller/VidApp.js | 29 +- .../scripts/controller/aaiSubscriberController.js | 892 ++- .../controller/change-management.controller.js | 75 +- .../controller/deleteResumeDialogController.js | 148 + .../scripts/controller/deletionDialogController.js | 123 - .../vid/scripts/controller/msoCommitController.js | 46 +- .../scripts/controller/msoCommitModalController.js | 237 + .../controller/pnfSearchAssociationController.js | 138 + .../controller/testEnvironmentsController.js | 102 + .../app/vid/scripts/directives/messageViewer.js | 17 + .../scripts/directives/parameterBlockDirective.js | 43 +- .../directives/parameterBlockDirective.js.orig | 507 -- .../vid/scripts/directives/progressBarDirective.js | 2 +- .../webapp/app/vid/scripts/directives/search.js | 11 + .../app/vid/scripts/directives/serviceMetadata.js | 34 + .../alert-change-management.html | 2 +- .../modals/alert-modal/alert-modal.controller.js | 33 + .../vid/scripts/modals/alert-modal/alert-modal.css | 15 + .../scripts/modals/alert-modal/alert-modal.html | 15 + .../alert-new-scheduler.controller.js | 33 - .../alert-new-scheduler/alert-new-scheduler.css | 3 - .../alert-new-scheduler/alert-new-scheduler.html | 12 - .../attach-test-env-manifest.controller.js | 58 + .../attach-test-env-manifest.css | 109 + .../attach-test-env-manifest.html | 26 + .../cancel-pending-workflow.controller.js | 29 + .../cancel-pending-workflow.css | 16 + .../cancel-pending-workflow.html | 14 + .../failed-change-management.html | 2 +- .../in-progress-change-management.html | 2 +- .../vid/scripts/modals/mso-commit/mso-commit.css | 6 + .../vid/scripts/modals/mso-commit/mso-commit.html | 48 + .../new-change-management.controller.js | 224 +- .../new-change-management.css | 130 - .../new-change-management.html | 54 +- .../new-scheduler/new-scheduler.controller.js | 455 -- .../scripts/modals/new-scheduler/new-scheduler.css | 145 - .../modals/new-scheduler/new-scheduler.html | 101 - .../new-test-environment.controller.js | 65 + .../new-test-environment/new-test-environment.html | 50 + .../pending-change-management.html | 4 +- .../modals/service-metadata/service-metadata.css | 37 + .../modals/service-metadata/service-metadata.html | 12 + .../vid/scripts/services/OwningEntityService.js | 40 + .../webapp/app/vid/scripts/services/aaiService.js | 213 +- .../scripts/services/change-management.service.js | 22 +- .../app/vid/scripts/services/componentService.js | 28 +- .../app/vid/scripts/services/creationService.js | 1949 ++--- .../webapp/app/vid/scripts/services/dataService.js | 89 +- .../vid/scripts/services/deleteResumeService.js | 518 ++ .../app/vid/scripts/services/deletionService.js | 508 -- .../webapp/app/vid/scripts/services/msoService.js | 373 +- .../webapp/app/vid/scripts/services/pnfService.js | 43 + .../app/vid/scripts/services/schedulerService.js | 93 +- .../scripts/services/testEnvironmentsService.js | 79 + .../app/vid/scripts/services/utilityService.js | 464 +- .../app/vid/scripts/view-models/aaiGetSubs.htm | 53 +- .../scripts/view-models/aaiGetSubscriberList.htm | 102 +- .../vid/scripts/view-models/aaiServiceTypes.htm | 4 +- .../app/vid/scripts/view-models/aaiSubDetails.htm | 12 +- .../app/vid/scripts/view-models/aaiSubViewEdit.htm | 2 +- .../app/vid/scripts/view-models/addNetworkNode.htm | 62 + .../vid/scripts/view-models/change-management.html | 100 +- .../view-models/createInstanceServiceModels.htm | 11 +- .../app/vid/scripts/view-models/creationDialog.htm | 4 +- .../vid/scripts/view-models/deleteResumeDialog.htm | 70 + .../app/vid/scripts/view-models/deletionDialog.htm | 70 - .../app/vid/scripts/view-models/instantiate.htm | 79 +- .../app/vid/scripts/view-models/messageViewer.htm | 6 + .../app/vid/scripts/view-models/msoCommit.htm | 5 +- .../scripts/view-models/pnfSearchAssociation.htm | 62 + .../webapp/app/vid/scripts/view-models/search.htm | 5 + .../vid/scripts/view-models/serviceMetadata.htm | 10 + .../app/vid/scripts/view-models/serviceModels.htm | 4 +- .../vid/scripts/view-models/serviceProxyConfig.htm | 108 + .../vid/scripts/view-models/testEnvironments.htm | 82 + .../src/main/webapp/app/vid/styles/buttons.css | 58 + .../app/vid/styles/change-management-icons.css | 67 +- .../webapp/app/vid/styles/change-management.css | 28 +- .../src/main/webapp/app/vid/styles/common.css | 115 +- .../vid/styles/fonts/OpenSans/Apache License.txt | 201 + .../vid/styles/fonts/OpenSans/OpenSans-Bold.ttf | Bin 0 -> 224592 bytes .../styles/fonts/OpenSans/OpenSans-BoldItalic.ttf | Bin 0 -> 213292 bytes .../styles/fonts/OpenSans/OpenSans-ExtraBold.ttf | Bin 0 -> 222584 bytes .../fonts/OpenSans/OpenSans-ExtraBoldItalic.ttf | Bin 0 -> 213420 bytes .../vid/styles/fonts/OpenSans/OpenSans-Italic.ttf | Bin 0 -> 212896 bytes .../vid/styles/fonts/OpenSans/OpenSans-Light.ttf | Bin 0 -> 222412 bytes .../styles/fonts/OpenSans/OpenSans-LightItalic.ttf | Bin 0 -> 213128 bytes .../vid/styles/fonts/OpenSans/OpenSans-Regular.ttf | Bin 0 -> 217360 bytes .../styles/fonts/OpenSans/OpenSans-Semibold.ttf | Bin 0 -> 221328 bytes .../fonts/OpenSans/OpenSans-SemiboldItalic.ttf | Bin 0 -> 212820 bytes .../main/webapp/app/vid/styles/fonts/icomoon.eot | Bin 5200 -> 6448 bytes .../main/webapp/app/vid/styles/fonts/icomoon.svg | 3 + .../main/webapp/app/vid/styles/fonts/icomoon.ttf | Bin 5036 -> 6284 bytes .../main/webapp/app/vid/styles/fonts/icomoon.woff | Bin 5112 -> 6360 bytes .../src/main/webapp/app/vid/styles/instantiate.css | 8 + .../main/webapp/app/vid/styles/messageViewer.css | 17 + .../main/webapp/app/vid/styles/modal-buttons.css | 29 + .../webapp/app/vid/styles/modal-create-new.css | 196 + .../src/main/webapp/app/vid/styles/modals.css | 52 + .../src/main/webapp/app/vid/styles/networkNode.css | 271 + .../webapp/app/vid/styles/pnfSearchAssociation.css | 82 + .../src/main/webapp/app/vid/styles/search.css | 37 + .../main/webapp/app/vid/styles/serviceMetadata.css | 18 + .../main/webapp/app/vid/styles/serviceModels.css | 4 + .../webapp/app/vid/styles/serviceProxyConfig.css | 154 + .../webapp/app/vid/styles/testEnvironments.css | 215 + .../src/main/webapp/app/vid/styles/vidTree.css | 4 + vid-app-common/src/main/webapp/test.jsp | 20 +- ...tyObfuscationConversionCommandLineUtilTest.java | 22 + .../src/test/java/org/onap/aai/util/TestSuite.java | 11 + .../org/onap/ecomp/vid/selenium/FirstClass.java | 606 ++ .../onap/ecomp/vid/selenium/LogOutLeftPane.java | 242 + .../core/MockApplicationContextTestSuite.java | 177 + .../org/onap/fusionapp/controller/NetMapTest.java | 49 + .../onap/fusionapp/service/ProfileServiceTest.java | 75 + .../main/java/org/vid/dao/FnAppDoaImplTest.java | 45 + .../src/test/java/org/onap/vid/RelatedToTest.java | 37 + .../src/test/java/org/onap/vid/TestSuite.java | 11 + .../org/onap/vid/aai/AaiGetVnfResponseTest.java | 33 + .../org/onap/vid/aai/ServicePropertiesTest.java | 34 + .../onap/vid/aai/SubscriberAaiResponseTest.java | 22 + .../org/onap/vid/aai/SubscriberWithFilterTest.java | 30 + .../src/test/java/org/onap/vid/aai/TestSuite.java | 12 + .../test/java/org/onap/vid/aai/VnfResultTest.java | 34 + .../onap/vid/aai/model/RelatedToPropertyTest.java | 55 + .../onap/vid/aai/model/RelationshipDataTest.java | 55 + .../org/onap/vid/aai/model/RelationshipTest.java | 103 + .../vid/aai/model/ServiceRelationshipsTest.java | 165 + .../java/org/onap/vid/aai/model/TestSuite.java | 11 + .../java/org/onap/vid/asdc/beans/ArtifactTest.java | 277 + .../java/org/onap/vid/asdc/beans/ResourceTest.java | 391 + .../org/onap/vid/asdc/beans/SubResourceTest.java | 167 + .../java/org/onap/vid/asdc/beans/TestSuite.java | 11 + .../onap/vid/asdc/beans/tosca/CapabilityTest.java | 124 + .../onap/vid/asdc/beans/tosca/ConstraintTest.java | 221 + .../org/onap/vid/asdc/beans/tosca/GroupTest.java | 124 + .../vid/asdc/beans/tosca/NodeTemplateTest.java | 92 + .../org/onap/vid/asdc/beans/tosca/TestSuite.java | 12 + .../vid/asdc/beans/tosca/TopologyTemplateTest.java | 101 + .../vid/asdc/beans/tosca/ToscaMetadataTest.java | 443 ++ .../onap/vid/asdc/beans/tosca/ToscaModelTest.java | 146 + .../onap/vid/asdc/parser/ToscaParserImpl2Test.java | 154 + .../test/java/org/onap/vid/bl/AaiServiceTest.java | 143 + .../org/onap/vid/client/FakeHttpSessionTest.java | 206 + .../test/java/org/onap/vid/client/TestSuite.java | 11 + .../org/onap/vid/controller/AaiControllerTest.java | 51 + .../vid/controller/HealthCheckControllerTest.java | 47 + .../org/onap/vid/controller/LocalWebConfig.java | 70 + .../org/onap/vid/controller/MsoControllerTest.java | 109 + .../PromiseEcompRequestIdFilterTest.java | 168 + .../vid/controller/PropertyControllerTest.java | 39 + .../onap/vid/controller/ToscaParserMockHelper.java | 42 + .../org/onap/vid/controller/VidControllerTest.java | 187 + .../vid/controller/ViewEditSubControllerTest.java | 45 + .../vid/integrationTest/AaiIntegrationTest.java | 43 + .../java/org/onap/vid/model/ModelUtilTest.java | 48 + .../test/java/org/onap/vid/model/NewNodeTest.java | 212 + .../java/org/onap/vid/model/NewServiceTest.java | 235 + .../test/java/org/onap/vid/model/NewVNFTest.java | 88 + .../java/org/onap/vid/model/ServiceModelTest.java | 123 + .../test/java/org/onap/vid/model/TestSuite.java | 12 + .../java/org/onap/vid/model/VolumeGroupTest.java | 169 + .../test/java/org/onap/vid/model/WorkflowTest.java | 72 + .../src/test/java/org/onap/vid/model/oeModel.java | 10 + .../org/onap/vid/mso/MsoBusinessLogicTest.java | 71 + .../vid/mso/MsoOperationalEnvironmentTest.java | 215 + .../test/java/org/onap/vid/mso/MsoUtilTest.java | 53 + .../onap/vid/mso/RestMsoImplementationTest.java | 20 + .../onap/vid/mso/rest/AsyncRequestStatusTest.java | 91 + .../org/onap/vid/mso/rest/MsoRestClientTest.java | 78 + .../org/onap/vid/mso/rest/OutgoingRequestId.java | 280 + .../org/onap/vid/mso/rest/RelatedInstanceTest.java | 93 + .../org/onap/vid/mso/rest/RelatedModelTest.java | 93 + .../org/onap/vid/mso/rest/RequestDetailsTest.java | 182 + .../test/java/org/onap/vid/mso/rest/TestSuite.java | 12 + .../onap/vid/policy/PolicyResponseWrapperTest.java | 70 + .../org/onap/vid/policy/PolicyRestIntTest.java | 22 + .../onap/vid/policy/PolicyRestInterfaceTest.java | 24 + .../java/org/onap/vid/policy/PolicyUtilTest.java | 54 + .../java/org/onap/vid/policy/RestObjectTest.java | 50 + .../test/java/org/onap/vid/policy/TestSuite.java | 12 + .../onap/vid/policy/rest/RequestDetailsTest.java | 33 + .../java/org/onap/vid/policy/rest/TestSuite.java | 11 + .../java/org/onap/vid/properties/TestSuite.java | 11 + .../org/onap/vid/properties/VidPropertiesTest.java | 31 + .../java/org/onap/vid/roles/RoleProviderTest.java | 50 + .../java/org/onap/vid/roles/RoleValidatorTest.java | 58 + .../test/java/org/onap/vid/roles/TestSuite.java | 11 + .../RestObjects/GetTimeSlotsRestObjectTest.java | 33 + .../PostCreateNewVnfRestObjectTest.java | 33 + .../PostSubmitVnfChangeRestObjectTest.java | 33 + .../vid/scheduler/RestObjects/RestObjectTest.java | 55 + .../PostCreateNewVnfWrapperTest.java | 55 + .../PostSubmitVnfChangeTimeSlotsWrapperTest.java | 55 + .../SchedulerResponseWrapperTest.java | 77 + .../vid/scheduler/SchedulerRestInterfaceTest.java | 26 + .../vid/scheduler/rest/RequestDetailsTest.java | 34 + .../org/onap/vid/scheduler/rest/TestSuite.java | 11 + .../java/org/onap/vid/selenium/FirstClass.java | 605 ++ .../java/org/onap/vid/selenium/LogOutLeftPane.java | 242 + .../services/ChangeManagementServiceImplTest.java | 69 + .../vid/services/ChangeManagementServiceTest.java | 29 + .../services/ChangeManagementServiceUnitTest.java | 107 + .../java/org/onap/vid/services/CsvServiceTest.java | 80 + .../test/java/org/onap/vid/services/TestSuite.java | 11 + .../org/onap/vid/testUtils/IntersectionTest.java | 101 + .../java/org/onap/vid/testUtils/RegExMatcher.java | 29 + .../java/org/onap/vid/testUtils/TestUtils.java | 68 + .../opencomp/vid/controller/MsoControllerTest.java | 112 - .../vid/controller/ToscaParserMockHelper.java | 42 - .../opencomp/vid/controller/VidControllerTest.java | 201 - .../java/org/opencomp/vid/testUtils/TestUtils.java | 65 - ...tyObfuscationConversionCommandLineUtilTest.java | 21 - .../java/org/openecomp/aai/util/TestSuite.java | 11 - .../openecomp/ecomp/vid/selenium/FirstClass.java | 606 -- .../ecomp/vid/selenium/LogOutLeftPane.java | 242 - .../core/MockApplicationContextTestSuite.java | 177 - .../openecomp/fusionapp/controller/NetMapTest.java | 49 - .../fusionapp/service/ProfileServiceTest.java | 75 - .../main/java/org/vid/dao/FnAppDoaImplTest.java | 45 - .../test/java/org/openecomp/vid/RelatedToTest.java | 36 - .../src/test/java/org/openecomp/vid/TestSuite.java | 11 - .../openecomp/vid/aai/AaiGetVnfResponseTest.java | 33 - .../openecomp/vid/aai/ServicePropertiesTest.java | 33 - .../vid/aai/SubscriberAaiResponseTest.java | 22 - .../vid/aai/SubscriberWithFilterTest.java | 30 - .../test/java/org/openecomp/vid/aai/TestSuite.java | 12 - .../java/org/openecomp/vid/aai/VnfResultTest.java | 33 - .../vid/aai/model/RelatedToPropertyTest.java | 55 - .../vid/aai/model/RelationshipDataTest.java | 55 - .../openecomp/vid/aai/model/RelationshipTest.java | 101 - .../vid/aai/model/ServiceRelationshipsTest.java | 165 - .../org/openecomp/vid/aai/model/TestSuite.java | 11 - .../org/openecomp/vid/asdc/beans/ArtifactTest.java | 277 - .../org/openecomp/vid/asdc/beans/ResourceTest.java | 391 - .../openecomp/vid/asdc/beans/SubResourceTest.java | 167 - .../org/openecomp/vid/asdc/beans/TestSuite.java | 11 - .../vid/asdc/beans/tosca/CapabilityTest.java | 124 - .../vid/asdc/beans/tosca/ConstraintTest.java | 221 - .../openecomp/vid/asdc/beans/tosca/GroupTest.java | 124 - .../vid/asdc/beans/tosca/NodeTemplateTest.java | 92 - .../openecomp/vid/asdc/beans/tosca/TestSuite.java | 12 - .../vid/asdc/beans/tosca/TopologyTemplateTest.java | 101 - .../vid/asdc/beans/tosca/ToscaMetadataTest.java | 443 -- .../vid/asdc/beans/tosca/ToscaModelTest.java | 146 - .../openecomp/vid/client/FakeHttpSessionTest.java | 206 - .../java/org/openecomp/vid/client/TestSuite.java | 11 - .../vid/controller/AaiControllerTest.java | 88 - .../vid/controller/HealthCheckControllerTest.java | 47 - .../vid/controller/PropertyControllerTest.java | 58 - .../org/openecomp/vid/controller/TestSuite.java | 12 - .../vid/controller/ViewEditSubControllerTest.java | 45 - .../org/openecomp/vid/model/ModelUtilTest.java | 48 - .../java/org/openecomp/vid/model/NewNodeTest.java | 212 - .../org/openecomp/vid/model/NewServiceTest.java | 235 - .../java/org/openecomp/vid/model/NewVNFTest.java | 88 - .../org/openecomp/vid/model/ServiceModelTest.java | 123 - .../java/org/openecomp/vid/model/TestSuite.java | 12 - .../org/openecomp/vid/model/VolumeGroupTest.java | 169 - .../java/org/openecomp/vid/model/WorkflowTest.java | 72 - .../openecomp/vid/mso/MsoLocalClientNewTest.java | 169 - .../java/org/openecomp/vid/mso/MsoRestIntTest.java | 22 - .../openecomp/vid/mso/MsoRestInterfaceTest.java | 21 - .../java/org/openecomp/vid/mso/MsoUtilTest.java | 53 - .../vid/mso/RestMsoImplementationTest.java | 44 - .../test/java/org/openecomp/vid/mso/TestSuite.java | 12 - .../vid/mso/rest/AsyncRequestStatusTest.java | 91 - .../vid/mso/rest/RelatedInstanceTest.java | 93 - .../openecomp/vid/mso/rest/RelatedModelTest.java | 93 - .../openecomp/vid/mso/rest/RequestDetailsTest.java | 182 - .../java/org/openecomp/vid/mso/rest/TestSuite.java | 12 - .../vid/policy/PolicyResponseWrapperTest.java | 70 - .../openecomp/vid/policy/PolicyRestIntTest.java | 22 - .../vid/policy/PolicyRestInterfaceTest.java | 24 - .../org/openecomp/vid/policy/PolicyUtilTest.java | 54 - .../org/openecomp/vid/policy/RestObjectTest.java | 50 - .../java/org/openecomp/vid/policy/TestSuite.java | 12 - .../vid/policy/rest/RequestDetailsTest.java | 33 - .../org/openecomp/vid/policy/rest/TestSuite.java | 11 - .../org/openecomp/vid/properties/TestSuite.java | 11 - .../vid/properties/VidPropertiesTest.java | 31 - .../org/openecomp/vid/roles/RoleProviderTest.java | 50 - .../org/openecomp/vid/roles/RoleValidatorTest.java | 58 - .../java/org/openecomp/vid/roles/TestSuite.java | 11 - .../RestObjects/GetTimeSlotsRestObjectTest.java | 33 - .../PostCreateNewVnfRestObjectTest.java | 33 - .../PostSubmitVnfChangeRestObjectTest.java | 33 - .../vid/scheduler/RestObjects/RestObjectTest.java | 55 - .../vid/scheduler/RestObjects/TestSuite.java | 12 - .../PostCreateNewVnfWrapperTest.java | 55 - .../PostSubmitVnfChangeTimeSlotsWrapperTest.java | 55 - .../SchedulerResponseWrapperTest.java | 77 - .../SchedulerResponseWrappers/TestSuite.java | 12 - .../vid/scheduler/SchedulerRestInterfaceTest.java | 26 - .../org/openecomp/vid/scheduler/TestSuite.java | 11 - .../vid/scheduler/rest/RequestDetailsTest.java | 33 - .../openecomp/vid/scheduler/rest/TestSuite.java | 11 - .../services/ChangeManagementServiceImplTest.java | 69 - .../vid/services/ChangeManagementServiceTest.java | 29 - .../java/org/openecomp/vid/services/TestSuite.java | 11 - .../test/resources/WEB-INF/conf/system.properties | 36 +- .../resources/WEB-INF/jsp/searchexistingsi.jsp | 6 +- .../test/resources/WEB-INF/jsp/serviceModels.jsp | 66 +- .../src/test/resources/WEB-INF/jsp/testMso.jsp | 2 +- .../test/resources/WEB-INF/jsp/testViewEdit.jsp | 8 +- vid-app-common/src/test/resources/asdc.properties | 2 +- .../src/test/resources/csv_files/csv_to_json.csv | 99 + .../src/test/resources/csv_files/empty_file.csv | 18 + .../test/resources/csv_files/missing_content.csv | 2 + .../test/resources/csv_files/missing_values.csv | 2 + .../src/test/resources/csv_files/one_line.csv | 1 + vid-app-common/src/test/resources/mso.properties | 1 + .../src/test/resources/objectconfig.properties | 2 + ...ctivateOperationalEnvironmentsPayloadToMso.json | 23 + .../createOperationalEnvironmentsPayloadToMso.json | 24 + ...ctivateOperationalEnvironmentsPayloadToMso.json | 12 + .../mso_request_create_configuration.json | 62 + .../test/resources/policy-configuration-csar.JSON | 168 + ...ement_software_update_expected_mso_request.json | 15 + .../change_management_software_update_request.json | 26 + vid-app-common/src/test/resources/vf-csar.JSON | 51 +- vid-app-common/src/test/resources/vl-csar.JSON | 40 +- .../src/test/resources/vnfConfigUpdatePayload.json | 40 + vid-automation/.gitignore | 42 + vid-automation/TestNg.xml | 9 + vid-automation/conf/credentials | 4 + vid-automation/conf/environments | 23 + vid-automation/conf/newEnvironment | 9 + vid-automation/conf/services | 22 + vid-automation/conf/users | 31 + vid-automation/pom.xml | 145 + .../main/java/vid/automation/test/Constants.java | 343 + .../main/java/vid/automation/test/StartTest.java | 66 + .../main/java/vid/automation/test/infra/Click.java | 54 + .../java/vid/automation/test/infra/Exists.java | 34 + .../main/java/vid/automation/test/infra/Get.java | 95 + .../main/java/vid/automation/test/infra/Input.java | 38 + .../vid/automation/test/infra/SelectOption.java | 47 + .../main/java/vid/automation/test/infra/Wait.java | 99 + .../vid/automation/test/model/Credentials.java | 9 + .../vid/automation/test/model/Environment.java | 11 + .../java/vid/automation/test/model/Service.java | 27 + .../vid/automation/test/model/ServicesObject.java | 11 + .../main/java/vid/automation/test/model/User.java | 15 + .../vid/automation/test/model/UsersObject.java | 13 + .../automation/test/sections/BrowseASDCPage.java | 12 + .../test/sections/ChangeManagementPage.java | 15 + .../test/sections/CreateNewInstancePage.java | 21 + .../automation/test/sections/CreationDialog.java | 8 + .../test/sections/LoginExternalPage.java | 29 + .../test/sections/PnfSearchAssociationPage.java | 24 + .../test/sections/SearchExistingPage.java | 77 + .../vid/automation/test/sections/SideMenu.java | 30 + .../test/sections/TestEnvironmentPage.java | 39 + .../vid/automation/test/sections/VidBasePage.java | 132 + .../vid/automation/test/sections/ViewEditPage.java | 84 + .../automation/test/services/BulkRegistration.java | 94 + .../automation/test/services/ServicesService.java | 47 + .../vid/automation/test/services/SimulatorApi.java | 98 + .../vid/automation/test/services/UsersService.java | 31 + .../vid/automation/test/test/AssociatePnfTest.java | 201 + .../vid/automation/test/test/BrowseASDCTest.java | 221 + .../automation/test/test/ChangeManagementTest.java | 596 ++ .../test/test/CreateInstanceDialogBaseTest.java | 35 + .../test/test/CreateNewInstanceTest.java | 84 + .../vid/automation/test/test/EnvironmentsTest.java | 484 ++ .../vid/automation/test/test/ReadOnlyTest.java | 64 + .../test/test/SearchExistingInstanceTest.java | 83 + .../vid/automation/test/test/VidBaseTestCase.java | 235 + .../test/test/ViewEditServiceInstanceTest.java | 158 + .../java/vid/automation/test/utils/ReadFile.java | 33 + .../bad_manifest_structure.json | 1 + .../resources/applicationEnvironment/manifest.json | 12 + .../applicationEnvironment/manifest2.json | 3 + .../manifest_with_wrong_recovery_action.json | 12 + .../applicationEnvironment/non_valid_json.json | 1 + .../src/main/resources/ci/conf/log4j.properties | 34 + .../aai_get_service_instance.json | 80 + .../mso_activate_service_instance.json | 16 + .../mso_activate_service_instance_error.json | 9 + .../mso_activate_service_instance_orch_req.json | 27 + .../ecompportal_getSessionSlotCheckInterval.json | 33 + .../changeManagement/get_aai_get_subscribers.json | 47 + .../changeManagement/get_aai_sub_details.json | 3914 +++++++++ .../get_scheduler_details_short.json | 340 + .../get_sdc_catalog_services_2f80c596.json | 38 + .../get_service-design-and-creation.json | 414 + .../get_vnf_data_by_globalid_and_service_type.json | 554 ++ .../service-design-and-creation.json | 385 + .../ecompportal_getSessionSlotCheckInterval.json | 33 + .../get_operational_environments_aai1.json | 87 + ..._response_for_post_operational_environment.json | 13 + .../post_activate_operational_environment.json | 18 + .../get_attachable_operational_environment.json | 87 + .../error_deactivate_operational_environment.json | 13 + .../get_operational_environments_aai1.json | 87 + .../post_deactivate_operational_environment.json | 18 + .../status/get_cloud_resources_request_status.json | 39 + ...loud_resources_request_status_bad_response.json | 18 + .../get_empty_operational_environment.json | 12 + .../get_error_operational_environment.json | 10 + .../get_full_operational_environment.json | 131 + .../get_operational_environment.json | 139 + .../pProbe/aai_get_logical_link.json | 86 + ...ai_get_service_instance_with_logical_links.json | 185 + .../pProbe/aai_get_specific_pnf.json | 33 + .../pProbe/aai_get_specific_pnf_error.json | 10 + .../pProbe/mso_add_pnf_relationship.json | 15 + .../pProbe/mso_add_pnf_relationship_error.json | 38 + .../pProbe/mso_get_add_relationship_orch_req.json | 27 + .../mso_get_remove_relationship_orch_req.json | 27 + .../pProbe/mso_remove_pnf_relationship.json | 15 + .../pProbe/mso_remove_pnf_relationship_error.json | 9 + .../post_operational_environment.json | 18 + .../aai_filter_service_instance_by_id.json | 21 + .../aai_filter_service_instance_by_id_2.json | 21 + .../aai_get_full_subscribers.json | 108 + .../aai_get_services.json | 124 + .../aai_get_subscribers_for_customer.json | 8289 ++++++++++++++++++++ .../aai_get_subscribers_for_customer_2.json | 734 ++ .../aai_named_query_for_view_edit.json | 383 + .../aai_named_query_for_view_edit_2.json | 43 + vid-ext-services-simulator/README.txt | 436 + vid-ext-services-simulator/pom.xml | 412 + .../simulator/controller/SimulatorController.java | 322 + .../errorHandling/VidSimulatorException.java | 8 + .../java/org/openecomp/simulator/model/Misc.java | 30 + .../simulator/model/SimulatorRequest.java | 67 + .../model/SimulatorRequestResponseExpectation.java | 48 + .../simulator/model/SimulatorResponse.java | 56 + .../simulator/service/TranslatorService.java | 19 + .../src/main/resources/download_files/2f80c596.zip | Bin 0 -> 87075 bytes .../aai_filter_service_instance_by_id.json | 21 + .../aai_get_full_subscribers.json | 108 + .../preset_registration/aai_get_services.json | 124 + .../preset_registration/aai_get_specific_pnf.json | 30 + .../aai_get_subscribers_for_customer.json | 8289 ++++++++++++++++++++ .../aai_named_query_for_view_edit.json | 383 + .../deactivate_service_instance.json | 10 + .../dissociate_pnf_from_service_instance.json | 10 + .../ecompportal_getSessionSlotCheckInterval.json | 33 + .../get_aai_get_subscribers.json | 47 + .../preset_registration/get_aai_sub_details.json | 3914 +++++++++ .../get_cloud_resources_request_status.json | 39 + .../preset_registration/get_logical_link.json | 10 + .../get_operational_environments_aai.json | 88 + .../get_scheduler_details_full.json.REMOVE_ME | 10 + .../get_scheduler_details_short.json | 340 + .../get_sdc_catalog_services_2f80c596.json | 38 + .../get_service-design-and-creation.json | 414 + .../preset_registration/get_service_instance.json | 10 + .../get_vnf_data_by_globalid_and_service_type.json | 554 ++ .../preset_registration/mso_add_relationships.json | 15 + .../post_activate_operational_environment.json | 18 + ...vate_or_deactivate_operational_environment.json | 18 + .../post_deactivate_operational_environment.json | 18 + .../post_operational_environment.json | 18 + .../service-design-and-creation.json | 385 + .../src/main/resources/simulator.properties | 8 + .../src/main/webapp/WEB-INF/rest-servlet.xml | 13 + .../src/main/webapp/WEB-INF/web.xml | 14 + 999 files changed, 84720 insertions(+), 35576 deletions(-) create mode 100644 epsdk-app-onap/src/main/java/org/onap/portalapp/conf/ExternalAppConfig.java create mode 100644 epsdk-app-onap/src/main/java/org/onap/portalapp/conf/ExternalAppInitializer.java create mode 100644 epsdk-app-onap/src/main/java/org/onap/portalapp/conf/HibernateMappingLocations.java create mode 100644 epsdk-app-onap/src/main/java/org/onap/portalapp/lm/FusionLicenseManagerImpl.java create mode 100644 epsdk-app-onap/src/main/java/org/onap/portalapp/lm/LicenseableClassImpl.java create mode 100644 epsdk-app-onap/src/main/java/org/onap/portalapp/login/LoginStrategyImpl.java create mode 100644 epsdk-app-onap/src/main/java/org/onap/portalapp/scheduler/Register.java create mode 100644 epsdk-app-onap/src/main/java/org/onap/portalapp/scheduler/RegistryAdapter.java create mode 100644 epsdk-app-onap/src/main/java/org/onap/portalapp/service/AdminAuthExtension.java delete mode 100755 epsdk-app-onap/src/main/java/org/openecomp/portalapp/conf/ExternalAppConfig.java delete mode 100755 epsdk-app-onap/src/main/java/org/openecomp/portalapp/conf/ExternalAppInitializer.java delete mode 100755 epsdk-app-onap/src/main/java/org/openecomp/portalapp/conf/HibernateMappingLocations.java delete mode 100755 epsdk-app-onap/src/main/java/org/openecomp/portalapp/lm/FusionLicenseManagerImpl.java delete mode 100755 epsdk-app-onap/src/main/java/org/openecomp/portalapp/lm/LicenseableClassImpl.java delete mode 100755 epsdk-app-onap/src/main/java/org/openecomp/portalapp/login/LoginStrategyImpl.java delete mode 100755 epsdk-app-onap/src/main/java/org/openecomp/portalapp/scheduler/Register.java delete mode 100755 epsdk-app-onap/src/main/java/org/openecomp/portalapp/scheduler/RegistryAdapter.java delete mode 100755 epsdk-app-onap/src/main/java/org/openecomp/portalapp/service/AdminAuthExtension.java delete mode 100755 epsdk-app-onap/src/main/swm/common/common.sh delete mode 100755 epsdk-app-onap/src/main/swm/common/localize.sh delete mode 100755 epsdk-app-onap/src/main/swm/common/localize_asdc.sh delete mode 100755 epsdk-app-onap/src/main/swm/common/localize_cache.sh delete mode 100755 epsdk-app-onap/src/main/swm/common/localize_log4j.sh delete mode 100755 epsdk-app-onap/src/main/swm/common/localize_logback.sh delete mode 100755 epsdk-app-onap/src/main/swm/common/localize_portal.sh delete mode 100755 epsdk-app-onap/src/main/swm/common/localize_quartz.sh delete mode 100755 epsdk-app-onap/src/main/swm/common/localize_system.sh delete mode 100755 epsdk-app-onap/src/main/swm/deinstall/postproc/post_proc delete mode 100755 epsdk-app-onap/src/main/swm/deinstall/preproc/pre_proc delete mode 100755 epsdk-app-onap/src/main/swm/descriptor.xml delete mode 100755 epsdk-app-onap/src/main/swm/fallback/postproc/post_proc delete mode 100755 epsdk-app-onap/src/main/swm/fallback/preproc/pre_proc delete mode 100755 epsdk-app-onap/src/main/swm/initinst/postproc/post_proc delete mode 100755 epsdk-app-onap/src/main/swm/initinst/preproc/pre_proc delete mode 100755 epsdk-app-onap/src/main/swm/install/postproc/post_proc delete mode 100755 epsdk-app-onap/src/main/swm/install/preproc/pre_proc delete mode 100755 epsdk-app-onap/src/main/swm/notes.txt create mode 100644 epsdk-app-onap/src/main/webapp/WEB-INF/fusion/jsp/ebz/ebz_header.jsp create mode 100644 epsdk-app-onap/src/main/webapp/WEB-INF/jsp/createnewserviceinstance.jsp create mode 100644 epsdk-app-onap/src/main/webapp/WEB-INF/jsp/searchexistingsi.jsp create mode 100644 epsdk-app-onap/src/main/webapp/WEB-INF/jsp/subscriberdetails.jsp delete mode 100644 epsdk-app-onap/src/main/webapp/app/vid/external/multiselect/angular-bootstrap-multiselect.min.js delete mode 100644 vid-app-common/src/main/java/org/ecomp/aai/model/AaiAICZones/AicZones.java delete mode 100644 vid-app-common/src/main/java/org/ecomp/aai/model/AaiAICZones/Zone.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/RelatedTo.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/aai/AaiClient.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/aai/AaiClientInterface.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/aai/AaiGetVnfResponse.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/aai/AaiResponse.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/aai/OperationalEnvironment.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/aai/ServiceInstance.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/aai/ServiceInstances.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/aai/ServiceInstancesSearchResults.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/aai/ServiceSubscription.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/aai/ServiceSubscriptions.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/aai/Services.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/aai/SubscriberAaiResponse.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/aai/SubscriberData.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/aai/SubscriberFilteredResults.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/aai/SubscriberListWithFilterData.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/aai/SubscriberWithFilter.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/aai/exceptions/InvalidAAIResponseException.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/aai/exceptions/RoleParsingException.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetAicZone/AicZones.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetAicZone/Zone.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetOperationalEnvironments/OperationalEnvironmentList.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetPnfResponse.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetPnfs/Pnf.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetServicesRequestModel/GetServicesAAIRespone.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetServicesRequestModel/Service.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetTenatns/GetTenantsResponse.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/aai/model/AaiRelationResponse.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/aai/model/GetServiceModelsByDistributionStatusResponse.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/aai/model/LogicalLinkResponse.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/aai/model/Model.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/aai/model/ModelVer.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/aai/model/ModelVers.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/aai/model/OwningEntity.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/aai/model/OwningEntityResponse.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/aai/model/PnfProperties.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/aai/model/PnfResult.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/aai/model/Project.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/aai/model/ProjectResponse.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/aai/model/RelatedToProperty.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/aai/model/Relationship.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/aai/model/RelationshipData.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/aai/model/RelationshipList.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/aai/model/Result.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/aai/model/ServiceInstance.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/aai/model/ServiceInstances.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/aai/model/ServiceProperties.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/aai/model/ServiceRelationships.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/aai/model/ServiceSubscription.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/aai/model/Services.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/aai/model/VnfResult.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/aai/util/AAIProperties.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/aai/util/AAIRestInterface.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/aai/util/CustomJacksonJaxBJsonProvider.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/aai/util/HttpsAuthClient.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/aai/util/HttpsComponentsClient.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/aai/util/JettyObfuscationConversionCommandLineUtil.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/asdc/AsdcCatalogException.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/asdc/AsdcClient.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/asdc/beans/Artifact.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/asdc/beans/Resource.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/asdc/beans/SecureService.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/asdc/beans/SecureServices.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/asdc/beans/Service.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/asdc/beans/SubResource.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/Capability.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/Constraint.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/Group.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/Import.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/Input.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/NodeTemplate.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/Property.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/Requirement.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/Schema.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/SubstitutionMappings.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/TopologyTemplate.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/ToscaCsar.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/ToscaMeta.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/ToscaMetadata.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/ToscaModel.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/asdc/local/LocalAsdcClient.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/asdc/memory/InMemoryAsdcClient.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/asdc/parser/ToscaParser.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/asdc/parser/ToscaParserImpl.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/asdc/parser/ToscaParserImpl2.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/asdc/rest/RestfulAsdcClient.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/category/AddCategoryOptionResponse.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/category/AddCategoryOptionsRequest.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/category/CategoryParameterOptionRep.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/category/CategoryParametersResponse.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/changeManagement/ChangeManagementRequest.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/changeManagement/ChangeManagementResponse.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/changeManagement/CloudConfiguration.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/changeManagement/CmResponse.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/changeManagement/GetVnfWorkflowRelationRequest.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/changeManagement/GetWorkflowsResponse.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/changeManagement/LeanCloudConfiguration.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/changeManagement/ModelInfo.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/changeManagement/ModelInfoOfRelatedInstance.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/changeManagement/MsoRequestDetails.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/changeManagement/RelatedInstance.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/changeManagement/RelatedInstanceList.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/changeManagement/RequestDetails.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/changeManagement/RequestDetailsWrapper.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/changeManagement/RequestInfo.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/changeManagement/UpdateRequestInfo.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/changeManagement/VnfDetails.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/changeManagement/VnfDetailsWithWorkflows.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/changeManagement/VnfWorkflowRelationAllResponse.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/changeManagement/VnfWorkflowRelationRequest.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/changeManagement/VnfWorkflowRelationResponse.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/changeManagement/WorkflowsDetail.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/client/FakeHttpSession.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/client/HttpBasicClient.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/client/HttpsBasicClient.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/controller/AaiController.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/controller/ChangeManagementController.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/controller/ControllersUtils.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/controller/HealthCheckController.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/controller/LoggerController.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/controller/MaintenanceController.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/controller/MsoConfig.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/controller/MsoController.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/controller/OperationalEnvironmentController.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/controller/PolicyController.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/controller/PropertyController.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/controller/RoleGeneratorController.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/controller/VidController.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/controller/ViewLogController.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/controller/WebConfig.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/controller/filter/PromiseEcompRequestIdFilter.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/controller/filter/TempFilterForCORS.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/controller/test/TestAaiController.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/controller/test/TestAsdcController.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/controller/test/TestMsoController.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/controller/test/TestPageController.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/dao/FnAppDoaImpl.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/dao/ProfileDao.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/exceptions/NotFoundException.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/exceptions/VidServiceUnavailableException.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/factories/MsoRequestFactory.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/logging/VidLoggerAspect.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/model/CategoryParameter.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/model/CategoryParameterOption.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/model/CommandProperty.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/model/ExceptionResponse.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/model/ExceptionTranslator.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/model/ListOfErrorsResponse.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/model/ModelConstants.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/model/ModelUtil.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/model/MsoExceptionResponse.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/model/Network.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/model/NewNetwork.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/model/NewNode.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/model/NewService.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/model/NewServiceModel.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/model/NewVNF.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/model/Node.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/model/PortMirroringConfig.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/model/ProxyResponse.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/model/RequestReferencesContainer.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/model/Resource.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/model/Result.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/model/Service.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/model/ServiceInstanceSearchResult.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/model/ServiceModel.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/model/ServiceProxy.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/model/Subscriber.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/model/SubscriberList.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/model/VNF.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/model/VNFDao.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/model/VersionByInvariantIdsRequest.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/model/VfModule.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/model/VidWorkflow.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/model/VolumeGroup.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/model/Workflow.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogic.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogicImpl.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/mso/MsoInterface.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/mso/MsoProperties.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/mso/MsoResponseWrapper.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/mso/MsoResponseWrapper2.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/mso/MsoResponseWrapperInterface.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/mso/MsoUtil.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/mso/RestMsoImplementation.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/mso/RestObject.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/mso/model/OperationalEnvironmentActivateInfo.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/mso/model/OperationalEnvironmentDeactivateInfo.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/mso/rest/AsyncRequestStatus.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/mso/rest/MsoRestClientNew.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/mso/rest/OperationalEnvironment/OperationEnvironmentRequestDetails.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/mso/rest/RelatedInstance.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/mso/rest/RelatedModel.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/mso/rest/Request.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/mso/rest/RequestDetails.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/mso/rest/RequestList.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/mso/rest/RequestWrapper.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/mso/rest/Response.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/mso/rest/RestInterface.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/mso/rest/Task.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/mso/rest/TaskList.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/policy/PolicyProperties.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/policy/PolicyResponseWrapper.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/policy/PolicyRestInt.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/policy/PolicyRestInterface.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/policy/PolicyRestInterfaceFactory.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/policy/PolicyRestInterfaceIfc.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/policy/PolicyUtil.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/policy/RestObject.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/policy/rest/RequestDetails.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/properties/AsdcClientConfiguration.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/properties/MsoClientConfiguration.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/properties/VidProperties.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/roles/EcompRole.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/roles/Role.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/roles/RoleProvider.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/roles/RoleValidator.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/scheduler/RestObject.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/scheduler/RestObjects/RestObject.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/scheduler/SchedulerProperties.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/scheduler/SchedulerRestInterface.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/scheduler/SchedulerRestInterfaceFactory.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/scheduler/SchedulerRestInterfaceIfc.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/services/AaiService.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/services/AaiServiceImpl.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/services/CategoryParameterService.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/services/CategoryParameterServiceImpl.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/services/ChangeManagementService.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/services/ChangeManagementServiceImpl.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/services/CsvService.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/services/CsvServiceImpl.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/services/RoleGenaratorServiceImpl.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/services/RoleGeneratorService.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/services/VidService.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/services/VidServiceImpl.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/services/WorkflowService.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/services/WorkflowServiceImpl.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/utils/Intersection.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/utils/Logging.java create mode 100644 vid-app-common/src/main/java/org/onap/vid/utils/Streams.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/aai/util/AAIProperties.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/aai/util/AAIRestInterface.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/aai/util/CustomJacksonJaxBJsonProvider.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/aai/util/HttpsAuthClient.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/aai/util/HttpsComponentsClient.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/aai/util/JettyObfuscationConversionCommandLineUtil.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/RelatedTo.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/aai/AaiClient.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/aai/AaiClientInterface.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/aai/AaiGetVnfResponse.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/aai/AaiResponse.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/aai/ServiceInstance.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/aai/ServiceInstances.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/aai/ServiceProperties.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/aai/ServiceSubscription.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/aai/ServiceSubscriptions.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/aai/Services.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/aai/SubscriberAaiResponse.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/aai/SubscriberData.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/aai/SubscriberFilteredResults.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/aai/SubscriberListWithFilterData.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/aai/SubscriberWithFilter.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/aai/VnfResult.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/aai/exceptions/InvalidAAIResponseException.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/aai/model/AaiGetServicesRequestModel/GetServicesAAIRespone.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/aai/model/AaiGetServicesRequestModel/Service.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/aai/model/AaiGetTenatns/GetTenantsResponse.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/aai/model/RelatedToProperty.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/aai/model/Relationship.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/aai/model/RelationshipData.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/aai/model/RelationshipList.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/aai/model/ServiceInstance.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/aai/model/ServiceInstances.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/aai/model/ServiceRelationships.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/aai/model/ServiceSubscription.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/aai/model/Services.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/asdc/AsdcCatalogException.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/asdc/AsdcClient.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/Artifact.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/Resource.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/SecureService.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/SecureServices.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/Service.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/SubResource.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Capability.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Constraint.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Group.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Import.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Input.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/NodeTemplate.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Property.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Requirement.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Schema.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/SubstitutionMappings.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/TopologyTemplate.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/ToscaCsar.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/ToscaMeta.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/ToscaMetadata.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/ToscaModel.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/asdc/local/LocalAsdcClient.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/asdc/memory/InMemoryAsdcClient.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/asdc/parser/ToscaParser.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/asdc/parser/ToscaParserImpl.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/asdc/parser/ToscaParserImpl2.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/asdc/rest/RestfulAsdcClient.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/changeManagement/ChangeManagementRequest.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/changeManagement/ChangeManagementResponse.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/changeManagement/CloudConfiguration.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/changeManagement/CmResponse.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/changeManagement/LeanCloudConfiguration.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/changeManagement/ModelInfo.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/changeManagement/ModelInfoOfRelatedInstance.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/changeManagement/MsoRequestDetails.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/changeManagement/RelatedInstance.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/changeManagement/RelatedInstanceList.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/changeManagement/RequestDetails.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/changeManagement/RequestDetailsWrapper.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/changeManagement/RequestInfo.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/changeManagement/RequestParameters.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/changeManagement/UpdateRequestInfo.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/client/FakeHttpSession.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/client/HttpBasicClient.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/client/HttpsBasicClient.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/controller/AaiController.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/controller/BrowseServiceTypesController.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/controller/ChangeManagementController.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/controller/HealthCheckController.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/controller/MsoConfig.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/controller/MsoController.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/controller/PolicyController.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/controller/PropertyController.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/controller/SchedulerController.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/controller/VidController.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/controller/ViewEditSubController.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/controller/ViewLogController.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/controller/WebConfig.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/controller/test/TestAaiController.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/controller/test/TestAsdcController.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/controller/test/TestMsoController.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/controller/test/TestPageController.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/dao/FnAppDoaImpl.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/dao/ProfileDao.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/exceptions/VidServiceUnavailableException.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/factories/MsoRequestFactory.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/model/CommandProperty.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/model/ExceptionResponse.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/model/ModelConstants.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/model/ModelUtil.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/model/Network.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/model/NewNetwork.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/model/NewNode.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/model/NewService.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/model/NewServiceModel.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/model/NewVNF.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/model/Node.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/model/ProxyResponse.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/model/Resource.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/model/Result.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/model/Service.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/model/ServiceModel.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/model/Subscriber.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/model/SubscriberList.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/model/VNF.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/model/VersionByInvariantIdsRequest.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/model/VfModule.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/model/VolumeGroup.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/model/Workflow.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/mso/MsoBusinessLogic.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/mso/MsoClientFactory.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/mso/MsoInterface.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/mso/MsoLocalClient.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/mso/MsoLocalClientNew.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/mso/MsoProperties.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/mso/MsoResponseWrapper.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/mso/MsoRestInt.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/mso/MsoRestInterface.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/mso/MsoRestInterfaceFactory.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/mso/MsoRestInterfaceIfc.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/mso/MsoUtil.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/mso/RestMsoImplementation.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/mso/RestObject.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/mso/rest/AsyncRequestStatus.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/mso/rest/MsoBusinessLogicNew.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/mso/rest/MsoRestClientNew.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/mso/rest/RelatedInstance.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/mso/rest/RelatedModel.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/mso/rest/Request.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/mso/rest/RequestDetails.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/mso/rest/RequestList.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/mso/rest/RequestWrapper.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/mso/rest/Response.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/mso/rest/RestInterface.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/mso/rest/Task.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/mso/rest/TaskList.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/policy/PolicyProperties.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/policy/PolicyResponseWrapper.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/policy/PolicyRestInt.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/policy/PolicyRestInterface.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/policy/PolicyRestInterfaceFactory.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/policy/PolicyRestInterfaceIfc.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/policy/PolicyUtil.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/policy/RestObject.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/policy/rest/RequestDetails.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/properties/AsdcClientConfiguration.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/properties/MsoClientConfiguration.java delete mode 100755 vid-app-common/src/main/java/org/openecomp/vid/properties/VidProperties.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/roles/EcompRole.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/roles/Role.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/roles/RoleProvider.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/roles/RoleValidator.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/scheduler/RestObject.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/scheduler/RestObjects/GetTimeSlotsRestObject.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/scheduler/RestObjects/PostCreateNewVnfRestObject.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/scheduler/RestObjects/PostSubmitVnfChangeRestObject.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/scheduler/RestObjects/RestObject.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/scheduler/SchedulerProperties.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/scheduler/SchedulerResponseWrapper.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/scheduler/SchedulerResponseWrappers/GetTimeSlotsWrapper.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/scheduler/SchedulerResponseWrappers/PostCreateNewVnfWrapper.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/scheduler/SchedulerResponseWrappers/PostSubmitVnfChangeTimeSlotsWrapper.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/scheduler/SchedulerResponseWrappers/SchedulerResponseWrapper.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/scheduler/SchedulerRestInt.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/scheduler/SchedulerRestInterface.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/scheduler/SchedulerRestInterfaceFactory.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/scheduler/SchedulerRestInterfaceIfc.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/scheduler/SchedulerUtil.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/scheduler/rest/RequestDetails.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/services/AaiService.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/services/AaiServiceImpl.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/services/ChangeManagementService.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/services/ChangeManagementServiceImpl.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/services/VidService.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/services/VidServiceImpl.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/services/WorkflowService.java delete mode 100644 vid-app-common/src/main/java/org/openecomp/vid/services/WorkflowServiceImpl.java create mode 100644 vid-app-common/src/main/resources/2f80c596.zip create mode 100644 vid-app-common/src/main/resources/aai_config_instance_view_edit.json create mode 100644 vid-app-common/src/main/resources/aai_get_node_template_instances.json create mode 100644 vid-app-common/src/main/resources/adiod.zip create mode 100644 vid-app-common/src/main/resources/csar317927061915233480.zip create mode 100644 vid-app-common/src/main/resources/generateRoleScript.sh create mode 100644 vid-app-common/src/main/resources/owning-entity-properties.JSON rename vid-app-common/src/main/resources/{pnf.csar => pnf.zip} (100%) create mode 100644 vid-app-common/src/main/resources/scripts/category_parameter.sh create mode 100644 vid-app-common/src/main/resources/scripts/update_category_option_name.sh create mode 100644 vid-app-common/src/main/resources/scripts/vnf_wf.sh create mode 100644 vid-app-common/src/main/resources/service-AmpPhSvc-csar.zip create mode 100644 vid-app-common/src/main/resources/service-David-csar.csar create mode 100644 vid-app-common/src/main/resources/service-DemoService1-csar.csar create mode 100644 vid-app-common/src/main/resources/service-Servicecontainermultiplepprobes-csar.csar create mode 100644 vid-app-common/src/main/resources/test.csv create mode 100644 vid-app-common/src/main/webapp/app/vid/external/upload-file/ng-file-upload.min.js create mode 100644 vid-app-common/src/main/webapp/app/vid/icons/collapse-change-managment.svg create mode 100644 vid-app-common/src/main/webapp/app/vid/icons/expand-change-managment.svg create mode 100644 vid-app-common/src/main/webapp/app/vid/icons/refresh-change-managment.svg create mode 100644 vid-app-common/src/main/webapp/app/vid/images/attach.svg create mode 100644 vid-app-common/src/main/webapp/app/vid/images/elipsis_menu_icon.svg create mode 100644 vid-app-common/src/main/webapp/app/vid/images/emptyData.svg create mode 100644 vid-app-common/src/main/webapp/app/vid/images/icon_noconnection.svg create mode 100644 vid-app-common/src/main/webapp/app/vid/images/refresh.svg create mode 100644 vid-app-common/src/main/webapp/app/vid/images/search.svg create mode 100644 vid-app-common/src/main/webapp/app/vid/images/sort_down.svg create mode 100644 vid-app-common/src/main/webapp/app/vid/images/sort_up.svg create mode 100644 vid-app-common/src/main/webapp/app/vid/images/sprite.png create mode 100644 vid-app-common/src/main/webapp/app/vid/images/v.svg create mode 100644 vid-app-common/src/main/webapp/app/vid/scripts/constants/version.json create mode 100644 vid-app-common/src/main/webapp/app/vid/scripts/controller/AddNetworkNodeController.js create mode 100644 vid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceProxyConfigController.js create mode 100644 vid-app-common/src/main/webapp/app/vid/scripts/controller/deleteResumeDialogController.js delete mode 100755 vid-app-common/src/main/webapp/app/vid/scripts/controller/deletionDialogController.js create mode 100644 vid-app-common/src/main/webapp/app/vid/scripts/controller/msoCommitModalController.js create mode 100644 vid-app-common/src/main/webapp/app/vid/scripts/controller/pnfSearchAssociationController.js create mode 100644 vid-app-common/src/main/webapp/app/vid/scripts/controller/testEnvironmentsController.js create mode 100644 vid-app-common/src/main/webapp/app/vid/scripts/directives/messageViewer.js delete mode 100644 vid-app-common/src/main/webapp/app/vid/scripts/directives/parameterBlockDirective.js.orig create mode 100644 vid-app-common/src/main/webapp/app/vid/scripts/directives/search.js create mode 100644 vid-app-common/src/main/webapp/app/vid/scripts/directives/serviceMetadata.js create mode 100644 vid-app-common/src/main/webapp/app/vid/scripts/modals/alert-modal/alert-modal.controller.js create mode 100644 vid-app-common/src/main/webapp/app/vid/scripts/modals/alert-modal/alert-modal.css create mode 100644 vid-app-common/src/main/webapp/app/vid/scripts/modals/alert-modal/alert-modal.html delete mode 100644 vid-app-common/src/main/webapp/app/vid/scripts/modals/alert-new-scheduler/alert-new-scheduler.controller.js delete mode 100644 vid-app-common/src/main/webapp/app/vid/scripts/modals/alert-new-scheduler/alert-new-scheduler.css delete mode 100644 vid-app-common/src/main/webapp/app/vid/scripts/modals/alert-new-scheduler/alert-new-scheduler.html create mode 100644 vid-app-common/src/main/webapp/app/vid/scripts/modals/attach-test-env-manifest/attach-test-env-manifest.controller.js create mode 100644 vid-app-common/src/main/webapp/app/vid/scripts/modals/attach-test-env-manifest/attach-test-env-manifest.css create mode 100644 vid-app-common/src/main/webapp/app/vid/scripts/modals/attach-test-env-manifest/attach-test-env-manifest.html create mode 100644 vid-app-common/src/main/webapp/app/vid/scripts/modals/cancel-pending-workflow/cancel-pending-workflow.controller.js create mode 100644 vid-app-common/src/main/webapp/app/vid/scripts/modals/cancel-pending-workflow/cancel-pending-workflow.css create mode 100644 vid-app-common/src/main/webapp/app/vid/scripts/modals/cancel-pending-workflow/cancel-pending-workflow.html create mode 100644 vid-app-common/src/main/webapp/app/vid/scripts/modals/mso-commit/mso-commit.css create mode 100644 vid-app-common/src/main/webapp/app/vid/scripts/modals/mso-commit/mso-commit.html delete mode 100644 vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.css delete mode 100644 vid-app-common/src/main/webapp/app/vid/scripts/modals/new-scheduler/new-scheduler.controller.js delete mode 100644 vid-app-common/src/main/webapp/app/vid/scripts/modals/new-scheduler/new-scheduler.css delete mode 100644 vid-app-common/src/main/webapp/app/vid/scripts/modals/new-scheduler/new-scheduler.html create mode 100644 vid-app-common/src/main/webapp/app/vid/scripts/modals/new-test-environment/new-test-environment.controller.js create mode 100644 vid-app-common/src/main/webapp/app/vid/scripts/modals/new-test-environment/new-test-environment.html create mode 100644 vid-app-common/src/main/webapp/app/vid/scripts/modals/service-metadata/service-metadata.css create mode 100644 vid-app-common/src/main/webapp/app/vid/scripts/modals/service-metadata/service-metadata.html create mode 100644 vid-app-common/src/main/webapp/app/vid/scripts/services/OwningEntityService.js create mode 100644 vid-app-common/src/main/webapp/app/vid/scripts/services/deleteResumeService.js delete mode 100755 vid-app-common/src/main/webapp/app/vid/scripts/services/deletionService.js create mode 100644 vid-app-common/src/main/webapp/app/vid/scripts/services/pnfService.js create mode 100644 vid-app-common/src/main/webapp/app/vid/scripts/services/testEnvironmentsService.js create mode 100644 vid-app-common/src/main/webapp/app/vid/scripts/view-models/addNetworkNode.htm create mode 100644 vid-app-common/src/main/webapp/app/vid/scripts/view-models/deleteResumeDialog.htm delete mode 100755 vid-app-common/src/main/webapp/app/vid/scripts/view-models/deletionDialog.htm create mode 100644 vid-app-common/src/main/webapp/app/vid/scripts/view-models/messageViewer.htm create mode 100644 vid-app-common/src/main/webapp/app/vid/scripts/view-models/pnfSearchAssociation.htm create mode 100644 vid-app-common/src/main/webapp/app/vid/scripts/view-models/search.htm create mode 100644 vid-app-common/src/main/webapp/app/vid/scripts/view-models/serviceMetadata.htm create mode 100644 vid-app-common/src/main/webapp/app/vid/scripts/view-models/serviceProxyConfig.htm create mode 100644 vid-app-common/src/main/webapp/app/vid/scripts/view-models/testEnvironments.htm create mode 100644 vid-app-common/src/main/webapp/app/vid/styles/buttons.css create mode 100644 vid-app-common/src/main/webapp/app/vid/styles/fonts/OpenSans/Apache License.txt create mode 100644 vid-app-common/src/main/webapp/app/vid/styles/fonts/OpenSans/OpenSans-Bold.ttf create mode 100644 vid-app-common/src/main/webapp/app/vid/styles/fonts/OpenSans/OpenSans-BoldItalic.ttf create mode 100644 vid-app-common/src/main/webapp/app/vid/styles/fonts/OpenSans/OpenSans-ExtraBold.ttf create mode 100644 vid-app-common/src/main/webapp/app/vid/styles/fonts/OpenSans/OpenSans-ExtraBoldItalic.ttf create mode 100644 vid-app-common/src/main/webapp/app/vid/styles/fonts/OpenSans/OpenSans-Italic.ttf create mode 100644 vid-app-common/src/main/webapp/app/vid/styles/fonts/OpenSans/OpenSans-Light.ttf create mode 100644 vid-app-common/src/main/webapp/app/vid/styles/fonts/OpenSans/OpenSans-LightItalic.ttf create mode 100644 vid-app-common/src/main/webapp/app/vid/styles/fonts/OpenSans/OpenSans-Regular.ttf create mode 100644 vid-app-common/src/main/webapp/app/vid/styles/fonts/OpenSans/OpenSans-Semibold.ttf create mode 100644 vid-app-common/src/main/webapp/app/vid/styles/fonts/OpenSans/OpenSans-SemiboldItalic.ttf create mode 100644 vid-app-common/src/main/webapp/app/vid/styles/messageViewer.css create mode 100644 vid-app-common/src/main/webapp/app/vid/styles/modal-buttons.css create mode 100644 vid-app-common/src/main/webapp/app/vid/styles/modal-create-new.css create mode 100644 vid-app-common/src/main/webapp/app/vid/styles/modals.css create mode 100644 vid-app-common/src/main/webapp/app/vid/styles/networkNode.css create mode 100644 vid-app-common/src/main/webapp/app/vid/styles/pnfSearchAssociation.css create mode 100644 vid-app-common/src/main/webapp/app/vid/styles/search.css create mode 100644 vid-app-common/src/main/webapp/app/vid/styles/serviceMetadata.css create mode 100644 vid-app-common/src/main/webapp/app/vid/styles/serviceProxyConfig.css create mode 100644 vid-app-common/src/main/webapp/app/vid/styles/testEnvironments.css create mode 100644 vid-app-common/src/test/java/org/onap/aai/util/JettyObfuscationConversionCommandLineUtilTest.java create mode 100644 vid-app-common/src/test/java/org/onap/aai/util/TestSuite.java create mode 100644 vid-app-common/src/test/java/org/onap/ecomp/vid/selenium/FirstClass.java create mode 100644 vid-app-common/src/test/java/org/onap/ecomp/vid/selenium/LogOutLeftPane.java create mode 100644 vid-app-common/src/test/java/org/onap/fusion/core/MockApplicationContextTestSuite.java create mode 100644 vid-app-common/src/test/java/org/onap/fusionapp/controller/NetMapTest.java create mode 100644 vid-app-common/src/test/java/org/onap/fusionapp/service/ProfileServiceTest.java create mode 100644 vid-app-common/src/test/java/org/onap/src/main/java/org/vid/dao/FnAppDoaImplTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/RelatedToTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/TestSuite.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/aai/AaiGetVnfResponseTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/aai/ServicePropertiesTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/aai/SubscriberAaiResponseTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/aai/SubscriberWithFilterTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/aai/TestSuite.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/aai/VnfResultTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/aai/model/RelatedToPropertyTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/aai/model/RelationshipDataTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/aai/model/RelationshipTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/aai/model/ServiceRelationshipsTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/aai/model/TestSuite.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/asdc/beans/ArtifactTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/asdc/beans/ResourceTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/asdc/beans/SubResourceTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/asdc/beans/TestSuite.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/asdc/beans/tosca/CapabilityTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/asdc/beans/tosca/ConstraintTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/asdc/beans/tosca/GroupTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/asdc/beans/tosca/NodeTemplateTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/asdc/beans/tosca/TestSuite.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/asdc/beans/tosca/TopologyTemplateTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/asdc/beans/tosca/ToscaMetadataTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/asdc/beans/tosca/ToscaModelTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/asdc/parser/ToscaParserImpl2Test.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/bl/AaiServiceTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/client/FakeHttpSessionTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/client/TestSuite.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/controller/AaiControllerTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/controller/HealthCheckControllerTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/controller/LocalWebConfig.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/controller/MsoControllerTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/controller/PromiseEcompRequestIdFilterTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/controller/PropertyControllerTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/controller/ToscaParserMockHelper.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/controller/VidControllerTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/controller/ViewEditSubControllerTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/integrationTest/AaiIntegrationTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/model/ModelUtilTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/model/NewNodeTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/model/NewServiceTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/model/NewVNFTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/model/ServiceModelTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/model/TestSuite.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/model/VolumeGroupTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/model/WorkflowTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/model/oeModel.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/mso/MsoBusinessLogicTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/mso/MsoOperationalEnvironmentTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/mso/MsoUtilTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/mso/RestMsoImplementationTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/mso/rest/AsyncRequestStatusTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/mso/rest/MsoRestClientTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/mso/rest/OutgoingRequestId.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/mso/rest/RelatedInstanceTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/mso/rest/RelatedModelTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/mso/rest/RequestDetailsTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/mso/rest/TestSuite.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/policy/PolicyResponseWrapperTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/policy/PolicyRestIntTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/policy/PolicyRestInterfaceTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/policy/PolicyUtilTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/policy/RestObjectTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/policy/TestSuite.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/policy/rest/RequestDetailsTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/policy/rest/TestSuite.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/properties/TestSuite.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/properties/VidPropertiesTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/roles/RoleProviderTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/roles/RoleValidatorTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/roles/TestSuite.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/scheduler/RestObjects/GetTimeSlotsRestObjectTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/scheduler/RestObjects/PostCreateNewVnfRestObjectTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/scheduler/RestObjects/PostSubmitVnfChangeRestObjectTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/scheduler/RestObjects/RestObjectTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/scheduler/SchedulerResponseWrappers/PostCreateNewVnfWrapperTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/scheduler/SchedulerResponseWrappers/PostSubmitVnfChangeTimeSlotsWrapperTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/scheduler/SchedulerResponseWrappers/SchedulerResponseWrapperTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/scheduler/SchedulerRestInterfaceTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/scheduler/rest/RequestDetailsTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/scheduler/rest/TestSuite.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/selenium/FirstClass.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/selenium/LogOutLeftPane.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/services/ChangeManagementServiceImplTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/services/ChangeManagementServiceTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/services/ChangeManagementServiceUnitTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/services/CsvServiceTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/services/TestSuite.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/testUtils/IntersectionTest.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/testUtils/RegExMatcher.java create mode 100644 vid-app-common/src/test/java/org/onap/vid/testUtils/TestUtils.java delete mode 100644 vid-app-common/src/test/java/org/opencomp/vid/controller/MsoControllerTest.java delete mode 100644 vid-app-common/src/test/java/org/opencomp/vid/controller/ToscaParserMockHelper.java delete mode 100644 vid-app-common/src/test/java/org/opencomp/vid/controller/VidControllerTest.java delete mode 100644 vid-app-common/src/test/java/org/opencomp/vid/testUtils/TestUtils.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/aai/util/JettyObfuscationConversionCommandLineUtilTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/aai/util/TestSuite.java delete mode 100755 vid-app-common/src/test/java/org/openecomp/ecomp/vid/selenium/FirstClass.java delete mode 100755 vid-app-common/src/test/java/org/openecomp/ecomp/vid/selenium/LogOutLeftPane.java delete mode 100755 vid-app-common/src/test/java/org/openecomp/fusion/core/MockApplicationContextTestSuite.java delete mode 100755 vid-app-common/src/test/java/org/openecomp/fusionapp/controller/NetMapTest.java delete mode 100755 vid-app-common/src/test/java/org/openecomp/fusionapp/service/ProfileServiceTest.java delete mode 100755 vid-app-common/src/test/java/org/openecomp/src/main/java/org/vid/dao/FnAppDoaImplTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/RelatedToTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/TestSuite.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/aai/AaiGetVnfResponseTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/aai/ServicePropertiesTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/aai/SubscriberAaiResponseTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/aai/SubscriberWithFilterTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/aai/TestSuite.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/aai/VnfResultTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/aai/model/RelatedToPropertyTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/aai/model/RelationshipDataTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/aai/model/RelationshipTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/aai/model/ServiceRelationshipsTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/aai/model/TestSuite.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/asdc/beans/ArtifactTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/asdc/beans/ResourceTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/asdc/beans/SubResourceTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/asdc/beans/TestSuite.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/asdc/beans/tosca/CapabilityTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/asdc/beans/tosca/ConstraintTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/asdc/beans/tosca/GroupTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/asdc/beans/tosca/NodeTemplateTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/asdc/beans/tosca/TestSuite.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/asdc/beans/tosca/TopologyTemplateTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/asdc/beans/tosca/ToscaMetadataTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/asdc/beans/tosca/ToscaModelTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/client/FakeHttpSessionTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/client/TestSuite.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/controller/AaiControllerTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/controller/HealthCheckControllerTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/controller/PropertyControllerTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/controller/TestSuite.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/controller/ViewEditSubControllerTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/model/ModelUtilTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/model/NewNodeTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/model/NewServiceTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/model/NewVNFTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/model/ServiceModelTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/model/TestSuite.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/model/VolumeGroupTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/model/WorkflowTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/mso/MsoLocalClientNewTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/mso/MsoRestIntTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/mso/MsoRestInterfaceTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/mso/MsoUtilTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/mso/RestMsoImplementationTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/mso/TestSuite.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/mso/rest/AsyncRequestStatusTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/mso/rest/RelatedInstanceTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/mso/rest/RelatedModelTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/mso/rest/RequestDetailsTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/mso/rest/TestSuite.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/policy/PolicyResponseWrapperTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/policy/PolicyRestIntTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/policy/PolicyRestInterfaceTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/policy/PolicyUtilTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/policy/RestObjectTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/policy/TestSuite.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/policy/rest/RequestDetailsTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/policy/rest/TestSuite.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/properties/TestSuite.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/properties/VidPropertiesTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/roles/RoleProviderTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/roles/RoleValidatorTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/roles/TestSuite.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/scheduler/RestObjects/GetTimeSlotsRestObjectTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/scheduler/RestObjects/PostCreateNewVnfRestObjectTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/scheduler/RestObjects/PostSubmitVnfChangeRestObjectTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/scheduler/RestObjects/RestObjectTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/scheduler/RestObjects/TestSuite.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/scheduler/SchedulerResponseWrappers/PostCreateNewVnfWrapperTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/scheduler/SchedulerResponseWrappers/PostSubmitVnfChangeTimeSlotsWrapperTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/scheduler/SchedulerResponseWrappers/SchedulerResponseWrapperTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/scheduler/SchedulerResponseWrappers/TestSuite.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/scheduler/SchedulerRestInterfaceTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/scheduler/TestSuite.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/scheduler/rest/RequestDetailsTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/scheduler/rest/TestSuite.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/services/ChangeManagementServiceImplTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/services/ChangeManagementServiceTest.java delete mode 100644 vid-app-common/src/test/java/org/openecomp/vid/services/TestSuite.java create mode 100644 vid-app-common/src/test/resources/csv_files/csv_to_json.csv create mode 100644 vid-app-common/src/test/resources/csv_files/empty_file.csv create mode 100644 vid-app-common/src/test/resources/csv_files/missing_content.csv create mode 100644 vid-app-common/src/test/resources/csv_files/missing_values.csv create mode 100644 vid-app-common/src/test/resources/csv_files/one_line.csv create mode 100644 vid-app-common/src/test/resources/payload_jsons/activateOperationalEnvironmentsPayloadToMso.json create mode 100644 vid-app-common/src/test/resources/payload_jsons/createOperationalEnvironmentsPayloadToMso.json create mode 100644 vid-app-common/src/test/resources/payload_jsons/deactivateOperationalEnvironmentsPayloadToMso.json create mode 100644 vid-app-common/src/test/resources/payload_jsons/mso_request_create_configuration.json create mode 100644 vid-app-common/src/test/resources/policy-configuration-csar.JSON create mode 100644 vid-app-common/src/test/resources/services/change_management_software_update_expected_mso_request.json create mode 100644 vid-app-common/src/test/resources/services/change_management_software_update_request.json create mode 100644 vid-app-common/src/test/resources/vnfConfigUpdatePayload.json create mode 100644 vid-automation/.gitignore create mode 100644 vid-automation/TestNg.xml create mode 100644 vid-automation/conf/credentials create mode 100644 vid-automation/conf/environments create mode 100644 vid-automation/conf/newEnvironment create mode 100644 vid-automation/conf/services create mode 100644 vid-automation/conf/users create mode 100644 vid-automation/pom.xml create mode 100644 vid-automation/src/main/java/vid/automation/test/Constants.java create mode 100644 vid-automation/src/main/java/vid/automation/test/StartTest.java create mode 100644 vid-automation/src/main/java/vid/automation/test/infra/Click.java create mode 100644 vid-automation/src/main/java/vid/automation/test/infra/Exists.java create mode 100644 vid-automation/src/main/java/vid/automation/test/infra/Get.java create mode 100644 vid-automation/src/main/java/vid/automation/test/infra/Input.java create mode 100644 vid-automation/src/main/java/vid/automation/test/infra/SelectOption.java create mode 100644 vid-automation/src/main/java/vid/automation/test/infra/Wait.java create mode 100644 vid-automation/src/main/java/vid/automation/test/model/Credentials.java create mode 100644 vid-automation/src/main/java/vid/automation/test/model/Environment.java create mode 100644 vid-automation/src/main/java/vid/automation/test/model/Service.java create mode 100644 vid-automation/src/main/java/vid/automation/test/model/ServicesObject.java create mode 100644 vid-automation/src/main/java/vid/automation/test/model/User.java create mode 100644 vid-automation/src/main/java/vid/automation/test/model/UsersObject.java create mode 100644 vid-automation/src/main/java/vid/automation/test/sections/BrowseASDCPage.java create mode 100644 vid-automation/src/main/java/vid/automation/test/sections/ChangeManagementPage.java create mode 100644 vid-automation/src/main/java/vid/automation/test/sections/CreateNewInstancePage.java create mode 100644 vid-automation/src/main/java/vid/automation/test/sections/CreationDialog.java create mode 100644 vid-automation/src/main/java/vid/automation/test/sections/LoginExternalPage.java create mode 100644 vid-automation/src/main/java/vid/automation/test/sections/PnfSearchAssociationPage.java create mode 100644 vid-automation/src/main/java/vid/automation/test/sections/SearchExistingPage.java create mode 100644 vid-automation/src/main/java/vid/automation/test/sections/SideMenu.java create mode 100644 vid-automation/src/main/java/vid/automation/test/sections/TestEnvironmentPage.java create mode 100644 vid-automation/src/main/java/vid/automation/test/sections/VidBasePage.java create mode 100644 vid-automation/src/main/java/vid/automation/test/sections/ViewEditPage.java create mode 100644 vid-automation/src/main/java/vid/automation/test/services/BulkRegistration.java create mode 100644 vid-automation/src/main/java/vid/automation/test/services/ServicesService.java create mode 100644 vid-automation/src/main/java/vid/automation/test/services/SimulatorApi.java create mode 100644 vid-automation/src/main/java/vid/automation/test/services/UsersService.java create mode 100644 vid-automation/src/main/java/vid/automation/test/test/AssociatePnfTest.java create mode 100644 vid-automation/src/main/java/vid/automation/test/test/BrowseASDCTest.java create mode 100644 vid-automation/src/main/java/vid/automation/test/test/ChangeManagementTest.java create mode 100644 vid-automation/src/main/java/vid/automation/test/test/CreateInstanceDialogBaseTest.java create mode 100644 vid-automation/src/main/java/vid/automation/test/test/CreateNewInstanceTest.java create mode 100644 vid-automation/src/main/java/vid/automation/test/test/EnvironmentsTest.java create mode 100644 vid-automation/src/main/java/vid/automation/test/test/ReadOnlyTest.java create mode 100644 vid-automation/src/main/java/vid/automation/test/test/SearchExistingInstanceTest.java create mode 100644 vid-automation/src/main/java/vid/automation/test/test/VidBaseTestCase.java create mode 100644 vid-automation/src/main/java/vid/automation/test/test/ViewEditServiceInstanceTest.java create mode 100644 vid-automation/src/main/java/vid/automation/test/utils/ReadFile.java create mode 100644 vid-automation/src/main/resources/applicationEnvironment/bad_manifest_structure.json create mode 100644 vid-automation/src/main/resources/applicationEnvironment/manifest.json create mode 100644 vid-automation/src/main/resources/applicationEnvironment/manifest2.json create mode 100644 vid-automation/src/main/resources/applicationEnvironment/manifest_with_wrong_recovery_action.json create mode 100644 vid-automation/src/main/resources/applicationEnvironment/non_valid_json.json create mode 100644 vid-automation/src/main/resources/ci/conf/log4j.properties create mode 100644 vid-automation/src/main/resources/registration_to_simulator/activateDeactivate/aai_get_service_instance.json create mode 100644 vid-automation/src/main/resources/registration_to_simulator/activateDeactivate/mso_activate_service_instance.json create mode 100644 vid-automation/src/main/resources/registration_to_simulator/activateDeactivate/mso_activate_service_instance_error.json create mode 100644 vid-automation/src/main/resources/registration_to_simulator/activateDeactivate/mso_activate_service_instance_orch_req.json create mode 100644 vid-automation/src/main/resources/registration_to_simulator/changeManagement/ecompportal_getSessionSlotCheckInterval.json create mode 100644 vid-automation/src/main/resources/registration_to_simulator/changeManagement/get_aai_get_subscribers.json create mode 100644 vid-automation/src/main/resources/registration_to_simulator/changeManagement/get_aai_sub_details.json create mode 100644 vid-automation/src/main/resources/registration_to_simulator/changeManagement/get_scheduler_details_short.json create mode 100644 vid-automation/src/main/resources/registration_to_simulator/changeManagement/get_sdc_catalog_services_2f80c596.json create mode 100644 vid-automation/src/main/resources/registration_to_simulator/changeManagement/get_service-design-and-creation.json create mode 100644 vid-automation/src/main/resources/registration_to_simulator/changeManagement/get_vnf_data_by_globalid_and_service_type.json create mode 100644 vid-automation/src/main/resources/registration_to_simulator/changeManagement/service-design-and-creation.json create mode 100644 vid-automation/src/main/resources/registration_to_simulator/ecompportal_getSessionSlotCheckInterval.json create mode 100644 vid-automation/src/main/resources/registration_to_simulator/environment/activate/get_operational_environments_aai1.json create mode 100644 vid-automation/src/main/resources/registration_to_simulator/environment/activate/mso_error_response_for_post_operational_environment.json create mode 100644 vid-automation/src/main/resources/registration_to_simulator/environment/activate/post_activate_operational_environment.json create mode 100644 vid-automation/src/main/resources/registration_to_simulator/environment/attachManifest/get_attachable_operational_environment.json create mode 100644 vid-automation/src/main/resources/registration_to_simulator/environment/deactivate/error_deactivate_operational_environment.json create mode 100644 vid-automation/src/main/resources/registration_to_simulator/environment/deactivate/get_operational_environments_aai1.json create mode 100644 vid-automation/src/main/resources/registration_to_simulator/environment/deactivate/post_deactivate_operational_environment.json create mode 100644 vid-automation/src/main/resources/registration_to_simulator/environment/status/get_cloud_resources_request_status.json create mode 100644 vid-automation/src/main/resources/registration_to_simulator/environment/status/get_cloud_resources_request_status_bad_response.json create mode 100644 vid-automation/src/main/resources/registration_to_simulator/get_empty_operational_environment.json create mode 100644 vid-automation/src/main/resources/registration_to_simulator/get_error_operational_environment.json create mode 100644 vid-automation/src/main/resources/registration_to_simulator/get_full_operational_environment.json create mode 100644 vid-automation/src/main/resources/registration_to_simulator/get_operational_environment.json create mode 100644 vid-automation/src/main/resources/registration_to_simulator/pProbe/aai_get_logical_link.json create mode 100644 vid-automation/src/main/resources/registration_to_simulator/pProbe/aai_get_service_instance_with_logical_links.json create mode 100644 vid-automation/src/main/resources/registration_to_simulator/pProbe/aai_get_specific_pnf.json create mode 100644 vid-automation/src/main/resources/registration_to_simulator/pProbe/aai_get_specific_pnf_error.json create mode 100644 vid-automation/src/main/resources/registration_to_simulator/pProbe/mso_add_pnf_relationship.json create mode 100644 vid-automation/src/main/resources/registration_to_simulator/pProbe/mso_add_pnf_relationship_error.json create mode 100644 vid-automation/src/main/resources/registration_to_simulator/pProbe/mso_get_add_relationship_orch_req.json create mode 100644 vid-automation/src/main/resources/registration_to_simulator/pProbe/mso_get_remove_relationship_orch_req.json create mode 100644 vid-automation/src/main/resources/registration_to_simulator/pProbe/mso_remove_pnf_relationship.json create mode 100644 vid-automation/src/main/resources/registration_to_simulator/pProbe/mso_remove_pnf_relationship_error.json create mode 100644 vid-automation/src/main/resources/registration_to_simulator/post_operational_environment.json create mode 100644 vid-automation/src/main/resources/registration_to_simulator/search_for_service_instance/aai_filter_service_instance_by_id.json create mode 100644 vid-automation/src/main/resources/registration_to_simulator/search_for_service_instance/aai_filter_service_instance_by_id_2.json create mode 100644 vid-automation/src/main/resources/registration_to_simulator/search_for_service_instance/aai_get_full_subscribers.json create mode 100644 vid-automation/src/main/resources/registration_to_simulator/search_for_service_instance/aai_get_services.json create mode 100644 vid-automation/src/main/resources/registration_to_simulator/search_for_service_instance/aai_get_subscribers_for_customer.json create mode 100644 vid-automation/src/main/resources/registration_to_simulator/search_for_service_instance/aai_get_subscribers_for_customer_2.json create mode 100644 vid-automation/src/main/resources/registration_to_simulator/search_for_service_instance/aai_named_query_for_view_edit.json create mode 100644 vid-automation/src/main/resources/registration_to_simulator/search_for_service_instance/aai_named_query_for_view_edit_2.json create mode 100644 vid-ext-services-simulator/README.txt create mode 100644 vid-ext-services-simulator/pom.xml create mode 100644 vid-ext-services-simulator/src/main/java/org/openecomp/simulator/controller/SimulatorController.java create mode 100644 vid-ext-services-simulator/src/main/java/org/openecomp/simulator/errorHandling/VidSimulatorException.java create mode 100644 vid-ext-services-simulator/src/main/java/org/openecomp/simulator/model/Misc.java create mode 100644 vid-ext-services-simulator/src/main/java/org/openecomp/simulator/model/SimulatorRequest.java create mode 100644 vid-ext-services-simulator/src/main/java/org/openecomp/simulator/model/SimulatorRequestResponseExpectation.java create mode 100644 vid-ext-services-simulator/src/main/java/org/openecomp/simulator/model/SimulatorResponse.java create mode 100644 vid-ext-services-simulator/src/main/java/org/openecomp/simulator/service/TranslatorService.java create mode 100644 vid-ext-services-simulator/src/main/resources/download_files/2f80c596.zip create mode 100644 vid-ext-services-simulator/src/main/resources/preset_registration/aai_filter_service_instance_by_id.json create mode 100644 vid-ext-services-simulator/src/main/resources/preset_registration/aai_get_full_subscribers.json create mode 100644 vid-ext-services-simulator/src/main/resources/preset_registration/aai_get_services.json create mode 100644 vid-ext-services-simulator/src/main/resources/preset_registration/aai_get_specific_pnf.json create mode 100644 vid-ext-services-simulator/src/main/resources/preset_registration/aai_get_subscribers_for_customer.json create mode 100644 vid-ext-services-simulator/src/main/resources/preset_registration/aai_named_query_for_view_edit.json create mode 100644 vid-ext-services-simulator/src/main/resources/preset_registration/deactivate_service_instance.json create mode 100644 vid-ext-services-simulator/src/main/resources/preset_registration/dissociate_pnf_from_service_instance.json create mode 100644 vid-ext-services-simulator/src/main/resources/preset_registration/ecompportal_getSessionSlotCheckInterval.json create mode 100644 vid-ext-services-simulator/src/main/resources/preset_registration/get_aai_get_subscribers.json create mode 100644 vid-ext-services-simulator/src/main/resources/preset_registration/get_aai_sub_details.json create mode 100644 vid-ext-services-simulator/src/main/resources/preset_registration/get_cloud_resources_request_status.json create mode 100644 vid-ext-services-simulator/src/main/resources/preset_registration/get_logical_link.json create mode 100644 vid-ext-services-simulator/src/main/resources/preset_registration/get_operational_environments_aai.json create mode 100644 vid-ext-services-simulator/src/main/resources/preset_registration/get_scheduler_details_full.json.REMOVE_ME create mode 100644 vid-ext-services-simulator/src/main/resources/preset_registration/get_scheduler_details_short.json create mode 100644 vid-ext-services-simulator/src/main/resources/preset_registration/get_sdc_catalog_services_2f80c596.json create mode 100644 vid-ext-services-simulator/src/main/resources/preset_registration/get_service-design-and-creation.json create mode 100644 vid-ext-services-simulator/src/main/resources/preset_registration/get_service_instance.json create mode 100644 vid-ext-services-simulator/src/main/resources/preset_registration/get_vnf_data_by_globalid_and_service_type.json create mode 100644 vid-ext-services-simulator/src/main/resources/preset_registration/mso_add_relationships.json create mode 100644 vid-ext-services-simulator/src/main/resources/preset_registration/post_activate_operational_environment.json create mode 100644 vid-ext-services-simulator/src/main/resources/preset_registration/post_activate_or_deactivate_operational_environment.json create mode 100644 vid-ext-services-simulator/src/main/resources/preset_registration/post_deactivate_operational_environment.json create mode 100644 vid-ext-services-simulator/src/main/resources/preset_registration/post_operational_environment.json create mode 100644 vid-ext-services-simulator/src/main/resources/preset_registration/service-design-and-creation.json create mode 100644 vid-ext-services-simulator/src/main/resources/simulator.properties create mode 100644 vid-ext-services-simulator/src/main/webapp/WEB-INF/rest-servlet.xml create mode 100644 vid-ext-services-simulator/src/main/webapp/WEB-INF/web.xml diff --git a/deliveries/pom.xml b/deliveries/pom.xml index 29ecf6582..e5129d973 100755 --- a/deliveries/pom.xml +++ b/deliveries/pom.xml @@ -3,13 +3,13 @@ 4.0.0 - org.openecomp.vid + org.onap.vid vid-parent 1.1.0-SNAPSHOT pom - org.openecomp.vid + org.onap.vid vid-deliveries VID Deliveries @@ -35,7 +35,7 @@ 1.23 - openecomp/vid:${project.version} + onap/vid:${project.version} remove docker-files diff --git a/deliveries/src/main/docker/docker-files/docker-compose.yml b/deliveries/src/main/docker/docker-files/docker-compose.yml index 25a7acfc3..508867a7e 100755 --- a/deliveries/src/main/docker/docker-files/docker-compose.yml +++ b/deliveries/src/main/docker/docker-files/docker-compose.yml @@ -1,7 +1,7 @@ version: '2' services: vid-server: - image: openecomp/vid + image: onap/vid ports: - "8080:8080" links: diff --git a/epsdk-app-onap/pom.xml b/epsdk-app-onap/pom.xml index bd32fb753..e8622f012 100755 --- a/epsdk-app-onap/pom.xml +++ b/epsdk-app-onap/pom.xml @@ -6,7 +6,7 @@ - org.openecomp.vid + org.onap.vid epsdk-app-onap 1.1.1-SNAPSHOT war diff --git a/epsdk-app-onap/src/main/java/org/onap/portalapp/conf/ExternalAppConfig.java b/epsdk-app-onap/src/main/java/org/onap/portalapp/conf/ExternalAppConfig.java new file mode 100644 index 000000000..eb110931e --- /dev/null +++ b/epsdk-app-onap/src/main/java/org/onap/portalapp/conf/ExternalAppConfig.java @@ -0,0 +1,248 @@ +/*- + * ================================================================================ + * ECOMP Portal SDK + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ================================================================================ + */ +package org.onap.portalapp.conf; + +import java.util.ArrayList; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.sql.DataSource; + +import org.onap.portalapp.login.LoginStrategyImpl; +import org.onap.portalapp.scheduler.RegistryAdapter; +import org.openecomp.portalsdk.core.auth.LoginStrategy; +import org.openecomp.portalsdk.core.conf.AppConfig; +import org.openecomp.portalsdk.core.conf.Configurable; +import org.openecomp.portalsdk.core.lm.FusionLicenseManager; +import org.openecomp.portalsdk.core.lm.FusionLicenseManagerUtils; +//import org.openecomp.portalsdk.core.lm.LicenseableClassImpl; +import org.openecomp.portalsdk.core.objectcache.AbstractCacheManager; +import org.openecomp.portalsdk.core.service.DataAccessService; +import org.openecomp.portalsdk.core.util.CacheManager; +import org.openecomp.portalsdk.core.util.SystemProperties; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Import; +import org.springframework.context.annotation.Profile; +import org.springframework.context.annotation.PropertySource; +import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; +import org.springframework.core.io.Resource; +import org.springframework.jdbc.datasource.init.DataSourceInitializer; +import org.springframework.jdbc.datasource.init.DatabasePopulator; +import org.springframework.jdbc.datasource.init.ResourceDatabasePopulator; +import org.springframework.scheduling.annotation.EnableAsync; +import org.springframework.scheduling.annotation.EnableScheduling; +import org.springframework.scheduling.quartz.SchedulerFactoryBean; +import org.springframework.web.servlet.ViewResolver; +import org.springframework.web.servlet.config.annotation.EnableWebMvc; +import org.springframework.web.servlet.config.annotation.InterceptorRegistry; +import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; +import org.openecomp.portalsdk.core.service.DataAccessService; +import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +/** + * ECOMP Portal SDK sample application. ECOMP Portal SDK core AppConfig class to + * reuse interceptors, view resolvers and other features defined there. + */ +@Configuration +@EnableWebMvc +@ComponentScan(basePackages = "org.openecomp") +@PropertySource(value = { "${container.classpath:}/WEB-INF/conf/app/test.properties" }, ignoreResourceNotFound = true) +@Profile("src") +@EnableAsync +@EnableScheduling +public class ExternalAppConfig extends AppConfig implements Configurable { + + private RegistryAdapter schedulerRegistryAdapter; + /** The Constant LOG. */ + private static final EELFLoggerDelegate LOG = EELFLoggerDelegate.getLogger(ExternalAppConfig.class); + + /** The vid schema script. */ + @Value("classpath:vid-schema.sql") + private Resource vidSchemaScript; + + /** The vid data script. */ + @Value("classpath:vid-data.sql") + private Resource vidDataScript; + + /** + * The Class InnerConfiguration. + */ + @Configuration + @Import(SystemProperties.class) + static class InnerConfiguration { + } + + /** + * View resolver. + * + * @return the view resolver + * @see org.openecomp.portalsdk.core.conf.AppConfig#viewResolver() + */ + public ViewResolver viewResolver() { + return super.viewResolver(); + } + + /** + * @see org.openecomp.portalsdk.core.conf.AppConfig#addResourceHandlers(ResourceHandlerRegistry) + * + * @param registry + */ + public void addResourceHandlers(ResourceHandlerRegistry registry) { + super.addResourceHandlers(registry); + } + + /** + * @see org.openecomp.portalsdk.core.conf.AppConfig#dataAccessService() + */ + public DataAccessService dataAccessService() { + // Echo the JDBC URL to assist developers when starting the app. + System.out.println("ExternalAppConfig: " + SystemProperties.DB_CONNECTIONURL + " is " + + SystemProperties.getProperty(SystemProperties.DB_CONNECTIONURL)); + return super.dataAccessService(); + } + + /** + * Creates a new list with a single entry that is the external app + * definitions.xml path. + * + * @return List of String, size 1 + */ + public List addTileDefinitions() { + List definitions = new ArrayList(); + definitions.add("/WEB-INF/defs/definitions.xml"); + return definitions; + } + + /** + * Adds request interceptors to the specified registry by calling + * {@link AppConfig#addInterceptors(InterceptorRegistry)}, but excludes + * certain paths from the session timeout interceptor. + */ + @Override + public void addInterceptors(InterceptorRegistry registry) { + super.setExcludeUrlPathsForSessionTimeout("/login_external", "*/login_external.htm", "login", "/login.htm", + "/api*", "/single_signon.htm", "/single_signon"); + super.addInterceptors(registry); + } + + /** + * Creates and returns a new instance of a {@link CacheManager} class. + * + * @return New instance of {@link CacheManager} + */ + @Bean + public AbstractCacheManager cacheManager() { + return new CacheManager(); + } + + + + + /** + * Creates and returns a new instance of a {@link FusionLicenseManager}. + * + * @return New instance of {@link FusionLicenseManager}. + */ +// @Bean +// public FusionLicenseManager fusionLicenseManager() { +// return new FusionLicenseManagerImpl(); +// } + + /** + * Creates and returns a new instance of a + * {@link FusionLicenseManagerUtils}. + * + * @return New instance of {@link FusionLicenseManagerUtils}. + */ +// @Bean +// public FusionLicenseManagerUtils fusionLicenseManagerUtils() { +// return new FusionLicenseManagerUtils(); +// } + + /** + * Creates and returns a new instance of a {@link SchedulerFactoryBean} and + * populates it with triggers. + * + * @return New instance of {@link SchedulerFactoryBean} + * @throws Exception + */ + // @Bean // ANNOTATION COMMENTED OUT + // APPLICATIONS REQUIRING QUARTZ SHOULD RESTORE ANNOTATION + public SchedulerFactoryBean schedulerFactoryBean() throws Exception { + SchedulerFactoryBean scheduler = new SchedulerFactoryBean(); + scheduler.setTriggers(schedulerRegistryAdapter.getTriggers()); + scheduler.setConfigLocation(appApplicationContext.getResource("WEB-INF/conf/quartz.properties")); + scheduler.setDataSource(dataSource()); + return scheduler; + } + + /** + * Data source initializer. + * + * @param dataSource the data source + * @return the data source initializer + */ + @Bean + public DataSourceInitializer dataSourceInitializer(DataSource dataSource) { + + LOG.info("Initializing VID data source"); + + final DataSourceInitializer initializer = new DataSourceInitializer(); + initializer.setDataSource(dataSource); + initializer.setDatabasePopulator(databasePopulator()); + return initializer; + } + + /** + * Database populator. + * + * @return the database populator + */ + public DatabasePopulator databasePopulator() { + LOG.info("Populating VID data source"); + + final ResourceDatabasePopulator populator = new ResourceDatabasePopulator(); + populator.addScript(vidSchemaScript); + populator.addScript(vidDataScript); + return populator; + } + + /** + * Sets the scheduler registry adapter. + * + * @param schedulerRegistryAdapter + */ + @Autowired + public void setSchedulerRegistryAdapter(final RegistryAdapter schedulerRegistryAdapter) { + this.schedulerRegistryAdapter = schedulerRegistryAdapter; + } + + /** + * Creates the LoginStrategy + * @return instance of LoginStrategy + */ + @Bean + public LoginStrategy loginStrategy() { + + return new LoginStrategyImpl(); + } +} diff --git a/epsdk-app-onap/src/main/java/org/onap/portalapp/conf/ExternalAppInitializer.java b/epsdk-app-onap/src/main/java/org/onap/portalapp/conf/ExternalAppInitializer.java new file mode 100644 index 000000000..347bb51e1 --- /dev/null +++ b/epsdk-app-onap/src/main/java/org/onap/portalapp/conf/ExternalAppInitializer.java @@ -0,0 +1,47 @@ +/*- + * ================================================================================ + * ECOMP Portal SDK + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ================================================================================ + */ +package org.onap.portalapp.conf; + +import org.openecomp.portalsdk.core.conf.AppInitializer; + +public class ExternalAppInitializer extends AppInitializer { + + @Override + protected Class[] getRootConfigClasses() { + return super.getRootConfigClasses(); + } + + @Override + protected Class[] getServletConfigClasses() { + Class appConfigClass = ExternalAppConfig.class; + // Show something on stdout to indicate the app is starting. + System.out.println("ExternalAppInitializer: servlet configuration class is " + appConfigClass.getName()); + return new Class[] { appConfigClass }; + } + + /* + * URL request will direct to the Spring dispatcher for processing + */ + @Override + protected String[] getServletMappings() { + return super.getServletMappings(); + } + +} diff --git a/epsdk-app-onap/src/main/java/org/onap/portalapp/conf/HibernateMappingLocations.java b/epsdk-app-onap/src/main/java/org/onap/portalapp/conf/HibernateMappingLocations.java new file mode 100644 index 000000000..e0e09d6a9 --- /dev/null +++ b/epsdk-app-onap/src/main/java/org/onap/portalapp/conf/HibernateMappingLocations.java @@ -0,0 +1,57 @@ +/*- + * ================================================================================ + * ECOMP Portal SDK + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ================================================================================ + */ +package org.onap.portalapp.conf; + +import org.springframework.context.annotation.Profile; +import org.springframework.core.io.ClassPathResource; +import org.springframework.core.io.Resource; +import org.springframework.stereotype.Component; + +import org.openecomp.portalsdk.core.conf.HibernateMappingLocatable; + +@Component +@Profile("src") +public class HibernateMappingLocations implements HibernateMappingLocatable { + + /* + * (non-Javadoc) + * + * @see org.openecomp.portalsdk.core.conf.HibernateMappingLocatable# + * getMappingLocations() + */ + @Override + public Resource[] getMappingLocations() { + return new Resource[] { new ClassPathResource("../fusion/orm/Fusion.hbm.xml"), + new ClassPathResource("../fusion/orm/Workflow.hbm.xml"), + new ClassPathResource("../fusion/orm/RNoteBookIntegration.hbm.xml") }; + } + + /* + * (non-Javadoc) + * + * @see org.openecomp.portalsdk.core.conf.HibernateMappingLocatable# + * getPackagesToScan() + */ + @Override + public String[] getPackagesToScan() { + return new String[] { "org.openecomp" }; + } + +} diff --git a/epsdk-app-onap/src/main/java/org/onap/portalapp/lm/FusionLicenseManagerImpl.java b/epsdk-app-onap/src/main/java/org/onap/portalapp/lm/FusionLicenseManagerImpl.java new file mode 100644 index 000000000..75569d4c5 --- /dev/null +++ b/epsdk-app-onap/src/main/java/org/onap/portalapp/lm/FusionLicenseManagerImpl.java @@ -0,0 +1,70 @@ +package org.onap.portalapp.lm; + +import java.util.Date; +import java.util.List; +import java.util.Map; + +import javax.servlet.ServletContext; + +import org.openecomp.portalsdk.core.lm.FusionLicenseManager; +import org.springframework.stereotype.Component; + +/* + * Please note that this class is not being used; its a dummy stub to have a qualifying bean for the interface. + */ + +@Component +public class FusionLicenseManagerImpl implements FusionLicenseManager { + + @Override + public void initKeyStoreParam() { + + } + + @Override + public void initCipherParam() { + + } + + @Override + public void initLicenseParam() { + + } + + @Override + public void doInitWork() { + + } + + @Override + public int installLicense() { + return 0; + } + + @Override + public synchronized int verifyLicense(ServletContext context) { + return 0; + } + + @Override + public void generateLicense(Map clientInfoMap, List ipAddressList) throws Exception { + + } + + @Override + public String nvl(String s) { + return null; + } + + @Override + public Date getExpiredDate() { + return null; + } + + @Override + public void setExpiredDate(Date expiredDate) { + + } + + +} diff --git a/epsdk-app-onap/src/main/java/org/onap/portalapp/lm/LicenseableClassImpl.java b/epsdk-app-onap/src/main/java/org/onap/portalapp/lm/LicenseableClassImpl.java new file mode 100644 index 000000000..856d8e0ed --- /dev/null +++ b/epsdk-app-onap/src/main/java/org/onap/portalapp/lm/LicenseableClassImpl.java @@ -0,0 +1,62 @@ +/*- + * ================================================================================ + * eCOMP Portal SDK + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ================================================================================ + */ +package org.onap.portalapp.lm; + +import java.io.FileNotFoundException; +import java.io.InputStream; + +import org.openecomp.portalsdk.core.lm.LicenseableClass; + +/* + * Please note that this class is not being used; its a dummy stub to have a qualifying bean for the interface. + */ + +public class LicenseableClassImpl implements LicenseableClass { + + public String getApplicationName() { + return ""; + } + + public InputStream getPublicKeystoreAsInputStream() throws FileNotFoundException { + return null; + } + + public String getAlias() { + return ""; + } + + public String getKeyPasswd() { + return ""; + } + + public String getPublicKeystorePassword() { + return ""; + } + + public String getCipherParamPassword() { + return ""; + } + + @SuppressWarnings("rawtypes") + public Class getClassToLicense() { + return this.getClass(); + } +} + diff --git a/epsdk-app-onap/src/main/java/org/onap/portalapp/login/LoginStrategyImpl.java b/epsdk-app-onap/src/main/java/org/onap/portalapp/login/LoginStrategyImpl.java new file mode 100644 index 000000000..b04202290 --- /dev/null +++ b/epsdk-app-onap/src/main/java/org/onap/portalapp/login/LoginStrategyImpl.java @@ -0,0 +1,69 @@ +package org.onap.portalapp.login; + +import javax.servlet.http.Cookie; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.openecomp.portalsdk.core.auth.LoginStrategy; +import org.openecomp.portalsdk.core.onboarding.exception.PortalAPIException; +import org.openecomp.portalsdk.core.onboarding.util.CipherUtil; +import org.openecomp.portalsdk.core.onboarding.util.PortalApiConstants; +import org.openecomp.portalsdk.core.onboarding.util.PortalApiProperties; +import org.springframework.web.servlet.ModelAndView; + +public class LoginStrategyImpl extends LoginStrategy { + + @Override + public ModelAndView doLogin(HttpServletRequest request, HttpServletResponse response) throws Exception { + //'login' for opensource is same as 'external' login. + return doExternalLogin(request, response); + } + + @Override + public String getUserId(HttpServletRequest request) throws PortalAPIException { + // Check ECOMP Portal cookie + if (!isLoginCookieExist(request)) + return null; + + String userid = null; + try { + userid = getUserIdFromCookie(request); + } catch (Exception e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + return userid; + } + + private static String getUserIdFromCookie(HttpServletRequest request) throws Exception { + String userId = ""; + Cookie[] cookies = request.getCookies(); + Cookie userIdcookie = null; + if (cookies != null) + for (Cookie cookie : cookies) + if (cookie.getName().equals(USER_ID)) + userIdcookie = cookie; + if(userIdcookie!=null){ + userId = CipherUtil.decrypt(userIdcookie.getValue()); + } + return userId; + + } + + private static boolean isLoginCookieExist(HttpServletRequest request) { + Cookie ep = getCookie(request, EP_SERVICE); + return (ep != null); + } + + private static Cookie getCookie(HttpServletRequest request, String cookieName) { + Cookie[] cookies = request.getCookies(); + if (cookies != null) + for (Cookie cookie : cookies) + if (cookie.getName().equals(cookieName)) + return cookie; + + return null; + } + + +} diff --git a/epsdk-app-onap/src/main/java/org/onap/portalapp/scheduler/Register.java b/epsdk-app-onap/src/main/java/org/onap/portalapp/scheduler/Register.java new file mode 100644 index 000000000..165f3318d --- /dev/null +++ b/epsdk-app-onap/src/main/java/org/onap/portalapp/scheduler/Register.java @@ -0,0 +1,72 @@ +/*- + * ================================================================================ + * ECOMP Portal SDK + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ================================================================================ + */ +package org.onap.portalapp.scheduler; + +import java.util.ArrayList; +import java.util.List; + +import org.openecomp.portalapp.scheduler.LogRegistry; +import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.openecomp.portalsdk.core.scheduler.Registerable; +import org.openecomp.portalsdk.core.util.SystemProperties; +import org.quartz.Trigger; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.DependsOn; +import org.springframework.stereotype.Component; + +@Component +@DependsOn({ "logRegistry", "systemProperties" }) +public class Register implements Registerable { + + EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(Register.class); + + private List scheduleTriggers = new ArrayList(); + Trigger trigger[] = new Trigger[1]; + + @Autowired + private LogRegistry logRegistry; + + @Override + public Trigger[] getTriggers() { + return getScheduleTriggers().toArray(trigger); + } + + @Override + public void registerTriggers() { + // if the property value is not available; the cron will not be added + // and can be ignored. its safe to ignore the exceptions + try { + if (SystemProperties.getProperty(SystemProperties.LOG_CRON) != null) + getScheduleTriggers().add(logRegistry.getTrigger()); + } catch (IllegalStateException ies) { + logger.info(EELFLoggerDelegate.debugLogger, ("Log Cron not available")); + } + + } + + public List getScheduleTriggers() { + return scheduleTriggers; + } + + public void setScheduleTriggers(List scheduleTriggers) { + this.scheduleTriggers = scheduleTriggers; + } + +} diff --git a/epsdk-app-onap/src/main/java/org/onap/portalapp/scheduler/RegistryAdapter.java b/epsdk-app-onap/src/main/java/org/onap/portalapp/scheduler/RegistryAdapter.java new file mode 100644 index 000000000..2cb5d89fe --- /dev/null +++ b/epsdk-app-onap/src/main/java/org/onap/portalapp/scheduler/RegistryAdapter.java @@ -0,0 +1,92 @@ +/*- + * ================================================================================ + * ECOMP Portal SDK + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ================================================================================ + */ +package org.onap.portalapp.scheduler; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import org.openecomp.portalsdk.core.scheduler.Registerable; +import org.openecomp.portalsdk.workflow.services.WorkflowScheduleService; +import org.quartz.Trigger; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.scheduling.quartz.SchedulerFactoryBean; +import org.springframework.stereotype.Component; + +@Component +public class RegistryAdapter { + + @Autowired + private Registerable registry; + + @Autowired + private WorkflowScheduleService workflowScheduleService; + + private SchedulerFactoryBean schedulerBean; + + Trigger trigger[] = new Trigger[1]; + + public Trigger[] getTriggers() { + + registry.registerTriggers(); + + List allTriggers = new ArrayList(); + + List coreTriggers = addCoreTriggers(); + final Trigger[] extTriggerArray = registry.getTriggers(); + + allTriggers.addAll(Arrays.asList(extTriggerArray)); + allTriggers.addAll(coreTriggers); + + return allTriggers.toArray(trigger); + } + + public List addCoreTriggers() { + // On startup of the application after crash recovery, invoke workflow + // schedule trigger + List triggers = getWorkflowScheduleService().triggerWorkflowScheduling(); + return triggers; + } + + public void setSchedulerBean(SchedulerFactoryBean _schedulerBean) { + schedulerBean = _schedulerBean; + } + + public SchedulerFactoryBean getSchedulerBean() { + return schedulerBean; + } + + public Registerable getRegistry() { + return registry; + } + + public void setRegistry(Registerable registry) { + this.registry = registry; + } + + public WorkflowScheduleService getWorkflowScheduleService() { + return workflowScheduleService; + } + + public void setWorkflowScheduleService(WorkflowScheduleService workflowScheduleService) { + this.workflowScheduleService = workflowScheduleService; + } + +} diff --git a/epsdk-app-onap/src/main/java/org/onap/portalapp/service/AdminAuthExtension.java b/epsdk-app-onap/src/main/java/org/onap/portalapp/service/AdminAuthExtension.java new file mode 100644 index 000000000..e3dbdf82d --- /dev/null +++ b/epsdk-app-onap/src/main/java/org/onap/portalapp/service/AdminAuthExtension.java @@ -0,0 +1,65 @@ +/*- + * ================================================================================ + * ECOMP Portal SDK + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ================================================================================ + */ +package org.onap.portalapp.service; + +import java.util.Set; + +import org.openecomp.portalapp.service.IAdminAuthExtension; +import org.openecomp.portalsdk.core.domain.Role; +import org.openecomp.portalsdk.core.domain.User; +import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + + +@Service("adminAuthExtension") +@Transactional +/** + * Provides empty implementations of the methods in IAdminAuthExtension. + */ +public class AdminAuthExtension implements IAdminAuthExtension { + + EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(AdminAuthExtension.class); + + /* + * (non-Javadoc) + * @see org.openecomp.portalapp.service.IAdminAuthExtension#saveUserExtension(org.openecomp.portalsdk.core.domain.User) + */ + public void saveUserExtension(User user) { + logger.debug("saveUserExtension"); + } + + /* + * (non-Javadoc) + * @see org.openecomp.portalapp.service.IAdminAuthExtension#editUserExtension(org.openecomp.portalsdk.core.domain.User) + */ + public void editUserExtension(User user) { + logger.debug("editUserExtension"); + } + + /* + * (non-Javadoc) + * @see org.openecomp.portalapp.service.IAdminAuthExtension#saveUserRoleExtension(java.util.Set, org.openecomp.portalsdk.core.domain.User) + */ + public void saveUserRoleExtension(Set roles, User user) { + logger.debug("saveUserRoleExtension"); + } + +} diff --git a/epsdk-app-onap/src/main/java/org/openecomp/portalapp/conf/ExternalAppConfig.java b/epsdk-app-onap/src/main/java/org/openecomp/portalapp/conf/ExternalAppConfig.java deleted file mode 100755 index f713cf110..000000000 --- a/epsdk-app-onap/src/main/java/org/openecomp/portalapp/conf/ExternalAppConfig.java +++ /dev/null @@ -1,249 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalapp.conf; - -import java.util.ArrayList; -import java.util.List; -import javax.annotation.PostConstruct; -import javax.sql.DataSource; - -//import org.openecomp.portalapp.lm.FusionLicenseManagerImpl; -import org.openecomp.portalapp.login.LoginStrategyImpl; -import org.openecomp.portalapp.scheduler.RegistryAdapter; -import org.openecomp.portalsdk.core.auth.LoginStrategy; -import org.openecomp.portalsdk.core.conf.AppConfig; -import org.openecomp.portalsdk.core.conf.Configurable; -import org.openecomp.portalsdk.core.lm.FusionLicenseManager; -import org.openecomp.portalsdk.core.lm.FusionLicenseManagerUtils; -//import org.openecomp.portalsdk.core.lm.LicenseableClassImpl; -import org.openecomp.portalsdk.core.objectcache.AbstractCacheManager; -import org.openecomp.portalsdk.core.service.DataAccessService; -import org.openecomp.portalsdk.core.util.CacheManager; -import org.openecomp.portalsdk.core.util.SystemProperties; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.Import; -import org.springframework.context.annotation.Profile; -import org.springframework.context.annotation.PropertySource; -import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; -import org.springframework.core.io.Resource; -import org.springframework.jdbc.datasource.init.DataSourceInitializer; -import org.springframework.jdbc.datasource.init.DatabasePopulator; -import org.springframework.jdbc.datasource.init.ResourceDatabasePopulator; -import org.springframework.scheduling.annotation.EnableAsync; -import org.springframework.scheduling.annotation.EnableScheduling; -import org.springframework.scheduling.quartz.SchedulerFactoryBean; -import org.springframework.web.servlet.ViewResolver; -import org.springframework.web.servlet.config.annotation.EnableWebMvc; -import org.springframework.web.servlet.config.annotation.InterceptorRegistry; -import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; -import org.openecomp.portalsdk.core.service.DataAccessService; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -/** - * ECOMP Portal SDK sample application. ECOMP Portal SDK core AppConfig class to - * reuse interceptors, view resolvers and other features defined there. - */ -@Configuration -@EnableWebMvc -@ComponentScan(basePackages = "org.openecomp") -@PropertySource(value = { "${container.classpath:}/WEB-INF/conf/app/test.properties" }, ignoreResourceNotFound = true) -@Profile("src") -@EnableAsync -@EnableScheduling -public class ExternalAppConfig extends AppConfig implements Configurable { - - private RegistryAdapter schedulerRegistryAdapter; - /** The Constant LOG. */ - private static final EELFLoggerDelegate LOG = EELFLoggerDelegate.getLogger(ExternalAppConfig.class); - - /** The vid schema script. */ - @Value("classpath:vid-schema.sql") - private Resource vidSchemaScript; - - /** The vid data script. */ - @Value("classpath:vid-data.sql") - private Resource vidDataScript; - - /** - * The Class InnerConfiguration. - */ - @Configuration - @Import(SystemProperties.class) - static class InnerConfiguration { - } - - /** - * View resolver. - * - * @return the view resolver - * @see org.openecomp.portalsdk.core.conf.AppConfig#viewResolver() - */ - public ViewResolver viewResolver() { - return super.viewResolver(); - } - - /** - * @see org.openecomp.portalsdk.core.conf.AppConfig#addResourceHandlers(ResourceHandlerRegistry) - * - * @param registry - */ - public void addResourceHandlers(ResourceHandlerRegistry registry) { - super.addResourceHandlers(registry); - } - - /** - * @see org.openecomp.portalsdk.core.conf.AppConfig#dataAccessService() - */ - public DataAccessService dataAccessService() { - // Echo the JDBC URL to assist developers when starting the app. - System.out.println("ExternalAppConfig: " + SystemProperties.DB_CONNECTIONURL + " is " - + SystemProperties.getProperty(SystemProperties.DB_CONNECTIONURL)); - return super.dataAccessService(); - } - - /** - * Creates a new list with a single entry that is the external app - * definitions.xml path. - * - * @return List of String, size 1 - */ - public List addTileDefinitions() { - List definitions = new ArrayList(); - definitions.add("/WEB-INF/defs/definitions.xml"); - return definitions; - } - - /** - * Adds request interceptors to the specified registry by calling - * {@link AppConfig#addInterceptors(InterceptorRegistry)}, but excludes - * certain paths from the session timeout interceptor. - */ - @Override - public void addInterceptors(InterceptorRegistry registry) { - super.setExcludeUrlPathsForSessionTimeout("/login_external", "*/login_external.htm", "login", "/login.htm", - "/api*", "/single_signon.htm", "/single_signon"); - super.addInterceptors(registry); - } - - /** - * Creates and returns a new instance of a {@link CacheManager} class. - * - * @return New instance of {@link CacheManager} - */ - @Bean - public AbstractCacheManager cacheManager() { - return new CacheManager(); - } - - - - - /** - * Creates and returns a new instance of a {@link FusionLicenseManager}. - * - * @return New instance of {@link FusionLicenseManager}. - */ -// @Bean -// public FusionLicenseManager fusionLicenseManager() { -// return new FusionLicenseManagerImpl(); -// } - - /** - * Creates and returns a new instance of a - * {@link FusionLicenseManagerUtils}. - * - * @return New instance of {@link FusionLicenseManagerUtils}. - */ -// @Bean -// public FusionLicenseManagerUtils fusionLicenseManagerUtils() { -// return new FusionLicenseManagerUtils(); -// } - - /** - * Creates and returns a new instance of a {@link SchedulerFactoryBean} and - * populates it with triggers. - * - * @return New instance of {@link SchedulerFactoryBean} - * @throws Exception - */ - // @Bean // ANNOTATION COMMENTED OUT - // APPLICATIONS REQUIRING QUARTZ SHOULD RESTORE ANNOTATION - public SchedulerFactoryBean schedulerFactoryBean() throws Exception { - SchedulerFactoryBean scheduler = new SchedulerFactoryBean(); - scheduler.setTriggers(schedulerRegistryAdapter.getTriggers()); - scheduler.setConfigLocation(appApplicationContext.getResource("WEB-INF/conf/quartz.properties")); - scheduler.setDataSource(dataSource()); - return scheduler; - } - - /** - * Data source initializer. - * - * @param dataSource the data source - * @return the data source initializer - */ - @Bean - public DataSourceInitializer dataSourceInitializer(DataSource dataSource) { - - LOG.info("Initializing VID data source"); - - final DataSourceInitializer initializer = new DataSourceInitializer(); - initializer.setDataSource(dataSource); - initializer.setDatabasePopulator(databasePopulator()); - return initializer; - } - - /** - * Database populator. - * - * @return the database populator - */ - public DatabasePopulator databasePopulator() { - LOG.info("Populating VID data source"); - - final ResourceDatabasePopulator populator = new ResourceDatabasePopulator(); - populator.addScript(vidSchemaScript); - populator.addScript(vidDataScript); - return populator; - } - - /** - * Sets the scheduler registry adapter. - * - * @param schedulerRegistryAdapter - */ - @Autowired - public void setSchedulerRegistryAdapter(final RegistryAdapter schedulerRegistryAdapter) { - this.schedulerRegistryAdapter = schedulerRegistryAdapter; - } - - /** - * Creates the LoginStrategy - * @return instance of LoginStrategy - */ - @Bean - public LoginStrategy loginStrategy() { - - return new LoginStrategyImpl(); - } -} diff --git a/epsdk-app-onap/src/main/java/org/openecomp/portalapp/conf/ExternalAppInitializer.java b/epsdk-app-onap/src/main/java/org/openecomp/portalapp/conf/ExternalAppInitializer.java deleted file mode 100755 index 6e5354a36..000000000 --- a/epsdk-app-onap/src/main/java/org/openecomp/portalapp/conf/ExternalAppInitializer.java +++ /dev/null @@ -1,47 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalapp.conf; - -import org.openecomp.portalsdk.core.conf.AppInitializer; - -public class ExternalAppInitializer extends AppInitializer { - - @Override - protected Class[] getRootConfigClasses() { - return super.getRootConfigClasses(); - } - - @Override - protected Class[] getServletConfigClasses() { - Class appConfigClass = ExternalAppConfig.class; - // Show something on stdout to indicate the app is starting. - System.out.println("ExternalAppInitializer: servlet configuration class is " + appConfigClass.getName()); - return new Class[] { appConfigClass }; - } - - /* - * URL request will direct to the Spring dispatcher for processing - */ - @Override - protected String[] getServletMappings() { - return super.getServletMappings(); - } - -} diff --git a/epsdk-app-onap/src/main/java/org/openecomp/portalapp/conf/HibernateMappingLocations.java b/epsdk-app-onap/src/main/java/org/openecomp/portalapp/conf/HibernateMappingLocations.java deleted file mode 100755 index bc751f750..000000000 --- a/epsdk-app-onap/src/main/java/org/openecomp/portalapp/conf/HibernateMappingLocations.java +++ /dev/null @@ -1,57 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalapp.conf; - -import org.springframework.context.annotation.Profile; -import org.springframework.core.io.ClassPathResource; -import org.springframework.core.io.Resource; -import org.springframework.stereotype.Component; - -import org.openecomp.portalsdk.core.conf.HibernateMappingLocatable; - -@Component -@Profile("src") -public class HibernateMappingLocations implements HibernateMappingLocatable { - - /* - * (non-Javadoc) - * - * @see org.openecomp.portalsdk.core.conf.HibernateMappingLocatable# - * getMappingLocations() - */ - @Override - public Resource[] getMappingLocations() { - return new Resource[] { new ClassPathResource("../fusion/orm/Fusion.hbm.xml"), - new ClassPathResource("../fusion/orm/Workflow.hbm.xml"), - new ClassPathResource("../fusion/orm/RNoteBookIntegration.hbm.xml") }; - } - - /* - * (non-Javadoc) - * - * @see org.openecomp.portalsdk.core.conf.HibernateMappingLocatable# - * getPackagesToScan() - */ - @Override - public String[] getPackagesToScan() { - return new String[] { "org.openecomp" }; - } - -} diff --git a/epsdk-app-onap/src/main/java/org/openecomp/portalapp/lm/FusionLicenseManagerImpl.java b/epsdk-app-onap/src/main/java/org/openecomp/portalapp/lm/FusionLicenseManagerImpl.java deleted file mode 100755 index e6a393668..000000000 --- a/epsdk-app-onap/src/main/java/org/openecomp/portalapp/lm/FusionLicenseManagerImpl.java +++ /dev/null @@ -1,70 +0,0 @@ -package org.openecomp.portalapp.lm; - -import java.util.Date; -import java.util.List; -import java.util.Map; - -import javax.servlet.ServletContext; - -import org.openecomp.portalsdk.core.lm.FusionLicenseManager; -import org.springframework.stereotype.Component; - -/* - * Please note that this class is not being used; its a dummy stub to have a qualifying bean for the interface. - */ - -@Component -public class FusionLicenseManagerImpl implements FusionLicenseManager { - - @Override - public void initKeyStoreParam() { - - } - - @Override - public void initCipherParam() { - - } - - @Override - public void initLicenseParam() { - - } - - @Override - public void doInitWork() { - - } - - @Override - public int installLicense() { - return 0; - } - - @Override - public synchronized int verifyLicense(ServletContext context) { - return 0; - } - - @Override - public void generateLicense(Map clientInfoMap, List ipAddressList) throws Exception { - - } - - @Override - public String nvl(String s) { - return null; - } - - @Override - public Date getExpiredDate() { - return null; - } - - @Override - public void setExpiredDate(Date expiredDate) { - - } - - -} diff --git a/epsdk-app-onap/src/main/java/org/openecomp/portalapp/lm/LicenseableClassImpl.java b/epsdk-app-onap/src/main/java/org/openecomp/portalapp/lm/LicenseableClassImpl.java deleted file mode 100755 index d688987ff..000000000 --- a/epsdk-app-onap/src/main/java/org/openecomp/portalapp/lm/LicenseableClassImpl.java +++ /dev/null @@ -1,62 +0,0 @@ -/*- - * ================================================================================ - * eCOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalapp.lm; - -import java.io.FileNotFoundException; -import java.io.InputStream; - -import org.openecomp.portalsdk.core.lm.LicenseableClass; - -/* - * Please note that this class is not being used; its a dummy stub to have a qualifying bean for the interface. - */ - -public class LicenseableClassImpl implements LicenseableClass { - - public String getApplicationName() { - return ""; - } - - public InputStream getPublicKeystoreAsInputStream() throws FileNotFoundException { - return null; - } - - public String getAlias() { - return ""; - } - - public String getKeyPasswd() { - return ""; - } - - public String getPublicKeystorePassword() { - return ""; - } - - public String getCipherParamPassword() { - return ""; - } - - @SuppressWarnings("rawtypes") - public Class getClassToLicense() { - return this.getClass(); - } -} - diff --git a/epsdk-app-onap/src/main/java/org/openecomp/portalapp/login/LoginStrategyImpl.java b/epsdk-app-onap/src/main/java/org/openecomp/portalapp/login/LoginStrategyImpl.java deleted file mode 100755 index e004c241b..000000000 --- a/epsdk-app-onap/src/main/java/org/openecomp/portalapp/login/LoginStrategyImpl.java +++ /dev/null @@ -1,69 +0,0 @@ -package org.openecomp.portalapp.login; - -import javax.servlet.http.Cookie; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.openecomp.portalsdk.core.auth.LoginStrategy; -import org.openecomp.portalsdk.core.onboarding.exception.PortalAPIException; -import org.openecomp.portalsdk.core.onboarding.util.CipherUtil; -import org.openecomp.portalsdk.core.onboarding.util.PortalApiConstants; -import org.openecomp.portalsdk.core.onboarding.util.PortalApiProperties; -import org.springframework.web.servlet.ModelAndView; - -public class LoginStrategyImpl extends LoginStrategy { - - @Override - public ModelAndView doLogin(HttpServletRequest request, HttpServletResponse response) throws Exception { - //'login' for opensource is same as 'external' login. - return doExternalLogin(request, response); - } - - @Override - public String getUserId(HttpServletRequest request) throws PortalAPIException { - // Check ECOMP Portal cookie - if (!isLoginCookieExist(request)) - return null; - - String userid = null; - try { - userid = getUserIdFromCookie(request); - } catch (Exception e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return userid; - } - - private static String getUserIdFromCookie(HttpServletRequest request) throws Exception { - String userId = ""; - Cookie[] cookies = request.getCookies(); - Cookie userIdcookie = null; - if (cookies != null) - for (Cookie cookie : cookies) - if (cookie.getName().equals(USER_ID)) - userIdcookie = cookie; - if(userIdcookie!=null){ - userId = CipherUtil.decrypt(userIdcookie.getValue()); - } - return userId; - - } - - private static boolean isLoginCookieExist(HttpServletRequest request) { - Cookie ep = getCookie(request, EP_SERVICE); - return (ep != null); - } - - private static Cookie getCookie(HttpServletRequest request, String cookieName) { - Cookie[] cookies = request.getCookies(); - if (cookies != null) - for (Cookie cookie : cookies) - if (cookie.getName().equals(cookieName)) - return cookie; - - return null; - } - - -} diff --git a/epsdk-app-onap/src/main/java/org/openecomp/portalapp/scheduler/Register.java b/epsdk-app-onap/src/main/java/org/openecomp/portalapp/scheduler/Register.java deleted file mode 100755 index acf934dd7..000000000 --- a/epsdk-app-onap/src/main/java/org/openecomp/portalapp/scheduler/Register.java +++ /dev/null @@ -1,71 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalapp.scheduler; - -import java.util.ArrayList; -import java.util.List; - -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.scheduler.Registerable; -import org.openecomp.portalsdk.core.util.SystemProperties; -import org.quartz.Trigger; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.annotation.DependsOn; -import org.springframework.stereotype.Component; - -@Component -@DependsOn({ "logRegistry", "systemProperties" }) -public class Register implements Registerable { - - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(Register.class); - - private List scheduleTriggers = new ArrayList(); - Trigger trigger[] = new Trigger[1]; - - @Autowired - private LogRegistry logRegistry; - - @Override - public Trigger[] getTriggers() { - return getScheduleTriggers().toArray(trigger); - } - - @Override - public void registerTriggers() { - // if the property value is not available; the cron will not be added - // and can be ignored. its safe to ignore the exceptions - try { - if (SystemProperties.getProperty(SystemProperties.LOG_CRON) != null) - getScheduleTriggers().add(logRegistry.getTrigger()); - } catch (IllegalStateException ies) { - logger.info(EELFLoggerDelegate.debugLogger, ("Log Cron not available")); - } - - } - - public List getScheduleTriggers() { - return scheduleTriggers; - } - - public void setScheduleTriggers(List scheduleTriggers) { - this.scheduleTriggers = scheduleTriggers; - } - -} diff --git a/epsdk-app-onap/src/main/java/org/openecomp/portalapp/scheduler/RegistryAdapter.java b/epsdk-app-onap/src/main/java/org/openecomp/portalapp/scheduler/RegistryAdapter.java deleted file mode 100755 index 902c545d3..000000000 --- a/epsdk-app-onap/src/main/java/org/openecomp/portalapp/scheduler/RegistryAdapter.java +++ /dev/null @@ -1,92 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalapp.scheduler; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import org.openecomp.portalsdk.core.scheduler.Registerable; -import org.openecomp.portalsdk.workflow.services.WorkflowScheduleService; -import org.quartz.Trigger; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.scheduling.quartz.SchedulerFactoryBean; -import org.springframework.stereotype.Component; - -@Component -public class RegistryAdapter { - - @Autowired - private Registerable registry; - - @Autowired - private WorkflowScheduleService workflowScheduleService; - - private SchedulerFactoryBean schedulerBean; - - Trigger trigger[] = new Trigger[1]; - - public Trigger[] getTriggers() { - - registry.registerTriggers(); - - List allTriggers = new ArrayList(); - - List coreTriggers = addCoreTriggers(); - final Trigger[] extTriggerArray = registry.getTriggers(); - - allTriggers.addAll(Arrays.asList(extTriggerArray)); - allTriggers.addAll(coreTriggers); - - return allTriggers.toArray(trigger); - } - - public List addCoreTriggers() { - // On startup of the application after crash recovery, invoke workflow - // schedule trigger - List triggers = getWorkflowScheduleService().triggerWorkflowScheduling(); - return triggers; - } - - public void setSchedulerBean(SchedulerFactoryBean _schedulerBean) { - schedulerBean = _schedulerBean; - } - - public SchedulerFactoryBean getSchedulerBean() { - return schedulerBean; - } - - public Registerable getRegistry() { - return registry; - } - - public void setRegistry(Registerable registry) { - this.registry = registry; - } - - public WorkflowScheduleService getWorkflowScheduleService() { - return workflowScheduleService; - } - - public void setWorkflowScheduleService(WorkflowScheduleService workflowScheduleService) { - this.workflowScheduleService = workflowScheduleService; - } - -} diff --git a/epsdk-app-onap/src/main/java/org/openecomp/portalapp/service/AdminAuthExtension.java b/epsdk-app-onap/src/main/java/org/openecomp/portalapp/service/AdminAuthExtension.java deleted file mode 100755 index 4145aa3d3..000000000 --- a/epsdk-app-onap/src/main/java/org/openecomp/portalapp/service/AdminAuthExtension.java +++ /dev/null @@ -1,64 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalapp.service; - -import java.util.Set; - -import org.openecomp.portalsdk.core.domain.Role; -import org.openecomp.portalsdk.core.domain.User; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - - -@Service("adminAuthExtension") -@Transactional -/** - * Provides empty implementations of the methods in IAdminAuthExtension. - */ -public class AdminAuthExtension implements IAdminAuthExtension { - - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(AdminAuthExtension.class); - - /* - * (non-Javadoc) - * @see org.openecomp.portalapp.service.IAdminAuthExtension#saveUserExtension(org.openecomp.portalsdk.core.domain.User) - */ - public void saveUserExtension(User user) { - logger.debug("saveUserExtension"); - } - - /* - * (non-Javadoc) - * @see org.openecomp.portalapp.service.IAdminAuthExtension#editUserExtension(org.openecomp.portalsdk.core.domain.User) - */ - public void editUserExtension(User user) { - logger.debug("editUserExtension"); - } - - /* - * (non-Javadoc) - * @see org.openecomp.portalapp.service.IAdminAuthExtension#saveUserRoleExtension(java.util.Set, org.openecomp.portalsdk.core.domain.User) - */ - public void saveUserRoleExtension(Set roles, User user) { - logger.debug("saveUserRoleExtension"); - } - -} diff --git a/epsdk-app-onap/src/main/resources/portal.properties b/epsdk-app-onap/src/main/resources/portal.properties index 824fd730e..405821119 100755 --- a/epsdk-app-onap/src/main/resources/portal.properties +++ b/epsdk-app-onap/src/main/resources/portal.properties @@ -30,7 +30,7 @@ use_rest_for_functional_menu=true ########################################################################## # Name of java class that implements the OnBoardingApiService interface. -portal.api.impl.class = org.openecomp.portalapp.service.OnBoardingApiServiceImpl +portal.api.impl.class = org.onap.portalapp.service.OnBoardingApiServiceImpl # Log On for single sign on ecomp_redirect_url = http://portal.api.simpledemo.onap.org:8989/ONAPPORTAL/login.htm diff --git a/epsdk-app-onap/src/main/resources/portal_template.properties b/epsdk-app-onap/src/main/resources/portal_template.properties index ed6940148..d01413aa1 100755 --- a/epsdk-app-onap/src/main/resources/portal_template.properties +++ b/epsdk-app-onap/src/main/resources/portal_template.properties @@ -1,6 +1,6 @@ # Properties read by ECOMP Framework library, ecompFW.jar -portal.api.impl.class = org.openecomp.portalapp.service.OnBoardingApiServiceImpl +portal.api.impl.class = org.onap.portalapp.service.OnBoardingApiServiceImpl portal.api.prefix = /api max.idle.time = 5 user.attribute.name = user_attribute diff --git a/epsdk-app-onap/src/main/resources/vid-data.sql b/epsdk-app-onap/src/main/resources/vid-data.sql index 497ca2028..8f0eabee2 100755 --- a/epsdk-app-onap/src/main/resources/vid-data.sql +++ b/epsdk-app-onap/src/main/resources/vid-data.sql @@ -28,8 +28,11 @@ DELETE FROM `fn_tab`; DELETE FROM `fn_function`; DELETE FROM `fn_lu_alert_method`; DELETE FROM `fn_lu_activity`; +DELETE FROM `fn_lu_call_times`; +DELETE FROM `fn_lu_country`; DELETE FROM `fn_lu_menu_set`; DELETE FROM `fn_lu_priority`; +DELETE FROM `fn_lu_state`; DELETE FROM `fn_lu_tab_set`; -- @@ -44,6 +47,31 @@ REPLACE INTO `cr_raptor_action_img` VALUES ('DELETE','/static/fusion/raptor/img/ INSERT IGNORE INTO `fn_app` VALUES (1,'Default',null,'Some Default Description','Some Default Note',null,null,null,'ECPP','?',1,'okYTaDrhzibcbGVq5mjkVQ==','N','N',null,'Default',null,null,'ECOMP-PORTAL-INBOX'); +-- +-- Dumping data for table `vid_workflow` +-- +INSERT INTO `vid_workflow` (`WORKFLOW_DB_ID`, `WORKFLOW_APP_NAME`) VALUES (1, 'Update') ON DUPLICATE KEY UPDATE WORKFLOW_APP_NAME='Update'; +INSERT INTO `vid_workflow` (`WORKFLOW_DB_ID`, `WORKFLOW_APP_NAME`) VALUES (2, 'Replace') ON DUPLICATE KEY UPDATE WORKFLOW_APP_NAME='Replace'; +INSERT INTO `vid_workflow` (`WORKFLOW_DB_ID`, `WORKFLOW_APP_NAME`) VALUES (3, 'VNF In Place Software Update') ON DUPLICATE KEY UPDATE WORKFLOW_APP_NAME='VNF In Place Software Update'; + + +-- +-- Dumping data for table `vid_category_parameter` +-- +INSERT INTO `vid_category_parameter` (`CATEGORY_ID`, `NAME`, `ID_SUPPORTED`, `FAMILY`,`CREATED_DATE`, `MODIFIED_DATE`) VALUES (1, 'platform', 0, 'PARAMETER_STANDARDIZATION','2017-09-12 17:01:13', '2017-09-12 17:01:13') ON DUPLICATE KEY UPDATE NAME='platform'; +INSERT INTO `vid_category_parameter` (`CATEGORY_ID`, `NAME`, `ID_SUPPORTED`, `FAMILY`,`CREATED_DATE`, `MODIFIED_DATE`) VALUES (2, 'project', 0, 'PARAMETER_STANDARDIZATION','2017-09-12 18:23:54', '2017-09-13 15:05:25') ON DUPLICATE KEY UPDATE NAME='project'; +INSERT INTO `vid_category_parameter` (`CATEGORY_ID`, `NAME`, `ID_SUPPORTED`, `FAMILY`,`CREATED_DATE`, `MODIFIED_DATE`) VALUES (3, 'lineOfBusiness', 0,'PARAMETER_STANDARDIZATION', '2017-09-12 18:24:14', '2017-09-12 18:24:15') ON DUPLICATE KEY UPDATE NAME='lineOfBusiness'; +INSERT INTO `vid_category_parameter` (`CATEGORY_ID`, `NAME`, `ID_SUPPORTED`, `FAMILY`,`CREATED_DATE`, `MODIFIED_DATE`) VALUES (4, 'owningEntity', 1, 'PARAMETER_STANDARDIZATION', '2017-09-12 18:24:26', '2017-09-12 18:24:28') ON DUPLICATE KEY UPDATE NAME='owningEntity'; +INSERT INTO `vid_category_parameter` (`CATEGORY_ID`, `NAME`, `ID_SUPPORTED`, `FAMILY`,`CREATED_DATE`, `MODIFIED_DATE`) VALUES (5,'operational-environment-type', 0,'TENANT_ISOLATION', '2017-11-12 18:24:26', '2017-11-12 18:24:28') ON DUPLICATE KEY UPDATE NAME='operational-environment-type'; +INSERT INTO `vid_category_parameter` (`CATEGORY_ID`, `NAME`, `ID_SUPPORTED`, `FAMILY`,`CREATED_DATE`, `MODIFIED_DATE`) VALUES (6,'workload-context', 0, 'TENANT_ISOLATION','2017-11-12 18:24:26', '2017-11-12 18:24:28') ON DUPLICATE KEY UPDATE NAME='workload-context'; + +-- +-- Dumping data for table `vid_category_parameter_option` +-- +INSERT INTO `vid_category_parameter_option` (`CATEGORY_OPT_APP_ID`, `NAME`, `CATEGORY_ID`) VALUES ('ECOMP', 'ECOMP', '6') ON DUPLICATE KEY UPDATE NAME='ECOMP'; +INSERT INTO `vid_category_parameter_option` (`CATEGORY_OPT_APP_ID`, `NAME`, `CATEGORY_ID`) VALUES ('DEV', 'DEV', '6') ON DUPLICATE KEY UPDATE NAME='DEV'; +INSERT INTO `vid_category_parameter_option` (`CATEGORY_OPT_APP_ID`, `NAME`, `CATEGORY_ID`) VALUES ('TEST', 'TEST', '6') ON DUPLICATE KEY UPDATE NAME='TEST'; +INSERT INTO `vid_category_parameter_option` (`CATEGORY_OPT_APP_ID`, `NAME`, `CATEGORY_ID`) VALUES ('VNF', 'VNF', '5') ON DUPLICATE KEY UPDATE NAME='VNF'; -- -- Dumping data for table `fn_function` @@ -84,6 +112,8 @@ INSERT INTO `fn_function` VALUES ('menu_test','Test Menu') ON DUPLICATE KEY UPDA INSERT INTO `fn_function` VALUES ('menu_viewlog','Log Menu') ON DUPLICATE KEY UPDATE FUNCTION_NAME='Log Menu'; INSERT INTO `fn_function` VALUES ('view_reports','View Raptor reports') ON DUPLICATE KEY UPDATE FUNCTION_NAME='View Raptor reports'; INSERT INTO `fn_function` VALUES ('menu_searchexisting', 'Search for Existing Service Instances') ON DUPLICATE KEY UPDATE FUNCTION_NAME='Search for Existing Service Instances'; +INSERT INTO `fn_function` VALUES ('menu_changemanagement','VNF Changes') ON DUPLICATE KEY UPDATE FUNCTION_NAME='VNF Changes'; +INSERT INTO `fn_function` VALUES ('menu_testenvironment','Test Environments') ON DUPLICATE KEY UPDATE FUNCTION_NAME='Test Environments'; -- -- Dumping data for table `fn_lu_activity` @@ -110,6 +140,303 @@ REPLACE INTO `fn_lu_alert_method` VALUES ('PAGER','Pager'); REPLACE INTO `fn_lu_alert_method` VALUES ('PHONE','Phone'); REPLACE INTO `fn_lu_alert_method` VALUES ('SMS','SMS'); +-- +-- Dumping data for table `fn_lu_call_times` +-- +REPLACE INTO `fn_lu_call_times` VALUES (1,20,'20 min'); +REPLACE INTO `fn_lu_call_times` VALUES (2,40,'40 min'); +REPLACE INTO `fn_lu_call_times` VALUES (3,60,'1 hr'); +REPLACE INTO `fn_lu_call_times` VALUES (4,80,'1 hr 20 min'); +REPLACE INTO `fn_lu_call_times` VALUES (5,100,'1 hr 40 min'); +REPLACE INTO `fn_lu_call_times` VALUES (6,120,'2 hrs'); +REPLACE INTO `fn_lu_call_times` VALUES (7,140,'2 hr 20 min'); +REPLACE INTO `fn_lu_call_times` VALUES (8,160,'2 hr 40 min'); +REPLACE INTO `fn_lu_call_times` VALUES (9,180,'3 hrs'); +REPLACE INTO `fn_lu_call_times` VALUES (10,200,'3 hr 20 min'); +REPLACE INTO `fn_lu_call_times` VALUES (11,220,'3 hr 40 min'); +REPLACE INTO `fn_lu_call_times` VALUES (12,240,'4 hrs'); +REPLACE INTO `fn_lu_call_times` VALUES (13,260,'4 hr 20 min'); +REPLACE INTO `fn_lu_call_times` VALUES (14,280,'4 hr 40 min'); +REPLACE INTO `fn_lu_call_times` VALUES (15,300,'5 hrs'); +REPLACE INTO `fn_lu_call_times` VALUES (16,320,'5 hr 20 min'); +REPLACE INTO `fn_lu_call_times` VALUES (17,340,'5 hr 40 min'); +REPLACE INTO `fn_lu_call_times` VALUES (18,360,'6 hrs'); +REPLACE INTO `fn_lu_call_times` VALUES (19,380,'6 hr 20 min'); +REPLACE INTO `fn_lu_call_times` VALUES (20,400,'6 hr 40 min'); +REPLACE INTO `fn_lu_call_times` VALUES (21,420,'7 hrs'); +REPLACE INTO `fn_lu_call_times` VALUES (22,440,'7 hr 20 min'); +REPLACE INTO `fn_lu_call_times` VALUES (23,460,'7 hr 40 min'); +REPLACE INTO `fn_lu_call_times` VALUES (24,480,'8 hrs'); +REPLACE INTO `fn_lu_call_times` VALUES (25,500,'8 hr 20 min'); +REPLACE INTO `fn_lu_call_times` VALUES (26,520,'8 hr 40 min'); +REPLACE INTO `fn_lu_call_times` VALUES (27,540,'9 hrs'); +REPLACE INTO `fn_lu_call_times` VALUES (28,560,'9 hr 20 min'); +REPLACE INTO `fn_lu_call_times` VALUES (29,580,'9 hr 40 min'); +REPLACE INTO `fn_lu_call_times` VALUES (30,600,'10 hrs'); +REPLACE INTO `fn_lu_call_times` VALUES (31,10,'10 min'); +REPLACE INTO `fn_lu_call_times` VALUES (32,5,'5 min'); +REPLACE INTO `fn_lu_call_times` VALUES (33,1200,'20 hrs'); +REPLACE INTO `fn_lu_call_times` VALUES (34,1800,'30 hrs'); +REPLACE INTO `fn_lu_call_times` VALUES (35,2400,'40 hrs'); +REPLACE INTO `fn_lu_call_times` VALUES (36,3000,'50 hrs'); +REPLACE INTO `fn_lu_call_times` VALUES (37,4200,'70 hrs'); +REPLACE INTO `fn_lu_call_times` VALUES (38,4800,'80 hrs'); +REPLACE INTO `fn_lu_call_times` VALUES (39,5400,'90 hrs'); +REPLACE INTO `fn_lu_call_times` VALUES (40,6000,'100 hrs'); +REPLACE INTO `fn_lu_call_times` VALUES (41,7200,'120 hrs'); +REPLACE INTO `fn_lu_call_times` VALUES (42,9600,'160 hrs'); +REPLACE INTO `fn_lu_call_times` VALUES (43,10800,'180 hrs'); +REPLACE INTO `fn_lu_call_times` VALUES (44,12000,'200 hrs'); +REPLACE INTO `fn_lu_call_times` VALUES (45,18000,'300 hrs'); +REPLACE INTO `fn_lu_call_times` VALUES (46,24000,'400 hrs'); +REPLACE INTO `fn_lu_call_times` VALUES (47,30000,'500 hrs'); + +-- +-- Dumping data for table `fn_lu_country` +-- +REPLACE INTO `fn_lu_country` VALUES ('AD','Andorra','Andorra',NULL); +REPLACE INTO `fn_lu_country` VALUES ('AE','United Arab Emirates','United Arab Emirates',NULL); +REPLACE INTO `fn_lu_country` VALUES ('AF','Afghanistan','Afghanistan',NULL); +REPLACE INTO `fn_lu_country` VALUES ('AG','Antigua and Barbuda','Antigua and Barbuda',NULL); +REPLACE INTO `fn_lu_country` VALUES ('AI','Anguilla','Anguilla',NULL); +REPLACE INTO `fn_lu_country` VALUES ('AL','Albania','Albania',NULL); +REPLACE INTO `fn_lu_country` VALUES ('AM','Armenia','Armenia',NULL); +REPLACE INTO `fn_lu_country` VALUES ('AN','Netherlands Antilles','Netherlands Antilles',NULL); +REPLACE INTO `fn_lu_country` VALUES ('AO','Angola','Angola',NULL); +REPLACE INTO `fn_lu_country` VALUES ('AQ','Antarctica','Antarctica',NULL); +REPLACE INTO `fn_lu_country` VALUES ('AR','Argentina','Argentina',NULL); +REPLACE INTO `fn_lu_country` VALUES ('AS','American Samoa','American Samoa',NULL); +REPLACE INTO `fn_lu_country` VALUES ('AT','Austria','Austria',NULL); +REPLACE INTO `fn_lu_country` VALUES ('AU','Australia','Australia',NULL); +REPLACE INTO `fn_lu_country` VALUES ('AW','Aruba','Aruba',NULL); +REPLACE INTO `fn_lu_country` VALUES ('AZ','Azerbaidjan','Azerbaidjan',NULL); +REPLACE INTO `fn_lu_country` VALUES ('BA','Bosnia-Herzegovina','Bosnia-Herzegovina',NULL); +REPLACE INTO `fn_lu_country` VALUES ('BB','Barbados','Barbados',NULL); +REPLACE INTO `fn_lu_country` VALUES ('BD','Bangladesh','Bangladesh',NULL); +REPLACE INTO `fn_lu_country` VALUES ('BE','Belgium','Belgium',NULL); +REPLACE INTO `fn_lu_country` VALUES ('BF','Burkina Faso','Burkina Faso',NULL); +REPLACE INTO `fn_lu_country` VALUES ('BG','Bulgaria','Bulgaria',NULL); +REPLACE INTO `fn_lu_country` VALUES ('BH','Bahrain','Bahrain',NULL); +REPLACE INTO `fn_lu_country` VALUES ('BI','Burundi','Burundi',NULL); +REPLACE INTO `fn_lu_country` VALUES ('BJ','Benin','Benin',NULL); +REPLACE INTO `fn_lu_country` VALUES ('BM','Bermuda','Bermuda',NULL); +REPLACE INTO `fn_lu_country` VALUES ('BN','Brunei Darussalam','Brunei Darussalam',NULL); +REPLACE INTO `fn_lu_country` VALUES ('BO','Bolivia','Bolivia',NULL); +REPLACE INTO `fn_lu_country` VALUES ('BR','Brazil','Brazil',NULL); +REPLACE INTO `fn_lu_country` VALUES ('BS','Bahamas','Bahamas',NULL); +REPLACE INTO `fn_lu_country` VALUES ('BT','Bhutan','Bhutan',NULL); +REPLACE INTO `fn_lu_country` VALUES ('BV','Bouvet Island','Bouvet Island',NULL); +REPLACE INTO `fn_lu_country` VALUES ('BW','Botswana','Botswana',NULL); +REPLACE INTO `fn_lu_country` VALUES ('BY','Belarus','Belarus',NULL); +REPLACE INTO `fn_lu_country` VALUES ('BZ','Belize','Belize',NULL); +REPLACE INTO `fn_lu_country` VALUES ('CA','Canada','Canada',NULL); +REPLACE INTO `fn_lu_country` VALUES ('CC','Cocos (Keeling) Islands','Cocos (Keeling) Islands',NULL); +REPLACE INTO `fn_lu_country` VALUES ('CF','Central African Republic','Central African Republic',NULL); +REPLACE INTO `fn_lu_country` VALUES ('CG','Congo','Congo',NULL); +REPLACE INTO `fn_lu_country` VALUES ('CH','Switzerland','Switzerland',NULL); +REPLACE INTO `fn_lu_country` VALUES ('CI','Ivory Coast (Cote D\'Ivoire)','Ivory Coast (Cote D\'Ivoire)',NULL); +REPLACE INTO `fn_lu_country` VALUES ('CK','Cook Islands','Cook Islands',NULL); +REPLACE INTO `fn_lu_country` VALUES ('CL','Chile','Chile',NULL); +REPLACE INTO `fn_lu_country` VALUES ('CM','Cameroon','Cameroon',NULL); +REPLACE INTO `fn_lu_country` VALUES ('CN','China','China','China'); +REPLACE INTO `fn_lu_country` VALUES ('CO','Colombia','Colombia',NULL); +REPLACE INTO `fn_lu_country` VALUES ('CR','Costa Rica','Costa Rica',NULL); +REPLACE INTO `fn_lu_country` VALUES ('CS','Former Czechoslovakia','Former Czechoslovakia',NULL); +REPLACE INTO `fn_lu_country` VALUES ('CU','Cuba','Cuba',NULL); +REPLACE INTO `fn_lu_country` VALUES ('CV','Cape Verde','Cape Verde',NULL); +REPLACE INTO `fn_lu_country` VALUES ('CX','Christmas Island','Christmas Island',NULL); +REPLACE INTO `fn_lu_country` VALUES ('CY','Cyprus','Cyprus',NULL); +REPLACE INTO `fn_lu_country` VALUES ('CZ','Czech Republic','Czech Republic',NULL); +REPLACE INTO `fn_lu_country` VALUES ('DE','Germany','Germany',NULL); +REPLACE INTO `fn_lu_country` VALUES ('DJ','Djibouti','Djibouti',NULL); +REPLACE INTO `fn_lu_country` VALUES ('DK','Denmark','Denmark',NULL); +REPLACE INTO `fn_lu_country` VALUES ('DM','Dominica','Dominica',NULL); +REPLACE INTO `fn_lu_country` VALUES ('DO','Dominican Republic','Dominican Republic',NULL); +REPLACE INTO `fn_lu_country` VALUES ('DZ','Algeria','Algeria',NULL); +REPLACE INTO `fn_lu_country` VALUES ('EC','Ecuador','Ecuador',NULL); +REPLACE INTO `fn_lu_country` VALUES ('EE','Estonia','Estonia',NULL); +REPLACE INTO `fn_lu_country` VALUES ('EG','Egypt','Egypt',NULL); +REPLACE INTO `fn_lu_country` VALUES ('EH','Western Sahara','Western Sahara',NULL); +REPLACE INTO `fn_lu_country` VALUES ('ER','Eritrea','Eritrea',NULL); +REPLACE INTO `fn_lu_country` VALUES ('ES','Spain','Spain',NULL); +REPLACE INTO `fn_lu_country` VALUES ('ET','Ethiopia','Ethiopia',NULL); +REPLACE INTO `fn_lu_country` VALUES ('FI','Finland','Finland',NULL); +REPLACE INTO `fn_lu_country` VALUES ('FJ','Fiji','Fiji',NULL); +REPLACE INTO `fn_lu_country` VALUES ('FK','Falkland Islands','Falkland Islands',NULL); +REPLACE INTO `fn_lu_country` VALUES ('FM','Micronesia','Micronesia',NULL); +REPLACE INTO `fn_lu_country` VALUES ('FO','Faroe Islands','Faroe Islands',NULL); +REPLACE INTO `fn_lu_country` VALUES ('FR','France','France',NULL); +REPLACE INTO `fn_lu_country` VALUES ('FX','France (European Territory)','France (European Territory)',NULL); +REPLACE INTO `fn_lu_country` VALUES ('GA','Gabon','Gabon',NULL); +REPLACE INTO `fn_lu_country` VALUES ('GB','Great Britain','Great Britain',NULL); +REPLACE INTO `fn_lu_country` VALUES ('GD','Grenada','Grenada',NULL); +REPLACE INTO `fn_lu_country` VALUES ('GE','Georgia','Georgia',NULL); +REPLACE INTO `fn_lu_country` VALUES ('GF','French Guyana','French Guyana',NULL); +REPLACE INTO `fn_lu_country` VALUES ('GH','Ghana','Ghana',NULL); +REPLACE INTO `fn_lu_country` VALUES ('GI','Gibraltar','Gibraltar',NULL); +REPLACE INTO `fn_lu_country` VALUES ('GL','Greenland','Greenland',NULL); +REPLACE INTO `fn_lu_country` VALUES ('GM','Gambia','Gambia',NULL); +REPLACE INTO `fn_lu_country` VALUES ('GN','Guinea','Guinea',NULL); +REPLACE INTO `fn_lu_country` VALUES ('GP','Guadeloupe (French)','Guadeloupe (French)',NULL); +REPLACE INTO `fn_lu_country` VALUES ('GQ','Equatorial Guinea','Equatorial Guinea',NULL); +REPLACE INTO `fn_lu_country` VALUES ('GR','Greece','Greece',NULL); +REPLACE INTO `fn_lu_country` VALUES ('GS','S. Georgia and S. Sandwich Isls.','S. Georgia and S. Sandwich Isls.',NULL); +REPLACE INTO `fn_lu_country` VALUES ('GT','Guatemala','Guatemala',NULL); +REPLACE INTO `fn_lu_country` VALUES ('GU','Guam (USA)','Guam (USA)',NULL); +REPLACE INTO `fn_lu_country` VALUES ('GW','Guinea Bissau','Guinea Bissau',NULL); +REPLACE INTO `fn_lu_country` VALUES ('GY','Guyana','Guyana',NULL); +REPLACE INTO `fn_lu_country` VALUES ('HK','Hong Kong','Hong Kong',NULL); +REPLACE INTO `fn_lu_country` VALUES ('HM','Heard and McDonald Islands','Heard and McDonald Islands',NULL); +REPLACE INTO `fn_lu_country` VALUES ('HN','Honduras','Honduras',NULL); +REPLACE INTO `fn_lu_country` VALUES ('HR','Croatia','Croatia',NULL); +REPLACE INTO `fn_lu_country` VALUES ('HT','Haiti','Haiti',NULL); +REPLACE INTO `fn_lu_country` VALUES ('HU','Hungary','Hungary',NULL); +REPLACE INTO `fn_lu_country` VALUES ('ID','Indonesia','Indonesia',NULL); +REPLACE INTO `fn_lu_country` VALUES ('IE','Ireland','Ireland',NULL); +REPLACE INTO `fn_lu_country` VALUES ('IL','Israel','Israel',NULL); +REPLACE INTO `fn_lu_country` VALUES ('IN','India','India',NULL); +REPLACE INTO `fn_lu_country` VALUES ('IO','British Indian Ocean Territory','British Indian Ocean Territory',NULL); +REPLACE INTO `fn_lu_country` VALUES ('IQ','Iraq','Iraq',NULL); +REPLACE INTO `fn_lu_country` VALUES ('IR','Iran','Iran',NULL); +REPLACE INTO `fn_lu_country` VALUES ('IS','Iceland','Iceland',NULL); +REPLACE INTO `fn_lu_country` VALUES ('IT','Italy','Italy',NULL); +REPLACE INTO `fn_lu_country` VALUES ('JM','Jamaica','Jamaica',NULL); +REPLACE INTO `fn_lu_country` VALUES ('JO','Jordan','Jordan',NULL); +REPLACE INTO `fn_lu_country` VALUES ('JP','Japan','Japan',NULL); +REPLACE INTO `fn_lu_country` VALUES ('KE','Kenya','Kenya',NULL); +REPLACE INTO `fn_lu_country` VALUES ('KG','Kyrgyzstan','Kyrgyzstan',NULL); +REPLACE INTO `fn_lu_country` VALUES ('KH','Cambodia','Cambodia',NULL); +REPLACE INTO `fn_lu_country` VALUES ('KI','Kiribati','Kiribati',NULL); +REPLACE INTO `fn_lu_country` VALUES ('KM','Comoros','Comoros',NULL); +REPLACE INTO `fn_lu_country` VALUES ('KN','Saint Kitts and Nevis Anguilla','Saint Kitts and Nevis Anguilla',NULL); +REPLACE INTO `fn_lu_country` VALUES ('KP','North Korea','North Korea',NULL); +REPLACE INTO `fn_lu_country` VALUES ('KR','South Korea','South Korea',NULL); +REPLACE INTO `fn_lu_country` VALUES ('KW','Kuwait','Kuwait',NULL); +REPLACE INTO `fn_lu_country` VALUES ('KY','Cayman Islands','Cayman Islands',NULL); +REPLACE INTO `fn_lu_country` VALUES ('KZ','Kazakhstan','Kazakhstan',NULL); +REPLACE INTO `fn_lu_country` VALUES ('LA','Laos','Laos',NULL); +REPLACE INTO `fn_lu_country` VALUES ('LB','Lebanon','Lebanon',NULL); +REPLACE INTO `fn_lu_country` VALUES ('LC','Saint Lucia','Saint Lucia',NULL); +REPLACE INTO `fn_lu_country` VALUES ('LI','Liechtenstein','Liechtenstein',NULL); +REPLACE INTO `fn_lu_country` VALUES ('LK','Sri Lanka','Sri Lanka',NULL); +REPLACE INTO `fn_lu_country` VALUES ('LR','Liberia','Liberia',NULL); +REPLACE INTO `fn_lu_country` VALUES ('LS','Lesotho','Lesotho',NULL); +REPLACE INTO `fn_lu_country` VALUES ('LT','Lithuania','Lithuania',NULL); +REPLACE INTO `fn_lu_country` VALUES ('LU','Luxembourg','Luxembourg',NULL); +REPLACE INTO `fn_lu_country` VALUES ('LV','Latvia','Latvia',NULL); +REPLACE INTO `fn_lu_country` VALUES ('LY','Libya','Libya',NULL); +REPLACE INTO `fn_lu_country` VALUES ('MA','Morocco','Morocco',NULL); +REPLACE INTO `fn_lu_country` VALUES ('MC','Monaco','Monaco',NULL); +REPLACE INTO `fn_lu_country` VALUES ('MD','Moldavia','Moldavia',NULL); +REPLACE INTO `fn_lu_country` VALUES ('MG','Madagascar','Madagascar',NULL); +REPLACE INTO `fn_lu_country` VALUES ('MH','Marshall Islands','Marshall Islands',NULL); +REPLACE INTO `fn_lu_country` VALUES ('MK','Macedonia','Macedonia',NULL); +REPLACE INTO `fn_lu_country` VALUES ('ML','Mali','Mali',NULL); +REPLACE INTO `fn_lu_country` VALUES ('MM','Myanmar','Myanmar',NULL); +REPLACE INTO `fn_lu_country` VALUES ('MN','Mongolia','Mongolia',NULL); +REPLACE INTO `fn_lu_country` VALUES ('MO','Macau','Macau',NULL); +REPLACE INTO `fn_lu_country` VALUES ('MP','Northern Mariana Islands','Northern Mariana Islands',NULL); +REPLACE INTO `fn_lu_country` VALUES ('MQ','Martinique (French)','Martinique (French)',NULL); +REPLACE INTO `fn_lu_country` VALUES ('MR','Mauritania','Mauritania',NULL); +REPLACE INTO `fn_lu_country` VALUES ('MS','Montserrat','Montserrat',NULL); +REPLACE INTO `fn_lu_country` VALUES ('MT','Malta','Malta',NULL); +REPLACE INTO `fn_lu_country` VALUES ('MU','Mauritius','Mauritius',NULL); +REPLACE INTO `fn_lu_country` VALUES ('MV','Maldives','Maldives',NULL); +REPLACE INTO `fn_lu_country` VALUES ('MW','Malawi','Malawi',NULL); +REPLACE INTO `fn_lu_country` VALUES ('MX','Mexico','Mexico','Mexico'); +REPLACE INTO `fn_lu_country` VALUES ('MY','Malaysia','Malaysia',NULL); +REPLACE INTO `fn_lu_country` VALUES ('MZ','Mozambique','Mozambique',NULL); +REPLACE INTO `fn_lu_country` VALUES ('NA','Namibia','Namibia',NULL); +REPLACE INTO `fn_lu_country` VALUES ('NC','New Caledonia (French)','New Caledonia (French)',NULL); +REPLACE INTO `fn_lu_country` VALUES ('NE','Niger','Niger',NULL); +REPLACE INTO `fn_lu_country` VALUES ('NF','Norfolk Island','Norfolk Island',NULL); +REPLACE INTO `fn_lu_country` VALUES ('NG','Nigeria','Nigeria',NULL); +REPLACE INTO `fn_lu_country` VALUES ('NI','Nicaragua','Nicaragua',NULL); +REPLACE INTO `fn_lu_country` VALUES ('NL','Netherlands','Netherlands',NULL); +REPLACE INTO `fn_lu_country` VALUES ('NO','Norway','Norway',NULL); +REPLACE INTO `fn_lu_country` VALUES ('NP','Nepal','Nepal',NULL); +REPLACE INTO `fn_lu_country` VALUES ('NR','Nauru','Nauru',NULL); +REPLACE INTO `fn_lu_country` VALUES ('NU','Niue','Niue',NULL); +REPLACE INTO `fn_lu_country` VALUES ('NZ','New Zealand','New Zealand',NULL); +REPLACE INTO `fn_lu_country` VALUES ('OM','Oman','Oman',NULL); +REPLACE INTO `fn_lu_country` VALUES ('PA','Panama','Panama',NULL); +REPLACE INTO `fn_lu_country` VALUES ('PE','Peru','Peru',NULL); +REPLACE INTO `fn_lu_country` VALUES ('PF','Polynesia (French)','Polynesia (French)',NULL); +REPLACE INTO `fn_lu_country` VALUES ('PG','Papua New Guinea','Papua New Guinea',NULL); +REPLACE INTO `fn_lu_country` VALUES ('PH','Philippines','Philippines',NULL); +REPLACE INTO `fn_lu_country` VALUES ('PK','Pakistan','Pakistan',NULL); +REPLACE INTO `fn_lu_country` VALUES ('PL','Poland','Poland',NULL); +REPLACE INTO `fn_lu_country` VALUES ('PM','Saint Pierre and Miquelon','Saint Pierre and Miquelon',NULL); +REPLACE INTO `fn_lu_country` VALUES ('PN','Pitcairn Island','Pitcairn Island',NULL); +REPLACE INTO `fn_lu_country` VALUES ('PR','Puerto Rico','Puerto Rico',NULL); +REPLACE INTO `fn_lu_country` VALUES ('PT','Portugal','Portugal',NULL); +REPLACE INTO `fn_lu_country` VALUES ('PW','Palau','Palau',NULL); +REPLACE INTO `fn_lu_country` VALUES ('PY','Paraguay','Paraguay',NULL); +REPLACE INTO `fn_lu_country` VALUES ('QA','Qatar','Qatar',NULL); +REPLACE INTO `fn_lu_country` VALUES ('RE','Reunion (French)','Reunion (French)',NULL); +REPLACE INTO `fn_lu_country` VALUES ('RO','Romania','Romania',NULL); +REPLACE INTO `fn_lu_country` VALUES ('RU','Russian Federation','Russian Federation',NULL); +REPLACE INTO `fn_lu_country` VALUES ('RW','Rwanda','Rwanda',NULL); +REPLACE INTO `fn_lu_country` VALUES ('SA','Saudi Arabia','Saudi Arabia',NULL); +REPLACE INTO `fn_lu_country` VALUES ('SB','Solomon Islands','Solomon Islands',NULL); +REPLACE INTO `fn_lu_country` VALUES ('SC','Seychelles','Seychelles',NULL); +REPLACE INTO `fn_lu_country` VALUES ('SD','Sudan','Sudan',NULL); +REPLACE INTO `fn_lu_country` VALUES ('SE','Sweden','Sweden',NULL); +REPLACE INTO `fn_lu_country` VALUES ('SG','Singapore','Singapore',NULL); +REPLACE INTO `fn_lu_country` VALUES ('SH','Saint Helena','Saint Helena',NULL); +REPLACE INTO `fn_lu_country` VALUES ('SI','Slovenia','Slovenia',NULL); +REPLACE INTO `fn_lu_country` VALUES ('SJ','Svalbard and Jan Mayen Islands','Svalbard and Jan Mayen Islands',NULL); +REPLACE INTO `fn_lu_country` VALUES ('SK','Slovak Republic','Slovak Republic',NULL); +REPLACE INTO `fn_lu_country` VALUES ('SL','Sierra Leone','Sierra Leone',NULL); +REPLACE INTO `fn_lu_country` VALUES ('SM','San Marino','San Marino',NULL); +REPLACE INTO `fn_lu_country` VALUES ('SN','Senegal','Senegal',NULL); +REPLACE INTO `fn_lu_country` VALUES ('SO','Somalia','Somalia',NULL); +REPLACE INTO `fn_lu_country` VALUES ('SR','Suriname','Suriname',NULL); +REPLACE INTO `fn_lu_country` VALUES ('ST','Saint Tome (Sao Tome) and Principe','Saint Tome (Sao Tome) and Principe',NULL); +REPLACE INTO `fn_lu_country` VALUES ('SU','Former USSR','Former USSR',NULL); +REPLACE INTO `fn_lu_country` VALUES ('SV','El Salvador','El Salvador',NULL); +REPLACE INTO `fn_lu_country` VALUES ('SY','Syria','Syria',NULL); +REPLACE INTO `fn_lu_country` VALUES ('SZ','Swaziland','Swaziland',NULL); +REPLACE INTO `fn_lu_country` VALUES ('TC','Turks and Caicos Islands','Turks and Caicos Islands',NULL); +REPLACE INTO `fn_lu_country` VALUES ('TD','Chad','Chad',NULL); +REPLACE INTO `fn_lu_country` VALUES ('TF','French Southern Territories','French Southern Territories',NULL); +REPLACE INTO `fn_lu_country` VALUES ('TG','Togo','Togo',NULL); +REPLACE INTO `fn_lu_country` VALUES ('TH','Thailand','Thailand',NULL); +REPLACE INTO `fn_lu_country` VALUES ('TJ','Tadjikistan','Tadjikistan',NULL); +REPLACE INTO `fn_lu_country` VALUES ('TK','Tokelau','Tokelau',NULL); +REPLACE INTO `fn_lu_country` VALUES ('TM','Turkmenistan','Turkmenistan',NULL); +REPLACE INTO `fn_lu_country` VALUES ('TN','Tunisia','Tunisia',NULL); +REPLACE INTO `fn_lu_country` VALUES ('TO','Tonga','Tonga',NULL); +REPLACE INTO `fn_lu_country` VALUES ('TP','East Timor','East Timor',NULL); +REPLACE INTO `fn_lu_country` VALUES ('TR','Turkey','Turkey',NULL); +REPLACE INTO `fn_lu_country` VALUES ('TT','Trinidad and Tobago','Trinidad and Tobago',NULL); +REPLACE INTO `fn_lu_country` VALUES ('TV','Tuvalu','Tuvalu',NULL); +REPLACE INTO `fn_lu_country` VALUES ('TW','Taiwan','Taiwan',NULL); +REPLACE INTO `fn_lu_country` VALUES ('TZ','Tanzania','Tanzania',NULL); +REPLACE INTO `fn_lu_country` VALUES ('UA','Ukraine','Ukraine',NULL); +REPLACE INTO `fn_lu_country` VALUES ('UG','Uganda','Uganda',NULL); +REPLACE INTO `fn_lu_country` VALUES ('UK','United Kingdom','United Kingdom',NULL); +REPLACE INTO `fn_lu_country` VALUES ('UM','USA Minor Outlying Islands','USA Minor Outlying Islands',NULL); +REPLACE INTO `fn_lu_country` VALUES ('US','United States','United States','USA'); +REPLACE INTO `fn_lu_country` VALUES ('UY','Uruguay','Uruguay',NULL); +REPLACE INTO `fn_lu_country` VALUES ('UZ','Uzbekistan','Uzbekistan',NULL); +REPLACE INTO `fn_lu_country` VALUES ('VA','Vatican City State','Vatican City State',NULL); +REPLACE INTO `fn_lu_country` VALUES ('VC','Saint Vincent and Grenadines','Saint Vincent and Grenadines',NULL); +REPLACE INTO `fn_lu_country` VALUES ('VE','Venezuela','Venezuela',NULL); +REPLACE INTO `fn_lu_country` VALUES ('VG','Virgin Islands (British)','Virgin Islands (British)',NULL); +REPLACE INTO `fn_lu_country` VALUES ('VI','Virgin Islands (USA)','Virgin Islands (USA)',NULL); +REPLACE INTO `fn_lu_country` VALUES ('VN','Vietnam','Vietnam',NULL); +REPLACE INTO `fn_lu_country` VALUES ('VU','Vanuatu','Vanuatu',NULL); +REPLACE INTO `fn_lu_country` VALUES ('WF','Wallis and Futuna Islands','Wallis and Futuna Islands',NULL); +REPLACE INTO `fn_lu_country` VALUES ('WS','Samoa','Samoa',NULL); +REPLACE INTO `fn_lu_country` VALUES ('YE','Yemen','Yemen',NULL); +REPLACE INTO `fn_lu_country` VALUES ('YT','Mayotte','Mayotte',NULL); +REPLACE INTO `fn_lu_country` VALUES ('YU','Yugoslavia','Yugoslavia',NULL); +REPLACE INTO `fn_lu_country` VALUES ('ZA','South Africa','South Africa',NULL); +REPLACE INTO `fn_lu_country` VALUES ('ZM','Zambia','Zambia',NULL); +REPLACE INTO `fn_lu_country` VALUES ('ZR','Zaire','Zaire',NULL); +REPLACE INTO `fn_lu_country` VALUES ('ZW','Zimbabwe','Zimbabwe',NULL); + -- -- Dumping data for table `fn_lu_menu_set` -- @@ -124,6 +451,62 @@ REPLACE INTO `fn_lu_priority` VALUES (30,'High','Y',30); REPLACE INTO `fn_lu_priority` VALUES (40,'Urgent','Y',40); REPLACE INTO `fn_lu_priority` VALUES (50,'Fatal','Y',50); +-- +-- Dumping data for table `fn_lu_state` +-- +REPLACE INTO `fn_lu_state` VALUES ('AK','AK - Alaska'); +REPLACE INTO `fn_lu_state` VALUES ('AL','AL - Alabama'); +REPLACE INTO `fn_lu_state` VALUES ('AR','AR - Arkansas'); +REPLACE INTO `fn_lu_state` VALUES ('AZ','AZ - Arizona'); +REPLACE INTO `fn_lu_state` VALUES ('CA','CA - California'); +REPLACE INTO `fn_lu_state` VALUES ('CO','CO - Colorado'); +REPLACE INTO `fn_lu_state` VALUES ('CT','CT - Connecticut'); +REPLACE INTO `fn_lu_state` VALUES ('DC','DC - District Of Columbia'); +REPLACE INTO `fn_lu_state` VALUES ('DE','DE - Delaware'); +REPLACE INTO `fn_lu_state` VALUES ('FL','FL - Florida'); +REPLACE INTO `fn_lu_state` VALUES ('GA','GA - Georgia'); +REPLACE INTO `fn_lu_state` VALUES ('HI','HI - Hawaii'); +REPLACE INTO `fn_lu_state` VALUES ('IA','IA - Iowa'); +REPLACE INTO `fn_lu_state` VALUES ('ID','ID - Idaho'); +REPLACE INTO `fn_lu_state` VALUES ('IL','IL - Illinois'); +REPLACE INTO `fn_lu_state` VALUES ('IN','IN - Indiana'); +REPLACE INTO `fn_lu_state` VALUES ('KS','KS - Kansas'); +REPLACE INTO `fn_lu_state` VALUES ('KY','KY - Kentucky'); +REPLACE INTO `fn_lu_state` VALUES ('LA','LA - Louisiana'); +REPLACE INTO `fn_lu_state` VALUES ('MA','MA - Massachusetts'); +REPLACE INTO `fn_lu_state` VALUES ('MD','MD - Maryland'); +REPLACE INTO `fn_lu_state` VALUES ('ME','ME - Maine'); +REPLACE INTO `fn_lu_state` VALUES ('MI','MI - Michigan'); +REPLACE INTO `fn_lu_state` VALUES ('MN','MN - Minnesota'); +REPLACE INTO `fn_lu_state` VALUES ('MO','MO - Missouri'); +REPLACE INTO `fn_lu_state` VALUES ('MS','MS - Mississippi'); +REPLACE INTO `fn_lu_state` VALUES ('MT','MT - Montana'); +REPLACE INTO `fn_lu_state` VALUES ('NC','NC - North Carolina'); +REPLACE INTO `fn_lu_state` VALUES ('ND','ND - North Dakota'); +REPLACE INTO `fn_lu_state` VALUES ('NE','NE - Nebraska'); +REPLACE INTO `fn_lu_state` VALUES ('NH','NH - New Hampshire'); +REPLACE INTO `fn_lu_state` VALUES ('NJ','NJ - New Jersey'); +REPLACE INTO `fn_lu_state` VALUES ('NM','NM - New Mexico'); +REPLACE INTO `fn_lu_state` VALUES ('NV','NV - Nevada'); +REPLACE INTO `fn_lu_state` VALUES ('NY','NY - New York'); +REPLACE INTO `fn_lu_state` VALUES ('OH','OH - Ohio'); +REPLACE INTO `fn_lu_state` VALUES ('OK','OK - Oklahoma'); +REPLACE INTO `fn_lu_state` VALUES ('OR','OR - Oregon'); +REPLACE INTO `fn_lu_state` VALUES ('PA','PA - Pennsylvania'); +REPLACE INTO `fn_lu_state` VALUES ('PR','PR - Puerto Rico'); +REPLACE INTO `fn_lu_state` VALUES ('RI','RI - Rhode Island'); +REPLACE INTO `fn_lu_state` VALUES ('SC','SC - South Carolina'); +REPLACE INTO `fn_lu_state` VALUES ('SD','SD - South Dakota'); +REPLACE INTO `fn_lu_state` VALUES ('TN','TN - Tennessee'); +REPLACE INTO `fn_lu_state` VALUES ('TX','TX - Texas'); +REPLACE INTO `fn_lu_state` VALUES ('UT','UT - Utah'); +REPLACE INTO `fn_lu_state` VALUES ('VA','VA - Virginia'); +REPLACE INTO `fn_lu_state` VALUES ('VI','VI-Virgin Island'); +REPLACE INTO `fn_lu_state` VALUES ('VT','VT - Vermont'); +REPLACE INTO `fn_lu_state` VALUES ('WA','WA - Washington'); +REPLACE INTO `fn_lu_state` VALUES ('WI','WI - Wisconsin'); +REPLACE INTO `fn_lu_state` VALUES ('WV','WV - West Virginia'); +REPLACE INTO `fn_lu_state` VALUES ('WY','WY - Wyoming'); -- -- Dumping data for table `fn_lu_tab_set` @@ -305,6 +688,9 @@ REPLACE INTO `fn_role_function` VALUES (16,'menu_viewlog'); REPLACE INTO `fn_role_function` VALUES ('1', 'menu_searchexisting'); REPLACE INTO `fn_role_function` VALUES ('16', 'menu_searchexisting'); +update fn_menu set active_yn = 'Y' where label = 'Admin'; +update fn_menu set active_yn = 'Y' where label = 'Root'; +update fn_menu set action = 'admin' where label = 'Admin'; -- -- Dumping data for table `fn_tab` diff --git a/epsdk-app-onap/src/main/resources/vid-schema.sql b/epsdk-app-onap/src/main/resources/vid-schema.sql index 6ca06b193..efd4d05f4 100755 --- a/epsdk-app-onap/src/main/resources/vid-schema.sql +++ b/epsdk-app-onap/src/main/resources/vid-schema.sql @@ -66,8 +66,8 @@ CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`cr_folder` ( `PARENT_FOLDER_ID` INT(11) NULL DEFAULT NULL, `PUBLIC_YN` VARCHAR(1) NOT NULL DEFAULT 'N', PRIMARY KEY (`FOLDER_ID`), - INDEX `fk_parent_key_cr_folder` (`PARENT_FOLDER_ID` ASC), - CONSTRAINT `fk_parent_key_cr_folder` + INDEX `FK_PARENT_KEY_CR_FOLDER` (`PARENT_FOLDER_ID` ASC), + CONSTRAINT `FK_PARENT_KEY_CR_FOLDER` FOREIGN KEY (`PARENT_FOLDER_ID`) REFERENCES `vid_openecomp_epsdk`.`cr_folder` (`FOLDER_ID`)) ENGINE = InnoDB @@ -94,11 +94,11 @@ CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`cr_hist_user_map` ( `HIST_ID` INT(11) NOT NULL, `USER_ID` INT(11) NOT NULL, PRIMARY KEY (`HIST_ID`, `USER_ID`), - INDEX `sys_c0014617` (`USER_ID` ASC), - CONSTRAINT `sys_c0014616` + INDEX `SYS_C0014617` (`USER_ID` ASC), + CONSTRAINT `SYS_C0014616` FOREIGN KEY (`HIST_ID`) REFERENCES `vid_openecomp_epsdk`.`cr_report_file_history` (`HIST_ID`), - CONSTRAINT `sys_c0014617` + CONSTRAINT `SYS_C0014617` FOREIGN KEY (`USER_ID`) REFERENCES `vid_openecomp_epsdk`.`fn_user` (`USER_ID`)) ENGINE = InnoDB @@ -167,7 +167,7 @@ CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`cr_report` ( `DASHBOARD_TYPE_YN` VARCHAR(1) NULL DEFAULT 'N', `DASHBOARD_YN` VARCHAR(1) NULL DEFAULT 'N', PRIMARY KEY (`REP_ID`), - INDEX `cr_report_create_idpublic_yntitle` (`CREATE_ID` ASC, `PUBLIC_YN` ASC, `TITLE` ASC)) + INDEX `CR_REPORT_CREATE_IDPUBLIC_YNTITLE` (`CREATE_ID` ASC, `PUBLIC_YN` ASC, `TITLE` ASC)) ENGINE = InnoDB DEFAULT CHARACTER SET = utf8; @@ -181,7 +181,7 @@ CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`cr_report_access` ( `USER_ID` DECIMAL(11,0) NULL DEFAULT NULL, `READ_ONLY_YN` VARCHAR(1) NOT NULL DEFAULT 'N', PRIMARY KEY (`REP_ID`, `ORDER_NO`), - CONSTRAINT `fk_cr_repor_ref_8550_cr_repor` + CONSTRAINT `FK_CR_REPOR_REF_8550_CR_REPOR` FOREIGN KEY (`REP_ID`) REFERENCES `vid_openecomp_epsdk`.`cr_report` (`REP_ID`)) ENGINE = InnoDB @@ -213,8 +213,8 @@ CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`cr_report_email_sent_log` ( `ACCESS_FLAG` VARCHAR(1) NOT NULL DEFAULT 'Y', `TOUCH_DATE` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`LOG_ID`), - INDEX `fk_cr_report_rep_id` (`REP_ID` ASC), - CONSTRAINT `fk_cr_report_rep_id` + INDEX `FK_CR_REPORT_REP_ID` (`REP_ID` ASC), + CONSTRAINT `FK_CR_REPORT_REP_ID` FOREIGN KEY (`REP_ID`) REFERENCES `vid_openecomp_epsdk`.`cr_report` (`REP_ID`)) ENGINE = InnoDB @@ -241,12 +241,12 @@ CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`cr_report_file_history` ( `DELETED_YN` CHAR(1) NULL DEFAULT 'N', `DELETED_BY` DECIMAL(38,0) NULL DEFAULT NULL, PRIMARY KEY (`HIST_ID`), - INDEX `sys_c0014614` (`FILE_TYPE_ID` ASC), - INDEX `sys_c0014615` (`REP_ID` ASC), - CONSTRAINT `sys_c0014614` + INDEX `SYS_C0014614` (`FILE_TYPE_ID` ASC), + INDEX `SYS_C0014615` (`REP_ID` ASC), + CONSTRAINT `SYS_C0014614` FOREIGN KEY (`FILE_TYPE_ID`) REFERENCES `vid_openecomp_epsdk`.`cr_lu_file_type` (`LOOKUP_ID`), - CONSTRAINT `sys_c0014615` + CONSTRAINT `SYS_C0014615` FOREIGN KEY (`REP_ID`) REFERENCES `vid_openecomp_epsdk`.`cr_report` (`REP_ID`)) ENGINE = InnoDB @@ -262,8 +262,8 @@ CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`cr_report_log` ( `ACTION` VARCHAR(2000) NOT NULL, `ACTION_VALUE` VARCHAR(50) NULL DEFAULT NULL, `FORM_FIELDS` VARCHAR(4000) NULL DEFAULT NULL, - INDEX `fk_cr_repor_ref_17645_cr_repor` (`REP_ID` ASC), - CONSTRAINT `fk_cr_repor_ref_17645_cr_repor` + INDEX `FK_CR_REPOR_REF_17645_CR_REPOR` (`REP_ID` ASC), + CONSTRAINT `FK_CR_REPOR_REF_17645_CR_REPOR` FOREIGN KEY (`REP_ID`) REFERENCES `vid_openecomp_epsdk`.`cr_report` (`REP_ID`)) ENGINE = InnoDB @@ -292,8 +292,8 @@ CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`cr_report_schedule` ( `ENCRYPT_YN` CHAR(1) NULL DEFAULT 'N', `ATTACHMENT_YN` CHAR(1) NULL DEFAULT 'Y', PRIMARY KEY (`SCHEDULE_ID`), - INDEX `fk_cr_repor_ref_14707_cr_repor` (`REP_ID` ASC), - CONSTRAINT `fk_cr_repor_ref_14707_cr_repor` + INDEX `FK_CR_REPOR_REF_14707_CR_REPOR` (`REP_ID` ASC), + CONSTRAINT `FK_CR_REPOR_REF_14707_CR_REPOR` FOREIGN KEY (`REP_ID`) REFERENCES `vid_openecomp_epsdk`.`cr_report` (`REP_ID`)) ENGINE = InnoDB @@ -309,7 +309,7 @@ CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`cr_report_schedule_users` ( `ROLE_ID` DECIMAL(11,0) NULL DEFAULT NULL, `ORDER_NO` DECIMAL(11,0) NOT NULL, PRIMARY KEY (`SCHEDULE_ID`, `REP_ID`, `USER_ID`, `ORDER_NO`), - CONSTRAINT `fk_cr_repor_ref_14716_cr_repor` + CONSTRAINT `FK_CR_REPOR_REF_14716_CR_REPOR` FOREIGN KEY (`SCHEDULE_ID`) REFERENCES `vid_openecomp_epsdk`.`cr_report_schedule` (`SCHEDULE_ID`)) ENGINE = InnoDB @@ -343,12 +343,12 @@ CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`cr_table_join` ( `SRC_TABLE_NAME` VARCHAR(30) NOT NULL, `DEST_TABLE_NAME` VARCHAR(30) NOT NULL, `JOIN_EXPR` VARCHAR(500) NOT NULL, - INDEX `cr_table_join_dest_table_name` (`DEST_TABLE_NAME` ASC), - INDEX `cr_table_join_src_table_name` (`SRC_TABLE_NAME` ASC), - CONSTRAINT `fk_cr_table_ref_311_cr_tab` + INDEX `CR_TABLE_JOIN_DEST_TABLE_NAME` (`DEST_TABLE_NAME` ASC), + INDEX `CR_TABLE_JOIN_SRC_TABLE_NAME` (`SRC_TABLE_NAME` ASC), + CONSTRAINT `FK_CR_TABLE_REF_311_CR_TAB` FOREIGN KEY (`SRC_TABLE_NAME`) REFERENCES `vid_openecomp_epsdk`.`cr_table_source` (`TABLE_NAME`), - CONSTRAINT `fk_cr_table_ref_315_cr_tab` + CONSTRAINT `FK_CR_TABLE_REF_315_CR_TAB` FOREIGN KEY (`DEST_TABLE_NAME`) REFERENCES `vid_openecomp_epsdk`.`cr_table_source` (`TABLE_NAME`)) ENGINE = InnoDB @@ -361,7 +361,7 @@ CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`cr_table_role` ( `TABLE_NAME` VARCHAR(30) NOT NULL, `ROLE_ID` DECIMAL(11,0) NOT NULL, PRIMARY KEY (`TABLE_NAME`, `ROLE_ID`), - CONSTRAINT `fk_cr_table_ref_32384_cr_table` + CONSTRAINT `FK_CR_TABLE_REF_32384_CR_TABLE` FOREIGN KEY (`TABLE_NAME`) REFERENCES `vid_openecomp_epsdk`.`cr_table_source` (`TABLE_NAME`)) ENGINE = InnoDB @@ -383,74 +383,7 @@ ENGINE = InnoDB DEFAULT CHARACTER SET = utf8; -- ---------------------------------------------------------------------------- --- Table vid_openecomp_epsdk.demo_bar_chart --- ---------------------------------------------------------------------------- -CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`demo_bar_chart` ( - `label` VARCHAR(20) NULL DEFAULT NULL, - `value` DECIMAL(25,15) NULL DEFAULT NULL) -ENGINE = InnoDB -DEFAULT CHARACTER SET = utf8; - --- ---------------------------------------------------------------------------- --- Table vid_openecomp_epsdk.demo_bar_chart_inter --- ---------------------------------------------------------------------------- -CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`demo_bar_chart_inter` ( - `spam_date` DATE NULL DEFAULT NULL, - `num_rpt_sources` DECIMAL(10,0) NULL DEFAULT NULL, - `num_det_sources` DECIMAL(10,0) NULL DEFAULT NULL) -ENGINE = InnoDB -DEFAULT CHARACTER SET = utf8; - --- ---------------------------------------------------------------------------- --- Table vid_openecomp_epsdk.demo_line_chart --- ---------------------------------------------------------------------------- -CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`demo_line_chart` ( - `series` VARCHAR(20) NULL DEFAULT NULL, - `log_date` DATE NULL DEFAULT NULL, - `data_value` DECIMAL(10,5) NULL DEFAULT NULL) -ENGINE = InnoDB -DEFAULT CHARACTER SET = utf8; - --- ---------------------------------------------------------------------------- --- Table vid_openecomp_epsdk.demo_pie_chart --- ---------------------------------------------------------------------------- -CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`demo_pie_chart` ( - `legend` VARCHAR(20) NULL DEFAULT NULL, - `data_value` DECIMAL(10,5) NULL DEFAULT NULL) -ENGINE = InnoDB -DEFAULT CHARACTER SET = utf8; - --- ---------------------------------------------------------------------------- --- Table vid_openecomp_epsdk.demo_scatter_chart --- ---------------------------------------------------------------------------- -CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`demo_scatter_chart` ( - `rainfall` DECIMAL(10,2) NULL DEFAULT NULL, - `key_value` VARCHAR(20) NULL DEFAULT NULL, - `measurements` DECIMAL(10,2) NULL DEFAULT NULL) -ENGINE = InnoDB -DEFAULT CHARACTER SET = utf8; - --- ---------------------------------------------------------------------------- --- Table vid_openecomp_epsdk.demo_scatter_plot --- ---------------------------------------------------------------------------- -CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`demo_scatter_plot` ( - `SERIES` VARCHAR(20) NULL DEFAULT NULL, - `VALUEX` DECIMAL(25,15) NULL DEFAULT NULL, - `VALUEY` DECIMAL(25,15) NULL DEFAULT NULL) -ENGINE = InnoDB -DEFAULT CHARACTER SET = utf8; - --- ---------------------------------------------------------------------------- --- Table vid_openecomp_epsdk.demo_util_chart --- ---------------------------------------------------------------------------- -CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`demo_util_chart` ( - `traffic_date` DATE NULL DEFAULT NULL, - `util_perc` DECIMAL(10,5) NULL DEFAULT NULL) -ENGINE = InnoDB -DEFAULT CHARACTER SET = utf8; - --- ---------------------------------------------------------------------------- --- Table vid_openecomp_epsdk.fn_app +-- Table vid_portal.fn_app -- ---------------------------------------------------------------------------- CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`fn_app` ( `APP_ID` INT(11) NOT NULL AUTO_INCREMENT, @@ -477,6 +410,21 @@ ENGINE = InnoDB AUTO_INCREMENT = 2 DEFAULT CHARACTER SET = utf8; +-- ---------------------------------------------------------------------------- +-- Table vid_openecomp_epsdk.fn_app_mme_cpu +-- ---------------------------------------------------------------------------- +CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`fn_app_mme_cpu` ( + `MME` VARCHAR(200) NULL DEFAULT NULL, + `YEARMONTH` INT(11) NULL DEFAULT NULL, + `SCTP_CPU` INT(11) NULL DEFAULT NULL, + `AP_CPU` INT(11) NULL DEFAULT NULL, + `DP_CPU` INT(11) NULL DEFAULT NULL, + `ROUTER_CPU` INT(11) NULL DEFAULT NULL, + `PEB_CPU` INT(11) NULL DEFAULT NULL, + `SAU` INT(11) NULL DEFAULT NULL) +ENGINE = InnoDB +DEFAULT CHARACTER SET = utf8; + -- ---------------------------------------------------------------------------- -- Table vid_openecomp_epsdk.fn_audit_action -- ---------------------------------------------------------------------------- @@ -519,14 +467,14 @@ CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`fn_audit_log` ( `AFFECTED_RECORD_ID_BK` VARCHAR(500) NULL DEFAULT NULL, `AFFECTED_RECORD_ID` VARCHAR(4000) NULL DEFAULT NULL, PRIMARY KEY (`LOG_ID`), - INDEX `fn_audit_log_activity_cd` (`ACTIVITY_CD` ASC), - INDEX `fn_audit_log_user_id` (`USER_ID` ASC), + INDEX `FN_AUDIT_LOG_ACTIVITY_CD` (`ACTIVITY_CD` ASC), + INDEX `FN_AUDIT_LOG_USER_ID` (`USER_ID` ASC), + CONSTRAINT `FK_FN_AUDIT_REF_205_FN_LU_AC` + FOREIGN KEY (`ACTIVITY_CD`) + REFERENCES `vid_openecomp_epsdk`.`fn_lu_activity` (`ACTIVITY_CD`), CONSTRAINT `FK_FN_AUDIT_REF_209_FN_USER` FOREIGN KEY (`USER_ID`) - REFERENCES `vid_openecomp_epsdk`.`fn_user` (`USER_ID`), - CONSTRAINT `fk_fn_audit_ref_205_fn_lu_ac` - FOREIGN KEY (`ACTIVITY_CD`) - REFERENCES `vid_openecomp_epsdk`.`fn_lu_activity` (`ACTIVITY_CD`)) + REFERENCES `vid_openecomp_epsdk`.`fn_user` (`USER_ID`)) ENGINE = InnoDB DEFAULT CHARACTER SET = utf8; @@ -604,6 +552,7 @@ CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`fn_datasource` ( `DS_TYPE` VARCHAR(20) NULL DEFAULT NULL, PRIMARY KEY (`ID`)) ENGINE = InnoDB +AUTO_INCREMENT = 4 DEFAULT CHARACTER SET = utf8; -- ---------------------------------------------------------------------------- @@ -616,6 +565,76 @@ CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`fn_function` ( ENGINE = InnoDB DEFAULT CHARACTER SET = utf8; +-- ---------------------------------------------------------------------------- +-- Table vid_openecomp_epsdk.fn_license +-- ---------------------------------------------------------------------------- +CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`fn_license` ( + `id` DECIMAL(11,0) NOT NULL, + `app_id` DECIMAL(11,0) NOT NULL, + `ip_address` VARCHAR(100) NOT NULL, + `quantum_version_id` DECIMAL(11,0) NOT NULL, + `created_date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, + `modified_date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, + `created_id` DECIMAL(11,0) NULL DEFAULT NULL, + `modified_id` DECIMAL(11,0) NULL DEFAULT NULL, + `end_date` TIMESTAMP NOT NULL DEFAULT '2036-01-19 03:14:07', + PRIMARY KEY (`id`), + INDEX `fn_license_r02` (`quantum_version_id` ASC), + CONSTRAINT `fn_license_r02` + FOREIGN KEY (`quantum_version_id`) + REFERENCES `vid_openecomp_epsdk`.`fn_license_version` (`id`)) +ENGINE = InnoDB +DEFAULT CHARACTER SET = utf8; + +-- ---------------------------------------------------------------------------- +-- Table vid_openecomp_epsdk.fn_license_app +-- ---------------------------------------------------------------------------- +CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`fn_license_app` ( + `id` DECIMAL(11,0) NOT NULL, + `app_name` VARCHAR(100) NOT NULL, + `ctxt_name` VARCHAR(100) NULL DEFAULT NULL, + INDEX `fn_license_app_ID` (`id` ASC)) +ENGINE = InnoDB +DEFAULT CHARACTER SET = utf8; + +-- ---------------------------------------------------------------------------- +-- Table vid_openecomp_epsdk.fn_license_contact +-- ---------------------------------------------------------------------------- +CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`fn_license_contact` ( + `id` INT(11) NOT NULL, + `license_id` INT(11) NULL DEFAULT NULL, + `sbcid` VARCHAR(20) NULL DEFAULT NULL, + PRIMARY KEY (`id`)) +ENGINE = InnoDB +DEFAULT CHARACTER SET = utf8; + +-- ---------------------------------------------------------------------------- +-- Table vid_openecomp_epsdk.fn_license_history +-- ---------------------------------------------------------------------------- +CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`fn_license_history` ( + `license_id` DECIMAL(11,0) NULL DEFAULT NULL, + `app_id` DECIMAL(11,0) NULL DEFAULT NULL, + `ip_address` VARCHAR(100) NULL DEFAULT NULL, + `quantum_version_id` DECIMAL(11,0) NULL DEFAULT NULL, + `created_date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, + `modified_date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, + `created_id` DECIMAL(11,0) NULL DEFAULT NULL, + `modified_id` DECIMAL(11,0) NULL DEFAULT NULL, + `id` DECIMAL(11,0) NOT NULL, + PRIMARY KEY (`id`)) +ENGINE = InnoDB +DEFAULT CHARACTER SET = utf8; + +-- ---------------------------------------------------------------------------- +-- Table vid_openecomp_epsdk.fn_license_version +-- ---------------------------------------------------------------------------- +CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`fn_license_version` ( + `id` DECIMAL(11,0) NOT NULL, + `quantum_version` VARCHAR(25) NULL DEFAULT NULL, + PRIMARY KEY (`id`)) +ENGINE = InnoDB +DEFAULT CHARACTER SET = utf8; + -- ---------------------------------------------------------------------------- -- Table vid_openecomp_epsdk.fn_lu_activity -- ---------------------------------------------------------------------------- @@ -647,22 +666,46 @@ ENGINE = InnoDB DEFAULT CHARACTER SET = utf8; -- ---------------------------------------------------------------------------- --- Table vid_openecomp_epsdk.fn_lu_menu_set +-- Table vid_openecomp_epsdk.fn_lu_call_times -- ---------------------------------------------------------------------------- -CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`fn_lu_menu_set` ( - `MENU_SET_CD` VARCHAR(10) NOT NULL, - `MENU_SET_NAME` VARCHAR(50) NOT NULL, - PRIMARY KEY (`MENU_SET_CD`)) +CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`fn_lu_call_times` ( + `CALL_TIME_ID` DECIMAL(10,0) NOT NULL, + `CALL_TIME_AMOUNT` DECIMAL(10,0) NOT NULL, + `CALL_TIME_DISPLAY` VARCHAR(50) NOT NULL, + PRIMARY KEY (`CALL_TIME_ID`)) ENGINE = InnoDB DEFAULT CHARACTER SET = utf8; -- ---------------------------------------------------------------------------- --- Table vid_openecomp_epsdk.fn_lu_message_location +-- Table vid_openecomp_epsdk.fn_lu_city -- ---------------------------------------------------------------------------- -CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`fn_lu_message_location` ( - `message_location_id` DECIMAL(11,0) NOT NULL, - `message_location_descr` VARCHAR(30) NOT NULL, - PRIMARY KEY (`message_location_id`)) +CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`fn_lu_city` ( + `CITY_CD` VARCHAR(2) NOT NULL, + `CITY` VARCHAR(100) NOT NULL, + `STATE_CD` VARCHAR(2) NOT NULL, + PRIMARY KEY (`CITY_CD`, `STATE_CD`)) +ENGINE = InnoDB +DEFAULT CHARACTER SET = utf8; + +-- ---------------------------------------------------------------------------- +-- Table vid_openecomp_epsdk.fn_lu_country +-- ---------------------------------------------------------------------------- +CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`fn_lu_country` ( + `COUNTRY_CD` VARCHAR(3) NOT NULL, + `COUNTRY` VARCHAR(100) NOT NULL, + `FULL_NAME` VARCHAR(100) NULL DEFAULT NULL, + `WEBPHONE_COUNTRY_LABEL` VARCHAR(30) NULL DEFAULT NULL, + PRIMARY KEY (`COUNTRY_CD`)) +ENGINE = InnoDB +DEFAULT CHARACTER SET = utf8; + +-- ---------------------------------------------------------------------------- +-- Table vid_openecomp_epsdk.fn_lu_menu_set +-- ---------------------------------------------------------------------------- +CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`fn_lu_menu_set` ( + `MENU_SET_CD` VARCHAR(10) NOT NULL, + `MENU_SET_NAME` VARCHAR(50) NOT NULL, + PRIMARY KEY (`MENU_SET_CD`)) ENGINE = InnoDB DEFAULT CHARACTER SET = utf8; @@ -688,6 +731,16 @@ CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`fn_lu_role_type` ( ENGINE = InnoDB DEFAULT CHARACTER SET = utf8; +-- ---------------------------------------------------------------------------- +-- Table vid_openecomp_epsdk.fn_lu_state +-- ---------------------------------------------------------------------------- +CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`fn_lu_state` ( + `STATE_CD` VARCHAR(2) NOT NULL, + `STATE` VARCHAR(100) NOT NULL, + PRIMARY KEY (`STATE_CD`)) +ENGINE = InnoDB +DEFAULT CHARACTER SET = utf8; + -- ---------------------------------------------------------------------------- -- Table vid_openecomp_epsdk.fn_lu_tab_set -- ---------------------------------------------------------------------------- @@ -730,7 +783,7 @@ CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`fn_menu` ( PRIMARY KEY (`MENU_ID`), INDEX `FK_FN_MENU_REF_196_FN_MENU` (`PARENT_ID` ASC), INDEX `FK_FN_MENU_MENU_SET_CD` (`MENU_SET_CD` ASC), - INDEX `fn_menu_function_cd` (`FUNCTION_CD` ASC), + INDEX `FN_MENU_FUNCTION_CD` (`FUNCTION_CD` ASC), CONSTRAINT `FK_FN_MENU_MENU_SET_CD` FOREIGN KEY (`MENU_SET_CD`) REFERENCES `vid_openecomp_epsdk`.`fn_lu_menu_set` (`MENU_SET_CD`), @@ -741,7 +794,7 @@ CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`fn_menu` ( FOREIGN KEY (`FUNCTION_CD`) REFERENCES `vid_openecomp_epsdk`.`fn_function` (`FUNCTION_CD`)) ENGINE = InnoDB -AUTO_INCREMENT = 150039 +AUTO_INCREMENT = 150029 DEFAULT CHARACTER SET = utf8; -- ---------------------------------------------------------------------------- @@ -752,7 +805,7 @@ CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`fn_org` ( `ORG_NAME` VARCHAR(50) NOT NULL, `ACCESS_CD` VARCHAR(10) NULL DEFAULT NULL, PRIMARY KEY (`ORG_ID`), - INDEX `fn_org_access_cd` (`ACCESS_CD` ASC)) + INDEX `FN_ORG_ACCESS_CD` (`ACCESS_CD` ASC)) ENGINE = InnoDB DEFAULT CHARACTER SET = utf8; @@ -817,12 +870,12 @@ CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`fn_qz_fired_triggers` ( `IS_NONCONCURRENT` VARCHAR(1) NULL DEFAULT NULL, `REQUESTS_RECOVERY` VARCHAR(1) NULL DEFAULT NULL, PRIMARY KEY (`SCHED_NAME`, `ENTRY_ID`), - INDEX `idx_fn_qz_ft_trig_inst_name` (`SCHED_NAME` ASC, `INSTANCE_NAME` ASC), - INDEX `idx_fn_qz_ft_inst_job_req_rcvry` (`SCHED_NAME` ASC, `INSTANCE_NAME` ASC, `REQUESTS_RECOVERY` ASC), - INDEX `idx_fn_qz_ft_j_g` (`SCHED_NAME` ASC, `JOB_NAME` ASC, `JOB_GROUP` ASC), - INDEX `idx_fn_qz_ft_jg` (`SCHED_NAME` ASC, `JOB_GROUP` ASC), - INDEX `idx_fn_qz_ft_t_g` (`SCHED_NAME` ASC, `TRIGGER_NAME` ASC, `TRIGGER_GROUP` ASC), - INDEX `idx_fn_qz_ft_tg` (`SCHED_NAME` ASC, `TRIGGER_GROUP` ASC)) + INDEX `IDX_FN_QZ_FT_TRIG_INST_NAME` (`SCHED_NAME` ASC, `INSTANCE_NAME` ASC), + INDEX `IDX_FN_QZ_FT_INST_JOB_REQ_RCVRY` (`SCHED_NAME` ASC, `INSTANCE_NAME` ASC, `REQUESTS_RECOVERY` ASC), + INDEX `IDX_FN_QZ_FT_J_G` (`SCHED_NAME` ASC, `JOB_NAME` ASC, `JOB_GROUP` ASC), + INDEX `IDX_FN_QZ_FT_JG` (`SCHED_NAME` ASC, `JOB_GROUP` ASC), + INDEX `IDX_FN_QZ_FT_T_G` (`SCHED_NAME` ASC, `TRIGGER_NAME` ASC, `TRIGGER_GROUP` ASC), + INDEX `IDX_FN_QZ_FT_TG` (`SCHED_NAME` ASC, `TRIGGER_GROUP` ASC)) ENGINE = InnoDB DEFAULT CHARACTER SET = utf8; @@ -841,8 +894,8 @@ CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`fn_qz_job_details` ( `REQUESTS_RECOVERY` VARCHAR(1) NOT NULL, `JOB_DATA` BLOB NULL DEFAULT NULL, PRIMARY KEY (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`), - INDEX `idx_fn_qz_j_req_recovery` (`SCHED_NAME` ASC, `REQUESTS_RECOVERY` ASC), - INDEX `idx_fn_qz_j_grp` (`SCHED_NAME` ASC, `JOB_GROUP` ASC)) + INDEX `IDX_FN_QZ_J_REQ_RECOVERY` (`SCHED_NAME` ASC, `REQUESTS_RECOVERY` ASC), + INDEX `IDX_FN_QZ_J_GRP` (`SCHED_NAME` ASC, `JOB_GROUP` ASC)) ENGINE = InnoDB DEFAULT CHARACTER SET = utf8; @@ -941,20 +994,18 @@ CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`fn_qz_triggers` ( `MISFIRE_INSTR` SMALLINT(2) NULL DEFAULT NULL, `JOB_DATA` BLOB NULL DEFAULT NULL, PRIMARY KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`), - INDEX `idx_fn_qz_t_j` (`SCHED_NAME` ASC, `JOB_NAME` ASC, `JOB_GROUP` ASC), - INDEX `idx_fn_qz_t_jg` (`SCHED_NAME` ASC, `JOB_GROUP` ASC), - INDEX `idx_fn_qz_t_c` (`SCHED_NAME` ASC, `CALENDAR_NAME` ASC), - INDEX `idx_fn_qz_t_g` (`SCHED_NAME` ASC, `TRIGGER_GROUP` ASC), - INDEX `idx_fn_qz_t_state` (`SCHED_NAME` ASC, `TRIGGER_STATE` ASC), - INDEX `idx_fn_qz_t_n_state` (`SCHED_NAME` ASC, `TRIGGER_NAME` ASC, `TRIGGER_GROUP` ASC, `TRIGGER_STATE` ASC), - INDEX `idx_fn_qz_t_n_g_state` (`SCHED_NAME` ASC, `TRIGGER_GROUP` ASC, `TRIGGER_STATE` ASC), - INDEX `idx_fn_qz_t_next_fire_time` (`SCHED_NAME` ASC, `NEXT_FIRE_TIME` ASC), - INDEX `idx_fn_qz_t_nft_st` (`SCHED_NAME` ASC, `TRIGGER_STATE` ASC, `NEXT_FIRE_TIME` ASC), - INDEX `idx_fn_qz_t_nft_misfire` (`SCHED_NAME` ASC, `MISFIRE_INSTR` ASC, `NEXT_FIRE_TIME` ASC), - INDEX `idx_fn_qz_t_nft_st_misfire` (`SCHED_NAME` ASC, `MISFIRE_INSTR` ASC, `NEXT_FIRE_TIME` ASC, `TRIGGER_STATE` ASC), - INDEX `idx_fn_qz_t_nft_st_misfire_grp` (`SCHED_NAME` ASC, `MISFIRE_INSTR` ASC, `NEXT_FIRE_TIME` ASC, `TRIGGER_GROUP` ASC, - -`TRIGGER_STATE` ASC), + INDEX `IDX_FN_QZ_T_J` (`SCHED_NAME` ASC, `JOB_NAME` ASC, `JOB_GROUP` ASC), + INDEX `IDX_FN_QZ_T_JG` (`SCHED_NAME` ASC, `JOB_GROUP` ASC), + INDEX `IDX_FN_QZ_T_C` (`SCHED_NAME` ASC, `CALENDAR_NAME` ASC), + INDEX `IDX_FN_QZ_T_G` (`SCHED_NAME` ASC, `TRIGGER_GROUP` ASC), + INDEX `IDX_FN_QZ_T_STATE` (`SCHED_NAME` ASC, `TRIGGER_STATE` ASC), + INDEX `IDX_FN_QZ_T_N_STATE` (`SCHED_NAME` ASC, `TRIGGER_NAME` ASC, `TRIGGER_GROUP` ASC, `TRIGGER_STATE` ASC), + INDEX `IDX_FN_QZ_T_N_G_STATE` (`SCHED_NAME` ASC, `TRIGGER_GROUP` ASC, `TRIGGER_STATE` ASC), + INDEX `IDX_FN_QZ_T_NEXT_FIRE_TIME` (`SCHED_NAME` ASC, `NEXT_FIRE_TIME` ASC), + INDEX `IDX_FN_QZ_T_NFT_ST` (`SCHED_NAME` ASC, `TRIGGER_STATE` ASC, `NEXT_FIRE_TIME` ASC), + INDEX `IDX_FN_QZ_T_NFT_MISFIRE` (`SCHED_NAME` ASC, `MISFIRE_INSTR` ASC, `NEXT_FIRE_TIME` ASC), + INDEX `IDX_FN_QZ_T_NFT_ST_MISFIRE` (`SCHED_NAME` ASC, `MISFIRE_INSTR` ASC, `NEXT_FIRE_TIME` ASC, `TRIGGER_STATE` ASC), + INDEX `IDX_FN_QZ_T_NFT_ST_MISFIRE_GRP` (`SCHED_NAME` ASC, `MISFIRE_INSTR` ASC, `NEXT_FIRE_TIME` ASC, `TRIGGER_GROUP` ASC, `TRIGGER_STATE` ASC), CONSTRAINT `fn_qz_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME` , `JOB_NAME` , `JOB_GROUP`) REFERENCES `vid_openecomp_epsdk`.`fn_qz_job_details` (`SCHED_NAME` , `JOB_NAME` , `JOB_GROUP`)) @@ -968,8 +1019,8 @@ CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`fn_restricted_url` ( `RESTRICTED_URL` VARCHAR(250) NOT NULL, `FUNCTION_CD` VARCHAR(30) NOT NULL, PRIMARY KEY (`RESTRICTED_URL`, `FUNCTION_CD`), - INDEX `fk_restricted_url_function_cd` (`FUNCTION_CD` ASC), - CONSTRAINT `fk_restricted_url_function_cd` + INDEX `FK_RESTRICTED_URL_FUNCTION_CD` (`FUNCTION_CD` ASC), + CONSTRAINT `FK_RESTRICTED_URL_FUNCTION_CD` FOREIGN KEY (`FUNCTION_CD`) REFERENCES `vid_openecomp_epsdk`.`fn_function` (`FUNCTION_CD`)) ENGINE = InnoDB @@ -980,7 +1031,7 @@ DEFAULT CHARACTER SET = utf8; -- ---------------------------------------------------------------------------- CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`fn_role` ( `ROLE_ID` INT(11) NOT NULL AUTO_INCREMENT, - `ROLE_NAME` VARCHAR(50) NOT NULL, + `ROLE_NAME` VARCHAR(255) NOT NULL, `ACTIVE_YN` VARCHAR(1) NOT NULL DEFAULT 'Y', `PRIORITY` DECIMAL(4,0) NULL DEFAULT NULL, PRIMARY KEY (`ROLE_ID`)) @@ -988,6 +1039,9 @@ ENGINE = InnoDB AUTO_INCREMENT = 17 DEFAULT CHARACTER SET = utf8; +ALTER TABLE `vid_openecomp_epsdk`.`fn_role` MODIFY `ROLE_NAME` VARCHAR (255); + + -- ---------------------------------------------------------------------------- -- Table vid_openecomp_epsdk.fn_role_composite -- ---------------------------------------------------------------------------- @@ -1012,12 +1066,12 @@ CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`fn_role_function` ( `ROLE_ID` INT(11) NOT NULL, `FUNCTION_CD` VARCHAR(30) NOT NULL, PRIMARY KEY (`ROLE_ID`, `FUNCTION_CD`), - INDEX `fn_role_function_function_cd` (`FUNCTION_CD` ASC), - INDEX `fn_role_function_role_id` (`ROLE_ID` ASC), + INDEX `FN_ROLE_FUNCTION_FUNCTION_CD` (`FUNCTION_CD` ASC), + INDEX `FN_ROLE_FUNCTION_ROLE_ID` (`ROLE_ID` ASC), CONSTRAINT `FK_FN_ROLE__REF_198_FN_ROLE` FOREIGN KEY (`ROLE_ID`) REFERENCES `vid_openecomp_epsdk`.`fn_role` (`ROLE_ID`), - CONSTRAINT `fk_fn_role__ref_201_fn_funct` + CONSTRAINT `FK_FN_ROLE__REF_201_FN_FUNCT` FOREIGN KEY (`FUNCTION_CD`) REFERENCES `vid_openecomp_epsdk`.`fn_function` (`FUNCTION_CD`)) ENGINE = InnoDB @@ -1053,12 +1107,12 @@ CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`fn_tab` ( `PARENT_TAB_CD` VARCHAR(30) NULL DEFAULT NULL, `TAB_SET_CD` VARCHAR(30) NULL DEFAULT NULL, PRIMARY KEY (`TAB_CD`), - INDEX `fk_fn_tab_function_cd` (`FUNCTION_CD` ASC), - INDEX `fk_fn_tab_set_cd` (`TAB_SET_CD` ASC), - CONSTRAINT `fk_fn_tab_function_cd` + INDEX `FK_FN_TAB_FUNCTION_CD` (`FUNCTION_CD` ASC), + INDEX `FK_FN_TAB_SET_CD` (`TAB_SET_CD` ASC), + CONSTRAINT `FK_FN_TAB_FUNCTION_CD` FOREIGN KEY (`FUNCTION_CD`) REFERENCES `vid_openecomp_epsdk`.`fn_function` (`FUNCTION_CD`), - CONSTRAINT `fk_fn_tab_set_cd` + CONSTRAINT `FK_FN_TAB_SET_CD` FOREIGN KEY (`TAB_SET_CD`) REFERENCES `vid_openecomp_epsdk`.`fn_lu_tab_set` (`TAB_SET_CD`)) ENGINE = InnoDB @@ -1071,7 +1125,7 @@ CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`fn_tab_selected` ( `SELECTED_TAB_CD` VARCHAR(30) NOT NULL, `TAB_URI` VARCHAR(40) NOT NULL, PRIMARY KEY (`SELECTED_TAB_CD`, `TAB_URI`), - CONSTRAINT `fk_fn_tab_selected_tab_cd` + CONSTRAINT `FK_FN_TAB_SELECTED_TAB_CD` FOREIGN KEY (`SELECTED_TAB_CD`) REFERENCES `vid_openecomp_epsdk`.`fn_tab` (`TAB_CD`)) ENGINE = InnoDB @@ -1124,37 +1178,38 @@ CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`fn_user` ( `FIN_LOC_CODE` VARCHAR(10) NULL DEFAULT NULL, `SILO_STATUS` VARCHAR(10) NULL DEFAULT NULL, PRIMARY KEY (`USER_ID`), - UNIQUE INDEX `fn_user_hrid` (`HRID` ASC), - UNIQUE INDEX `fn_user_login_id` (`LOGIN_ID` ASC), - INDEX `fn_user_address_id` (`ADDRESS_ID` ASC), - INDEX `fn_user_alert_method_cd` (`ALERT_METHOD_CD` ASC), - INDEX `fn_user_org_id` (`ORG_ID` ASC), - INDEX `fk_fn_user_ref_197_fn_user` (`MANAGER_ID` ASC), - INDEX `fk_fn_user_ref_198_fn_user` (`CREATED_ID` ASC), - INDEX `fk_fn_user_ref_199_fn_user` (`MODIFIED_ID` ASC), - INDEX `fk_timezone` (`TIMEZONE` ASC), - CONSTRAINT `fk_fn_user_ref_110_fn_org` + UNIQUE INDEX `FN_USER_HRID` (`HRID` ASC), + UNIQUE INDEX `FN_USER_LOGIN_ID` (`LOGIN_ID` ASC), + INDEX `FN_USER_ADDRESS_ID` (`ADDRESS_ID` ASC), + INDEX `FN_USER_ALERT_METHOD_CD` (`ALERT_METHOD_CD` ASC), + INDEX `FN_USER_ORG_ID` (`ORG_ID` ASC), + INDEX `FK_FN_USER_REF_197_FN_USER` (`MANAGER_ID` ASC), + INDEX `FK_FN_USER_REF_198_FN_USER` (`CREATED_ID` ASC), + INDEX `FK_FN_USER_REF_199_FN_USER` (`MODIFIED_ID` ASC), + INDEX `FK_TIMEZONE` (`TIMEZONE` ASC), + CONSTRAINT `FK_FN_USER_REF_110_FN_ORG` FOREIGN KEY (`ORG_ID`) REFERENCES `vid_openecomp_epsdk`.`fn_org` (`ORG_ID`), - CONSTRAINT `fk_fn_user_ref_123_fn_lu_al` + CONSTRAINT `FK_FN_USER_REF_123_FN_LU_AL` FOREIGN KEY (`ALERT_METHOD_CD`) REFERENCES `vid_openecomp_epsdk`.`fn_lu_alert_method` (`ALERT_METHOD_CD`), - CONSTRAINT `fk_fn_user_ref_197_fn_user` + CONSTRAINT `FK_FN_USER_REF_197_FN_USER` FOREIGN KEY (`MANAGER_ID`) REFERENCES `vid_openecomp_epsdk`.`fn_user` (`USER_ID`), - CONSTRAINT `fk_fn_user_ref_198_fn_user` + CONSTRAINT `FK_FN_USER_REF_198_FN_USER` FOREIGN KEY (`CREATED_ID`) REFERENCES `vid_openecomp_epsdk`.`fn_user` (`USER_ID`), - CONSTRAINT `fk_fn_user_ref_199_fn_user` + CONSTRAINT `FK_FN_USER_REF_199_FN_USER` FOREIGN KEY (`MODIFIED_ID`) REFERENCES `vid_openecomp_epsdk`.`fn_user` (`USER_ID`), - CONSTRAINT `fk_timezone` + CONSTRAINT `FK_TIMEZONE` FOREIGN KEY (`TIMEZONE`) REFERENCES `vid_openecomp_epsdk`.`fn_lu_timezone` (`TIMEZONE_ID`)) ENGINE = InnoDB -AUTO_INCREMENT = 2 +AUTO_INCREMENT = 3 DEFAULT CHARACTER SET = utf8; + -- ---------------------------------------------------------------------------- -- Table vid_openecomp_epsdk.fn_user_pseudo_role -- ---------------------------------------------------------------------------- @@ -1162,11 +1217,11 @@ CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`fn_user_pseudo_role` ( `PSEUDO_ROLE_ID` INT(11) NOT NULL, `USER_ID` INT(11) NOT NULL, PRIMARY KEY (`PSEUDO_ROLE_ID`, `USER_ID`), - INDEX `fk_pseudo_role_user_id` (`USER_ID` ASC), - CONSTRAINT `fk_pseudo_role_pseudo_role_id` + INDEX `FK_PSEUDO_ROLE_USER_ID` (`USER_ID` ASC), + CONSTRAINT `FK_PSEUDO_ROLE_PSEUDO_ROLE_ID` FOREIGN KEY (`PSEUDO_ROLE_ID`) REFERENCES `vid_openecomp_epsdk`.`fn_role` (`ROLE_ID`), - CONSTRAINT `fk_pseudo_role_user_id` + CONSTRAINT `FK_PSEUDO_ROLE_USER_ID` FOREIGN KEY (`USER_ID`) REFERENCES `vid_openecomp_epsdk`.`fn_user` (`USER_ID`)) ENGINE = InnoDB @@ -1181,16 +1236,16 @@ CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`fn_user_role` ( `PRIORITY` DECIMAL(4,0) NULL DEFAULT NULL, `APP_ID` INT(11) NOT NULL DEFAULT '1', PRIMARY KEY (`USER_ID`, `ROLE_ID`, `APP_ID`), - INDEX `fn_user_role_role_id` (`ROLE_ID` ASC), - INDEX `fn_user_role_user_id` (`USER_ID` ASC), - INDEX `fk_fn_user__ref_178_fn_app_IDX` (`APP_ID` ASC), + INDEX `FN_USER_ROLE_ROLE_ID` (`ROLE_ID` ASC), + INDEX `FN_USER_ROLE_USER_ID` (`USER_ID` ASC), + INDEX `FK_FN_USER__REF_178_FN_APP_idx` (`APP_ID` ASC), CONSTRAINT `FK_FN_USER__REF_172_FN_USER` FOREIGN KEY (`USER_ID`) REFERENCES `vid_openecomp_epsdk`.`fn_user` (`USER_ID`), CONSTRAINT `FK_FN_USER__REF_175_FN_ROLE` FOREIGN KEY (`ROLE_ID`) REFERENCES `vid_openecomp_epsdk`.`fn_role` (`ROLE_ID`), - CONSTRAINT `fk_fn_user__ref_178_fn_app` + CONSTRAINT `FK_FN_USER__REF_178_FN_APP` FOREIGN KEY (`APP_ID`) REFERENCES `vid_openecomp_epsdk`.`fn_app` (`APP_ID`)) ENGINE = InnoDB @@ -1218,26 +1273,12 @@ ENGINE = InnoDB DEFAULT CHARACTER SET = utf8; -- ---------------------------------------------------------------------------- --- Table vid_openecomp_epsdk.rcloudinvocation --- ---------------------------------------------------------------------------- -CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`rcloudinvocation` ( - `id` VARCHAR(128) NOT NULL, - `created` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `userinfo` VARCHAR(2048) NOT NULL, - `notebookid` VARCHAR(128) NOT NULL, - `parameters` VARCHAR(2048) NULL DEFAULT NULL, - `tokenreaddate` TIMESTAMP NULL DEFAULT NULL, - PRIMARY KEY (`id`)) -ENGINE = InnoDB -DEFAULT CHARACTER SET = utf8; - --- ---------------------------------------------------------------------------- --- Table vid_openecomp_epsdk.rcloudnotebook +-- Table vid_openecomp_epsdk.fn_xmltype -- ---------------------------------------------------------------------------- -CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`rcloudnotebook` ( - `notebookname` VARCHAR(128) NOT NULL, - `notebookid` VARCHAR(128) NOT NULL, - PRIMARY KEY (`notebookname`)) +CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`fn_xmltype` ( + `ID` DECIMAL(10,0) NOT NULL, + `XML_DOCUMENT` TEXT NULL DEFAULT NULL, + UNIQUE INDEX `FN_XMLTYPE_ID` (`ID` ASC)) ENGINE = InnoDB DEFAULT CHARACTER SET = utf8; @@ -1257,16 +1298,87 @@ CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`schema_info` ( `IDLE_CONNECTION_TEST_PERIOD` INT(11) NOT NULL) ENGINE = InnoDB DEFAULT CHARACTER SET = utf8; +-- ---------------------------------------------------------------------------- +-- Table vid_openecomp_epsdk.vid_vnf +-- ---------------------------------------------------------------------------- + +CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`vid_vnf` ( + `VNF_DB_ID` int(11) NOT NULL AUTO_INCREMENT, + `VNF_APP_UUID` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, + `VNF_APP_INVARIANT_UUID` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, + `CREATED_DATE` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + `MODIFIED_DATE` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (`VNF_DB_ID`), + UNIQUE KEY `vid_vnf_VNF_ID_uindex` (`VNF_APP_UUID`,`VNF_APP_INVARIANT_UUID`) +) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8; -- ---------------------------------------------------------------------------- --- View vid_openecomp_epsdk.v_url_access +-- Table vid_openecomp_epsdk.vid_workflow +-- ---------------------------------------------------------------------------- + +CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`vid_workflow` ( + `WORKFLOW_DB_ID` int(11) NOT NULL AUTO_INCREMENT, + `WORKFLOW_APP_NAME` varchar(50) COLLATE utf8_bin NOT NULL, + `CREATED_DATE` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + `MODIFIED_DATE` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (`WORKFLOW_DB_ID`), + UNIQUE KEY `vid_workflow_workflow_uuid_uindex` (`WORKFLOW_APP_NAME`), + UNIQUE KEY `vid_workflow_WORKFLOW_ID_uindex` (`WORKFLOW_DB_ID`) +) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; + +-- ---------------------------------------------------------------------------- +-- Table vid_openecomp_epsdk.vid_vnf_workflow +-- ---------------------------------------------------------------------------- + + +CREATE TABLE IF NOT EXISTS `vid_openecomp_epsdk`.`vid_vnf_workflow` ( + `VNF_DB_ID` int(11) NOT NULL, + `WORKFLOW_DB_ID` int(11) NOT NULL, + KEY `vid_vnf_workflow_vid_vnf_VND_ID_fk` (`VNF_DB_ID`), + KEY `vid_vnf_workflow_vid_workflow_WORKFLOW_ID_fk` (`WORKFLOW_DB_ID`), + CONSTRAINT `vid_vnf_workflow_vid_vnf_VND_ID_fk` FOREIGN KEY (`VNF_DB_ID`) REFERENCES `vid_vnf` (`VNF_DB_ID`), + CONSTRAINT `vid_vnf_workflow_vid_workflow_WORKFLOW_ID_fk` FOREIGN KEY (`WORKFLOW_DB_ID`) REFERENCES `vid_openecomp_epsdk`.`vid_workflow` (`WORKFLOW_DB_ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; + + +-- ---------------------------------------------------------------------------- +-- Table vid_openecomp_epsdk.vid_category_parameter -- ---------------------------------------------------------------------------- -CREATE OR REPLACE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `v_url_access` AS select distinct `m`.`ACTION` AS -`URL`,`m`.`FUNCTION_CD` AS `FUNCTION_CD` from `fn_menu` `m` where (`m`.`ACTION` is not null) union select distinct -`t`.`ACTION` AS `URL`,`t`.`FUNCTION_CD` AS `FUNCTION_CD` from `fn_tab` `t` where (`t`.`ACTION` is not null) union select +CREATE TABLE IF NOT EXISTS `vid_category_parameter` ( + `CATEGORY_ID` INT(11) NOT NULL AUTO_INCREMENT, + `NAME` VARCHAR(255) NULL COLLATE 'utf8_bin', + `ID_SUPPORTED` TINYINT(1) NOT NULL DEFAULT '0', + `CREATED_DATE` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + `MODIFIED_DATE` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (`CATEGORY_ID`) +) COLLATE='utf8_bin' ENGINE=InnoDB AUTO_INCREMENT=5; -`r`.`RESTRICTED_URL` AS `URL`,`r`.`FUNCTION_CD` AS `FUNCTION_CD` from `fn_restricted_url` `r`; +------------------------------------------------------------------------------- + +ALTER TABLE `vid_category_parameter` + ADD COLUMN if not exists `FAMILY` ENUM('PARAMETER_STANDARDIZATION','TENANT_ISOLATION') NOT NULL DEFAULT 'PARAMETER_STANDARDIZATION' AFTER `ID_SUPPORTED`; +-- ---------------------------------------------------------------------------- +-- Table vid_openecomp_epsdk.vid_category_parameter +-- ---------------------------------------------------------------------------- +CREATE TABLE IF NOT EXISTS `vid_category_parameter_option` ( + `CATEGORY_OPT_DB_ID` INT(11) NOT NULL AUTO_INCREMENT, + `CATEGORY_OPT_APP_ID` VARCHAR(50) NOT NULL COLLATE 'utf8_bin', + `NAME` VARCHAR(50) NULL COLLATE 'utf8_bin', + `CATEGORY_ID` INT(11) NOT NULL DEFAULT '0', + `CREATED_DATE` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + `MODIFIED_DATE` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (`CATEGORY_OPT_DB_ID`), + UNIQUE INDEX `APP_ID_CATEGORY_UNIQUE` (`CATEGORY_ID`, `CATEGORY_OPT_APP_ID`), + UNIQUE INDEX `NAME_CATEGORY_UNIQUE` (`CATEGORY_ID`, `NAME`), + CONSTRAINT `FK_OWNING_ENTITY_OPTIONS_TO_OE` FOREIGN KEY (`CATEGORY_ID`) REFERENCES `vid_openecomp_epsdk`.`vid_category_parameter` (`CATEGORY_ID`) +) COLLATE='utf8_bin' ENGINE=InnoDB AUTO_INCREMENT=25; + + +-- ---------------------------------------------------------------------------- +-- View vid_openecomp_epsdk.v_url_access +-- ---------------------------------------------------------------------------- +CREATE OR REPLACE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `v_url_access` AS select distinct `m`.`ACTION` AS `URL`,`m`.`FUNCTION_CD` AS `FUNCTION_CD` from `fn_menu` `m` where (`m`.`ACTION` is not null) union select distinct `t`.`ACTION` AS `URL`,`t`.`FUNCTION_CD` AS `FUNCTION_CD` from `fn_tab` `t` where (`t`.`ACTION` is not null) union select `r`.`RESTRICTED_URL` AS `URL`,`r`.`FUNCTION_CD` AS `FUNCTION_CD` from `fn_restricted_url` `r`; SET FOREIGN_KEY_CHECKS = 1; diff --git a/epsdk-app-onap/src/main/swm/common/common.sh b/epsdk-app-onap/src/main/swm/common/common.sh deleted file mode 100755 index 4b98a5eac..000000000 --- a/epsdk-app-onap/src/main/swm/common/common.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash - -if [[ "${INSTALL_ROOT}" = */ ]]; then - export ROOT_DIR=${INSTALL_ROOT}opt/app/vid/portal -else - export ROOT_DIR=${INSTALL_ROOT}/opt/app/vid/portal -fi - -export JAVA_HOME=/opt/app/java/jdk/jdk180 - - -OS=`uname` - -if [ "${OS}" = "SunOS" ]; then - CURRENT_USER=`/usr/xpg4/bin/id -un` - CURRENT_GROUP=`/usr/xpg4/bin/id -gn` -else - CURRENT_USER=`id -un` - CURRENT_GROUP=`id -gn` -fi - -export CURRENT_USER CURRENT_GROUP -export TOMCAT_HOME=/opt/app/vid/tomcat - -if [ -z "${VID_ENDPOINT_NAME}" ]; then - VID_ENDPOINT_NAME="vid" -fi - -# Fail - used to quickly exit with a rc and error message -fail() { - rc=$1 - shift; - echo "ERROR: $@" - exit $rc -} diff --git a/epsdk-app-onap/src/main/swm/common/localize.sh b/epsdk-app-onap/src/main/swm/common/localize.sh deleted file mode 100755 index 711287e1f..000000000 --- a/epsdk-app-onap/src/main/swm/common/localize.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash - -COMMON_DIR="$(dirname "$AFTSWM_ACTIONHANDLER_SCRIPT")/../../common" - -source "${COMMON_DIR}/localize_logback.sh" || { - echo "ERROR: Localizing logback.xml failed" - exit 1 -} - -source "${COMMON_DIR}/localize_portal.sh" || { - echo "ERROR: Localizing portal.properties failed" - exit 1 -} - -source "${COMMON_DIR}/localize_quartz.sh" || { - echo "ERROR: Localizing quartz.properties failed" - exit 1 -} - -source "${COMMON_DIR}/localize_system.sh" || { - echo "ERROR: Localizing system.properties failed" - exit 1 -} - -source "${COMMON_DIR}/localize_cache.sh" || { - echo "ERROR: Localizing cache.ccf failed" - exit 1 -} - -source "${COMMON_DIR}/localize_asdc.sh" || { - echo "ERROR: Localizing asdc.properties failed" - exit 1 -} diff --git a/epsdk-app-onap/src/main/swm/common/localize_asdc.sh b/epsdk-app-onap/src/main/swm/common/localize_asdc.sh deleted file mode 100755 index 5774e5a0c..000000000 --- a/epsdk-app-onap/src/main/swm/common/localize_asdc.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/bash - -FINAL_CONFIG_FILE=${ROOT_DIR}/war/WEB-INF/conf/asdc.properties -TEMPLATE_CONFIG_FILE=${ROOT_DIR}/war/WEB-INF/conf/asdc_template.properties -BACKUP1_CONFIG_FILE=${ROOT_DIR}/war/WEB-INF/conf/asdc.properties.bk.1 -BACKUP2_CONFIG_FILE=${ROOT_DIR}/war/WEB-INF/conf/asdc.properties.bk.2 - -echo "Localizing the SDC client configuration" - -if [ -z "${ASDC_CLIENT_TYPE}" ]; then - ASDC_CLIENT_TYPE=REST -fi - -if [ "${ASDC_CLIENT_TYPE}" = "REST" ]; then - if [ -z "${ASDC_CLIENT_REST_HOST}" ]; then - echo 'ASDC_CLIENT_REST_HOST must be provided when ASDC_CLIENT_TYPE=REST' - exit 1 - fi - - if [ -z "${ASDC_CLIENT_REST_AUTH}" ]; then - echo 'ASDC_CLIENT_REST_AUTH must be provided when ASDC_CLIENT_TYPE=REST' - exit 2 - fi - - if [ -z "${ASDC_CLIENT_REST_PROTOCOL}" ]; then - ASDC_CLIENT_REST_PROTOCOL=http - fi - - if [ -z "${ASDC_CLIENT_REST_PORT}" ]; then - ASDC_CLIENT_REST_PORT=8080 - fi -else - ASDC_CLIENT_REST_HOST="" - ASDC_CLIENT_REST_AUTH="" - ASDC_CLIENT_REST_PROTOCOL="http" - ASDC_CLIENT_REST_PORT="8080" -fi - -#------------------------------------------------------------------------ -#- MAKE A BACKUP OF PREVIOUS BACKUP FILE, IF EXISTS -#------------------------------------------------------------------------ -if [ -f ${BACKUP1_CONFIG_FILE} ]; then - cp -f ${BACKUP1_CONFIG_FILE} ${BACKUP2_CONFIG_FILE} || { - echo "ERROR: Could not copy ${BACKUP1_CONFIG_FILE} to ${BACKUP2_CONFIG_FILE}" - exit 2 - } -fi - -#------------------------------------------------------------------------ -#- MAKE A BACKUP OF CURRENT FILE, IF EXISTS -#------------------------------------------------------------------------ -if [ -f ${FINAL_CONFIG_FILE} ]; then - cp -f ${FINAL_CONFIG_FILE} ${BACKUP1_CONFIG_FILE} || { - echo "ERROR: Could not copy ${FINAL_CONFIG_FILE} to ${BACKUP1_CONFIG_FILE}" - exit 3 - } -fi - -sed -e 's ${ASDC_CLIENT_TYPE} '${ASDC_CLIENT_TYPE}' g' \ - -e 's ${ASDC_CLIENT_REST_HOST} '${ASDC_CLIENT_REST_HOST}' g' \ - -e 's ${ASDC_CLIENT_REST_PORT} '${ASDC_CLIENT_REST_PORT}' g' \ - -e 's ${ASDC_CLIENT_REST_PROTOCOL} '${ASDC_CLIENT_REST_PROTOCOL}' g' \ - -e 's/${ASDC_CLIENT_REST_AUTH}/'"${ASDC_CLIENT_REST_AUTH}"'/g' ${TEMPLATE_CONFIG_FILE} > ${FINAL_CONFIG_FILE} || { - echo "ERROR: Could not process template file ${TEMPLATE_CONFIG_FILE} into ${FINAL_CONFIG_FILE}" - exit 4 - } - -echo "Localized ${FINAL_CONFIG_FILE} successfully." diff --git a/epsdk-app-onap/src/main/swm/common/localize_cache.sh b/epsdk-app-onap/src/main/swm/common/localize_cache.sh deleted file mode 100755 index 00069f89f..000000000 --- a/epsdk-app-onap/src/main/swm/common/localize_cache.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash - -FINAL_CONFIG_FILE=${ROOT_DIR}/war/WEB-INF/classes/cache.ccf -TEMPLATE_CONFIG_FILE=${ROOT_DIR}/war/WEB-INF/classes/cache_template.ccf -BACKUP1_CONFIG_FILE=${ROOT_DIR}/war/WEB-INF/classes/cache.ccf.bk.1 -BACKUP2_CONFIG_FILE=${ROOT_DIR}/war/WEB-INF/classes/cache.ccf.bk.2 - -echo "Localizing the VID cache configuration" - -if [ -z "${CACHE_DIRECTORY}" ]; then - CACHE_DIRECTORY=${ROOT_DIR}/cache -fi - -mkdir -p "${CACHE_DIRECTORY}" - -#------------------------------------------------------------------------ -#- MAKE A BACKUP OF PREVIOUS BACKUP FILE, IF EXISTS -#------------------------------------------------------------------------ -if [ -f ${BACKUP1_CONFIG_FILE} ]; then - cp -f ${BACKUP1_CONFIG_FILE} ${BACKUP2_CONFIG_FILE} || { - echo "ERROR: Could not copy ${BACKUP1_CONFIG_FILE} to ${BACKUP2_CONFIG_FILE}" - exit 1 - } -fi - -#------------------------------------------------------------------------ -#- MAKE A BACKUP OF CURRENT FILE, IF EXISTS -#------------------------------------------------------------------------ -if [ -f ${FINAL_CONFIG_FILE} ]; then - cp -f ${FINAL_CONFIG_FILE} ${BACKUP1_CONFIG_FILE} || { - echo "ERROR: Could not copy ${FINAL_CONFIG_FILE} to ${BACKUP1_CONFIG_FILE}" - exit 2 - } -fi - -sed -e 's,${CACHE_DIRECTORY},'${CACHE_DIRECTORY}',g' ${TEMPLATE_CONFIG_FILE} > ${FINAL_CONFIG_FILE} || { - echo "ERROR: Could not process template file ${TEMPLATE_CONFIG_FILE} into ${FINAL_CONFIG_FILE}" - exit 3 - } - -echo "Localized ${FINAL_CONFIG_FILE} successfully." diff --git a/epsdk-app-onap/src/main/swm/common/localize_log4j.sh b/epsdk-app-onap/src/main/swm/common/localize_log4j.sh deleted file mode 100755 index 1b044aa6b..000000000 --- a/epsdk-app-onap/src/main/swm/common/localize_log4j.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/bash - -FINAL_CONFIG_FILE=${ROOT_DIR}/war/WEB-INF/conf/log4j.properties -TEMPLATE_CONFIG_FILE=${ROOT_DIR}/war/WEB-INF/conf/log4j_template.properties -BACKUP1_CONFIG_FILE=${ROOT_DIR}/war/WEB-INF/conf/log4j.properties.bk.1 -BACKUP2_CONFIG_FILE=${ROOT_DIR}/war/WEB-INF/conf/log4j.properties.bk.2 - -echo "Localizing the VID log4j configuration" - -if [ -z "${LOG4J_LOGLEVEL}" ]; then - LOG4J_LOGLEVEL=INFO -fi - - -if [ -z "${LOG4J_APPENDER}" ]; then - LOG4J_APPENDER=rollingfile -fi - -if [ -z "${LOG4J_LOGS_DIRECTORY}" ]; then - LOG4J_LOGS_DIRECTORY=${ROOT_DIR}/logs -fi - -mkdir -p ${LOG4J_LOGS_DIRECTORY} - -#------------------------------------------------------------------------ -#- MAKE A BACKUP OF PREVIOUS BACKUP FILE, IF EXISTS -#------------------------------------------------------------------------ -if [ -f ${BACKUP1_CONFIG_FILE} ]; then - cp -f ${BACKUP1_CONFIG_FILE} ${BACKUP2_CONFIG_FILE} || { - echo "ERROR: Could not copy ${BACKUP1_CONFIG_FILE} to ${BACKUP2_CONFIG_FILE}" - exit 1 - } -fi - -#------------------------------------------------------------------------ -#- MAKE A BACKUP OF CURRENT FILE, IF EXISTS -#------------------------------------------------------------------------ -if [ -f ${FINAL_CONFIG_FILE} ]; then - cp -f ${FINAL_CONFIG_FILE} ${BACKUP1_CONFIG_FILE} || { - echo "ERROR: Could not copy ${FINAL_CONFIG_FILE} to ${BACKUP1_CONFIG_FILE}" - exit 2 - } -fi - -sed -e 's/${LOG4J_LOGLEVEL}/'${LOG4J_LOGLEVEL}'/g' \ - -e 's/${LOG4J_APPENDER}/'${LOG4J_APPENDER}'/g' \ - -e 's,${LOG4J_LOGS_DIRECTORY},'${LOG4J_LOGS_DIRECTORY}',g' ${TEMPLATE_CONFIG_FILE} > ${FINAL_CONFIG_FILE} || { - echo "ERROR: Could not process template file ${TEMPLATE_CONFIG_FILE} into ${FINAL_CONFIG_FILE}" - exit 3 - } - -echo "Localized ${FINAL_CONFIG_FILE} successfully." - - diff --git a/epsdk-app-onap/src/main/swm/common/localize_logback.sh b/epsdk-app-onap/src/main/swm/common/localize_logback.sh deleted file mode 100755 index bda2486d4..000000000 --- a/epsdk-app-onap/src/main/swm/common/localize_logback.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash - -FINAL_CONFIG_FILE=${ROOT_DIR}/war/WEB-INF/classes/logback.xml -TEMPLATE_CONFIG_FILE=${ROOT_DIR}/war/WEB-INF/classes/logback_template.xml -BACKUP1_CONFIG_FILE=${ROOT_DIR}/war/WEB-INF/classes/logback.xml.bk.1 -BACKUP2_CONFIG_FILE=${ROOT_DIR}/war/WEB-INF/classes/logback.xml.bk.2 - -echo "Localizing the VID logback configuration" - -if [ -z "${VID_LOG_DIR}" ]; then - VID_LOG_DIR="${ROOT_DIR}/logs" -fi - -if [ -z "${VID_LOG_LEVEL}" ]; then - VID_LOG_LEVEL="INFO" -fi - -mkdir -p "${VID_LOG_DIR}" - -#------------------------------------------------------------------------ -#- MAKE A BACKUP OF PREVIOUS BACKUP FILE, IF EXISTS -#------------------------------------------------------------------------ -if [ -f ${BACKUP1_CONFIG_FILE} ]; then - cp -f ${BACKUP1_CONFIG_FILE} ${BACKUP2_CONFIG_FILE} || { - echo "ERROR: Could not copy ${BACKUP1_CONFIG_FILE} to ${BACKUP2_CONFIG_FILE}" - exit 1 - } -fi - -#------------------------------------------------------------------------ -#- MAKE A BACKUP OF CURRENT FILE, IF EXISTS -#------------------------------------------------------------------------ -if [ -f ${FINAL_CONFIG_FILE} ]; then - cp -f ${FINAL_CONFIG_FILE} ${BACKUP1_CONFIG_FILE} || { - echo "ERROR: Could not copy ${FINAL_CONFIG_FILE} to ${BACKUP1_CONFIG_FILE}" - exit 2 - } -fi - -sed -e 's/${VID_LOG_LEVEL}/'${VID_LOG_LEVEL}'/g' \ - -e 's,${VID_LOG_DIR},'${VID_LOG_DIR}',g' ${TEMPLATE_CONFIG_FILE} > ${FINAL_CONFIG_FILE} || { - echo "ERROR: Could not process template file ${TEMPLATE_CONFIG_FILE} into ${FINAL_CONFIG_FILE}" - exit 3 - } - -echo "Localized ${FINAL_CONFIG_FILE} successfully." diff --git a/epsdk-app-onap/src/main/swm/common/localize_portal.sh b/epsdk-app-onap/src/main/swm/common/localize_portal.sh deleted file mode 100755 index 27ea24a11..000000000 --- a/epsdk-app-onap/src/main/swm/common/localize_portal.sh +++ /dev/null @@ -1,84 +0,0 @@ -#!/bin/bash - -FINAL_CONFIG_FILE=${ROOT_DIR}/war/WEB-INF/classes/portal.properties -TEMPLATE_CONFIG_FILE=${ROOT_DIR}/war/WEB-INF/classes/portal_template.properties -BACKUP1_CONFIG_FILE=${ROOT_DIR}/war/WEB-INF/classes/portal.properties.bk.1 -BACKUP2_CONFIG_FILE=${ROOT_DIR}/war/WEB-INF/classes/portal.properties.bk.2 - -echo "Localizing the VID portal configuration" - -if [ -z "${VID_ECOMP_REDIRECT_URL}" ]; then - VID_ECOMP_REDIRECT_URL=http://portal.api.simpledemo.onap.org:8989/ONAPPORTAL/login.htm -fi - -if [ -z "${VID_WJ_LOGOUT_URL}" ]; then - VID_WJ_LOGOUT_URL=https://portal.openecomp.org/ecompportal/ecompportal/process_csp -fi - -if [ -z "${VID_ECOMP_REST_URL}" ]; then - VID_ECOMP_REST_URL=http://portal.api.simpledemo.onap.org:8989/ONAPPORTAL/auxapi -fi - -if [ -z "${VID_UEB_URL_LIST}" ]; then - VID_UEB_URL_LIST=ueb.openecomp.org -fi - -if [ -z "${VID_UEB_CONSUMER_GROUP}" ]; then - VID_UEB_CONSUMER_GROUP=VID -fi - -if [ -z "${VID_ECOMP_PORTAL_INBOX_NAME}" ]; then - VID_ECOMP_PORTAL_INBOX_NAME=ECOMP-PORTAL-INBOX-DEV-LOCAL -fi - -if [ -z "${VID_UEB_APP_KEY}" ]; then - VID_UEB_APP_KEY=sYH0NJnsKmJC1B2A -fi - -if [ -z "${VID_UEB_APP_SECRET}" ]; then - VID_UEB_APP_SECRET=YOtknsT2wVFz9WISlSPDaAtd -fi - -if [ -z "${VID_UEB_APP_MAILBOX_NAME}" ]; then - VID_UEB_APP_MAILBOX_NAME="ECOMP-PORTAL-OUTBOX-90" -fi - -if [ -z "${VID_UEB_LISTENERS_ENABLE}" ]; then - VID_UEB_LISTENERS_ENABLE="false" -fi - -#------------------------------------------------------------------------ -#- MAKE A BACKUP OF PREVIOUS BACKUP FILE, IF EXISTS -#------------------------------------------------------------------------ -if [ -f ${BACKUP1_CONFIG_FILE} ]; then - cp -f ${BACKUP1_CONFIG_FILE} ${BACKUP2_CONFIG_FILE} || { - echo "ERROR: Could not copy ${BACKUP1_CONFIG_FILE} to ${BACKUP2_CONFIG_FILE}" - exit 2 - } -fi - -#------------------------------------------------------------------------ -#- MAKE A BACKUP OF CURRENT FILE, IF EXISTS -#------------------------------------------------------------------------ -if [ -f ${FINAL_CONFIG_FILE} ]; then - cp -f ${FINAL_CONFIG_FILE} ${BACKUP1_CONFIG_FILE} || { - echo "ERROR: Could not copy ${FINAL_CONFIG_FILE} to ${BACKUP1_CONFIG_FILE}" - exit 3 - } -fi - -sed -e 's ${VID_WJ_LOGOUT_URL} '${VID_WJ_LOGOUT_URL}' g' \ - -e 's ${VID_ECOMP_REDIRECT_URL} '${VID_ECOMP_REDIRECT_URL}' g' \ - -e 's ${VID_ECOMP_REST_URL} '${VID_ECOMP_REST_URL}' g' \ - -e 's ${VID_UEB_URL_LIST} '${VID_UEB_URL_LIST}' g' \ - -e 's ${VID_ECOMP_PORTAL_INBOX_NAME} '${VID_ECOMP_PORTAL_INBOX_NAME}' g' \ - -e 's ${VID_UEB_APP_KEY} '${VID_UEB_APP_KEY}' g' \ - -e 's ${VID_UEB_APP_SECRET} '${VID_UEB_APP_SECRET}' g' \ - -e 's ${VID_UEB_APP_MAILBOX_NAME} '${VID_UEB_APP_MAILBOX_NAME}' g' \ - -e 's ${VID_UEB_LISTENERS_ENABLE} '${VID_UEB_LISTENERS_ENABLE}' g' \ - -e 's/${VID_UEB_CONSUMER_GROUP}/'${VID_UEB_CONSUMER_GROUP}'/g' ${TEMPLATE_CONFIG_FILE} > ${FINAL_CONFIG_FILE} || { - echo "ERROR: Could not process template file ${TEMPLATE_CONFIG_FILE} into ${FINAL_CONFIG_FILE}" - exit 4 - } - -echo "Localized ${FINAL_CONFIG_FILE} successfully." diff --git a/epsdk-app-onap/src/main/swm/common/localize_quartz.sh b/epsdk-app-onap/src/main/swm/common/localize_quartz.sh deleted file mode 100755 index 9a646867c..000000000 --- a/epsdk-app-onap/src/main/swm/common/localize_quartz.sh +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/bash - -FINAL_CONFIG_FILE=${ROOT_DIR}/war/WEB-INF/conf/quartz.properties -TEMPLATE_CONFIG_FILE=${ROOT_DIR}/war/WEB-INF/conf/quartz_template.properties -BACKUP1_CONFIG_FILE=${ROOT_DIR}/war/WEB-INF/conf/quartz.properties.bk.1 -BACKUP2_CONFIG_FILE=${ROOT_DIR}/war/WEB-INF/conf/quartz.properties.bk.2 - -echo "Localizing the VID quartz configuration" - -if [ -z "${VID_MYSQL_HOST}" ]; then - VID_MYSQL_HOST=localhost -fi - -if [ -z "${VID_MYSQL_PORT}" ]; then - VID_MYSQL_PORT=3306 -fi - -if [ -z "${VID_MYSQL_DBNAME}" ]; then - VID_MYSQL_DBNAME=vid_portal -fi - -if [ -z "${VID_MYSQL_USER}" ]; then - VID_MYSQL_USER=$(id -un) -fi - -if [ -z "${VID_MYSQL_MAXCONNECTIONS}" ]; then - VID_MYSQL_MAXCONNECTIONS=5 -fi - -if [ -z "${VID_MYSQL_PASS}" ]; then - echo "Missing required parameter VID_MYSQL_PASS" - exit 1 -fi - -#------------------------------------------------------------------------ -#- MAKE A BACKUP OF PREVIOUS BACKUP FILE, IF EXISTS -#------------------------------------------------------------------------ -if [ -f ${BACKUP1_CONFIG_FILE} ]; then - cp -f ${BACKUP1_CONFIG_FILE} ${BACKUP2_CONFIG_FILE} || { - echo "ERROR: Could not copy ${BACKUP1_CONFIG_FILE} to ${BACKUP2_CONFIG_FILE}" - exit 2 - } -fi - -#------------------------------------------------------------------------ -#- MAKE A BACKUP OF CURRENT FILE, IF EXISTS -#------------------------------------------------------------------------ -if [ -f ${FINAL_CONFIG_FILE} ]; then - cp -f ${FINAL_CONFIG_FILE} ${BACKUP1_CONFIG_FILE} || { - echo "ERROR: Could not copy ${FINAL_CONFIG_FILE} to ${BACKUP1_CONFIG_FILE}" - exit 3 - } -fi - -sed -e 's/${VID_MYSQL_HOST}/'${VID_MYSQL_HOST}'/g' \ - -e 's/${VID_MYSQL_PORT}/'${VID_MYSQL_PORT}'/g' \ - -e 's/${VID_MYSQL_DBNAME}/'${VID_MYSQL_DBNAME}'/g' \ - -e 's/${VID_MYSQL_USER}/'${VID_MYSQL_USER}'/g' \ - -e 's/${VID_MYSQL_PASS}/'${VID_MYSQL_PASS}'/g' \ - -e 's/${VID_MYSQL_MAXCONNECTIONS}/'${VID_MYSQL_MAXCONNECTIONS}'/g' ${TEMPLATE_CONFIG_FILE} > ${FINAL_CONFIG_FILE} || { - echo "ERROR: Could not process template file ${TEMPLATE_CONFIG_FILE} into ${FINAL_CONFIG_FILE}" - exit 4 - } - -echo "Localized ${FINAL_CONFIG_FILE} successfully." - - diff --git a/epsdk-app-onap/src/main/swm/common/localize_system.sh b/epsdk-app-onap/src/main/swm/common/localize_system.sh deleted file mode 100755 index c9d0afd8d..000000000 --- a/epsdk-app-onap/src/main/swm/common/localize_system.sh +++ /dev/null @@ -1,178 +0,0 @@ -#!/bin/bash - -FINAL_CONFIG_FILE=${ROOT_DIR}/war/WEB-INF/conf/system.properties -TEMPLATE_CONFIG_FILE=${ROOT_DIR}/war/WEB-INF/conf/system_template.properties -BACKUP1_CONFIG_FILE=${ROOT_DIR}/war/WEB-INF/conf/system.properties.bk.1 -BACKUP2_CONFIG_FILE=${ROOT_DIR}/war/WEB-INF/conf/system.properties.bk.2 - -echo "Localizing the VID system configuration" - -if [ -z "${VID_MYSQL_HOST}" ]; then - VID_MYSQL_HOST=localhost -fi - -if [ -z "${VID_MYSQL_PORT}" ]; then - VID_MYSQL_PORT=3306 -fi - -if [ -z "${VID_MYSQL_DBNAME}" ]; then - VID_MYSQL_DBNAME=vid_portal -fi - -if [ -z "${VID_MYSQL_USER}" ]; then - VID_MYSQL_USER=vid_admin -fi - -if [ -z "${VID_MYSQL_MAXCONNECTIONS}" ]; then - VID_MYSQL_MAXCONNECTIONS=5 -fi - -if [ -z "${VID_AAI_HOST}" ]; then - VID_AAI_HOST=aai.api.openecomp.org -fi - -if [ -z "${VID_AAI_PORT}" ]; then - VID_AAI_PORT=8443 -fi - -if [ -z "${VID_APP_DISPLAY_NAME}" ]; then - VID_APP_DISPLAY_NAME=VID -fi - -if [ -z "${VID_ECOMP_SHARED_CONTEXT_REST_URL}" ]; then - VID_ECOMP_SHARED_CONTEXT_REST_URL="https://portal.openecomp.org:8080/ecompportal/context" -fi - -if [ -z "${VID_ECOMP_REDIRECT_URL}" ]; then - VID_ECOMP_REDIRECT_URL=http://portal.api.simpledemo.onap.org:8989/ONAPPORTAL/login.htm -fi - -if [ -z "${VID_ECOMP_REST_URL}" ]; then - VID_ECOMP_REST_URL=http://portal.api.simpledemo.onap.org:8989/ONAPPORTAL/auxapi -fi - -if [ -z "${VID_MSO_SERVER_URL}" ]; then - VID_MSO_SERVER_URL=https://mso.api.openecomp.org:8443 -fi - -if [ -z "${VID_TRUSTSTORE_FILE}" ]; then - VID_TRUSTSTORE_FILE=${ROOT_DIR}/etc/vid_keystore.jks -fi - -if [ -z "${VID_MYLOGIN_FEED_DIRECTORY}" ]; then - VID_MYLOGIN_FEED_DIRECTORY=/tmp/MyLogins -fi - -if [ -z "${VID_TRUSTSTORE_PASS}" ]; then - echo "ERROR: Missing required parameter VID_TRUSTSTORE_PASS" - exit 1 -fi - -if [ -z "${VID_MSO_USER}" ]; then - echo "ERROR: Missing required parameter VID_MSO_USER" - exit 1 -fi - -if [ -z "${VID_MSO_PASS}" ]; then - echo "ERROR: Missing required parameter VID_MSO_PASS"; - exit 1 -fi - -if [ -z "${VID_MYSQL_PASS}" ]; then - echo "ERROR: Missing required parameter VID_MYSQL_PASS" - exit 1 -fi - -if [ -z "${MSO_DME2_CLIENT_TIMEOUT}" ]; then - echo "ERROR: Missing required parameter MSO_DME2_CLIENT_TIMEOUT" - exit 1 -fi - -if [ -z "${MSO_DME2_CLIENT_READ_TIMEOUT}" ]; then - echo "ERROR: Missing required parameter MSO_DME2_CLIENT_READ_TIMEOUT" - exit 1 -fi - -if [ -z "${MSO_DME2_SERVER_URL}" ]; then - echo "ERROR: Missing required parameter MSO_DME2_SERVER_URL" - exit 1 -fi -if [ -z "${MSO_DME2_ENABLED}" ]; then - echo "ERROR: Missing required parameter MSO_DME2_ENABLED" - exit 1 -fi -if [ -z "${MSO_POLLING_INTERVAL_MSECS}" ]; then - MSO_POLLING_INTERVAL_MSECS=10000 -fi - -if [ -z "${AAI_TRUSTSTORE_FILENAME}" ]; then - AAI_TRUSTSTORE_FILENAME=tomcat_keystore -fi - -if [ -z "${AAI_TRUSTSTORE_PASSWD_X}" ]; then - AAI_TRUSTSTORE_PASSWD_X=70c87528c88dcd9f9c2558d30e817868 -fi - -if [ -z "${AAI_KEYSTORE_FILENAME}" ]; then - AAI_KEYSTORE_FILENAME=aai-client-cert.p12 -fi - -if [ -z "${AAI_KEYSTORE_PASSWD_X}" ]; then - AAI_KEYSTORE_PASSWD_X=70c87528c88dcd9f9c2558d30e817868 -fi - -mkdir -p "${VID_MYLOGIN_FEED_DIRECTORY}" - -#------------------------------------------------------------------------ -#- MAKE A BACKUP OF PREVIOUS BACKUP FILE, IF EXISTS -#------------------------------------------------------------------------ -if [ -f ${BACKUP1_CONFIG_FILE} ]; then - cp -f ${BACKUP1_CONFIG_FILE} ${BACKUP2_CONFIG_FILE} || { - echo "ERROR: Could not copy ${BACKUP1_CONFIG_FILE} to ${BACKUP2_CONFIG_FILE}" - exit 2 - } -fi - -#------------------------------------------------------------------------ -#- MAKE A BACKUP OF CURRENT FILE, IF EXISTS -#------------------------------------------------------------------------ -if [ -f ${FINAL_CONFIG_FILE} ]; then - cp -f ${FINAL_CONFIG_FILE} ${BACKUP1_CONFIG_FILE} || { - echo "ERROR: Could not copy ${FINAL_CONFIG_FILE} to ${BACKUP1_CONFIG_FILE}" - exit 3 - } -fi - -sed -e 's/${VID_MYSQL_HOST}/'${VID_MYSQL_HOST}'/g' \ - -e 's/${VID_MYSQL_PORT}/'${VID_MYSQL_PORT}'/g' \ - -e 's/${VID_MYSQL_DBNAME}/'${VID_MYSQL_DBNAME}'/g' \ - -e 's/${VID_MYSQL_USER}/'${VID_MYSQL_USER}'/g' \ - -e 's/${VID_MYSQL_PASS}/'${VID_MYSQL_PASS}'/g' \ - -e 's/${VID_AAI_HOST}/'${VID_AAI_HOST}'/g' \ - -e 's/${VID_AAI_PORT}/'${VID_AAI_PORT}'/g' \ - -e 's,${AAI_TRUSTSTORE_FILENAME},'${AAI_TRUSTSTORE_FILENAME}',g' \ - -e 's/${AAI_TRUSTSTORE_PASSWD_X}/'${AAI_TRUSTSTORE_PASSWD_X}'/g' \ - -e 's,${AAI_KEYSTORE_FILENAME},'${AAI_KEYSTORE_FILENAME}',g' \ - -e 's/${AAI_KEYSTORE_PASSWD_X}/'${AAI_KEYSTORE_PASSWD_X}'/g' \ - -e 's/${VID_APP_DISPLAY_NAME}/'${VID_APP_DISPLAY_NAME}'/g' \ - -e 's ${VID_ECOMP_SHARED_CONTEXT_REST_URL} '${VID_ECOMP_SHARED_CONTEXT_REST_URL}' g' \ - -e 's ${VID_ECOMP_REDIRECT_URL} '${VID_ECOMP_REDIRECT_URL}' g' \ - -e 's ${VID_ECOMP_REST_URL} '${VID_ECOMP_REST_URL}' g' \ - -e 's ${VID_MSO_SERVER_URL} '${VID_MSO_SERVER_URL}' g' \ - -e 's/${VID_MSO_USER}/'${VID_MSO_USER}'/g' \ - -e 's/${VID_MSO_PASS}/'${VID_MSO_PASS}'/g' \ - -e 's,${VID_MYLOGIN_FEED_DIRECTORY},'${VID_MYLOGIN_FEED_DIRECTORY}',g' \ - -e 's,${MSO_DME2_CLIENT_TIMEOUT},'${MSO_DME2_CLIENT_TIMEOUT}',g' \ - -e 's,${MSO_DME2_CLIENT_READ_TIMEOUT},'${MSO_DME2_CLIENT_READ_TIMEOUT}',g' \ - -e 's,${MSO_DME2_SERVER_URL},'${MSO_DME2_SERVER_URL}',g' \ - -e 's,${MSO_DME2_ENABLED},'${MSO_DME2_ENABLED}',g' \ - -e 's,${MSO_POLLING_INTERVAL_MSECS},'${MSO_POLLING_INTERVAL_MSECS}',g' \ - -e 's,${VID_TRUSTSTORE_FILE},'${VID_TRUSTSTORE_FILE}',g' \ - -e 's/${VID_TRUSTSTORE_PASS}/'${VID_TRUSTSTORE_PASS}'/g' ${TEMPLATE_CONFIG_FILE} > ${FINAL_CONFIG_FILE} || { - echo "ERROR: Could not process template file ${TEMPLATE_CONFIG_FILE} into ${FINAL_CONFIG_FILE}" - exit 4 - } - -echo "Localized ${FINAL_CONFIG_FILE} successfully." - - diff --git a/epsdk-app-onap/src/main/swm/deinstall/postproc/post_proc b/epsdk-app-onap/src/main/swm/deinstall/postproc/post_proc deleted file mode 100755 index 103d18d38..000000000 --- a/epsdk-app-onap/src/main/swm/deinstall/postproc/post_proc +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -cd ../../common -exec sh -x ./deinstall_postproc.sh \ No newline at end of file diff --git a/epsdk-app-onap/src/main/swm/deinstall/preproc/pre_proc b/epsdk-app-onap/src/main/swm/deinstall/preproc/pre_proc deleted file mode 100755 index ce87ecffb..000000000 --- a/epsdk-app-onap/src/main/swm/deinstall/preproc/pre_proc +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -cd ../../common -exec sh -x ./deinstall_preproc.sh \ No newline at end of file diff --git a/epsdk-app-onap/src/main/swm/descriptor.xml b/epsdk-app-onap/src/main/swm/descriptor.xml deleted file mode 100755 index 7c09ef3a8..000000000 --- a/epsdk-app-onap/src/main/swm/descriptor.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/epsdk-app-onap/src/main/swm/fallback/postproc/post_proc b/epsdk-app-onap/src/main/swm/fallback/postproc/post_proc deleted file mode 100755 index 96b4b06ad..000000000 --- a/epsdk-app-onap/src/main/swm/fallback/postproc/post_proc +++ /dev/null @@ -1 +0,0 @@ -#!/bin/sh \ No newline at end of file diff --git a/epsdk-app-onap/src/main/swm/fallback/preproc/pre_proc b/epsdk-app-onap/src/main/swm/fallback/preproc/pre_proc deleted file mode 100755 index 96b4b06ad..000000000 --- a/epsdk-app-onap/src/main/swm/fallback/preproc/pre_proc +++ /dev/null @@ -1 +0,0 @@ -#!/bin/sh \ No newline at end of file diff --git a/epsdk-app-onap/src/main/swm/initinst/postproc/post_proc b/epsdk-app-onap/src/main/swm/initinst/postproc/post_proc deleted file mode 100755 index a986928c0..000000000 --- a/epsdk-app-onap/src/main/swm/initinst/postproc/post_proc +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -source ${DIR}/../../install/postproc/post_proc || { - echo "INITINST post_proc script failed"; exit 1 -} diff --git a/epsdk-app-onap/src/main/swm/initinst/preproc/pre_proc b/epsdk-app-onap/src/main/swm/initinst/preproc/pre_proc deleted file mode 100755 index 983d0c535..000000000 --- a/epsdk-app-onap/src/main/swm/initinst/preproc/pre_proc +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" - -source "${DIR}/../../install/preproc/pre_proc" || { - echo "INITINST pre_proc script failed"; exit 1 -} diff --git a/epsdk-app-onap/src/main/swm/install/postproc/post_proc b/epsdk-app-onap/src/main/swm/install/postproc/post_proc deleted file mode 100755 index 370d44b61..000000000 --- a/epsdk-app-onap/src/main/swm/install/postproc/post_proc +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash - -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -COMMON_SCRIPT=${DIR}/../../common/common.sh - -source "${COMMON_SCRIPT}" || { - echo "ERROR: Common script failed" - exit 1 -} - -mkdir -p "${TOMCAT_HOME}/temp" - -#Extract the WAR so it can be customized by the localization script -mkdir -p ${ROOT_DIR}/war -cp "${ROOT_DIR}/lib/vid.war" "${ROOT_DIR}/war/${VID_ENDPOINT_NAME}.war" -cd "${ROOT_DIR}/war" -${JAVA_HOME}/bin/jar -xf ${VID_ENDPOINT_NAME}.war -rm ${ROOT_DIR}/war/${VID_ENDPOINT_NAME}.war - -LOCALIZE_SCRIPT=$(dirname "$AFTSWM_ACTIONHANDLER_SCRIPT")/../../common/localize.sh - - -source "${LOCALIZE_SCRIPT}" || { - echo "ERROR: Localization script failed" - exit 2 -} - -#Create the customized WAR and deploy it to Tomcat -mkdir -p "${ROOT_DIR}/deployed" -cd "${ROOT_DIR}/war" -${JAVA_HOME}/bin/jar -cvf "${ROOT_DIR}/deployed/${VID_ENDPOINT_NAME}.war" . -cd -rm -rf "${ROOT_DIR}/war" -mv -f "${ROOT_DIR}/deployed/${VID_ENDPOINT_NAME}.war" "${TOMCAT_HOME}/webapps" - -if [ -f "${TOMCAT_HOME}/bin/startup.sh" ]; then - "${TOMCAT_HOME}/bin/startup.sh" -fi diff --git a/epsdk-app-onap/src/main/swm/install/preproc/pre_proc b/epsdk-app-onap/src/main/swm/install/preproc/pre_proc deleted file mode 100755 index a09a9c46f..000000000 --- a/epsdk-app-onap/src/main/swm/install/preproc/pre_proc +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -COMMON_SCRIPT=${DIR}/../../common/common.sh - -source "${COMMON_SCRIPT}" || { - echo "ERROR: Common script failed" - exit 1 -} - -if [ -f "${TOMCAT_HOME}/bin/shutdown.sh" ]; then - "${TOMCAT_HOME}/bin/shutdown.sh" - - if [ -d "${TOMCAT_HOME}/webapps/${VID_ENDPOINT_NAME}" ]; then - rm -r "${TOMCAT_HOME}/webapps/${VID_ENDPOINT_NAME}" - fi -fi - diff --git a/epsdk-app-onap/src/main/swm/notes.txt b/epsdk-app-onap/src/main/swm/notes.txt deleted file mode 100755 index f0a8fa974..000000000 --- a/epsdk-app-onap/src/main/swm/notes.txt +++ /dev/null @@ -1,52 +0,0 @@ -This package will install the Virtual Infrastructure Deployment (VID) war to the local tomcat server. -The Tomcat server is marked as a dependency of this package and will be installed automatically on the -target server if it has not already been installed. The current version of Tomcat used by VID -is 8.0.36. MariaDB is also necessary for VID and can be installed by whichever method you choose. - -The following are variables that can be set to customize your installation of VID: - -Variable Default Description - -ASDC_CLIENT_REST_AUTH unset Basic authentication header value (e.g. Basic asdfoijwelkjsg=) -ASDC_CLIENT_REST_HOST unset Host where the SDC Catalog Service is running -ASDC_CLIENT_REST_PORT 8080 Port where the SDC Catalog Service is running -ASDC_CLIENT_TYPE REST Set to IN_MEMORY for testing, REST for connecting with an actual SDC Catalog Service - -MSO_DME2_CLIENT_READ_TIMEOUT unset Time in ms before DME2 MSO read requests timeout -MSO_DME2_CLIENT_TIMEOUT unset Time in ms before DME2 MSO requests timeout -MSO_DME2_ENABLED unset Whether the enable the MSO DME2 client or not -MSO_DME2_SERVER_URL unset The server URL for connecting to the MSO service -MSO_POLLING_INTERVAL_MSECS 10000 The interval at which to poll MSO for orchestration requests -VID_MSO_PASS unset The password for connecting with the MSO service -VID_MSO_SERVER_URL unset The server URL for connecting with the MSO service -VID_MSO_USER unset The user name for connecting with the MSO service - -VID_LOG_DIR ${ROOT_DIR}/logs The directory to store log files in -VID_LOG_LEVEL INFO The level at which to log (follows logback logging levels) -VID_ECOMP_REDIRECT_URL https://portal.openecomp.org/ecompportal/ecompportal/process_csp See ECOMP SDK Documentation -VID_ECOMP_REST_URL https://portal.openecomp.org/ecompportal/auxapi See ECOMP SDK Documentation -VID_ENDPOINT_NAME vid http://{host}:{port}/{VID_ENDPOINT_NAME} - -VID_MYSQL_HOST unset The host where the VID MariaDB instance is running -VID_MYSQL_MAXCONNECTIONS 5 The maximum connections to use to connect to the MariaDB instance -VID_MYSQL_PORT 3306 The port where the VID MariaDB instance is running -VID_MYSQL_DBNAME vid_portal The database name (i.e. CREATE DATABASE ${VID_MYSQL_DBNAME} -VID_MYSQL_USER vidadmin The user to connect as to the MariaDB instance -VID_MYSQL_PASS unset The password for the ${VID_MYSQL_USER} @ ${VID_MYSQL_HOST} - -VID_AAI_HOST unset The host where the A&AI service is running -VID_AAI_PORT 8443 The port where the A&AI service is running -VID_TRUSTSTORE_PASS unset The password for the VID truststore (A&AI client) -VID_TRUSTSTORE_FILE unset The location on the file system of the truststore (A&AI client) -AAI_TRUSTSTORE_FILENAME tomcat_keystore A file name -AAI_TRUSTSTORE_PASSWD_X (dev env creds) A password -AAI_KEYSTORE_FILENAME aai-client-cert.p12 A file name -AAI_KEYSTORE_PASSWD_X (dev env creds) A password - -VID_UEB_URL_LIST ueb.openecomp.org The hosts where UEB is running -VID_UEB_CONSUMER_GROUP VID The UEB consumer group name to use -VID_ECOMP_PORTAL_INBOX_NAME ECOMP-PORTAL-INBOX-DEV-LOCAL A UEB Topic to send messages to the ECOMP portal on -VID_UEB_APP_KEY sYH0NJnsKmJC1B2A The UEB App Key (mandatory) -VID_UEB_APP_SECRET YOtknsT2wVFz9WISlSPDaAtd The UEB App Secret -VID_UEB_APP_MAILBOX_NAME ECOMP-PORTAL-OUTBOX-90 A UEB Topic to listen for messages from the ECOMP portal on -VID_UEB_LISTENERS_ENABLE false Enable the UEB listeners for the specified mailboxes (In 1610, this should always be false) diff --git a/epsdk-app-onap/src/main/webapp/WEB-INF/conf/system.properties b/epsdk-app-onap/src/main/webapp/WEB-INF/conf/system.properties index 7a6d5d9c9..86e18940d 100755 --- a/epsdk-app-onap/src/main/webapp/WEB-INF/conf/system.properties +++ b/epsdk-app-onap/src/main/webapp/WEB-INF/conf/system.properties @@ -169,7 +169,6 @@ mso.restapi.get.man.tasks=/tasks/v1 vid.truststore.filename=/opt/app/vid/etc/vid_keystore.jks mso.dme2.client.timeout=30000 mso.dme2.client.read.timeout=120000 -vid.truststore.filename=vid_keystore.jks vid.truststore.passwd.x=OBF:1wgg1wfq1uus1uui1x131x0r1x1v1x1j1uvo1uve1wg81wfi scheduler.create.new.vnf.change.instance=/v1/ChangeManagement/schedules/ scheduler.get.time.slots=/v1/ChangeManagement/schedules/ diff --git a/epsdk-app-onap/src/main/webapp/WEB-INF/fusion/jsp/ds2/footer.jsp b/epsdk-app-onap/src/main/webapp/WEB-INF/fusion/jsp/ds2/footer.jsp index 33bb38d0e..9cb681501 100755 --- a/epsdk-app-onap/src/main/webapp/WEB-INF/fusion/jsp/ds2/footer.jsp +++ b/epsdk-app-onap/src/main/webapp/WEB-INF/fusion/jsp/ds2/footer.jsp @@ -1,17 +1,34 @@ - + + + + + + + +
-
\ No newline at end of file + \ No newline at end of file diff --git a/epsdk-app-onap/src/main/webapp/WEB-INF/fusion/jsp/ds2/header.jsp b/epsdk-app-onap/src/main/webapp/WEB-INF/fusion/jsp/ds2/header.jsp index 94213a2a3..483922fca 100755 --- a/epsdk-app-onap/src/main/webapp/WEB-INF/fusion/jsp/ds2/header.jsp +++ b/epsdk-app-onap/src/main/webapp/WEB-INF/fusion/jsp/ds2/header.jsp @@ -1 +1,235 @@ - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
\ No newline at end of file diff --git a/epsdk-app-onap/src/main/webapp/WEB-INF/fusion/jsp/ebz/ebz_header.jsp b/epsdk-app-onap/src/main/webapp/WEB-INF/fusion/jsp/ebz/ebz_header.jsp new file mode 100644 index 000000000..ad3201cf8 --- /dev/null +++ b/epsdk-app-onap/src/main/webapp/WEB-INF/fusion/jsp/ebz/ebz_header.jsp @@ -0,0 +1,837 @@ +<%-- + ================================================================================ + eCOMP Portal SDK + ================================================================================ + Copyright (C) 2017 AT&T Intellectual Property + ================================================================================ + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ================================================================================ + --%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> +<%@ page isELIgnored="false"%> +<%@ page import="org.openecomp.portalsdk.core.util.SystemProperties"%> +<%@ page import="org.openecomp.portalsdk.core.onboarding.util.PortalApiProperties"%> +<%@ page import="org.openecomp.portalsdk.core.onboarding.util.PortalApiConstants"%> +<%@ page import="org.openecomp.portalsdk.core.domain.MenuData"%> + + + + + +<%-- --%> + + + + + + + + + + + + + + + +<%----%> + + + + + + + + + +" /> +" /> + +<% + String contactUsLink = SystemProperties.getProperty(SystemProperties.CONTACT_US_LINK); + String redirectUrl = PortalApiProperties.getProperty(PortalApiConstants.ECOMP_REDIRECT_URL); + String portalUrl = redirectUrl.substring(0, redirectUrl.lastIndexOf('/')) + "/process_csp"; + String getAccessLink = redirectUrl.substring(0, redirectUrl.lastIndexOf('/')) + "/get_access"; +%> + + + + +<%@include file="/WEB-INF/fusion/jsp/ebz/loginSnippet.html" %> + +
+
+ +
+
+
+ + +
+
+
+
+
  • + + ECOMP Portal +
  • +
    +
    + +
    +
    + + +
    + + +
    +
    +
    +
  • + Unable to load menus +
  • +
    + +
    +
  • +
    + + +
    +
  • +
  •  
  • +
    + +
    +
    +
    +
    +
    +
    +
    + +
    +
    + + + +     {{app_name}} + +
    +
    +
    +
    + + + + + +
    +
    +
    +
    +
    +
    +
    +
    + \ No newline at end of file diff --git a/epsdk-app-onap/src/main/webapp/WEB-INF/jsp/createnewserviceinstance.jsp b/epsdk-app-onap/src/main/webapp/WEB-INF/jsp/createnewserviceinstance.jsp new file mode 100644 index 000000000..fd2030e6c --- /dev/null +++ b/epsdk-app-onap/src/main/webapp/WEB-INF/jsp/createnewserviceinstance.jsp @@ -0,0 +1,146 @@ + + +
    + +

    Create New Service Instance

    + + +
    + + + + + + + + + + + + + + + +
    + + +
    + +
    + +
    + + + + +
    + +
    + +
    + +
    + +
    + + + +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + diff --git a/epsdk-app-onap/src/main/webapp/WEB-INF/jsp/searchexistingsi.jsp b/epsdk-app-onap/src/main/webapp/WEB-INF/jsp/searchexistingsi.jsp new file mode 100644 index 000000000..ca840e62f --- /dev/null +++ b/epsdk-app-onap/src/main/webapp/WEB-INF/jsp/searchexistingsi.jsp @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<%@ page import="org.openecomp.vid.mso.*"%> +<%@ page import="org.openecomp.portalsdk.core.util.SystemProperties"%> +<% + String properties = "{msoMaxPolls:" + SystemProperties.getProperty(MsoProperties.MSO_MAX_POLLS) + + ",msoMaxPollingIntervalMsec:" + + SystemProperties.getProperty(MsoProperties.MSO_POLLING_INTERVAL_MSECS) + "}"; +%> + +
    + + + +
    + +
    + + + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + \ No newline at end of file diff --git a/epsdk-app-onap/src/main/webapp/WEB-INF/jsp/serviceModels.jsp b/epsdk-app-onap/src/main/webapp/WEB-INF/jsp/serviceModels.jsp index d0c36d47a..88131c593 100755 --- a/epsdk-app-onap/src/main/webapp/WEB-INF/jsp/serviceModels.jsp +++ b/epsdk-app-onap/src/main/webapp/WEB-INF/jsp/serviceModels.jsp @@ -1,3 +1,4 @@ + @@ -7,20 +8,22 @@ - + + - + + @@ -33,40 +36,56 @@ - + + + - + + + + + + + - + + + - + + + + + + + <%@ page import="org.openecomp.vid.mso.*"%> <%@ page import="org.openecomp.portalsdk.core.util.SystemProperties"%> @@ -81,18 +100,20 @@
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    diff --git a/epsdk-app-onap/src/main/webapp/WEB-INF/jsp/subscriberdetails.jsp b/epsdk-app-onap/src/main/webapp/WEB-INF/jsp/subscriberdetails.jsp new file mode 100644 index 000000000..ca92b1529 --- /dev/null +++ b/epsdk-app-onap/src/main/webapp/WEB-INF/jsp/subscriberdetails.jsp @@ -0,0 +1,184 @@ +<%@ include file="/WEB-INF/fusion/jsp/popup_modal.html" %> +
    +
    +

    Selected Subscriber's Service Instance Details:

    +
    + + + + + + + + + + + + + + + + + + + + +
    View/EditGlobal Customer IDSubscriber NameService TypeService Instance ID
    + + {{disData.globalCustomerId}}{{disData.subscriberName}}{{disData.serviceType}}{{disData.serviceInstanceId}}
    +
    +
    + + + +
    +
    + +
    +
    + +
    + + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + + + diff --git a/epsdk-app-onap/src/main/webapp/WEB-INF/jsp/testViewEdit.jsp b/epsdk-app-onap/src/main/webapp/WEB-INF/jsp/testViewEdit.jsp index 59c8a317e..2c8022263 100755 --- a/epsdk-app-onap/src/main/webapp/WEB-INF/jsp/testViewEdit.jsp +++ b/epsdk-app-onap/src/main/webapp/WEB-INF/jsp/testViewEdit.jsp @@ -7,7 +7,7 @@ - + @@ -16,7 +16,7 @@ - + @@ -54,7 +54,7 @@
    -
    +
    diff --git a/epsdk-app-onap/src/main/webapp/WEB-INF/jsp/welcome.jsp b/epsdk-app-onap/src/main/webapp/WEB-INF/jsp/welcome.jsp index ad5331d98..b505909f6 100755 --- a/epsdk-app-onap/src/main/webapp/WEB-INF/jsp/welcome.jsp +++ b/epsdk-app-onap/src/main/webapp/WEB-INF/jsp/welcome.jsp @@ -1,23 +1,27 @@ +
    -

    ONAP

    +

    AT&T Domain 2.0 Network


    Welcome to VID


    The Virtual Infrastructure Deployment (VID) application allows infrastructure service deployment operators to instantiate service instances and their constituent parts for Distributed service models required by the - ONAP service operations that manage them, such as Mobility Network Services, etc. - The models are defined by ONAP component SDC. The service + internal AT&T service operations organizations that manage them, such as Mobility Network Services, + Netbond Services, or FlexReach Services. The models are defined by ECOMP component ASDC. The service deployment operator selects the service operations owner and model that they wish to instantiate. After - entry of appropriate data, the operator instructs VID to direct another ONAP component, MSO, to instantiate + entry of appropriate data, the operator instructs VID to direct another ECOMP component, MSO, to instantiate the selected service model. Once the service instance has been instantiated, the service operator can instruct VID to direct MSO to instantiate the service instance's component VNFs, VF Modules, Networks and Volume Groups. The VID user can also search for, and display, existing service instances and direct the instantiation of subsequent instance components.

    - -

    Contact Us

    - Please click here to contact us. +

    About VID

    + VID was originally developed for the October 2016 release by an integrated IT and Labs team, under the + direction of Steve Smokowski and Vivian Pressley. +

    +

    Contact Us

    + Please click here to contact us. @@ -26,6 +30,7 @@
    +


    diff --git a/epsdk-app-onap/src/main/webapp/app/fusion/external/ebz/angular_js/app.js b/epsdk-app-onap/src/main/webapp/app/fusion/external/ebz/angular_js/app.js index 59e27470f..e5db518d4 100755 --- a/epsdk-app-onap/src/main/webapp/app/fusion/external/ebz/angular_js/app.js +++ b/epsdk-app-onap/src/main/webapp/app/fusion/external/ebz/angular_js/app.js @@ -1,5 +1,5 @@ angular.module('att.abs.helper', []); angular.module('quantum', []); var app=angular.module("abs", ["att.abs", "att.abs.helper","modalServices", /*'ngAnimate','ngTouch',*/ 'ui.bootstrap', - "att.gridster","checklist-model","ngRoute", "ngCookies", 'btorfs.multiselect']); + "att.gridster","checklist-model","ngRoute", "ngCookies", 'btorfs.multiselect','ngFileUpload']); diff --git a/epsdk-app-onap/src/main/webapp/app/vid/external/multiselect/angular-bootstrap-multiselect.min.js b/epsdk-app-onap/src/main/webapp/app/vid/external/multiselect/angular-bootstrap-multiselect.min.js deleted file mode 100644 index b9be2c7e4..000000000 --- a/epsdk-app-onap/src/main/webapp/app/vid/external/multiselect/angular-bootstrap-multiselect.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(){"use strict";var a=angular.module("btorfs.multiselect",["btorfs.multiselect.templates"]);a.getRecursiveProperty=function(a,b){return b.split(".").reduce(function(a,b){return a?a[b]:null},a)},a.directive("multiselect",["$filter","$document","$log",function(b,c,d){return{restrict:"AE",scope:{options:"=",displayProp:"@",idProp:"@",searchLimit:"=?",selectionLimit:"=?",showSelectAll:"=?",showUnselectAll:"=?",showSearch:"=?",searchFilter:"=?",disabled:"=?ngDisabled",labels:"=?",showTooltip:"=?",placeholder:"@?"},require:"ngModel",templateUrl:"multiselect.html",link:function(b,e,f,g){b.selectionLimit=b.selectionLimit||0,b.searchLimit=b.searchLimit||25,b.searchFilter="",b.resolvedOptions=[],"function"!=typeof b.options&&(b.resolvedOptions=b.options),"undefined"!=typeof f.disabled&&(b.disabled=!0);var h=function(a){e[0].contains(a.target)||b.$apply(function(){b.open=!1})};c.on("click",h);var i=function(){g.$viewValue?(b.selectedOptions=b.resolvedOptions.filter(function(a){for(var c=b.getId(a),d=0;d1){var a=angular.isDefined(b.selectedOptions)?b.selectedOptions.length:0;return 0===a?b.labels&&b.labels.select?b.labels.select:b.placeholder||"Select":a+" "+(b.labels&&b.labels.itemsSelected?b.labels.itemsSelected:"selected")}return b.labels&&b.labels.select?b.labels.select:b.placeholder||"Select"},b.selectAll=function(){b.selectedOptions=b.resolvedOptions.slice(),b.unselectedOptions=[]},b.unselectAll=function(){b.selectedOptions=[],b.unselectedOptions=b.resolvedOptions.slice()},b.toggleItem=function(a){"undefined"==typeof b.selectedOptions&&(b.selectedOptions=[]);var c=b.selectedOptions.indexOf(a),d=c!==-1;if(d)b.unselectedOptions.push(b.selectedOptions[c]),b.selectedOptions.splice(c,1);else if(!d&&(0===b.selectionLimit||b.selectedOptions.lengthb.searchLimit)return!1;var d=b.getDisplay(c);if(d){var e=d.toLowerCase().indexOf(b.searchFilter.toLowerCase())>-1;return e&&a++,e}}}}}}])}(),angular.module("btorfs.multiselect.templates",["multiselect.html"]),angular.module("multiselect.html",[]).run(["$templateCache",function(a){a.put("multiselect.html",'\n')}]); \ No newline at end of file diff --git a/pom.xml b/pom.xml index bc3fe2349..22caa1808 100644 --- a/pom.xml +++ b/pom.xml @@ -1,7 +1,7 @@ 4.0.0 - org.openecomp.vid + org.onap.vid vid-parent pom vid @@ -17,6 +17,7 @@ vid-app-common epsdk-app-onap + @@ -81,7 +82,7 @@ /content/repositories/snapshots/ /content/repositories/releases/ /content/repositories/staging/ - /content/sites/site/org/openecomp/vid/${project.version} + /content/sites/site/org/onap/vid/${project.version} diff --git a/vid-app-common/pom.xml b/vid-app-common/pom.xml index e77bf96ee..aa973b05b 100755 --- a/vid-app-common/pom.xml +++ b/vid-app-common/pom.xml @@ -7,7 +7,7 @@ - org.openecomp.vid + org.onap.vid vid-app-common 1.1.1-SNAPSHOT war @@ -29,7 +29,7 @@ /content/repositories/snapshots/ /content/repositories/releases/ /content/repositories/staging/ - /content/sites/site/org/openecomp/vid/${project.version} + /content/sites/site/org/onap/vid/${project.version} @@ -130,7 +130,7 @@ 0.4.23 ${basedir}/src/main/resources/json/mso - org.openecomp.vid.domain.mso + org.onap.vid.domain.mso ${project.build.directory}/generated-sources @@ -165,6 +165,7 @@ **/selenium/*.java + **/integrationTest/*.java ${basedir}/war @@ -452,7 +453,8 @@ org.openecomp.sdc.sdc-tosca sdc-tosca - 1.1.32 + 1.1.51-SNAPSHOT + compile net.javacrumbs.json-unit @@ -460,5 +462,16 @@ 1.23.0 test - + + org.apache.commons + commons-text + 1.1 + + + org.hamcrest + java-hamcrest + 2.0.0.0 + test + + diff --git a/vid-app-common/src/main/java/org/ecomp/aai/model/AaiAICZones/AicZones.java b/vid-app-common/src/main/java/org/ecomp/aai/model/AaiAICZones/AicZones.java deleted file mode 100644 index ee8bcf0c8..000000000 --- a/vid-app-common/src/main/java/org/ecomp/aai/model/AaiAICZones/AicZones.java +++ /dev/null @@ -1,10 +0,0 @@ -package org.ecomp.aai.model.AaiAICZones; - -import java.util.List; - -import org.codehaus.jackson.annotate.JsonProperty; - -public class AicZones { - @JsonProperty("zone") - public List zones; -} diff --git a/vid-app-common/src/main/java/org/ecomp/aai/model/AaiAICZones/Zone.java b/vid-app-common/src/main/java/org/ecomp/aai/model/AaiAICZones/Zone.java deleted file mode 100644 index 00d387c2b..000000000 --- a/vid-app-common/src/main/java/org/ecomp/aai/model/AaiAICZones/Zone.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.ecomp.aai.model.AaiAICZones; - -import org.codehaus.jackson.annotate.JsonIgnoreProperties; -import org.codehaus.jackson.annotate.JsonProperty; - -@JsonIgnoreProperties(ignoreUnknown = true) -public class Zone { - @JsonProperty("zone-id") - public String zoneId; - - @JsonProperty("zone-name") - public String zoneName; -} diff --git a/vid-app-common/src/main/java/org/onap/vid/RelatedTo.java b/vid-app-common/src/main/java/org/onap/vid/RelatedTo.java new file mode 100644 index 000000000..738f62036 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/RelatedTo.java @@ -0,0 +1,39 @@ +package org.onap.vid; + +import com.fasterxml.jackson.annotation.*; +import org.codehaus.jackson.annotate.JsonProperty; + +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "id", + "node-type", + "relationship-label", + "url" +}) +public class RelatedTo { + + @JsonProperty("id") + public String id; + @JsonProperty("node-type") + public String nodeType; + @JsonProperty("relationship-label") + public String relationshipLabel; + @JsonProperty("url") + public String url; + @JsonIgnore + private Map additionalProperties = new HashMap(); + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/AaiClient.java b/vid-app-common/src/main/java/org/onap/vid/aai/AaiClient.java new file mode 100644 index 000000000..2b8cf3a0e --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/aai/AaiClient.java @@ -0,0 +1,489 @@ +package org.onap.vid.aai; + +import org.apache.http.HttpStatus; +import org.apache.http.client.utils.URIBuilder; +import org.codehaus.jackson.map.ObjectMapper; +import org.json.simple.JSONArray; +import org.json.simple.JSONObject; +import org.json.simple.parser.JSONParser; +import org.onap.vid.aai.util.AAIRestInterface; +import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.vid.aai.model.AaiGetAicZone.AicZones; +import org.onap.vid.aai.model.AaiGetOperationalEnvironments.OperationalEnvironmentList; +import org.onap.vid.aai.model.*; +import org.onap.vid.aai.model.AaiGetPnfs.Pnf; +import org.onap.vid.aai.model.AaiGetServicesRequestModel.GetServicesAAIRespone; +import org.onap.vid.aai.model.AaiGetTenatns.GetTenantsResponse; +import org.onap.vid.model.SubscriberList; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.util.UriUtils; + +import javax.servlet.ServletContext; +import javax.ws.rs.BadRequestException; +import javax.ws.rs.WebApplicationException; +import javax.ws.rs.core.Response; +import java.io.File; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.Iterator; +import java.util.List; +import java.util.UUID; + +/** + + * Created by Oren on 7/4/17. + */ +public class AaiClient implements AaiClientInterface { + + /** + * The Constant dateFormat. + */ + final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); + protected String fromAppId = "VidAaiController"; + @Autowired + ServletContext servletContext; + /** + * The logger + */ + + EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(AaiClient.class); + private final String getServiceModelsResponseBody = "{\"start\" : \"service-design-and-creation/models/\", \"query\" : \"query/serviceModels-byDistributionStatus?distributionStatus=DISTRIBUTION_COMPLETE_OK\"}"; + + public AaiClient() { + // certiPath = getCertificatesFile().getAbsolutePath(); + // depth = "0"; + } + + public AaiClient(ServletContext context) { + servletContext = context; + } + + + private static String checkForNull(String local) { + if (local != null) + return local; + else + return ""; + + } + + @Override + public AaiResponse getServicesByOwningEntityId(List owningEntityIds){ + File certiPath = getCertificatesFile(); + Response resp = doAaiGet(certiPath.getAbsolutePath(), getUrlFromLIst("business/owning-entities?", "owning-entity-id=", owningEntityIds), false); + AaiResponse aaiResponse = proccessAaiResponse(resp, OwningEntityResponse.class, null); + + return aaiResponse; + } + + @Override + public AaiResponse getServicesByProjectNames(List projectNames){ + File certiPath = getCertificatesFile(); + Response resp = doAaiGet(certiPath.getAbsolutePath(), getUrlFromLIst("business/projects?", "project-name=", projectNames), false); + AaiResponse aaiResponse = proccessAaiResponse(resp, ProjectResponse.class, null); + + return aaiResponse; + } + + @Override + public AaiResponse getServiceModelsByDistributionStatus() { + File certiPath = getCertificatesFile(); + Response resp = doAaiPut(certiPath.getAbsolutePath(), "query?format=resource", getServiceModelsResponseBody, false); + AaiResponse aaiResponse = proccessAaiResponse(resp, GetServiceModelsByDistributionStatusResponse.class, null); + + return aaiResponse; + } + + @Override + public AaiResponse getPNFData(String globalCustomerId, String serviceType, String modelVersionId, String modelInvariantId, String cloudRegion, String equipVendor, String equipModel) { + String certiPath = getCertificatesFile().getAbsolutePath(); + String siQuery = "/business/customers/customer/" + globalCustomerId + "/service-subscriptions/service-subscription/" + encodePathSegment(serviceType) + "/service-instances?model-version-id=" + modelVersionId + "&model-invariant-id=" + modelInvariantId; + String pnfQuery = "query/pnf-fromModel-byRegion?cloudRegionId=" + encodePathSegment(cloudRegion) + "&equipVendor=" + encodePathSegment(equipVendor) + "&equipModel=" + encodePathSegment(equipModel); + String payload = "{\"start\":\"" + siQuery + "\",\"query\":\"" + pnfQuery + "\"}"; + Response resp = doAaiPut(certiPath, "query?format=simple", payload, false); + return proccessAaiResponse(resp, AaiGetPnfResponse.class, null); + } + + + @Override + public AaiResponse getSpecificPnf(String pnfId) { + File certiPath = getCertificatesFile(); + Response resp = doAaiGet(certiPath.getAbsolutePath(), "network/pnfs/pnf/"+pnfId, false); + AaiResponse aaiResponse = proccessAaiResponse(resp, Pnf.class, null); + + return aaiResponse; + } + + public AaiResponse getServiceInstance(String globalCustomerId, String serviceType, String serviceInstanceId) { + String certiPath = getCertificatesFile().getAbsolutePath(); + String getServiceInstancePath = "business/customers/customer/"+globalCustomerId+"/service-subscriptions/service-subscription/"+serviceType+"/service-instances/service-instance/"+serviceInstanceId; + Response resp = doAaiGet(certiPath , getServiceInstancePath , false); + return proccessAaiResponse(resp, ServiceRelationships.class, null); + } + + @Override + public AaiResponse getLogicalLink(String link) { + String certiPath = getCertificatesFile().getAbsolutePath(); + Response resp = doAaiGet(certiPath , "network/logical-links/logical-link/" + link , false); + return proccessAaiResponse(resp, LogicalLinkResponse.class, null); + } + + private String getUrlFromLIst(String url, String paramKey, List params){ + url.concat(paramKey); + int i = 0; + for(String param: params){ + i ++; + url = url.concat(paramKey); + String encodedParam= param; + try { + encodedParam= URLEncoder.encode(param, "UTF-8"); + } catch (UnsupportedEncodingException e) { + String methodName = "getUrlFromList"; + logger.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); + } + url = url.concat(encodedParam); + if(i != params.size()){ + url = url.concat("&"); + } + } + return url; + } + + + @Override + public AaiResponse getAllSubscribers() { + String certiPath = getCertificatesFile().getAbsolutePath(); + String depth = "0"; + Response resp = doAaiGet(certiPath, "business/customers?subscriber-type=INFRA&depth=" + depth, false); + return proccessAaiResponse(resp, SubscriberList.class, null); + } + + + @Override + public AaiResponse getAllAicZones() { + String certiPath = getCertificatesFile().getAbsolutePath(); + Response resp = doAaiGet(certiPath, "network/zones", false); + AaiResponse aaiAicZones = proccessAaiResponse(resp, AicZones.class, null); + return aaiAicZones; + } + + + @Override + public AaiResponse getAicZoneForPnf(String globalCustomerId , String serviceType , String serviceId) { + String certiPath = getCertificatesFile().getAbsolutePath(); + String aicZonePath = "business/customers/customer/" + globalCustomerId + "/service-subscriptions/service-subscription/" + serviceType + "/service-instances/service-instance/" + serviceId; + Response resp = doAaiGet(certiPath , aicZonePath , false); + AaiResponse aaiResponse = proccessAaiResponse(resp , ServiceRelationships.class , null); + ServiceRelationships serviceRelationships = (ServiceRelationships)aaiResponse.getT(); + RelationshipList relationshipList = serviceRelationships.getRelationshipList(); + Relationship relationship = relationshipList.getRelationship().get(0); + RelationshipData relationshipData= relationship.getRelationDataList().get(0); + String aicZone = relationshipData.getRelationshipValue(); + AaiResponse aaiAicZonaForPnfResponse = new AaiResponse(aicZone , null ,HttpStatus.SC_OK); + return aaiAicZonaForPnfResponse; + } + + + @Override + public AaiResponse getVNFData() { + String certiPath = getCertificatesFile().getAbsolutePath(); + String payload = "{\"start\": [\"/business/customers/customer/e433710f-9217-458d-a79d-1c7aff376d89/service-subscriptions/service-subscription/VIRTUAL%20USP/service-instances/service-instance/3f93c7cb-2fd0-4557-9514-e189b7b04f9d\"], \"query\": \"query/vnf-topology-fromServiceInstance\"}"; + Response resp = doAaiPut(certiPath, "query?format=simple", payload, false); + return proccessAaiResponse(resp, AaiGetVnfResponse.class, null); + + } + + @Override + public Response getVNFData(String globalSubscriberId, String serviceType) { + String certiPath = getCertificatesFile().getAbsolutePath(); + String payload = "{\"start\": [\"business/customers/customer/" + globalSubscriberId + "/service-subscriptions/service-subscription/"+ encodePathSegment(serviceType) +"/service-instances\"]," + + "\"query\": \"query/vnf-topology-fromServiceInstance\"}"; + return doAaiPut(certiPath, "query?format=simple", payload, false); + + } + + @Override + public AaiResponse getVNFData(String globalSubscriberId, String serviceType, String serviceInstanceId) { + String certiPath = getCertificatesFile().getAbsolutePath(); + String payload = "{\"start\": [\"/business/customers/customer/" + globalSubscriberId + "/service-subscriptions/service-subscription/" + encodePathSegment(serviceType) + "/service-instances/service-instance/" + serviceInstanceId + "\"], \"query\": \"query/vnf-topology-fromServiceInstance\"}"; + Response resp = doAaiPut(certiPath, "query?format=simple", payload, false); + return proccessAaiResponse(resp, AaiGetVnfResponse.class, null); + } + + @Override + public Response getVersionByInvariantId(List modelInvariantId) { + File certiPath = getCertificatesFile(); + StringBuilder sb = new StringBuilder(); + for (String id : modelInvariantId){ + sb.append("&model-invariant-id="); + sb.append(id); + + } + Response resp = doAaiGet(certiPath.getAbsolutePath(), "service-design-and-creation/models?depth=2"+ sb.toString(), false); + return resp; + } + + @Override + public AaiResponse getSubscriberData(String subscriberId) { + File certiPath = getCertificatesFile(); + String depth = "2"; + AaiResponse subscriberDataResponse; + Response resp = doAaiGet(certiPath.getAbsolutePath(), "business/customers/customer/" + subscriberId + "?depth=" + depth, false); + subscriberDataResponse = proccessAaiResponse(resp, Services.class, null); + return subscriberDataResponse; + } + + @Override + public AaiResponse getServices() { + File certiPath = getCertificatesFile(); + Response resp = doAaiGet(certiPath.getAbsolutePath(), "service-design-and-creation/services", false); + AaiResponse getServicesResponse = proccessAaiResponse(resp, GetServicesAAIRespone.class, null); + + return getServicesResponse; + } + + @Override + public AaiResponse getOperationalEnvironments(String operationalEnvironmentType, String operationalEnvironmentStatus) { + File certiPath = getCertificatesFile(); + String url = "cloud-infrastructure/operational-environments"; + URIBuilder urlBuilder = new URIBuilder(); + if (operationalEnvironmentType != null) + urlBuilder.addParameter("operational-environment-type", operationalEnvironmentType); + if (operationalEnvironmentStatus != null) + urlBuilder.addParameter("operational-environment-status", operationalEnvironmentStatus); + url += urlBuilder.toString(); + Response resp = doAaiGet(certiPath.getAbsolutePath(), url, false); + AaiResponse getOperationalEnvironmentsResponse = proccessAaiResponse(resp, OperationalEnvironmentList.class, null); + return getOperationalEnvironmentsResponse; + + } + + @Override + public AaiResponse getTenants(String globalCustomerId, String serviceType) { + File certiPath = getCertificatesFile(); + String url = "business/customers/customer/" + globalCustomerId + "/service-subscriptions/service-subscription/" + serviceType; + + Response resp = doAaiGet(certiPath.getAbsolutePath(), url, false); + String responseAsString = parseForTenantsByServiceSubscription(resp.readEntity(String.class)); + if (responseAsString.equals("")){ + AaiResponse aaiResponse = new AaiResponse<>(null, String.format("{\"statusText\":\" A&AI has no LCP Region & Tenants associated to subscriber '%s' and service type '%s'\"}", globalCustomerId, serviceType), HttpStatus.SC_INTERNAL_SERVER_ERROR); + return aaiResponse; + } + else { + AaiResponse getTenantsResponse = proccessAaiResponse(resp, GetTenantsResponse[].class, responseAsString); + return getTenantsResponse; + } + + } + + @Override + public AaiResponse getNodeTemplateInstances(String globalCustomerId, String serviceType, String modelVersionId, String modelInvariantId, String cloudRegion) { + + String certiPath = getCertificatesFile().getAbsolutePath(); + + String siQuery = "/business/customers/customer/" + globalCustomerId + "/service-subscriptions/service-subscription/" + encodePathSegment(serviceType) + "/service-instances?model-version-id=" + modelVersionId + "&model-invariant-id=" + modelInvariantId; + String vnfQuery = "query/queryvnfFromModelbyRegion?cloudRegionId=" + encodePathSegment(cloudRegion); + String payload1 = "{\"start\":\"" + siQuery + "\",\"query\":\"" + vnfQuery + "\"}"; + + Response resp1 = doAaiPut(certiPath, "query?format=simple", payload1, false); + AaiResponse aaiResponse1 = proccessAaiResponse(resp1, AaiGetVnfResponse.class, null); + logger.debug(EELFLoggerDelegate.debugLogger, "getNodeTemplateInstances AAI's response: {}", aaiResponse1); + return aaiResponse1; + } + + private AaiResponse proccessAaiResponse(Response resp, Class classType, String responseBody) { + AaiResponse subscriberDataResponse = null; + if (resp == null) { + subscriberDataResponse = new AaiResponse<>(null, null, HttpStatus.SC_INTERNAL_SERVER_ERROR); + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "Invalid response from AAI"); + } else { + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "getSubscribers() resp=" + resp.getStatusInfo().toString()); + if (resp.getStatus() != HttpStatus.SC_OK) { + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "Invalid response from AAI"); + subscriberDataResponse = new AaiResponse<>(null, resp.readEntity(String.class), resp.getStatus()); + } else { + String finalResponse = null; + try { + if (responseBody != null) { + finalResponse = responseBody; + } else { + finalResponse = resp.readEntity(String.class); + } + + subscriberDataResponse = new AaiResponse<>((new ObjectMapper().readValue(finalResponse, classType)), null, HttpStatus.SC_OK); + + } catch(Exception e){ + subscriberDataResponse = new AaiResponse<>(null, null, HttpStatus.SC_INTERNAL_SERVER_ERROR); + logger.error("Failed to parse aai response: \"{}\" to class {}", finalResponse, classType, e); + } + } + } + return subscriberDataResponse; + } + + private File getCertificatesFile() { + if (servletContext != null) + return new File(servletContext.getRealPath("/WEB-INF/cert/")); + return null; + } + + @SuppressWarnings("all") + public Response doAaiGet(String certiPath, String uri, boolean xml) { + String methodName = "doAaiGet"; + String transId = UUID.randomUUID().toString(); + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + Response resp = null; + try { + + AAIRestInterface restContrller = new AAIRestInterface(certiPath); + resp = restContrller.RestGet(fromAppId, transId, uri, xml); + + } catch (WebApplicationException e) { + final String message = ((BadRequestException) e).getResponse().readEntity(String.class); + logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + message); + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + message); + } catch (Exception e) { + logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); + } + + return resp; + } + + private String parseForTenantsByServiceSubscription(String resp) { + String tenantList = ""; + + try { + JSONParser jsonParser = new JSONParser(); + + JSONObject jsonObject = (JSONObject) jsonParser.parse(resp); + + return parseServiceSubscriptionObjectForTenants(jsonObject); + } catch (Exception ex) { + + } + + return tenantList; + } + + protected Response doAaiPut(String certiPath, String uri, String payload, boolean xml) { + String methodName = "doAaiPut"; + String transId = UUID.randomUUID().toString(); + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + Response resp = null; + try { + + AAIRestInterface restContrller = new AAIRestInterface(certiPath); + resp = restContrller.RestPut(fromAppId, transId, uri, payload, xml); + + } catch (Exception e) { + logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); + } + + return resp; + } + + + public static String parseServiceSubscriptionObjectForTenants(JSONObject jsonObject) { + + JSONArray tenantArray = new JSONArray(); + boolean bconvert = false; + + try { + JSONObject relationShipListsObj = (JSONObject) jsonObject.get("relationship-list"); + if (relationShipListsObj != null) { + JSONArray rShipArray = (JSONArray) relationShipListsObj.get("relationship"); + if (rShipArray != null) { + Iterator i1 = rShipArray.iterator(); + + while (i1.hasNext()) { + + JSONObject inner1Obj = (JSONObject) i1.next(); + + if (inner1Obj == null) + continue; + + String relatedTo = checkForNull((String) inner1Obj.get("related-to")); + if (relatedTo.equalsIgnoreCase("tenant")) { + JSONObject tenantNewObj = new JSONObject(); + + String relatedLink = checkForNull((String) inner1Obj.get("related-link")); + tenantNewObj.put("link", relatedLink); + + JSONArray rDataArray = (JSONArray) inner1Obj.get("relationship-data"); + if (rDataArray != null) { + Iterator i2 = rDataArray.iterator(); + + while (i2.hasNext()) { + JSONObject inner2Obj = (JSONObject) i2.next(); + + if (inner2Obj == null) + continue; + + String rShipKey = checkForNull((String) inner2Obj.get("relationship-key")); + String rShipVal = checkForNull((String) inner2Obj.get("relationship-value")); + if (rShipKey.equalsIgnoreCase("cloud-region.cloud-owner")) { + tenantNewObj.put("cloudOwner", rShipVal); + } else if (rShipKey.equalsIgnoreCase("cloud-region.cloud-region-id")) { + tenantNewObj.put("cloudRegionID", rShipVal); + } + + if (rShipKey.equalsIgnoreCase("tenant.tenant-id")) { + tenantNewObj.put("tenantID", rShipVal); + } + } + } + + JSONArray relatedTPropArray = (JSONArray) inner1Obj.get("related-to-property"); + if (relatedTPropArray != null) { + Iterator i3 = relatedTPropArray.iterator(); + + while (i3.hasNext()) { + JSONObject inner3Obj = (JSONObject) i3.next(); + + if (inner3Obj == null) + continue; + + String propKey = checkForNull((String) inner3Obj.get("property-key")); + String propVal = checkForNull((String) inner3Obj.get("property-value")); + if (propKey.equalsIgnoreCase("tenant.tenant-name")) { + tenantNewObj.put("tenantName", propVal); + } + } + } + bconvert = true; + tenantArray.add(tenantNewObj); + } + } + + } + } + } catch (NullPointerException ex) { + + + } + + if (bconvert) + return tenantArray.toJSONString(); + else + return ""; + + } + + private static String encodePathSegment(String segmentToEncode) { + try { + return UriUtils.encodePathSegment(segmentToEncode, "UTF-8"); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException("URI encoding failed unexpectedly", e); + } + } + +} \ No newline at end of file diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/AaiClientInterface.java b/vid-app-common/src/main/java/org/onap/vid/aai/AaiClientInterface.java new file mode 100644 index 000000000..5095f48b5 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/aai/AaiClientInterface.java @@ -0,0 +1,58 @@ +package org.onap.vid.aai; + +import org.codehaus.jackson.JsonParseException; +import org.codehaus.jackson.map.JsonMappingException; +import org.onap.vid.aai.model.AaiGetPnfs.Pnf; +import org.onap.vid.aai.model.AaiGetOperationalEnvironments.OperationalEnvironmentList; +import org.onap.vid.aai.model.AaiGetServicesRequestModel.GetServicesAAIRespone; +import org.onap.vid.aai.model.AaiGetTenatns.GetTenantsResponse; +import org.onap.vid.model.SubscriberList; + +import javax.ws.rs.core.Response; + +import java.io.IOException; +import java.util.List; + +/** + * Created by Oren on 7/4/17. + */ +public interface AaiClientInterface { + + AaiResponse getAllSubscribers(); + + AaiResponse getSubscriberData(String subscriberId); + + AaiResponse getServices(); + + AaiResponse getServicesByOwningEntityId(List owningEntityIds); + + AaiResponse getTenants(String globalCustomerId, String serviceType); + + AaiResponse getOperationalEnvironments(String operationalEnvironmentType, String operationalEnvironmentStatus); + + AaiResponse getAllAicZones(); + + AaiResponse getAicZoneForPnf(String globalCustomerId , String serviceType , String serviceId); + + AaiResponse getVNFData(); + + Response getVNFData(String globalSubscriberId, String serviceType); + + AaiResponse getVNFData(String globalSubscriberId, String serviceType, String serviceInstanceId); + + AaiResponse getNodeTemplateInstances(String globalCustomerId, String serviceType, String modelVersionId, String modelInvariantId, String cloudRegion); + + Response getVersionByInvariantId(List modelInvariantId); + + AaiResponse getServicesByProjectNames(List projectNames); + + AaiResponse getServiceModelsByDistributionStatus(); + + AaiResponse getPNFData(String globalCustomerId, String serviceType, String modelVersionId, String modelInvariantId, String cloudRegion, String equipVendor, String equipModel); + + AaiResponse getSpecificPnf(String pnfId); + + AaiResponse getServiceInstance(String globalCustomerId, String serviceType, String serviceInstanceId); + + AaiResponse getLogicalLink(String link); +} diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/AaiGetVnfResponse.java b/vid-app-common/src/main/java/org/onap/vid/aai/AaiGetVnfResponse.java new file mode 100644 index 000000000..14e8e5dcf --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/aai/AaiGetVnfResponse.java @@ -0,0 +1,39 @@ +package org.onap.vid.aai; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.google.common.base.MoreObjects; +import org.codehaus.jackson.annotate.*; +import org.onap.vid.aai.model.VnfResult; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "results" +}) +public class AaiGetVnfResponse { + @JsonProperty("results") + public List results = null; + @JsonIgnore + private Map additionalProperties = new HashMap(); + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + return MoreObjects.toStringHelper(this) + .add("results", results) + .add("additionalProperties", additionalProperties) + .toString(); + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/AaiResponse.java b/vid-app-common/src/main/java/org/onap/vid/aai/AaiResponse.java new file mode 100644 index 000000000..c4b19b134 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/aai/AaiResponse.java @@ -0,0 +1,34 @@ +package org.onap.vid.aai; + +import com.google.common.base.MoreObjects; +import org.onap.vid.model.ProxyResponse; + +/** + * Created by Oren on 7/10/17. + */ +public class AaiResponse extends ProxyResponse{ + + T t; + + public AaiResponse() { + } + + public AaiResponse(T t, String errorMessage, int aaiHttpCode) { + this.t = t; + this.errorMessage = errorMessage; + this.httpCode = aaiHttpCode; + } + + public T getT() { + return t; + } + + @Override + public String toString() { + return MoreObjects.toStringHelper(this) + .add("httpCode", httpCode) + .add("errorMessage", errorMessage) + .add("t", t) + .toString(); + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/OperationalEnvironment.java b/vid-app-common/src/main/java/org/onap/vid/aai/OperationalEnvironment.java new file mode 100644 index 000000000..10ad4e963 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/aai/OperationalEnvironment.java @@ -0,0 +1,107 @@ +package org.onap.vid.aai; + +import org.codehaus.jackson.annotate.JsonIgnoreProperties; +import org.codehaus.jackson.annotate.JsonProperty; +import org.onap.vid.aai.model.Relationship; +import org.onap.vid.aai.model.RelationshipList; + +import java.util.List; + +@JsonIgnoreProperties(ignoreUnknown = true) +public class OperationalEnvironment { + + private String operationalEnvironmentId; + private String operationalEnvironmentName; + private String operationalEnvironmentType; + private String operationalEnvironmentStatus; + private String tenantContext; + private String workloadContext; + private String resourceVersion; + private RelationshipList relationshipList; + + public OperationalEnvironment() { + } + + public OperationalEnvironment(String operationalEnvironmentId, String operationalEnvironmentName, String operationalEnvironmentType, String operationalEnvironmentStatus, String tenantContext, String workloadContext, String resourceVersion, RelationshipList relationshipList) { + this.operationalEnvironmentId = operationalEnvironmentId; + this.operationalEnvironmentName = operationalEnvironmentName; + this.operationalEnvironmentType = operationalEnvironmentType; + this.operationalEnvironmentStatus = operationalEnvironmentStatus; + this.tenantContext = tenantContext; + this.workloadContext = workloadContext; + this.resourceVersion = resourceVersion; + this.relationshipList = relationshipList; + } + + @JsonProperty("operational-environment-id") + public String getOperationalEnvironmentId() { + return operationalEnvironmentId; + } + + public void setOperationalEnvironmentId(String operationalEnvironmentId) { + this.operationalEnvironmentId = operationalEnvironmentId; + } + + @JsonProperty("operational-environment-name") + public String getOperationalEnvironmentName() { + return operationalEnvironmentName; + } + + public void setOperationalEnvironmentName(String operationalEnvironmentName) { + this.operationalEnvironmentName = operationalEnvironmentName; + } + + @JsonProperty("operational-environment-type") + public String getOperationalEnvironmentType() { + return operationalEnvironmentType; + } + + public void setOperationalEnvironmentType(String operationalEnvironmentType) { + this.operationalEnvironmentType = operationalEnvironmentType; + } + + @JsonProperty("operational-environment-status") + public String getOperationalEnvironmentStatus() { + return operationalEnvironmentStatus; + } + + public void setOperationalEnvironmentStatus(String operationalEnvironmentStatus) { + this.operationalEnvironmentStatus = operationalEnvironmentStatus; + } + + @JsonProperty("tenant-context") + public String getTenantContext() { + return tenantContext; + } + + public void setTenantContext(String tenantContext) { + this.tenantContext = tenantContext; + } + + @JsonProperty("workload-context") + public String getWorkloadContext() { + return workloadContext; + } + + public void setWorkloadContext(String workloadContext) { + this.workloadContext = workloadContext; + } + + @JsonProperty("resource-version") + public String getResourceVersion() { + return resourceVersion; + } + + public void setResourceVersion(String resourceVersion) { + this.resourceVersion = resourceVersion; + } + + @JsonProperty("relationship-list") + public RelationshipList getRelationshipList() { + return relationshipList; + } + + public void setRelationshipList(RelationshipList relationshipList) { + this.relationshipList = relationshipList; + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/ServiceInstance.java b/vid-app-common/src/main/java/org/onap/vid/aai/ServiceInstance.java new file mode 100644 index 000000000..26f4a21e7 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/aai/ServiceInstance.java @@ -0,0 +1,33 @@ +package org.onap.vid.aai; + +import org.codehaus.jackson.annotate.JsonIgnoreProperties; +import org.codehaus.jackson.annotate.JsonProperty; + +@JsonIgnoreProperties(ignoreUnknown = true) +public class ServiceInstance { + + @JsonProperty("service-instance-id") + public String serviceInstanceId; + + @JsonProperty("service-instance-name") + public String serviceInstanceName; + + @JsonProperty("persona-model-id") + public String personaModelId; + + @JsonProperty("persona-model-version") + public String personaModelVersion; + + @JsonProperty("resource-version") + public String resourceVersion; + + @JsonProperty("orchestration-status") + public String orchestrationStatus; + + @JsonProperty("model-invariant-id") + public String modelInvariantId; + + @JsonProperty("model-version-id") + public String modelVersionId; + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/ServiceInstances.java b/vid-app-common/src/main/java/org/onap/vid/aai/ServiceInstances.java new file mode 100644 index 000000000..c92a47a36 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/aai/ServiceInstances.java @@ -0,0 +1,14 @@ +package org.onap.vid.aai; + +import org.codehaus.jackson.annotate.JsonIgnoreProperties; +import org.codehaus.jackson.annotate.JsonProperty; + +import java.util.List; + +@JsonIgnoreProperties(ignoreUnknown = true) +public class ServiceInstances { + + @JsonProperty("service-instance") + public List serviceInstance; + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/ServiceInstancesSearchResults.java b/vid-app-common/src/main/java/org/onap/vid/aai/ServiceInstancesSearchResults.java new file mode 100644 index 000000000..b32a83a13 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/aai/ServiceInstancesSearchResults.java @@ -0,0 +1,14 @@ +package org.onap.vid.aai; + +import org.codehaus.jackson.annotate.JsonIgnoreProperties; +import org.codehaus.jackson.annotate.JsonProperty; +import org.onap.vid.model.ServiceInstanceSearchResult; + +import java.util.ArrayList; +import java.util.List; + +@JsonIgnoreProperties(ignoreUnknown = true) +public class ServiceInstancesSearchResults { + @JsonProperty("service-instances") + public List serviceInstances; +} diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/ServiceSubscription.java b/vid-app-common/src/main/java/org/onap/vid/aai/ServiceSubscription.java new file mode 100644 index 000000000..5dc9d526b --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/aai/ServiceSubscription.java @@ -0,0 +1,20 @@ +package org.onap.vid.aai; + +import org.codehaus.jackson.annotate.JsonIgnoreProperties; +import org.codehaus.jackson.annotate.JsonProperty; + +@JsonIgnoreProperties(ignoreUnknown = true) +public class ServiceSubscription { + + @JsonProperty("service-type") + public String serviceType; + + @JsonProperty("resource-version") + public String resourceVersion; + + @JsonProperty("service-instances") + public ServiceInstances serviceInstances; + + @JsonProperty("is-permitted") + public boolean isPermitted =false; +} diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/ServiceSubscriptions.java b/vid-app-common/src/main/java/org/onap/vid/aai/ServiceSubscriptions.java new file mode 100644 index 000000000..686dc7d60 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/aai/ServiceSubscriptions.java @@ -0,0 +1,17 @@ +package org.onap.vid.aai; + +import org.codehaus.jackson.annotate.JsonIgnoreProperties; +import org.codehaus.jackson.annotate.JsonProperty; + +import java.util.List; + +/** + * Created by Oren on 7/9/17. + */ +@JsonIgnoreProperties(ignoreUnknown = true) + +public class ServiceSubscriptions { + + @JsonProperty("service-subscription") + public List serviceSubscription; +} diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/Services.java b/vid-app-common/src/main/java/org/onap/vid/aai/Services.java new file mode 100644 index 000000000..fe70de5af --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/aai/Services.java @@ -0,0 +1,24 @@ +package org.onap.vid.aai; + +import org.codehaus.jackson.annotate.JsonIgnoreProperties; +import org.codehaus.jackson.annotate.JsonProperty; + +@JsonIgnoreProperties(ignoreUnknown = true) +public class Services { + @JsonProperty("global-customer-id") + public String globalCustomerId; + + @JsonProperty("subscriber-name") + public String subscriberName; + + @JsonProperty("subscriber-type") + public String subscriberType; + + @JsonProperty("resource-version") + public String resourceVersion; + + @JsonProperty("service-subscriptions") + public ServiceSubscriptions serviceSubscriptions; + + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/SubscriberAaiResponse.java b/vid-app-common/src/main/java/org/onap/vid/aai/SubscriberAaiResponse.java new file mode 100644 index 000000000..2dad75fdf --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/aai/SubscriberAaiResponse.java @@ -0,0 +1,24 @@ +package org.onap.vid.aai; + +import org.onap.vid.model.ProxyResponse; +import org.onap.vid.model.SubscriberList; + +/** + * Created by Oren on 7/5/17. + */ +public class SubscriberAaiResponse extends ProxyResponse { + + + private SubscriberList subscriberList; + + public SubscriberAaiResponse(SubscriberList subscriberList, String errorMessage, int aaiHttpCode) { + this.subscriberList = subscriberList; + this.errorMessage = errorMessage; + this.httpCode = aaiHttpCode; + } + + + public SubscriberList getSubscriberList() { + return subscriberList; + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/SubscriberData.java b/vid-app-common/src/main/java/org/onap/vid/aai/SubscriberData.java new file mode 100644 index 000000000..1c93d97e2 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/aai/SubscriberData.java @@ -0,0 +1,7 @@ +package org.onap.vid.aai; + +/** + * Created by Oren on 7/10/17. + */ +public class SubscriberData { +} diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/SubscriberFilteredResults.java b/vid-app-common/src/main/java/org/onap/vid/aai/SubscriberFilteredResults.java new file mode 100644 index 000000000..2db981999 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/aai/SubscriberFilteredResults.java @@ -0,0 +1,29 @@ +package org.onap.vid.aai; + +import org.onap.vid.model.ProxyResponse; +import org.onap.vid.model.SubscriberList; +import org.onap.vid.roles.RoleValidator; + +/** + * Created by Oren on 7/5/17. + */ + +public class SubscriberFilteredResults extends ProxyResponse { + + private SubscriberListWithFilterData subscriberList; + + public SubscriberFilteredResults(RoleValidator roleValidator,SubscriberList subscribers, String errorMessage, int aaiHttpCode) { + this.subscriberList = new SubscriberListWithFilterData(subscribers,roleValidator); + this.errorMessage = errorMessage; + this.httpCode = aaiHttpCode; + } + + + public SubscriberListWithFilterData getSubscriberList() { + return subscriberList; + } + + public void setSubscriberList(SubscriberListWithFilterData subscriberList) { + this.subscriberList = subscriberList; + } +} \ No newline at end of file diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/SubscriberListWithFilterData.java b/vid-app-common/src/main/java/org/onap/vid/aai/SubscriberListWithFilterData.java new file mode 100644 index 000000000..0d4b4b7b3 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/aai/SubscriberListWithFilterData.java @@ -0,0 +1,31 @@ +package org.onap.vid.aai; + +import org.onap.vid.model.Subscriber; +import org.onap.vid.model.SubscriberList; +import org.onap.vid.roles.RoleValidator; + +import java.util.ArrayList; +import java.util.List; + +/** + * Created by Oren on 7/5/17. + */ +public class SubscriberListWithFilterData { + + public SubscriberListWithFilterData(SubscriberList subscriberList, RoleValidator roleValidator){ + List subscribers = subscriberList.customer; + List subscribersWithFilter = new ArrayList<>(); + for (Subscriber subscriber :subscribers){ + SubscriberWithFilter subscriberWithFilter = new SubscriberWithFilter(); + subscriberWithFilter.setIsPermitted(roleValidator.isSubscriberPermitted(subscriber.globalCustomerId)); + subscriberWithFilter.subscriberType = subscriber.subscriberType; + subscriberWithFilter.resourceVersion = subscriber.resourceVersion; + subscriberWithFilter.subscriberName = subscriber.subscriberName; + subscriberWithFilter.globalCustomerId = subscriber.globalCustomerId; + subscribersWithFilter.add(subscriberWithFilter); + } + this.customer = subscribersWithFilter; + } + + public List customer; +} diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/SubscriberWithFilter.java b/vid-app-common/src/main/java/org/onap/vid/aai/SubscriberWithFilter.java new file mode 100644 index 000000000..aaaa14455 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/aai/SubscriberWithFilter.java @@ -0,0 +1,21 @@ +package org.onap.vid.aai; + +import org.codehaus.jackson.annotate.JsonProperty; +import org.onap.vid.model.Subscriber; + +/** + * Created by Oren on 7/5/17. + */ +public class SubscriberWithFilter extends Subscriber{ + + @JsonProperty("is-permitted") + private boolean isPermitted; + + public boolean getIsPermitted() { + return isPermitted; + } + + public void setIsPermitted(boolean isPermitted) { + this.isPermitted = isPermitted; + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/exceptions/InvalidAAIResponseException.java b/vid-app-common/src/main/java/org/onap/vid/aai/exceptions/InvalidAAIResponseException.java new file mode 100644 index 000000000..e6296488e --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/aai/exceptions/InvalidAAIResponseException.java @@ -0,0 +1,7 @@ +package org.onap.vid.aai.exceptions; + +/** + * Created by Oren on 7/4/17. + */ +public class InvalidAAIResponseException extends Exception { +} diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/exceptions/RoleParsingException.java b/vid-app-common/src/main/java/org/onap/vid/aai/exceptions/RoleParsingException.java new file mode 100644 index 000000000..1d838a1c0 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/aai/exceptions/RoleParsingException.java @@ -0,0 +1,7 @@ +package org.onap.vid.aai.exceptions; + +/** + * Created by Oren on 12/16/17. + */ +public class RoleParsingException extends Exception { +} diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetAicZone/AicZones.java b/vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetAicZone/AicZones.java new file mode 100644 index 000000000..c30aaeb8f --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetAicZone/AicZones.java @@ -0,0 +1,10 @@ +package org.onap.vid.aai.model.AaiGetAicZone; + +import java.util.List; + +import org.codehaus.jackson.annotate.JsonProperty; + +public class AicZones { + @JsonProperty("zone") + public List zones; +} diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetAicZone/Zone.java b/vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetAicZone/Zone.java new file mode 100644 index 000000000..89400f20e --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetAicZone/Zone.java @@ -0,0 +1,13 @@ +package org.onap.vid.aai.model.AaiGetAicZone; + +import org.codehaus.jackson.annotate.JsonIgnoreProperties; +import org.codehaus.jackson.annotate.JsonProperty; + +@JsonIgnoreProperties(ignoreUnknown = true) +public class Zone { + @JsonProperty("zone-id") + public String zoneId; + + @JsonProperty("zone-name") + public String zoneName; +} diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetOperationalEnvironments/OperationalEnvironmentList.java b/vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetOperationalEnvironments/OperationalEnvironmentList.java new file mode 100644 index 000000000..1f31cfaa9 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetOperationalEnvironments/OperationalEnvironmentList.java @@ -0,0 +1,30 @@ +package org.onap.vid.aai.model.AaiGetOperationalEnvironments; + +import org.codehaus.jackson.annotate.JsonIgnoreProperties; +import org.codehaus.jackson.annotate.JsonProperty; +import org.onap.vid.aai.OperationalEnvironment; + +import java.util.List; + +@JsonIgnoreProperties(ignoreUnknown = true) +public class OperationalEnvironmentList { + + @JsonProperty("operational-environment") + public List getOperationalEnvironment() { + return operationalEnvironment; + } + + @JsonProperty("operational-environment") + public void setOperationalEnvironment(List operationalEnvironment) { + this.operationalEnvironment = operationalEnvironment; + } + + public OperationalEnvironmentList() { + } + + public OperationalEnvironmentList(List operationalEnvironment) { + this.operationalEnvironment = operationalEnvironment; + } + + private List operationalEnvironment; +} diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetPnfResponse.java b/vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetPnfResponse.java new file mode 100644 index 000000000..cd8cca8f2 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetPnfResponse.java @@ -0,0 +1,42 @@ +package org.onap.vid.aai.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.google.common.base.MoreObjects; +import org.codehaus.jackson.annotate.JsonAnyGetter; +import org.codehaus.jackson.annotate.JsonAnySetter; +import org.codehaus.jackson.annotate.JsonIgnore; +import org.codehaus.jackson.annotate.JsonProperty; +import org.codehaus.jackson.annotate.JsonPropertyOrder; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "results" +}) +public class AaiGetPnfResponse { + @JsonProperty("results") + public List results = null; + @JsonIgnore + private Map additionalProperties = new HashMap(); + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public String toString() { + return MoreObjects.toStringHelper(this) + .add("results", results) + .add("additionalProperties", additionalProperties) + .toString(); + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetPnfs/Pnf.java b/vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetPnfs/Pnf.java new file mode 100644 index 000000000..00a731a70 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetPnfs/Pnf.java @@ -0,0 +1,77 @@ +package org.onap.vid.aai.model.AaiGetPnfs; + +import org.codehaus.jackson.annotate.JsonIgnoreProperties; +import org.codehaus.jackson.annotate.JsonProperty; +import org.onap.vid.aai.model.AaiRelationResponse; + +@JsonIgnoreProperties(ignoreUnknown = true) +public class Pnf extends AaiRelationResponse { + + @JsonProperty("pnf-name") + public String pnfName; + @JsonProperty("pnf-name2") + public String pnfName2; + @JsonProperty("pnf-name2-source") + public String pnfName2Source; + @JsonProperty("pnf-id") + public String pnfId; + @JsonProperty("equip-type") + public String equipType; + @JsonProperty("equip-vendor") + public String equipVendor; + @JsonProperty("equip-model") + public String equipModel; + + public String getPnfName() { + return pnfName; + } + + public void setPnfName(String pnfName) { + this.pnfName = pnfName; + } + + public String getEquipType() { + return equipType; + } + + public void setEquipType(String equipType) { + this.equipType = equipType; + } + + public String getEquipVendor() { + return equipVendor; + } + + public void setEquipVendor(String equipVendor) { + this.equipVendor = equipVendor; + } + + public String getPnfName2() { + return pnfName2; + } + + public void setPnfName2(String pnfName2) { + this.pnfName2 = pnfName2; + } + + public String getPnfId() { + return pnfId; + } + + public void setPnfId(String pnfId) { + this.pnfId = pnfId; + } + + public String getEquipModel() { + return equipModel; + } + + public void setEquipModel(String equipModel) { + this.equipModel = equipModel; + } + + public String getPnfName2Source() { return pnfName2Source; } + + public void setPnfName2Source(String pnfName2Source) { this.pnfName2Source = pnfName2Source; } +} + diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetServicesRequestModel/GetServicesAAIRespone.java b/vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetServicesRequestModel/GetServicesAAIRespone.java new file mode 100644 index 000000000..d3dd7d26c --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetServicesRequestModel/GetServicesAAIRespone.java @@ -0,0 +1,11 @@ +package org.onap.vid.aai.model.AaiGetServicesRequestModel; + +import org.codehaus.jackson.annotate.JsonIgnoreProperties; +import org.codehaus.jackson.annotate.JsonProperty; + +import java.util.List; +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetServicesAAIRespone { + + public List service; +} diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetServicesRequestModel/Service.java b/vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetServicesRequestModel/Service.java new file mode 100644 index 000000000..367287e1d --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetServicesRequestModel/Service.java @@ -0,0 +1,21 @@ +package org.onap.vid.aai.model.AaiGetServicesRequestModel; + +import org.codehaus.jackson.annotate.JsonIgnoreProperties; +import org.codehaus.jackson.annotate.JsonProperty; + +/** + * Created by Oren on 7/17/17. + */ + +@JsonIgnoreProperties(ignoreUnknown = true) +public class Service { + @JsonProperty("service-id") + public String serviceId; + @JsonProperty("service-description") + public String serviceDescription; + @JsonProperty("resource-version") + public String resourceVersion; + @JsonProperty("is-permitted") + public boolean isPermitted; + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetTenatns/GetTenantsResponse.java b/vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetTenatns/GetTenantsResponse.java new file mode 100644 index 000000000..bee92440d --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetTenatns/GetTenantsResponse.java @@ -0,0 +1,33 @@ +package org.onap.vid.aai.model.AaiGetTenatns; + +import org.codehaus.jackson.annotate.JsonIgnoreProperties; +import org.codehaus.jackson.annotate.JsonProperty; + +/** + * Created by Oren on 7/18/17. + */ +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetTenantsResponse { + + @JsonProperty("cloudRegionID") + public String cloudRegionId; + + @JsonProperty("tenantName") + public String tenantName; + + @JsonProperty("tenantID") + public String tenantID; + + @JsonProperty("is-permitted") + public boolean isPermitted; + + public GetTenantsResponse() { + } + + public GetTenantsResponse(String cloudRegionId, String tenantName, String tenantID, boolean isPermitted) { + this.cloudRegionId = cloudRegionId; + this.tenantName = tenantName; + this.tenantID = tenantID; + this.isPermitted = isPermitted; + } +} \ No newline at end of file diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/model/AaiRelationResponse.java b/vid-app-common/src/main/java/org/onap/vid/aai/model/AaiRelationResponse.java new file mode 100644 index 000000000..7bc2e7a2e --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/aai/model/AaiRelationResponse.java @@ -0,0 +1,45 @@ +package org.onap.vid.aai.model; + + + +import org.codehaus.jackson.annotate.JsonIgnore; +import org.codehaus.jackson.annotate.JsonProperty; + +import java.util.HashMap; +import java.util.Map; + +/** + * Created by moriya1 on 08/10/2017. + */ +public class AaiRelationResponse { + + @JsonProperty("resource-version") + private String resourceVersion; + @JsonProperty("relationship-list") + private RelationshipList relationshipList; + @JsonIgnore + private Map additionalProperties = new HashMap(); + + + @JsonProperty("resource-version") + public String getResourceVersion() { + return resourceVersion; + } + + @JsonProperty("resource-version") + public void setResourceVersion(String resourceVersion) { + this.resourceVersion = resourceVersion; + } + + @JsonProperty("relationship-list") + public RelationshipList getRelationshipList() { + return relationshipList; + } + + @JsonProperty("relationship-list") + public void setRelationshipList(RelationshipList relationshipList) { + this.relationshipList = relationshipList; + } + + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/model/GetServiceModelsByDistributionStatusResponse.java b/vid-app-common/src/main/java/org/onap/vid/aai/model/GetServiceModelsByDistributionStatusResponse.java new file mode 100644 index 000000000..5a6924dcb --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/aai/model/GetServiceModelsByDistributionStatusResponse.java @@ -0,0 +1,29 @@ +package org.onap.vid.aai.model; + + +import org.codehaus.jackson.annotate.JsonIgnoreProperties; +import org.codehaus.jackson.annotate.JsonProperty; + +import java.util.List; + +/** + * Created by moriya1 on 15/10/2017. + */ +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetServiceModelsByDistributionStatusResponse { + @JsonProperty("results") + private List results; + + + @JsonProperty("results") + public List getResults() { + return results; + } + + @JsonProperty("results") + public void setResults(List results) { + this.results = results; + } + + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/model/LogicalLinkResponse.java b/vid-app-common/src/main/java/org/onap/vid/aai/model/LogicalLinkResponse.java new file mode 100644 index 000000000..6625957ec --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/aai/model/LogicalLinkResponse.java @@ -0,0 +1,72 @@ +package org.onap.vid.aai.model; + +import org.codehaus.jackson.annotate.JsonProperty; + +public class LogicalLinkResponse { + + @JsonProperty("link-name") + public String linkName; + + @JsonProperty("in-maint") + public Boolean inMaint; + + @JsonProperty("link-type") + public String linkType; + + @JsonProperty("resource-version") + public String resourceVersion; + + @JsonProperty("purpose") + public String purpose; + + @JsonProperty("relationship-list") + public RelationshipList relationshipList; + + public String getLinkName() { + return linkName; + } + + public void setLinkName(String linkName) { + this.linkName = linkName; + } + + public Boolean getInMaint() { + return inMaint; + } + + public void setInMaint(Boolean inMaint) { + this.inMaint = inMaint; + } + + public String getLinkType() { + return linkType; + } + + public void setLinkType(String linkType) { + this.linkType = linkType; + } + + public String getResourceVersion() { + return resourceVersion; + } + + public void setResourceVersion(String resourceVersion) { + this.resourceVersion = resourceVersion; + } + + public String getPurpose() { + return purpose; + } + + public void setPurpose(String purpose) { + this.purpose = purpose; + } + + public RelationshipList getRelationshipList() { + return relationshipList; + } + + public void setRelationshipList(RelationshipList relationshipList) { + this.relationshipList = relationshipList; + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/model/Model.java b/vid-app-common/src/main/java/org/onap/vid/aai/model/Model.java new file mode 100644 index 000000000..5f422f68a --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/aai/model/Model.java @@ -0,0 +1,61 @@ +package org.onap.vid.aai.model; + +import org.codehaus.jackson.annotate.JsonIgnoreProperties; +import org.codehaus.jackson.annotate.JsonProperty; + +/** + * Created by moriya1 on 15/10/2017. + */ +@JsonIgnoreProperties(ignoreUnknown = true) +public class Model { + + @JsonProperty("model-invariant-id") + private String modelInvariantId; + @JsonProperty("model-type") + private String modelType; + @JsonProperty("resource-version") + private String resourceVersion; + @JsonProperty("model-vers") + private ModelVers modelVers; + + @JsonProperty("model-invariant-id") + public String getModelInvariantId() { + return modelInvariantId; + } + + @JsonProperty("model-invariant-id") + public void setModelInvariantId(String modelInvariantId) { + this.modelInvariantId = modelInvariantId; + } + + @JsonProperty("model-type") + public String getModelType() { + return modelType; + } + + @JsonProperty("model-type") + public void setModelType(String modelType) { + this.modelType = modelType; + } + + @JsonProperty("resource-version") + public String getResourceVersion() { + return resourceVersion; + } + + @JsonProperty("resource-version") + public void setResourceVersion(String resourceVersion) { + this.resourceVersion = resourceVersion; + } + + @JsonProperty("model-vers") + public ModelVers getModelVers() { + return modelVers; + } + + @JsonProperty("model-vers") + public void setModelVers(ModelVers modelVers) { + this.modelVers = modelVers; + } + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/model/ModelVer.java b/vid-app-common/src/main/java/org/onap/vid/aai/model/ModelVer.java new file mode 100644 index 000000000..f02bbacfe --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/aai/model/ModelVer.java @@ -0,0 +1,84 @@ +package org.onap.vid.aai.model; + +import org.codehaus.jackson.annotate.JsonIgnoreProperties; +import org.codehaus.jackson.annotate.JsonProperty; + +@JsonIgnoreProperties(ignoreUnknown = true) +public class ModelVer { + + @JsonProperty("model-version-id") + private String modelVersionId; + @JsonProperty("model-name") + private String modelName; + @JsonProperty("model-version") + private String modelVersion; + @JsonProperty("distribution-status") + private String distributionStatus; + @JsonProperty("resource-version") + private String resourceVersion; + @JsonProperty("model-description") + private String modelDescription; + + + + @JsonProperty("model-version-id") + public String getModelVersionId() { + return modelVersionId; + } + + @JsonProperty("model-version-id") + public void setModelVersionId(String modelVersionId) { + this.modelVersionId = modelVersionId; + } + + @JsonProperty("model-name") + public String getModelName() { + return modelName; + } + + @JsonProperty("model-name") + public void setModelName(String modelName) { + this.modelName = modelName; + } + + @JsonProperty("model-version") + public String getModelVersion() { + return modelVersion; + } + + @JsonProperty("model-version") + public void setModelVersion(String modelVersion) { + this.modelVersion = modelVersion; + } + + @JsonProperty("distribution-status") + public String getDistributionStatus() { + return distributionStatus; + } + + @JsonProperty("distribution-status") + public void setDistributionStatus(String distributionStatus) { + this.distributionStatus = distributionStatus; + } + + @JsonProperty("resource-version") + public String getResourceVersion() { + return resourceVersion; + } + + @JsonProperty("resource-version") + public void setResourceVersion(String resourceVersion) { + this.resourceVersion = resourceVersion; + } + + @JsonProperty("model-description") + public String getModelDescription() { + return modelDescription; + } + + @JsonProperty("model-description") + public void setModelDescription(String modelDescription) { + this.modelDescription = modelDescription; + } + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/model/ModelVers.java b/vid-app-common/src/main/java/org/onap/vid/aai/model/ModelVers.java new file mode 100644 index 000000000..f352158f2 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/aai/model/ModelVers.java @@ -0,0 +1,28 @@ +package org.onap.vid.aai.model; + +import org.codehaus.jackson.annotate.JsonIgnoreProperties; +import org.codehaus.jackson.annotate.JsonProperty; + +import java.util.List; + +/** + * Created by moriya1 on 15/10/2017. + */ +@JsonIgnoreProperties(ignoreUnknown = true) +public class ModelVers { + + @JsonProperty("model-ver") + private List modelVer; + + @JsonProperty("model-ver") + public List getModelVer() { + return modelVer; + } + + @JsonProperty("model-ver") + public void setModelVer(List modelVer) { + this.modelVer = modelVer; + } + + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/model/OwningEntity.java b/vid-app-common/src/main/java/org/onap/vid/aai/model/OwningEntity.java new file mode 100644 index 000000000..edf5242d6 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/aai/model/OwningEntity.java @@ -0,0 +1,36 @@ +package org.onap.vid.aai.model; + + +import org.codehaus.jackson.annotate.JsonProperty; + +/** + * Created by moriya1 on 08/10/2017. + */ +public class OwningEntity extends AaiRelationResponse { + @JsonProperty("owning-entity-id") + private String owningEntityId; + @JsonProperty("owning-entity-name") + private String owningEntityName; + + @JsonProperty("owning-entity-id") + public String getOwningEntityId() { + return owningEntityId; + } + + @JsonProperty("owning-entity-id") + public void setOwningEntityId(String owningEntityId) { + this.owningEntityId = owningEntityId; + } + + @JsonProperty("owning-entity-name") + public String getOwningEntityName() { + return owningEntityName; + } + + @JsonProperty("owning-entity-name") + public void setOwningEntityName(String owningEntityName) { + this.owningEntityName = owningEntityName; + } + + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/model/OwningEntityResponse.java b/vid-app-common/src/main/java/org/onap/vid/aai/model/OwningEntityResponse.java new file mode 100644 index 000000000..3a571ea14 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/aai/model/OwningEntityResponse.java @@ -0,0 +1,28 @@ +package org.onap.vid.aai.model; + + +import org.codehaus.jackson.annotate.JsonProperty; + +import java.util.List; + +/** + * Created by moriya1 on 08/10/2017. + */ +public class OwningEntityResponse { + + @JsonProperty("owning-entity") + private List owningEntity; + + + @JsonProperty("owning-entity") + public List getOwningEntity() { + return owningEntity; + } + + @JsonProperty("owning-entity") + public void setOwningEntity(List owningEntity) { + this.owningEntity = owningEntity; + } + + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/model/PnfProperties.java b/vid-app-common/src/main/java/org/onap/vid/aai/model/PnfProperties.java new file mode 100644 index 000000000..3481d263e --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/aai/model/PnfProperties.java @@ -0,0 +1,51 @@ +package org.onap.vid.aai.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.codehaus.jackson.annotate.JsonIgnoreProperties; +import org.codehaus.jackson.annotate.JsonProperty; + +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +@JsonPropertyOrder({ + "pnf-name", + "equip-type", + "equip-vendor", + "equip-model", + "in-maint", + "resource-version" +}) +public class PnfProperties { + + @JsonProperty("pnf-name") + public String pnfName; + @JsonProperty("equip-type") + public String equipType; + @JsonProperty("equip-vendor") + public String equipVendor; + @JsonProperty("equip-model") + public String equipModel; + @JsonProperty("in-maint") + public Boolean inMaint; + @JsonProperty("resource-version") + public String resourceVersion; + @JsonIgnore + private Map additionalProperties = new HashMap(); + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/model/PnfResult.java b/vid-app-common/src/main/java/org/onap/vid/aai/model/PnfResult.java new file mode 100644 index 000000000..a727d8f3c --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/aai/model/PnfResult.java @@ -0,0 +1,49 @@ +package org.onap.vid.aai.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.codehaus.jackson.annotate.JsonProperty; +import org.onap.vid.RelatedTo; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "id", + "node-type", + "url", + "properties", + "related-to" +}) +public class PnfResult { + + @JsonProperty("id") + public String id; + @JsonProperty("node-type") + public String nodeType; + @JsonProperty("url") + public String url; + @JsonProperty("properties") + public PnfProperties properties; + @JsonProperty("related-to") + public List relatedTo; + + @JsonIgnore + private Map additionalProperties = new HashMap(); + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/model/Project.java b/vid-app-common/src/main/java/org/onap/vid/aai/model/Project.java new file mode 100644 index 000000000..5931bb97a --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/aai/model/Project.java @@ -0,0 +1,21 @@ +package org.onap.vid.aai.model; + + +import org.codehaus.jackson.annotate.JsonProperty; + +/** + * Created by moriya1 on 08/10/2017. + */ +public class Project extends AaiRelationResponse { + + @JsonProperty("project-name") + private String projectName; + + @JsonProperty("project-name") + public String getProjectName() { return projectName; } + + @JsonProperty("project-name") + public void setProjectName(String projectName) { this.projectName = projectName; } + + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/model/ProjectResponse.java b/vid-app-common/src/main/java/org/onap/vid/aai/model/ProjectResponse.java new file mode 100644 index 000000000..0ca35b0a9 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/aai/model/ProjectResponse.java @@ -0,0 +1,28 @@ +package org.onap.vid.aai.model; + + +import org.codehaus.jackson.annotate.JsonProperty; + +import java.util.List; + +/** + * Created by moriya1 on 08/10/2017. + */ +public class ProjectResponse { + + @JsonProperty("project") + private List project; + + + @JsonProperty("project") + public List getProject() { + return project; + } + + @JsonProperty("project") + public void setProject(List project) { + this.project = project; + } + + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/model/RelatedToProperty.java b/vid-app-common/src/main/java/org/onap/vid/aai/model/RelatedToProperty.java new file mode 100644 index 000000000..38003aec2 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/aai/model/RelatedToProperty.java @@ -0,0 +1,35 @@ +package org.onap.vid.aai.model; + + +import org.codehaus.jackson.annotate.JsonProperty; + +public class RelatedToProperty { + + public String getPropertyKey() { + return propertyKey; + } + + + public void setPropertyKey(String propertyKey) { + this.propertyKey = propertyKey; + } + + + public String getPropertyValue() { + return propertyValue; + } + + + public void setPropertyValue(String propertyValue) { + this.propertyValue = propertyValue; + } + + + @JsonProperty("property-key") + public String propertyKey; + + + @JsonProperty("property-value") + public String propertyValue; + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/model/Relationship.java b/vid-app-common/src/main/java/org/onap/vid/aai/model/Relationship.java new file mode 100644 index 000000000..c80d5b6be --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/aai/model/Relationship.java @@ -0,0 +1,67 @@ +package org.onap.vid.aai.model; + +import org.codehaus.jackson.annotate.JsonProperty; + +import java.util.List; + + + + +public class Relationship { + + @JsonProperty("related-to") + public String relatedTo; + + @JsonProperty("related-link") + public String relatedLink; + + @JsonProperty("relationship-label") + public String relationshipLabel; + + @JsonProperty("relationship-data") + public List relationshipData; + + @JsonProperty("related-to-property") + public List relatedToProperty; + + + public String getRelatedTo() { + return relatedTo; + } + + public void setRelatedTo(String relatedTo) { + this.relatedTo = relatedTo; + } + + public String getRelatedLink() { + return relatedLink; + } + + public void setRelatedLink(String relatedLink) { + this.relatedLink = relatedLink; + } + + public List getRelationDataList() { + return relationshipData; + } + + public void setRelationDataList(List relationDataList) { + this.relationshipData = relationDataList; + } + + public List getRelatedToPropertyList() { + return relatedToProperty; + } + + public void setRelatedToPropertyList(List relatedToPropertyList) { + this.relatedToProperty = relatedToPropertyList; + } + + public String getRelationshipLabel() { + return relationshipLabel; + } + + public void setRelationshipLabel(String relationshipLabel) { + this.relationshipLabel = relationshipLabel; + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/model/RelationshipData.java b/vid-app-common/src/main/java/org/onap/vid/aai/model/RelationshipData.java new file mode 100644 index 000000000..5d2d4091d --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/aai/model/RelationshipData.java @@ -0,0 +1,30 @@ +package org.onap.vid.aai.model; + + +import org.codehaus.jackson.annotate.JsonProperty; + +public class RelationshipData { + @JsonProperty("relationship-key") + public String getRelationshipKey() { + return relationshipKey; + } + @JsonProperty("relationship-key") + public void setRelationshipKey(String relationshipKey) { + this.relationshipKey = relationshipKey; + } + @JsonProperty("relationship-value") + public String getRelationshipValue() { + return relationshipValue; + } + @JsonProperty("relationship-value") + public void setRelationshipValue(String relationshipValue) { + this.relationshipValue = relationshipValue; + } + + @JsonProperty("relationship-key") + public String relationshipKey; + + @JsonProperty("relationship-value") + public String relationshipValue; + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/model/RelationshipList.java b/vid-app-common/src/main/java/org/onap/vid/aai/model/RelationshipList.java new file mode 100644 index 000000000..43194fc7c --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/aai/model/RelationshipList.java @@ -0,0 +1,26 @@ +package org.onap.vid.aai.model; + +import org.codehaus.jackson.annotate.JsonProperty; + +import java.util.List; + + +public class RelationshipList { + + @JsonProperty("relationship") + public List getRelationship() { + return relationship; + } + + @JsonProperty("relationship") + public void setRelationship(List relationship) { + this.relationship = relationship; + } + + @JsonProperty("relationship") + public List relationship; + + + + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/model/Result.java b/vid-app-common/src/main/java/org/onap/vid/aai/model/Result.java new file mode 100644 index 000000000..1eb46be75 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/aai/model/Result.java @@ -0,0 +1,26 @@ +package org.onap.vid.aai.model; + +import org.codehaus.jackson.annotate.JsonIgnoreProperties; +import org.codehaus.jackson.annotate.JsonProperty; + +/** + * Created by moriya1 on 15/10/2017. + */ +@JsonIgnoreProperties(ignoreUnknown = true) +public class Result { + @JsonProperty("model") + private Model model; + + @JsonProperty("model") + public Model getModel() { + return model; + } + + @JsonProperty("model") + public void setModel(Model model) { + this.model = model; + } + + + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/model/ServiceInstance.java b/vid-app-common/src/main/java/org/onap/vid/aai/model/ServiceInstance.java new file mode 100644 index 000000000..381f9bc25 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/aai/model/ServiceInstance.java @@ -0,0 +1,26 @@ +package org.onap.vid.aai.model; + +import org.codehaus.jackson.annotate.JsonProperty; + +public class ServiceInstance { + + @JsonProperty("service-instance-id") + public String serviceInstanceId; + + @JsonProperty("service-instance-name") + public String serviceInstanceName; + + @JsonProperty("persona-model-id") + public String personaModelId; + + @JsonProperty("persona-model-version") + public String personaModelVersion; + + @JsonProperty("resource-version") + public String resourceVersion; + + @JsonProperty("orchestration-status") + public String orchestrationStatus; + + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/model/ServiceInstances.java b/vid-app-common/src/main/java/org/onap/vid/aai/model/ServiceInstances.java new file mode 100644 index 000000000..0fced4c57 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/aai/model/ServiceInstances.java @@ -0,0 +1,12 @@ +package org.onap.vid.aai.model; + +import java.util.List; + +import org.codehaus.jackson.annotate.JsonProperty; + +public class ServiceInstances { + + @JsonProperty("service-instance") + public List serviceInstance; + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/model/ServiceProperties.java b/vid-app-common/src/main/java/org/onap/vid/aai/model/ServiceProperties.java new file mode 100644 index 000000000..a76bcf8a1 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/aai/model/ServiceProperties.java @@ -0,0 +1,113 @@ +package org.onap.vid.aai.model; + +import com.fasterxml.jackson.annotation.*; +import org.codehaus.jackson.annotate.JsonIgnoreProperties; +import org.codehaus.jackson.annotate.JsonProperty; + +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +@JsonPropertyOrder({ + "service-instance-id", + "service-instance-name", + "model-invariant-id", + "model-version-id", + "resource-version", + "orchestration-status", + "global-customer-id", + "subscriber-name", + "subscriber-type", + "vnf-id", + "vnf-name", + "vnf-type", + "service-id", + "prov-status", + "in-maint", + "is-closed-loop-disabled", + "model-customization-id", + "nf-type", + "nf-function", + "nf-role", + "nf-naming-code" +}) +public class ServiceProperties { + + @JsonProperty("service-instance-id") + @com.fasterxml.jackson.annotation.JsonProperty("service-instance-id") + public String serviceInstanceId; + @JsonProperty("service-instance-name") + @com.fasterxml.jackson.annotation.JsonProperty("service-instance-name") + public String serviceInstanceName; + @JsonProperty("model-invariant-id") + @com.fasterxml.jackson.annotation.JsonProperty("model-invariant-id") + public String modelInvariantId; + @JsonProperty("model-version-id") + @com.fasterxml.jackson.annotation.JsonProperty("model-version-id") + public String modelVersionId; + @JsonProperty("resource-version") + @com.fasterxml.jackson.annotation.JsonProperty("resource-version") + public String resourceVersion; + @JsonProperty("orchestration-status") + @com.fasterxml.jackson.annotation.JsonProperty("orchestration-status") + public String orchestrationStatus; + @JsonProperty("global-customer-id") + @com.fasterxml.jackson.annotation.JsonProperty("global-customer-id") + public String globalCustomerId; + @JsonProperty("subscriber-name") + @com.fasterxml.jackson.annotation.JsonProperty("subscriber-name") + public String subscriberName; + @JsonProperty("subscriber-type") + @com.fasterxml.jackson.annotation.JsonProperty("subscriber-type") + public String subscriberType; + @JsonProperty("vnf-id") + @com.fasterxml.jackson.annotation.JsonProperty("vnf-id") + public String vnfId; + @JsonProperty("vnf-name") + @com.fasterxml.jackson.annotation.JsonProperty("vnf-name") + public String vnfName; + @JsonProperty("vnf-type") + @com.fasterxml.jackson.annotation.JsonProperty("vnf-type") + public String vnfType; + @JsonProperty("service-id") + @com.fasterxml.jackson.annotation.JsonProperty("service-id") + public String serviceId; + @JsonProperty("prov-status") + @com.fasterxml.jackson.annotation.JsonProperty("prov-status") + public String provStatus; + @JsonProperty("in-maint") + @com.fasterxml.jackson.annotation.JsonProperty("in-maint") + public Boolean inMaint; + @JsonProperty("is-closed-loop-disabled") + @com.fasterxml.jackson.annotation.JsonProperty("is-closed-loop-disabled") + public Boolean isClosedLoopDisabled; + @JsonProperty("model-customization-id") + @com.fasterxml.jackson.annotation.JsonProperty("model-customization-id") + public String modelCustomizationId; + @JsonProperty("nf-type") + @com.fasterxml.jackson.annotation.JsonProperty("nf-type") + public String nfType; + @JsonProperty("nf-function") + @com.fasterxml.jackson.annotation.JsonProperty("nf-function") + public String nfFunction; + @JsonProperty("nf-role") + @com.fasterxml.jackson.annotation.JsonProperty("nf-role") + public String nfRole; + @JsonProperty("nf-naming-code") + @com.fasterxml.jackson.annotation.JsonProperty("nf-naming-code") + public String nfNamingCode; + @JsonIgnore + private Map additionalProperties = new HashMap(); + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/model/ServiceRelationships.java b/vid-app-common/src/main/java/org/onap/vid/aai/model/ServiceRelationships.java new file mode 100644 index 000000000..b8abc8494 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/aai/model/ServiceRelationships.java @@ -0,0 +1,102 @@ +package org.onap.vid.aai.model; + +import org.codehaus.jackson.annotate.JsonProperty; + +public class ServiceRelationships { + + @JsonProperty("service-instance-id") + public String serviceInstanceId; + + @JsonProperty("service-instance-name") + public String serviceInstanceName; + + @JsonProperty("service-type") + public String serviceType; + + @JsonProperty("service-role") + public String serviceRole; + + @JsonProperty("environment-context") + public String environmentContext; + + @JsonProperty("workload-context") + public String workloadContext; + + @JsonProperty("model-invariant-id") + public String modelInvariantId; + + @JsonProperty("model-version-id") + public String modelVersionId; + + @JsonProperty("resource-version") + public String resourceVersion; + + @JsonProperty("orchestration-status") + public String orchestrationStatus; + + @JsonProperty("relationship-list") + public RelationshipList relationshipList; + + + public String getServiceInstanceId() { + return serviceInstanceId; + } + + public void setServiceInstanceId(String serviceInstanceId) { + this.serviceInstanceId = serviceInstanceId; + } + + public String getServiceInstanceName() { + return serviceInstanceName; + } + + public void setServiceInstanceName(String serviceInstanceName) { + this.serviceInstanceName = serviceInstanceName; + } + + public String getModelInvariantId() { + return modelInvariantId; + } + + public void setModelInvariantId(String modelInvariantId) { + this.modelInvariantId = modelInvariantId; + } + + public String getModelVersionId() { + return modelVersionId; + } + + public void setModelVersionId(String modelVersionId) { + this.modelVersionId = modelVersionId; + } + + public String getResourceVersion() { + return resourceVersion; + } + + public void setResourceVersion(String resourceVersion) { + this.resourceVersion = resourceVersion; + } + + public String getOrchestrationStatus() { + return orchestrationStatus; + } + + public void setOrchestrationStatus(String orchestrationStatus) { + this.orchestrationStatus = orchestrationStatus; + } + + public RelationshipList getRelationshipList() { + return relationshipList; + } + + public void setRelationshipList(RelationshipList relationshipList) { + this.relationshipList = relationshipList; + } + + + + + + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/model/ServiceSubscription.java b/vid-app-common/src/main/java/org/onap/vid/aai/model/ServiceSubscription.java new file mode 100644 index 000000000..91582e816 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/aai/model/ServiceSubscription.java @@ -0,0 +1,17 @@ +package org.onap.vid.aai.model; + +import org.codehaus.jackson.annotate.JsonProperty; + +public class ServiceSubscription { + + @JsonProperty("service-type") + public String serviceType; + + @JsonProperty("resource-version") + public String resourceVersion; + + @JsonProperty("service-instances") + public ServiceInstances serviceInstances; + + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/model/Services.java b/vid-app-common/src/main/java/org/onap/vid/aai/model/Services.java new file mode 100644 index 000000000..3ba4b22d0 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/aai/model/Services.java @@ -0,0 +1,24 @@ +package org.onap.vid.aai.model; + +import java.util.List; + +import org.codehaus.jackson.annotate.JsonProperty; + +public class Services { + @JsonProperty("global-customer-id") + public String globalCustomerId; + + @JsonProperty("subscriber-name") + public String subscriberName; + + @JsonProperty("subscriber-type") + public String subscriberType; + + @JsonProperty("resource-version") + public String resourceVersion; + + @JsonProperty("service-subscriptions") + public List serviceSubscriptions; + + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/model/VnfResult.java b/vid-app-common/src/main/java/org/onap/vid/aai/model/VnfResult.java new file mode 100644 index 000000000..e4f22849d --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/aai/model/VnfResult.java @@ -0,0 +1,46 @@ +package org.onap.vid.aai.model; + +import com.fasterxml.jackson.annotation.*; +import org.codehaus.jackson.annotate.JsonProperty; +import org.onap.vid.RelatedTo; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "id", + "node-type", + "url", + "properties", + "related-to" +}) +public class VnfResult { + + @JsonProperty("id") + public String id; + @com.fasterxml.jackson.annotation.JsonProperty("node-type") + @JsonProperty("node-type") + public String nodeType; + @JsonProperty("url") + public String url; + @JsonProperty("properties") + public ServiceProperties properties; + @JsonProperty("related-to") + @com.fasterxml.jackson.annotation.JsonProperty("related-to") + public List relatedTo = null; + @JsonIgnore + private Map additionalProperties = new HashMap(); + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/util/AAIProperties.java b/vid-app-common/src/main/java/org/onap/vid/aai/util/AAIProperties.java new file mode 100644 index 000000000..254584ca1 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/aai/util/AAIProperties.java @@ -0,0 +1,68 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.aai.util; + + +import org.openecomp.portalsdk.core.util.SystemProperties; + +/** + * The Class AAIProperties. + */ +public class AAIProperties extends SystemProperties { + + /** The Constant AAI_SERVER_URL_BASE. */ + //VID Specific + public static final String AAI_SERVER_URL_BASE = "aai.server.url.base"; + + /** The Constant AAI_SERVER_URL. */ + public static final String AAI_SERVER_URL = "aai.server.url"; + + /** The Constant AAI_OLDSERVER_URL_BASE. */ + public static final String AAI_OLDSERVER_URL_BASE = "aai.oldserver.url.base"; + + /** The Constant AAI_OLDSERVER_URL. */ + public static final String AAI_OLDSERVER_URL = "aai.oldserver.url"; + + /** The Constant AAI_TRUSTSTORE_FILENAME. */ + public static final String AAI_TRUSTSTORE_FILENAME = "aai.truststore.filename"; + + /** The Constant AAI_TRUSTSTORE_PASSWD_X. */ + public static final String AAI_TRUSTSTORE_PASSWD_X = "aai.truststore.passwd.x"; + + /** The Constant AAI_KEYSTORE_FILENAME. */ + public static final String AAI_KEYSTORE_FILENAME = "aai.keystore.filename"; + + /** The Constant AAI_KEYSTORE_PASSWD_X. */ + public static final String AAI_KEYSTORE_PASSWD_X = "aai.keystore.passwd.x"; + + /** The Constant AAI_VID_USERNAME. */ + public static final String AAI_VID_USERNAME = "aai.vid.username"; + + /** The Constant AAI_VID_PASSWD_X. */ + public static final String AAI_VID_PASSWD_X = "aai.vid.passwd.x"; + + /** The Constant FILESEPARTOR. */ + public static final String FILESEPARTOR = (System.getProperty("file.separator") == null) ? "/" : System.getProperty("file.separator"); + + /** The Constant AAI_USE_CLIENT_CERT */ + public static final String AAI_USE_CLIENT_CERT = "aai.use.client.cert"; + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/util/AAIRestInterface.java b/vid-app-common/src/main/java/org/onap/vid/aai/util/AAIRestInterface.java new file mode 100644 index 000000000..13b7d30b0 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/aai/util/AAIRestInterface.java @@ -0,0 +1,373 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.aai.util; + + +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.security.KeyManagementException; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.Base64; +import java.util.Date; +import java.util.UUID; + +import javax.ws.rs.client.Client; +import javax.ws.rs.client.Entity; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; + +import com.att.eelf.configuration.EELFLogger; +import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.openecomp.portalsdk.core.util.SystemProperties; +import org.eclipse.jetty.util.security.Password; +import org.onap.vid.utils.Logging; +import org.springframework.http.HttpMethod; +import static org.onap.vid.utils.Logging.getHttpServletRequest; +import static org.onap.vid.utils.Logging.requestIdHeaderKey; + + +/** + * The Class AAIRestInterface. + */ +public class AAIRestInterface { + + /** The logger. */ + EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(AAIRestInterface.class); + + final private EELFLogger outgoingRequestsLogger = Logging.getRequestsLogger("aai"); + + /** The Constant dateFormat. */ + final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); + + /** The client. */ + private static Client client = null; + + /** The rest srvr base URL. */ + private String restSrvrBaseURL; + + /** The certificate path. */ + public String certificatePath = ""; + + private String START_STRING = " start"; + + private String TRANSACTION_ID_HEADER = "X-TransactionId"; + private String FROM_APP_ID_HEADER = "X-FromAppId"; + private String SUCCESSFUL_API_MESSAGE=" REST api POST was successful!"; + private String URL_DECLERATION = ", url="; + + + + + + + /** + * Instantiates a new AAI rest interface. + * + * @param certPath the cert path + */ + public AAIRestInterface(String certPath) + { + certificatePath = certPath; + } + + /** + * Encode URL. + * + * @param nodeKey the node key + * @return the string + * @throws UnsupportedEncodingException the unsupported encoding exception + */ + public String encodeURL (String nodeKey) throws UnsupportedEncodingException { + return URLEncoder.encode(nodeKey, "UTF-8").replaceAll("\\+", "%20"); + } + + /** + * Inits the rest client. + */ + private void initRestClient() + { + String methodName = "initRestClient"; + + if (client == null) { + try { + client = HttpsAuthClient.getClient(certificatePath); + } + catch (KeyManagementException e){ + logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== KeyManagementException in " + methodName + e.toString()); + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== KeyManagementException in " + methodName + e.toString()); + } catch (Exception e) { + logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== Exception in REST call to DB in initRestClient" + e.toString()); + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== Exception in REST call to DB : " + e.toString()); + } + } + } + + /** + * Sets the rest srvr base URL. + * + * @param baseURL the base URL + */ + public void SetRestSrvrBaseURL(String baseURL) + { + if (baseURL == null) + { + logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== REST Server base URL cannot be null."); + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== REST Server base URL cannot be null."); + } + + restSrvrBaseURL = baseURL; + } + + /** + * Gets the rest srvr base URL. + * + * @return the rest srvr base URL + */ + public String getRestSrvrBaseURL() + { + return restSrvrBaseURL; + } + + + /** + * Rest get. + * + * @param fromAppId the from app id + * @param transId the trans id + * @param requestUri the request uri + * @param xml the xml + * @return the string + * @throws UnsupportedEncodingException + */ + public Response RestGet(String fromAppId, String transId, String requestUri, boolean xml) throws UnsupportedEncodingException { + String methodName = "RestGet"; + + String responseType = MediaType.APPLICATION_JSON; + if (xml) + responseType = MediaType.APPLICATION_XML; + + initRestClient(); + + String clientCert = SystemProperties.getProperty(AAIProperties.AAI_USE_CLIENT_CERT); + + boolean useClientCert = false; + if (clientCert != null && + SystemProperties.getProperty(AAIProperties.AAI_USE_CLIENT_CERT).equalsIgnoreCase("true")) { + useClientCert = true; + } + String url = ""; + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START_STRING); + + url = SystemProperties.getProperty(AAIProperties.AAI_SERVER_URL) + requestUri; + + + logger.debug(dateFormat.format(new Date()) + "<== " + url + " for the get REST API"); + Logging.logRequest(outgoingRequestsLogger, HttpMethod.GET, url); + + final Response cres; + if (useClientCert == true) { + cres = client.target(url) + .request() + .accept(responseType) + .header(TRANSACTION_ID_HEADER, transId) + .header(FROM_APP_ID_HEADER, fromAppId) + .header("Content-Type", MediaType.APPLICATION_JSON) + .header(requestIdHeaderKey, getHttpServletRequest().getHeader(requestIdHeaderKey)) + .get(); + } else { + + String vidUsername = SystemProperties.getProperty(AAIProperties.AAI_VID_USERNAME); + String vidPassword = Password.deobfuscate(SystemProperties.getProperty(AAIProperties.AAI_VID_PASSWD_X)); + String encodeThis = vidUsername + ":" + vidPassword; + + cres = client.target(url) + .request() + .accept(responseType) + .header(TRANSACTION_ID_HEADER, transId) + .header(FROM_APP_ID_HEADER, fromAppId) + .header("Content-Type", "application/json") + .header("Authorization", "Basic " + Base64.getEncoder().encodeToString(encodeThis.getBytes("utf-8"))) + .header(requestIdHeaderKey, getHttpServletRequest().getHeader(requestIdHeaderKey)) + .get(); + } + Logging.logResponse(outgoingRequestsLogger, HttpMethod.GET, url, cres); +// String r = cres.readEntity(String.class); + if (cres.getStatus() == 200) { + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + SUCCESSFUL_API_MESSAGE); + logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + methodName + SUCCESSFUL_API_MESSAGE); + } else { + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName +" with status="+cres.getStatus()+URL_DECLERATION+url); + } + return cres; +// logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName +" resp=" + r ); +// return r; + } + + + /** + * Delete. + * + * @param sourceID the source ID + * @param transId the trans id + * @param path the path + * @return true, if successful + */ + public boolean Delete(String sourceID, String transId, String path) { + String methodName = "Delete"; + String url=""; + transId += ":" + UUID.randomUUID().toString(); + logger.debug(dateFormat.format(new Date()) + "<== " + methodName + START_STRING); + + initRestClient(); + String request = "{}"; + url = SystemProperties.getProperty(AAIProperties.AAI_SERVER_URL) + path; + Logging.logRequest(outgoingRequestsLogger, HttpMethod.DELETE, url); + final Response cres = client.target(url) + .request() + .accept(MediaType.APPLICATION_JSON) + .header(TRANSACTION_ID_HEADER, transId) + .header(FROM_APP_ID_HEADER, sourceID) + .header(requestIdHeaderKey, getHttpServletRequest().getHeader(requestIdHeaderKey)) + //.entity(request) + .delete(); + Logging.logResponse(outgoingRequestsLogger, HttpMethod.DELETE, url, cres); + if (cres.getStatus() == 404) { // resource not found + String msg = "Resource does not exist...: " + cres.getStatus() + + ":" + cres.readEntity(String.class); + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + msg); + return false; + } else if (cres.getStatus() == 200 || cres.getStatus() == 204){ + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "Resource " + url + " deleted"); + return true; + } else { + String msg = "Deleting Resource failed: " + cres.getStatus() + + ":" + cres.readEntity(String.class); + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + msg); + } + + return false; + } + + + /** + * Rest put. + * + * @param fromAppId the from app id + * @param transId the trans id + * @param path the path + * @param payload the payload + * @param xml the xml + * @return the string + */ + public Response RestPut(String fromAppId, String transId, String path, String payload, boolean xml) { + String methodName = "RestPut"; + String url=""; + transId = UUID.randomUUID().toString(); + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START_STRING); + + try { + + String responseType = MediaType.APPLICATION_JSON; + if (xml) + responseType = "application/xml"; + + initRestClient(); + + url = SystemProperties.getProperty(AAIProperties.AAI_SERVER_URL) + path; + Logging.logRequest(outgoingRequestsLogger, HttpMethod.PUT, url, payload); + final Response cres = client.target(url) + .request() + .accept(responseType) + .header(TRANSACTION_ID_HEADER, transId) + .header(FROM_APP_ID_HEADER, fromAppId) + .header(requestIdHeaderKey, getHttpServletRequest().getHeader(requestIdHeaderKey)) + .put(Entity.entity(payload, MediaType.APPLICATION_JSON)); + Logging.logResponse(outgoingRequestsLogger, HttpMethod.PUT, url, cres); + + if (cres.getStatus() == 200 && cres.getStatus() <= 299) { + logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + methodName + URL_DECLERATION); + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + URL_DECLERATION); + } else { + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName +" with status="+cres.getStatus()+URL_DECLERATION+url); + } + return cres; + } catch (Exception e) { + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + URL_DECLERATION+url+ ", Exception: " + e.toString()); + } + return null; + } + + + + /** + * Rest post. + * + * @param fromAppId the from app id + * @param transId the trans id + * @param path the path + * @param payload the payload + * @param xml the xml + * @return the string + */ + public Response RestPost(String fromAppId, String transId, String path, String payload, boolean xml) { + String methodName = "RestPost"; + String url=""; + transId = UUID.randomUUID().toString(); + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START_STRING); + + try { + + String responseType = MediaType.APPLICATION_JSON; + if (xml) + responseType = "application/xml"; + + initRestClient(); + + url = SystemProperties.getProperty(AAIProperties.AAI_SERVER_URL_BASE) + path; + String vidUsername = SystemProperties.getProperty(AAIProperties.AAI_VID_USERNAME); + String vidPassword = Password.deobfuscate(SystemProperties.getProperty(AAIProperties.AAI_VID_PASSWD_X)); + String encodeThis = vidUsername + ":" + vidPassword; + + Logging.logRequest(outgoingRequestsLogger, HttpMethod.POST, url, payload); + final Response cres = client.target(url) + .request() + .accept(responseType) + .header(TRANSACTION_ID_HEADER, transId) + .header(FROM_APP_ID_HEADER, fromAppId) + .header("Authorization", "Basic " + Base64.getEncoder().encodeToString(encodeThis.getBytes("utf-8"))) + .header(requestIdHeaderKey, getHttpServletRequest().getHeader(requestIdHeaderKey)) + .post(Entity.entity(payload, MediaType.APPLICATION_JSON)); + Logging.logResponse(outgoingRequestsLogger, HttpMethod.POST, url, cres); + + if (cres.getStatus() == 200 && cres.getStatus() <= 299) { + logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + methodName + URL_DECLERATION); + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + URL_DECLERATION); + } else { + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " with status="+cres.getStatus()+URL_DECLERATION+url); + } + return cres; + } catch (Exception e) { + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + URL_DECLERATION+url+ ", Exception: " + e.toString()); + } + return null; + } + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/util/CustomJacksonJaxBJsonProvider.java b/vid-app-common/src/main/java/org/onap/vid/aai/util/CustomJacksonJaxBJsonProvider.java new file mode 100644 index 000000000..996341a9c --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/aai/util/CustomJacksonJaxBJsonProvider.java @@ -0,0 +1,73 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.aai.util; + + +import javax.ws.rs.ext.Provider; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; +import com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider; +import com.fasterxml.jackson.module.jaxb.JaxbAnnotationModule; + +/** + * The Class CustomJacksonJaxBJsonProvider. + */ +@Provider +public class CustomJacksonJaxBJsonProvider extends JacksonJaxbJsonProvider { + + /** The common mapper. */ + private static ObjectMapper commonMapper = null; + + /** + * Instantiates a new custom jackson jax B json provider. + */ + public CustomJacksonJaxBJsonProvider() { + if (commonMapper == null) { + ObjectMapper mapper = new ObjectMapper(); + + mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); + + mapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false); + mapper.configure(SerializationFeature.INDENT_OUTPUT, false); + mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, false); + + mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + mapper.configure(DeserializationFeature.UNWRAP_ROOT_VALUE, false); + + mapper.registerModule(new JaxbAnnotationModule()); + + commonMapper = mapper; + } + super.setMapper(commonMapper); + } + + /** + * Gets the mapper. + * + * @return the mapper + */ + public ObjectMapper getMapper() { + return commonMapper; + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/util/HttpsAuthClient.java b/vid-app-common/src/main/java/org/onap/vid/aai/util/HttpsAuthClient.java new file mode 100644 index 000000000..0cf32cd42 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/aai/util/HttpsAuthClient.java @@ -0,0 +1,140 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.aai.util; + + +import java.io.FileInputStream; +import java.security.KeyManagementException; +import java.security.KeyStore; + +import javax.net.ssl.HostnameVerifier; +import javax.net.ssl.HttpsURLConnection; +import javax.net.ssl.KeyManagerFactory; +import javax.net.ssl.SSLContext; +import javax.net.ssl.SSLSession; +import javax.ws.rs.client.Client; +import javax.ws.rs.client.ClientBuilder; + +import org.eclipse.jetty.util.security.Password; +import org.glassfish.jersey.client.ClientConfig; +import org.glassfish.jersey.client.HttpUrlConnectorProvider; +import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.openecomp.portalsdk.core.util.SystemProperties; +/** + * The Class HttpsAuthClient. + */ +public class HttpsAuthClient{ + /** The logger. */ + static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(HttpsAuthClient.class); + + /** + * Gets the client. + * + * @param certFilePath the cert file path + * @return the client + * @throws KeyManagementException the key management exception + */ + public static Client getClient(String certFilePath) throws KeyManagementException { + + ClientConfig config = new ClientConfig(); + //config.getFeatures().put(JSONConfiguration.FEATURE_POJO_MAPPING, Boolean.TRUE); + //config.getClasses().add(org.openecomp.aai.util.CustomJacksonJaxBJsonProvider.class); + + try { + + config.property(HttpUrlConnectorProvider.SET_METHOD_WORKAROUND, Boolean.TRUE ); + + config.connectorProvider(new HttpUrlConnectorProvider().useSetMethodWorkaround()); + String truststore_path = certFilePath + org.onap.vid.aai.util.AAIProperties.FILESEPARTOR + SystemProperties.getProperty(org.onap.vid.aai.util.AAIProperties.AAI_TRUSTSTORE_FILENAME); + String truststore_password = SystemProperties.getProperty(org.onap.vid.aai.util.AAIProperties.AAI_TRUSTSTORE_PASSWD_X); + String decrypted_truststore_password = Password.deobfuscate(truststore_password); + + boolean useClientCert = false; + + String keystore_path = certFilePath + org.onap.vid.aai.util.AAIProperties.FILESEPARTOR + SystemProperties.getProperty(org.onap.vid.aai.util.AAIProperties.AAI_KEYSTORE_FILENAME); + String keystore_password = SystemProperties.getProperty(org.onap.vid.aai.util.AAIProperties.AAI_KEYSTORE_PASSWD_X); + String decrypted_keystore_password = Password.deobfuscate(keystore_password); + + String clientCert = SystemProperties.getProperty(org.onap.vid.aai.util.AAIProperties.AAI_USE_CLIENT_CERT); + + if (clientCert != null && + SystemProperties.getProperty(org.onap.vid.aai.util.AAIProperties.AAI_USE_CLIENT_CERT).equalsIgnoreCase("true")) { + useClientCert = true; + } + + System.setProperty("javax.net.ssl.trustStore", truststore_path); + System.setProperty("javax.net.ssl.trustStorePassword", decrypted_truststore_password); + HttpsURLConnection.setDefaultHostnameVerifier( new HostnameVerifier(){ + public boolean verify(String string,SSLSession ssls) { + return true; + } + }); + + final SSLContext ctx = SSLContext.getInstance("TLS"); + + KeyManagerFactory kmf = null; + if (useClientCert) { + + try { + kmf = KeyManagerFactory.getInstance("SunX509"); + FileInputStream fin = new FileInputStream(keystore_path); + KeyStore ks = KeyStore.getInstance("PKCS12"); + char[] pwd = decrypted_keystore_password.toCharArray(); + ks.load(fin, pwd); + kmf.init(ks, pwd); + } catch (Exception e) { + //System.out.println("Error setting up kmf: exiting"); + logger.debug(EELFLoggerDelegate.debugLogger, "Error setting up kmf: exiting"); + e.printStackTrace(); + return null; + } + ctx.init(kmf.getKeyManagers(), null, null); + + return ClientBuilder.newBuilder() + .sslContext(ctx) + .hostnameVerifier(new HostnameVerifier() { + @Override + public boolean verify( String s, SSLSession sslSession ) { + return true; + } + }).withConfig(config) + .build() + .register(org.onap.vid.aai.util.CustomJacksonJaxBJsonProvider.class); + } else { + return ClientBuilder.newBuilder() + .hostnameVerifier(new HostnameVerifier() { + @Override + public boolean verify( String s, SSLSession sslSession ) { + return true; + } + }).withConfig(config) + .build() + .register(org.onap.vid.aai.util.CustomJacksonJaxBJsonProvider.class); + } + } catch (Exception e) { + logger.debug(EELFLoggerDelegate.debugLogger, "Error setting up config: exiting"); + //System.out.println("Error setting up config: exiting"); + e.printStackTrace(); + System.exit(1); + return null; + } + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/util/HttpsComponentsClient.java b/vid-app-common/src/main/java/org/onap/vid/aai/util/HttpsComponentsClient.java new file mode 100644 index 000000000..54d7f4684 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/aai/util/HttpsComponentsClient.java @@ -0,0 +1,99 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.aai.util; + +import java.io.FileInputStream; +import java.security.KeyManagementException; +import java.security.KeyStore; + +import javax.net.ssl.SSLContext; + +import org.apache.http.conn.ssl.SSLContextBuilder; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.conn.ssl.SSLConnectionSocketFactory; +import org.apache.http.impl.client.HttpClients; +import org.eclipse.jetty.util.security.Password; +import org.openecomp.portalsdk.core.util.SystemProperties; + + +/** + * The Class HttpsComponentsClient. + */ +public class HttpsComponentsClient{ + + /** + * Gets the client. + * + * @param certFilePath the cert file path + * @return the client + * @throws KeyManagementException the key management exception + */ + public static CloseableHttpClient getClient(String certFilePath) throws Exception { + CloseableHttpClient httpclient = null; + try { + + String truststore_path = certFilePath + AAIProperties.FILESEPARTOR + SystemProperties.getProperty(AAIProperties.AAI_TRUSTSTORE_FILENAME); + String truststore_password = SystemProperties.getProperty(AAIProperties.AAI_TRUSTSTORE_PASSWD_X); + String decrypted_truststore_password = Password.deobfuscate(truststore_password); + String keystore_path = certFilePath + AAIProperties.FILESEPARTOR + SystemProperties.getProperty(AAIProperties.AAI_KEYSTORE_FILENAME); + String keystore_password = SystemProperties.getProperty(AAIProperties.AAI_KEYSTORE_PASSWD_X); + String decrypted_keystore_password = Password.deobfuscate(keystore_password); + + SSLContextBuilder sslContextB = new SSLContextBuilder(); + + KeyStore ks = KeyStore.getInstance("PKCS12"); + FileInputStream fin = new FileInputStream(keystore_path); + char[] pwd = decrypted_keystore_password.toCharArray(); + ks.load(fin, pwd); + + sslContextB.loadKeyMaterial(ks, pwd); + + KeyStore ts = KeyStore.getInstance("JKS"); + FileInputStream fin1 = new FileInputStream(truststore_path); + char[] pwd1 = decrypted_truststore_password.toCharArray(); + ts.load(fin1, pwd1); + + sslContextB.loadTrustMaterial(ts); + sslContextB.loadKeyMaterial(ks, pwd); + sslContextB.useTLS(); + + SSLContext sslcontext = sslContextB.build(); + + SSLConnectionSocketFactory sslFactory = new SSLConnectionSocketFactory( + sslcontext, + new String[] { "TLSv1.1", "TLSv1.2" }, + null, + SSLConnectionSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER ); + + httpclient = HttpClients.custom() + .setSSLSocketFactory(sslFactory) + .build(); + + + } catch (Exception e) { + throw e; + } + return httpclient; + } + + + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/util/JettyObfuscationConversionCommandLineUtil.java b/vid-app-common/src/main/java/org/onap/vid/aai/util/JettyObfuscationConversionCommandLineUtil.java new file mode 100644 index 000000000..8a3ba88ff --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/aai/util/JettyObfuscationConversionCommandLineUtil.java @@ -0,0 +1,78 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.aai.util; + + +import org.apache.commons.cli.BasicParser; +import org.apache.commons.cli.CommandLine; +import org.apache.commons.cli.CommandLineParser; +import org.apache.commons.cli.Options; +import org.apache.commons.cli.ParseException; +import org.eclipse.jetty.util.security.Password; + + +public class JettyObfuscationConversionCommandLineUtil { + /** + * The main method. + * + * @param args the arguments + */ + public static void main(String[] args){ + Options options = new Options(); + options.addOption("e", true, "obfuscate the given string"); + options.addOption("d", true, "deobfuscate the given string"); + + CommandLineParser parser = new BasicParser(); + + try { + CommandLine cmd = parser.parse(options, args); + String toProcess = null; + + if (cmd.hasOption("e")){ + toProcess = cmd.getOptionValue("e"); + String encoded = Password.obfuscate(toProcess); + System.out.println(encoded); + } else if (cmd.hasOption("d")) { + toProcess = cmd.getOptionValue("d"); + String decoded_str = Password.deobfuscate(toProcess); + System.out.println(decoded_str); + } else { + usage(); + } + } catch (ParseException e) { + System.out.println("failed to parse input"); + System.out.println(e.toString()); + usage(); + } catch (Exception e) { + System.out.println("exception:" + e.toString()); + } + } + + /** + * Usage. + */ + private static void usage(){ + System.out.println("usage:");; + System.out.println("-e [string] to obfuscate"); + System.out.println("-d [string] to deobfuscate"); + System.out.println("-h help"); + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/asdc/AsdcCatalogException.java b/vid-app-common/src/main/java/org/onap/vid/asdc/AsdcCatalogException.java new file mode 100644 index 000000000..01883d50e --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/asdc/AsdcCatalogException.java @@ -0,0 +1,58 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.asdc; + +/** + * The Class AsdcCatalogException. + */ +public class AsdcCatalogException extends Exception { + + /** The Constant serialVersionUID. */ + private static final long serialVersionUID = 1L; + + /** + * Instantiates a new sdc catalog exception. + * + * @param msg the msg + */ + public AsdcCatalogException(String msg) { + super(msg); + } + + /** + * Instantiates a new sdc catalog exception. + * + * @param cause the cause + */ + public AsdcCatalogException(Throwable cause) { + super(cause); + } + + /** + * Instantiates a new sdc catalog exception. + * + * @param msg the msg + * @param t the t + */ + public AsdcCatalogException(String msg, Throwable t) { + super(msg, t); + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/asdc/AsdcClient.java b/vid-app-common/src/main/java/org/onap/vid/asdc/AsdcClient.java new file mode 100644 index 000000000..970ec954f --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/asdc/AsdcClient.java @@ -0,0 +1,129 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.asdc; + +import java.io.IOException; +import java.nio.file.Path; +import java.util.Collection; +import java.util.Map; +import java.util.UUID; + +import org.onap.vid.asdc.beans.Artifact; +import org.onap.vid.asdc.beans.Resource; +import org.onap.vid.asdc.beans.Service; + +/** + * The Interface AsdcClient. + */ +public interface AsdcClient { + + /** + * Gets the resource. + * + * @param uuid the uuid + * @return the resource + * @throws AsdcCatalogException the sdc catalog exception + */ + public Resource getResource(UUID uuid) throws AsdcCatalogException; + + /** + * Gets the resources. + * + * @return the resources + * @throws AsdcCatalogException the sdc catalog exception + */ + public Collection getResources() throws AsdcCatalogException; + + /** + * Gets the resources. + * + * @param filter the filter + * @return the resources + * @throws AsdcCatalogException the sdc catalog exception + */ + public Collection getResources(Map filter) throws AsdcCatalogException; + + /** + * Gets the resource artifact. + * + * @param resourceUuid the resource uuid + * @param artifactUuid the artifact uuid + * @return the resource artifact + * @throws AsdcCatalogException the sdc catalog exception + */ + public Artifact getResourceArtifact(UUID resourceUuid, UUID artifactUuid) throws AsdcCatalogException; + + /** + * Gets the resource tosca model. + * + * @param uuid the uuid + * @return the resource tosca model + * @throws AsdcCatalogException the sdc catalog exception + */ + public Path getResourceToscaModel(UUID uuid) throws AsdcCatalogException; + + /** + * Gets the service. + * + * @param uuid the uuid + * @return the service + * @throws AsdcCatalogException the sdc catalog exception + */ + public Service getService(UUID uuid) throws AsdcCatalogException; + + /** + * Gets the services. + * + * @return the services + * @throws AsdcCatalogException the sdc catalog exception + */ + public Collection getServices() throws AsdcCatalogException; + + /** + * Gets the services. + * + * @param filter the filter + * @return the services + * @throws AsdcCatalogException the asdc catalog exception + */ + public Collection getServices(Map filter) throws AsdcCatalogException; + + /** + * Gets the service artifact. + * + * @param serviceUuid the service uuid + * @param artifactUuid the artifact uuid + * @return the service artifact + * @throws AsdcCatalogException the asdc catalog exception + */ + public Artifact getServiceArtifact(UUID serviceUuid, UUID artifactUuid) throws AsdcCatalogException; + + /** + * Gets the service tosca model. + * + * @param uuid the uuid + * @return the service tosca model + * @throws AsdcCatalogException the asdc catalog exception + */ + public Path getServiceToscaModel(UUID uuid) throws AsdcCatalogException; + + //TODO: Collect TOSCA information from CSAR +} diff --git a/vid-app-common/src/main/java/org/onap/vid/asdc/beans/Artifact.java b/vid-app-common/src/main/java/org/onap/vid/asdc/beans/Artifact.java new file mode 100644 index 000000000..c7e093ffb --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/asdc/beans/Artifact.java @@ -0,0 +1,314 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.asdc.beans; + +import java.util.UUID; + +/** + * The Class Artifact. + */ +public class Artifact { + +/* + * SDC has widened this to a String type for 1610. + public enum Type { + HEAT, + HEAT_ENV, + HEAT_VOL, + HEAT_NET, + HEAT_NESTED, + HEAT_ARTIFACT, + YANG_XML, + VNF_CATALOG, + VF_LICENSE, + VENDOR_LICENSE, + ASSET_INVENTORY_PROFILE, + ASSET_QUERY_SPEC, + APPC_CONFIG, + VF_MODULES_METADATA, + DCAE_TOSCA, + DCAE_JSON, + DCAE_EMF, + DCAE_DOC, + DCAE_BLUEPRINT, + DCAE_EVENT, + DCAE_INVENTORY_TOSCA, + DCAE_INVENTORY_JSON, + DCAE_INVENTORY_EMF, + DCAE_INVENTORY_DOC, + DCAE_INVENTORY_BLUEPRINT, + DCAE_INVENTORY_EVENT, + OTHER, + AAI_SERVICE_MODEL //HEY! READ ME! YES, YOU! I AM A TEMPORARY FIX, PLEASE REMOVE ME BECAUSE I AM A FRAUD. I DON'T BELONG HERE. + //Warm Regards, + // *The* Artifact.Type.AAI_SERVICE_MODEL Constant + } + */ + + /** The artifact name. */ + private String artifactName; + + /** The artifact label. */ + private String artifactLabel; + + /** The artifact group type. */ + private String artifactGroupType; + + /** The artifact type. */ + private String artifactType; + + /** The artifact URL. */ + private String artifactURL; + + /** The artifact description. */ + private String artifactDescription; + + /** The artifact timeout. */ + private int artifactTimeout; + + /** The artifact checksum. */ + private String artifactChecksum; + + /** The artifact UUID. */ + private String artifactUUID; + + /** The artifact version. */ + private String artifactVersion; + + /** The generated from UUID. */ + private String generatedFromUUID; + + /** + * Gets the artifact name. + * + * @return the artifact name + */ + public String getArtifactName() { + return artifactName; + } + + /** + * Gets the artifact type. + * + * @return the artifact type + */ + public String getArtifactType() { + return artifactType; + } + /** + * Gets the artifact group type. + * + * @return the artifact group type + */ + public String getArtifactGroupType() { + return artifactGroupType; + } + + /** + * Gets the artifact label. + * + * @return the artifact label + */ + public String getArtifactLabel() { + return artifactLabel; + } + /** + * Gets the artifact URL. + * + * @return the artifact URL + */ + public String getArtifactURL() { + return artifactURL; + } + + /** + * Gets the artifact description. + * + * @return the artifact description + */ + public String getArtifactDescription() { + return artifactDescription; + } + + /** + * Gets the artifact timeout. + * + * @return the artifact timeout + */ + public int getArtifactTimeout() { + return artifactTimeout; + } + + /** + * Gets the artifact checksum. + * + * @return the artifact checksum + */ + public String getArtifactChecksum() { + return artifactChecksum; + } + + /** + * Gets the artifact UUID. + * + * @return the artifact UUID + */ + public String getArtifactUUID() { + return artifactUUID; + } + + /** + * Gets the artifact version. + * + * @return the artifact version + */ + public String getArtifactVersion() { + return artifactVersion; + } + + /** + * Gets the generated from UUID. + * + * @return the generated from UUID + */ + public String getGeneratedFromUUID() { + return generatedFromUUID; + } + + /** + * Sets the artifact name. + * + * @param artifactName the new artifact name + */ + public void setArtifactName(String artifactName) { + this.artifactName = artifactName; + } + + /** + * Sets the artifact type. + * + * @param artifactType the new artifact type + */ + public void setArtifactType(String artifactType) { + this.artifactType = artifactType; + } + /** + * Sets the artifact group type. + * + * @param artifactGroupType the new artifact group type + */ + public void setArtifactGroupType(String artifactGroupType) { + this.artifactGroupType = artifactGroupType; + } + /** + * Sets the artifact label. + * + * @param artifactGroupType the new artifact label + */ + public void setArtifactLabel(String artifactLabel) { + this.artifactLabel = artifactLabel; + } + /** + * Sets the artifact URL. + * + * @param artifactURL the new artifact URL + */ + public void setArtifactURL(String artifactURL) { + this.artifactURL = artifactURL; + } + + /** + * Sets the artifact description. + * + * @param artifactDescription the new artifact description + */ + public void setArtifactDescription(String artifactDescription) { + this.artifactDescription = artifactDescription; + } + + /** + * Sets the artifact timeout. + * + * @param artifactTimeout the new artifact timeout + */ + public void setArtifactTimeout(int artifactTimeout) { + this.artifactTimeout = artifactTimeout; + } + + /** + * Sets the artifact checksum. + * + * @param artifactChecksum the new artifact checksum + */ + public void setArtifactChecksum(String artifactChecksum) { + this.artifactChecksum = artifactChecksum; + } + + /** + * Sets the artifact UUID. + * + * @param artifactUUID the new artifact UUID + */ + public void setArtifactUUID(String artifactUUID) { + this.artifactUUID = artifactUUID; + } + + /** + * Sets the artifact version. + * + * @param artifactVersion the new artifact version + */ + public void setArtifactVersion(String artifactVersion) { + this.artifactVersion = artifactVersion; + } + + /** + * Sets the generated from UUID. + * + * @param generatedFromUUID the new generated from UUID + */ + public void setGeneratedFromUUID(String generatedFromUUID) { + this.generatedFromUUID = generatedFromUUID; + } + + /* (non-Javadoc) + * @see java.lang.Object#hashCode() + */ + @Override + public int hashCode() { + final UUID uuid = UUID.fromString(getArtifactUUID()); + + return uuid.hashCode(); + } + + /* (non-Javadoc) + * @see java.lang.Object#equals(java.lang.Object) + */ + @Override + public boolean equals(Object o) { + if (o == this) return true; + if (!(o instanceof Artifact)) return false; + + final Artifact artifact = (Artifact) o; + + return (artifact.getArtifactUUID().equals(getArtifactUUID())); + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/asdc/beans/Resource.java b/vid-app-common/src/main/java/org/onap/vid/asdc/beans/Resource.java new file mode 100644 index 000000000..6b5aa5320 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/asdc/beans/Resource.java @@ -0,0 +1,429 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.asdc.beans; + +import java.util.Collection; +import java.util.UUID; + +/** + * The Class Resource. + */ +public class Resource { + + /** + * The Enum Type. + */ + public enum Type { + + /** The vf. */ + VF, + + /** The vfc. */ + VFC, + + /** The cp. */ + CP, + + /** The vl. */ + VL, + + /** The vfcmt. */ + VFCMT + } + + /** + * The Enum LifecycleState. + */ + public enum LifecycleState { + + /** The not certified checkout. */ + NOT_CERTIFIED_CHECKOUT, + + /** The not certified checkin. */ + NOT_CERTIFIED_CHECKIN, + + /** The ready for certification. */ + READY_FOR_CERTIFICATION, + + /** The certification in progress. */ + CERTIFICATION_IN_PROGRESS, + + /** The certified. */ + CERTIFIED + } + + /** The uuid. */ + private String uuid; + + /** The invariant UUID. */ + private String invariantUUID; + + /** The name. */ + private String name; + + /** The description. */ + private String description; + + /** The version. */ + private String version; + + /** The tosca model URL. */ + private String toscaModelURL; + + /** The category. */ + private String category; + + /** The sub category. */ + private String subCategory; + + /** The resource type. */ + private Resource.Type resourceType; + + /** The lifecycle state. */ + private Resource.LifecycleState lifecycleState; + + /** The last updater user ID. */ + private String lastUpdaterUserId; + + /** The last updater full name. */ + private String lastUpdaterFullName; + + /** The tosca model. */ + private String toscaModel; + + /** The tosca resource name. */ + private String toscaResourceName; + + /** The artifacts. */ + private Collection artifacts; + + /** The resources. */ + private Collection resources; + + /** + * Gets the uuid. + * + * @return the uuid + */ + public String getUuid() { + return uuid; + } + + /** + * Gets the invariant UUID. + * + * @return the invariant UUID + */ + public String getInvariantUUID() { + return invariantUUID; + } + + /** + * Gets the name. + * + * @return the name + */ + public String getName() { + return name; + } + + /** + * Gets the description. + * + * @return the description + */ + public String getDescription() { + return description; + } + + /** + * Gets the version. + * + * @return the version + */ + public String getVersion() { + return version; + } + + /** + * Gets the tosca model URL. + * + * @return the tosca model URL + */ + public String getToscaModelURL() { + return toscaModelURL; + } + + /** + * Gets the category. + * + * @return the category + */ + public String getCategory() { + return category; + } + + /** + * Gets the sub category. + * + * @return the sub category + */ + public String getSubCategory() { + return subCategory; + } + + /** + * Gets the resource type. + * + * @return the resource type + */ + public Resource.Type getResourceType() { + return resourceType; + } + + /** + * Gets the lifecycle state. + * + * @return the lifecycle state + */ + public Resource.LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * Gets the last updater user ID. + * + * @return the last updater user ID + */ + public String getLastUpdaterUserId() { + return lastUpdaterUserId; + } + + /** + * Gets the last updater full name. + * + * @return the last updater full name + */ + public String getLastUpdaterFullName() { + return lastUpdaterFullName; + } + + /** + * Gets the tosca model. + * + * @return the tosca model + */ + public String getToscaModel() { + return toscaModel; + } + + /** + * Gets the tosca resource name. + * + * @return the tosca resource name + */ + public String getToscaResourceName() { + return toscaResourceName; + } + + /** + * Gets the artifacts. + * + * @return the artifacts + */ + public Collection getArtifacts() { + return artifacts; + } + + /** + * Gets the resources. + * + * @return the resources + */ + public Collection getResources() { + return resources; + } + + /** + * Sets the uuid. + * + * @param uuid the new uuid + */ + public void setUuid(String uuid) { + this.uuid = uuid; + } + + /** + * Sets the invariant UUID. + * + * @param invariantUUID the new invariant UUID + */ + public void setInvariantUUID(String invariantUUID) { + this.invariantUUID = invariantUUID; + } + + /** + * Sets the name. + * + * @param name the new name + */ + public void setName(String name) { + this.name = name; + } + /** + * Sets the description. + * + * @param name the new description + */ + public void setDescription(String description) { + this.description = description; + } + /** + * Sets the version. + * + * @param version the new version + */ + public void setVersion(String version) { + this.version = version; + } + + /** + * Sets the tosca model URL. + * + * @param toscaModelURL the new tosca model URL + */ + public void setToscaModelURL(String toscaModelURL) { + this.toscaModelURL = toscaModelURL; + } + + /** + * Sets the category. + * + * @param category the new category + */ + public void setCategory(String category) { + this.category = category; + } + + /** + * Sets the sub category. + * + * @param subCategory the new sub category + */ + public void setSubCategory(String subCategory) { + this.subCategory = subCategory; + } + + /** + * Sets the resource type. + * + * @param resourceType the new resource type + */ + public void setResourceType(Resource.Type resourceType) { + this.resourceType = resourceType; + } + + /** + * Sets the lifecycle state. + * + * @param lifecycleState the new lifecycle state + */ + public void setLifecycleState(Resource.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + } + + /** + * Sets the last updater user ID. + * + * @param lastUpdaterUserId the new last updater user ID + */ + public void setLastUpdaterUserId(String lastUpdaterUserId) { + this.lastUpdaterUserId = lastUpdaterUserId; + } + + /** + * Sets the last updater full name. + * + * @param lastUpdaterFullName the new last updater full name + */ + public void setLastUpdaterFullName(String lastUpdaterFullName) { + this.lastUpdaterFullName = lastUpdaterFullName; + } + + /** + * Sets the tosca model. + * + * @param toscaModel the new tosca model + */ + public void setToscaModel(String toscaModel) { + this.toscaModel = toscaModel; + } + + /** + * Sets the tosca resource name. + * + * @param toscaResourceName the new tosca resource name + */ + public void setToscaResourceName(String toscaResourceName) { + this.toscaResourceName = toscaResourceName; + } + + /** + * Sets the artifacts. + * + * @param artifacts the new artifacts + */ + public void setArtifacts(Collection artifacts) { + this.artifacts = artifacts; + } + + /** + * Sets the resources. + * + * @param resources the new resources + */ + public void setResources(Collection resources) { + this.resources = resources; + } + + /* (non-Javadoc) + * @see java.lang.Object#hashCode() + */ + @Override + public int hashCode() { + final UUID uuid = UUID.fromString(getUuid()); + + return uuid.hashCode(); + } + + /* (non-Javadoc) + * @see java.lang.Object#equals(java.lang.Object) + */ + @Override + public boolean equals(Object o) { + if (o == this) return true; + if (!(o instanceof Resource)) return false; + + final Resource resource = (Resource) o; + + return (resource.getUuid().equals(getUuid())); + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/asdc/beans/SecureService.java b/vid-app-common/src/main/java/org/onap/vid/asdc/beans/SecureService.java new file mode 100644 index 000000000..b81a43893 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/asdc/beans/SecureService.java @@ -0,0 +1,9 @@ +package org.onap.vid.asdc.beans; + +/** + * Created by Oren on 6/27/17. + */ +public class SecureService extends Service{ + + public boolean isPermmited = true; +} diff --git a/vid-app-common/src/main/java/org/onap/vid/asdc/beans/SecureServices.java b/vid-app-common/src/main/java/org/onap/vid/asdc/beans/SecureServices.java new file mode 100644 index 000000000..a6aa3de6f --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/asdc/beans/SecureServices.java @@ -0,0 +1,30 @@ +package org.onap.vid.asdc.beans; + +import java.util.Collection; +import java.util.List; + +/** + * Created by Oren on 6/27/17. + */ +public class SecureServices { + + private Collection services; + private boolean isReadOnly = true; + + public void setServices(Collection services) { + this.services = services; + } + + public Collection getServices() { + + return services; + } + public boolean isReadOnly() { + return isReadOnly; + } + + public void setReadOnly(boolean readOnly) { + isReadOnly = readOnly; + } + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/asdc/beans/Service.java b/vid-app-common/src/main/java/org/onap/vid/asdc/beans/Service.java new file mode 100644 index 000000000..5f59b89e8 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/asdc/beans/Service.java @@ -0,0 +1,354 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.asdc.beans; + +import java.util.Collection; +import java.util.UUID; +/** + * The Class Service. + */ +public class Service { + + /** + * The Enum DistributionStatus. + */ + public enum DistributionStatus { + + /** The distribution not approved. */ + DISTRIBUTION_NOT_APPROVED, + + /** The distribution approved. */ + DISTRIBUTION_APPROVED, + + /** The distributed. */ + DISTRIBUTED, + + /** The distribution rejected. */ + DISTRIBUTION_REJECTED, + + /** The destributed for tenant isolation. */ + DISTRIBUTION_COMPLETE_OK + } + + /** + * The Enum LifecycleState. + */ + public enum LifecycleState { + + /** The not certified checkout. */ + NOT_CERTIFIED_CHECKOUT, + + /** The not certified checkin. */ + NOT_CERTIFIED_CHECKIN, + + /** The ready for certification. */ + READY_FOR_CERTIFICATION, + + /** The certification in progress. */ + CERTIFICATION_IN_PROGRESS, + + /** The certified. */ + CERTIFIED + } + + /** The uuid. */ + private String uuid; + + /** The invariant UUID. */ + private String invariantUUID; + + /** The name. */ + private String name; + + /** The version. */ + private String version; + + /** The tosca model URL. */ + private String toscaModelURL; + + /** The category. */ + private String category; + + /** The lifecycle state. */ + private Service.LifecycleState lifecycleState; + + /** The last updater user uid. */ + private String lastUpdaterUserId; + + /** The last updater full name. */ + private String lastUpdaterFullName; + + /** The distribution status. */ + private Service.DistributionStatus distributionStatus; + + /** The artifacts. */ + private Collection artifacts; + + /** The resources. */ + private Collection resources; + + /** + * Gets the uuid. + * + * @return the uuid + */ + public String getUuid() { + return uuid; + } + + /** + * Gets the invariant UUID. + * + * @return the invariant UUID + */ + public String getInvariantUUID() { + return invariantUUID; + } + + /** + * Gets the name. + * + * @return the name + */ + public String getName() { + return name; + } + + /** + * Gets the version. + * + * @return the version + */ + public String getVersion() { + return version; + } + + /** + * Gets the tosca model URL. + * + * @return the tosca model URL + */ + public String getToscaModelURL() { + return toscaModelURL; + } + + /** + * Gets the category. + * + * @return the category + */ + public String getCategory() { + return category; + } + + /** + * Gets the lifecycle state. + * + * @return the lifecycle state + */ + public Service.LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * Gets the last updater user uid. + * + * @return the last updater user uid + */ + public String getLastUpdaterUserId() { + return lastUpdaterUserId; + } + + /** + * Gets the last updater full name. + * + * @return the last updater full name + */ + public String getLastUpdaterFullName() { + return lastUpdaterFullName; + } + + /** + * Gets the distribution status. + * + * @return the distribution status + */ + public Service.DistributionStatus getDistributionStatus() { + return distributionStatus; + } + + /** + * Gets the artifacts. + * + * @return the artifacts + */ + public Collection getArtifacts() { + return artifacts; + } + + /** + * Gets the resources. + * + * @return the resources + */ + public Collection getResources() { + return resources; + } + + /** + * Sets the uuid. + * + * @param uuid the new uuid + */ + public void setUuid(String uuid) { + this.uuid = uuid; + } + + /** + * Sets the invariant UUID. + * + * @param invariantUUID the new invariant UUID + */ + public void setInvariantUUID(String invariantUUID) { + this.invariantUUID = invariantUUID; + } + + /** + * Sets the name. + * + * @param name the new name + */ + public void setName(String name) { + this.name = name; + } + + /** + * Sets the version. + * + * @param version the new version + */ + public void setVersion(String version) { + this.version = version; + } + + /** + * Sets the tosca model URL. + * + * @param toscaModelURL the new tosca model URL + */ + public void setToscaModelURL(String toscaModelURL) { + this.toscaModelURL = toscaModelURL; + } + + /** + * Sets the category. + * + * @param category the new category + */ + public void setCategory(String category) { + this.category = category; + } + + /** + * Sets the lifecycle state. + * + * @param lifecycleState the new lifecycle state + */ + public void setLifecycleState(Service.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + } + + /** + * Sets the last updater user uid. + * + * @param lastUpdaterUserId the new last updater user uid + */ + public void set(String lastUpdaterUserId) { + this.lastUpdaterUserId = lastUpdaterUserId; + } + + /** + * Sets the last updater full name. + * + * @param lastUpdaterFullName the new last updater full name + */ + public void setLastUpdaterFullName(String lastUpdaterFullName) { + this.lastUpdaterFullName = lastUpdaterFullName; + } + + /** + * Sets the distribution status. + * + * @param distributionStatus the new distribution status + */ + public void setDistributionStatus(Service.DistributionStatus distributionStatus) { + this.distributionStatus = distributionStatus; + } + + /** + * Sets the artifacts. + * + * @param artifacts the new artifacts + */ + public void setArtifacts(Collection artifacts) { + this.artifacts = artifacts; + } + + /** + * Sets the resources. + * + * @param resources the new resources + */ + public void setResources(Collection resources) { + this.resources = resources; + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return uuid; + } + + /* (non-Javadoc) + * @see java.lang.Object#hashCode() + */ + @Override + public int hashCode() { + final UUID uuid = UUID.fromString(getUuid()); + + return uuid.hashCode(); + } + + /* (non-Javadoc) + * @see java.lang.Object#equals(java.lang.Object) + */ + @Override + public boolean equals(Object o) { + if (o == this) return true; + if (!(o instanceof Service)) return false; + + final Service service = (Service) o; + + return (service.getUuid().equals(getUuid())); + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/asdc/beans/SubResource.java b/vid-app-common/src/main/java/org/onap/vid/asdc/beans/SubResource.java new file mode 100644 index 000000000..5f7811d64 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/asdc/beans/SubResource.java @@ -0,0 +1,175 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.asdc.beans; + +import java.util.Collection; +/** + * The Class SubResource. + */ +public class SubResource { + + /** The resource instance name. */ + private String resourceInstanceName; + + /** The resource name. */ + private String resourceName; + + /** The resource invariant UUID. */ + private String resourceInvariantUUID; + + /** The resource version. */ + private String resourceVersion; + + /** The resource type. */ + private String resourceType; + + /** The resource UUID. */ + private String resourceUUID; + + /** The artifacts. */ + private Collection artifacts; + + /** + * Gets the resource instance name. + * + * @return the resource instance name + */ + public String getResourceInstanceName() { + return resourceInstanceName; + } + + /** + * Gets the resource name. + * + * @return the resource name + */ + public String getResourceName() { + return resourceName; + } + + /** + * Gets the resource invariant UUID. + * + * @return the resource invariant UUID + */ + public String getResourceInvariantUUID() { + return resourceInvariantUUID; + } + + /** + * Gets the resource version. + * + * @return the resource version + */ + public String getResourceVersion() { + return resourceVersion; + } + + /** + * Gets the resoucre type. + * + * @return the resoucre type + */ + public String getResoucreType() { + return resourceType; + } + + /** + * Gets the resource UUID. + * + * @return the resource UUID + */ + public String getResourceUUID() { + return resourceUUID; + } + + /** + * Gets the artifacts. + * + * @return the artifacts + */ + public Collection getArtifacts() { + return artifacts; + } + + /** + * Sets the resource instance name. + * + * @param resourceInstanceName the new resource instance name + */ + public void setResourceInstanceName(String resourceInstanceName) { + this.resourceInstanceName = resourceInstanceName; + } + + /** + * Sets the resource name. + * + * @param resourceName the new resource name + */ + public void setResourceName(String resourceName) { + this.resourceName = resourceName; + } + + /** + * Sets the resource invariant UUID. + * + * @param resourceInvariantUUID the new resource invariant UUID + */ + public void setResourceInvariantUUID(String resourceInvariantUUID) { + this.resourceInvariantUUID = resourceInvariantUUID; + } + + /** + * Sets the resource version. + * + * @param resourceVersion the new resource version + */ + public void setResourceVersion(String resourceVersion) { + this.resourceVersion = resourceVersion; + } + + /** + * Sets the resoucre type. + * + * @param resourceType the new resoucre type + */ + public void setResoucreType(String resourceType) { + this.resourceType = resourceType; + } + + /** + * Sets the resource UUID. + * + * @param resourceUUID the new resource UUID + */ + public void setResourceUUID(String resourceUUID) { + this.resourceUUID = resourceUUID; + } + + /** + * Sets the artifacts. + * + * @param artifacts the new artifacts + */ + public void setArtifacts(Collection artifacts) { + this.artifacts = artifacts; + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/Capability.java b/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/Capability.java new file mode 100644 index 000000000..7aa13435d --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/Capability.java @@ -0,0 +1,140 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.asdc.beans.tosca; + +import java.util.Collection; +import java.util.Map; + +/** + * The Class Capability. + */ +public class Capability { + + /** The type. */ + private String type; //FIXME: Make an enumeration? + + /** The description. */ + private String description; + + /** The occurrences. */ + private Collection occurrences; //FIXME: Make an enumeration? + + /** The properties. */ + private Map properties; + + /** The valid source types. */ + private Collection valid_source_types; //FIXME: Make an enumeration? + + /** + * Instantiates a new capability. + */ + public Capability() {} + + /** + * Gets the type. + * + * @return the type + */ + public String getType() { + return type; + } + + /** + * Gets the description. + * + * @return the description + */ + public String getDescription() { + return description; + } + + /** + * Gets the occurrences. + * + * @return the occurrences + */ + public Collection getOccurrences() { + return occurrences; + } + + /** + * Gets the properties. + * + * @return the properties + */ + public Map getProperties() { + return properties; + } + + /** + * Gets the valid source types. + * + * @return the valid source types + */ + public Collection getValid_source_types() { + return valid_source_types; + } + + /** + * Sets the type. + * + * @param type the new type + */ + public void setType(String type) { + this.type = type; + } + + /** + * Sets the description. + * + * @param description the new description + */ + public void setDescription(String description) { + this.description = description; + } + + /** + * Sets the occurrences. + * + * @param occurrences the new occurrences + */ + public void setOccurrences(Collection occurrences) { + this.occurrences = occurrences; + } + + /** + * Sets the properties. + * + * @param properties the properties + */ + public void setProperties(Map properties) { + this.properties = properties; + } + + /** + * Sets the valid source types. + * + * @param valid_source_types the new valid source types + */ + public void setValid_source_types(Collection valid_source_types) { + this.valid_source_types = valid_source_types; + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/Constraint.java b/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/Constraint.java new file mode 100644 index 000000000..118776cab --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/Constraint.java @@ -0,0 +1,199 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.asdc.beans.tosca; +import java.util.List; +import java.util.ArrayList; + +/** + * The Class Constraint. + */ + +public class Constraint { + private List valid_values; + private Object equal; + private Object greater_than; + private Object greater_or_equal; + private Object less_than; + private Object less_or_equal; + private List in_range; + private Object length; + private Object min_length; + private Object max_length; + + /** + * Instantiates a new Constraint. + */ + public Constraint() { + valid_values = new ArrayList(); + in_range = new ArrayList(); + } + + /** + * Gets the valid_values. + * + * @return the valid_values + */ + public List getvalid_values() { + return valid_values; + } + /** + * Gets equal. + * + * @return equal + */ + public Object getEqual() { + return equal; + } + /** + * Gets greater_than. + * + * @return greater_than + */ + public Object getGreater_than() { + return greater_than; + } + /** + * Gets greater_or_equal. + * + * @return greater_or_equal + */ + public Object getGreater_or_equal() { + return greater_or_equal; + } + /** + * Gets less_than. + * + * @return less_than + */ + public Object getLess_than() { + return less_than; + } + /** + * Gets less_or_equal. + * + * @return less_or_equal + */ + public Object getLess_or_equal() { + return less_or_equal; + } + /** + * Gets in_range. + * + * @return in_range + */ + public List getIn_range() { + return in_range; + } + /** + * Gets length. + * + * @return length + */ + public Object getLength() { + return length; + } + /** + * Gets min_length. + * + * @return min_length + */ + public Object getMin_length() { + return min_length; + } + /** + * Gets max_length. + * + * @return max_length + */ + public Object getMax_length() { + return max_length; + } + /** + * Sets the valid_values. + * + * @param op the new valid_values + */ + public void setvalid_values(List vlist) { + this.valid_values = vlist; + } + /** + * Sets equal. + * + * @param e the new equal + */ + public void setEqual(Object e) { + this.equal = e; + } + /** + * Sets greater_than. + * + * @param e the new greater_than + */ + public void setGreater_than(Object e) { + this.greater_than = e; + } + /** + * Sets less_than. + * + * @param e the new less_than + */ + public void setLess_than(Object e) { + this.less_than = e; + } + /** + * Sets in_range. + * + * @param e the new in_range + */ + public void setIn_range(List e) { + this.in_range = e; + } + /** + * Sets length. + * + * @param e the length + */ + public void setLength(Object e) { + this.length = e; + } + /** + * Sets min_length. + * + * @param e the min_length + */ + public void setMin_length(Object e) { + this.min_length = e; + } + /** + * Sets max_length. + * + * @param e the max_length + */ + public void setMax_length(Object e) { + this.max_length = e; + } + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "valid_values=" + valid_values; + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/Group.java b/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/Group.java new file mode 100644 index 000000000..2685b22b8 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/Group.java @@ -0,0 +1,135 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.asdc.beans.tosca; + +import java.util.Collection; +import java.util.Map; + +/** + * The Class Group. + */ +public class Group { + + /** The type. */ + private String type; + + /** The members. */ + private Collection members; + + /** The metadata. */ + private ToscaMetadata metadata; + + /** The vf module type. */ + private String vf_module_type; + + /** The properties. */ + private Map properties; + + /** + * Gets the metadata. + * + * @return the metadata + */ + public ToscaMetadata getMetadata() { + return metadata; + } + + /** + * Sets the metadata. + * + * @param metadata the new metadata + */ + public void setMetadata(ToscaMetadata metadata) { + this.metadata = metadata; + } + + /** + * Gets the members. + * + * @return the members + */ + public Collection getMembers() { + return members; + } + + /** + * Sets the members. + * + * @param members the new members + */ + public void setMembers(Collection members) { + this.members = members; + } + + /** + * Gets the type. + * + * @return the type + */ + public String getType() { + return type; + } + + /** + * Sets the type. + * + * @param type the new type + */ + public void setType(String type) { + this.type = type; + } + + /** + * Gets the vf module type. + * + * @return the vf module type + */ + public String getvf_module_type() { + return vf_module_type; + } + + /** + * Sets the vf module type. + * + * @param vf_module_type the new vf module type + */ + public void setvf_module_type(String vf_module_type) { + this.vf_module_type = vf_module_type; + } + + /** + * Gets the properties. + * + * @return the properties + */ + public Map getProperties() { + return properties; + } + + /** + * Sets the properties. + * + * @param properties the properties + */ + public void setProperties(Map properties) { + this.properties = properties; + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/Import.java b/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/Import.java new file mode 100644 index 000000000..dcd66e605 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/Import.java @@ -0,0 +1,48 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.asdc.beans.tosca; + +/** + * The Class Import. + */ +public class Import { + + /** The file. */ + private String file; + + /** + * Gets the file. + * + * @return the file + */ + public String getFile() { + return file; + } + + /** + * Sets the file. + * + * @param file the new file + */ + public void setFile(String file) { + this.file = file; + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/Input.java b/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/Input.java new file mode 100644 index 000000000..e485a65e2 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/Input.java @@ -0,0 +1,168 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.asdc.beans.tosca; + +import org.openecomp.sdc.toscaparser.api.elements.constraints.*; + +import java.util.List; +import java.util.ArrayList; + +// TODO: Auto-generated Javadoc +/** + * The Class Input. + */ +public class Input { + + /** The type. */ + private String type; + + /** The description. */ + private String description; + + /** The default. */ + private Object _default; + + /** The entry schema. */ + private Input entry_schema; + + /** The constraints */ + private List constraints; + + /** The required field. If not set, the default is true */ + private boolean required = true; + + /** + * Instantiates a new input. + */ + public Input() { + constraints = new ArrayList(); + } + + /** + * Gets the type. + * + * @return the type + */ + public String getType() { + return type; + } + + /** + * Sets the type. + * + * @param type the new type + */ + public void setType(String type) { + this.type = type; + } + /** + * Gets the required field. + * + * @return the required field + */ + public boolean getRequired() { + return required; + } + /** + * Sets the required value. + * + * @param required the new required value + */ + public void setRequired(boolean required) { + this.required = required; + } + /** + * Gets the description. + * + * @return the description + */ + public String getDescription() { + return description; + } + + /** + * Sets the description. + * + * @param description the new description + */ + public void setDescription(String description) { + this.description = description; + } + + /** + * Gets the default. + * + * @return the default + */ + public Object getDefault() { + return _default; + } + + /** + * Sets the default. + * + * @param _default the new default + */ + public void setDefault(Object _default) { + this._default = _default; + } + + /** + * Gets the entry schema. + * + * @return the entry schema + */ + public Input getentry_schema() { + return entry_schema; + } + /** + * Sets the entry schema. + * + * @param the entry schema + */ + public void setentry_schema(Input s) { + this.entry_schema = s; + } + /** + * Sets the constraints. + * + * @param c the new constraints + */ + public void setConstraints(List c) { + this.constraints = c; + } + /** + * Gets the constraints + * + * @return the constraints + */ + public List getConstraints() { + return constraints; + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "type=" + type + ",description=" + description + ",default=" + _default; + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/NodeTemplate.java b/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/NodeTemplate.java new file mode 100644 index 000000000..28210b2ec --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/NodeTemplate.java @@ -0,0 +1,117 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.asdc.beans.tosca; + +import java.util.Map; +import java.util.HashMap; + +/** + * The Class NodeTemplate. + */ +public class NodeTemplate { + + /** The type. */ + private String type; + + /** The metadata. */ + private ToscaMetadata metadata; + + /** The properties. */ + private Map properties; //HEAT? + + /** The requirements. */ + private Object requirements; + + public NodeTemplate () { + properties = new HashMap(); + } + /** + * Gets the type. + * + * @return the type + */ + public String getType() { + return type; + } + + /** + * Sets the type. + * + * @param type the new type + */ + public void setType(String type) { + this.type = type; + } + + /** + * Gets the metadata. + * + * @return the metadata + */ + public ToscaMetadata getMetadata() { + return metadata; + } + + /** + * Sets the metadata. + * + * @param metadata the new metadata + */ + public void setMetadata(ToscaMetadata metadata) { + this.metadata = metadata; + } + + /** + * Gets the properties. + * + * @return the properties + */ + public Map getProperties() { + return properties; + } + + /** + * Sets the properties. + * + * @param properties the properties + */ + public void setProperties(Map properties) { + this.properties = properties; + } + + /** + * Gets the requirements. + * + * @return the requirements + */ + public Object getRequirements() { + return requirements; + } + + /** + * Sets the requirements. + * + * @param requirements the new requirements + */ + public void setRequirements(Object requirements) { + this.requirements = requirements; + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/Property.java b/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/Property.java new file mode 100644 index 000000000..107f5c82f --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/Property.java @@ -0,0 +1,157 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.asdc.beans.tosca; + +/** + * The Class Property. + */ +public class Property { + + /** The type. */ + private String type; + + /** The description. */ + private String description; + + /** The entry schema. */ + private Schema entry_schema; + + /** The default. */ + private String _default; + + /** The required. */ + private boolean required; + + /** + * Instantiates a new property. + */ + private Property() {} + + /** + * Gets the type. + * + * @return the type + */ + public String getType() { + return type; + } + + /** + * Gets the description. + * + * @return the description + */ + public String getDescription() { + return description; + } + + /** + * Gets the entry schema. + * + * @return the entry schema + */ + public Schema getEntry_schema() { + return entry_schema; + } + + /** + * Gets the default. + * + * @return the default + */ + public String get_default() { + return _default; + } + + /** + * Sets the type. + * + * @param type the new type + */ + public void setType(String type) { + this.type = type; + } + + /** + * Sets the description. + * + * @param description the new description + */ + public void setDescription(String description) { + this.description = description; + } + + /** + * Sets the entry schema. + * + * @param entry_schema the new entry schema + */ + public void setEntry_schema(Schema entry_schema) { + this.entry_schema = entry_schema; + } + + /** + * Sets the default. + * + * @param _default the new default + */ + public void set_default(String _default) { + this._default = _default; + } + + /** + * Gets the default. + * + * @return the default + */ + public String getDefault() { + return _default; + } + + /** + * Checks if is required. + * + * @return true, if is required + */ + public boolean isRequired() { + return required; + } + + /** + * Sets the default. + * + * @param _default the new default + */ + public void setDefault(String _default) { + this._default = _default; + } + + /** + * Sets the required. + * + * @param required the new required + */ + public void setRequired(boolean required) { + this.required = required; + } + + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/Requirement.java b/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/Requirement.java new file mode 100644 index 000000000..0c2f88493 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/Requirement.java @@ -0,0 +1,120 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.asdc.beans.tosca; + +import java.util.Collection; + +/** + * The Class Requirement. + */ +public class Requirement { + + /** The occurrences. */ + private Collection occurrences; + + /** The capability. */ + private String capability; + + /** The node. */ + private String node; + + /** The relationship. */ + private String relationship; + + /** + * Instantiates a new requirement. + */ + private Requirement() {} + + /** + * Gets the occurrences. + * + * @return the occurrences + */ + public Collection getOccurrences() { + return occurrences; + } + + /** + * Gets the capability. + * + * @return the capability + */ + public String getCapability() { + return capability; + } + + /** + * Gets the node. + * + * @return the node + */ + public String getNode() { + return node; + } + + /** + * Gets the relationship. + * + * @return the relationship + */ + public String getRelationship() { + return relationship; + } + + /** + * Sets the occurrences. + * + * @param occurrences the new occurrences + */ + public void setOccurrences(Collection occurrences) { + this.occurrences = occurrences; + } + + /** + * Sets the capability. + * + * @param capability the new capability + */ + public void setCapability(String capability) { + this.capability = capability; + } + + /** + * Sets the node. + * + * @param node the new node + */ + public void setNode(String node) { + this.node = node; + } + + /** + * Sets the relationship. + * + * @param relationship the new relationship + */ + public void setRelationship(String relationship) { + this.relationship = relationship; + } + + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/Schema.java b/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/Schema.java new file mode 100644 index 000000000..7bf347708 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/Schema.java @@ -0,0 +1,53 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.asdc.beans.tosca; + +/** + * The Class Schema. + */ +public class Schema { + + /** The type. */ + public String type; + + /** + * Instantiates a new schema. + */ + public Schema() {} + + /** + * Gets the type. + * + * @return the type + */ + public String getType() { + return type; + } + + /** + * Sets the type. + * + * @param type the new type + */ + public void setType(String type) { + this.type = type; + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/SubstitutionMappings.java b/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/SubstitutionMappings.java new file mode 100644 index 000000000..70779c5f2 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/SubstitutionMappings.java @@ -0,0 +1,101 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.asdc.beans.tosca; + +import java.util.HashMap; +import java.util.Map; + +/** + * The Class SubstitutionMappings. + */ +public class SubstitutionMappings { + + /** The node type. */ + private String node_type; + + /** The capabilities. */ + private Map capabilities; + + /** The requirements. */ + private Map requirements; + + /** + * Instantiates a new substitution mappings. + */ + public SubstitutionMappings() { + capabilities = new HashMap (); + requirements = new HashMap (); + } + + /** + * Gets the node type. + * + * @return the node type + */ + public String getnode_type() { + return node_type; + } + + /** + * Sets the node type. + * + * @param node_type the new node type + */ + public void setnode_type(String node_type) { + this.node_type = node_type; + } + + /** + * Gets the capabilities. + * + * @return the capabilities + */ + public Map getCapabilities() { + return capabilities; + } + + /** + * Sets the capabilities. + * + * @param capabilities the capabilities + */ + public void setCapabilities(Map capabilities) { + this.capabilities = capabilities; + } + + /** + * Gets the requirements. + * + * @return the requirements + */ + public Map getRequirements() { + return requirements; + } + + /** + * Sets the requirements. + * + * @param requirements the requirements + */ + public void setRequirements(Map requirements) { + this.requirements = requirements; + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/TopologyTemplate.java b/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/TopologyTemplate.java new file mode 100644 index 000000000..70830715e --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/TopologyTemplate.java @@ -0,0 +1,124 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.asdc.beans.tosca; + +import java.util.HashMap; +import java.util.Map; + +/** + * The Class TopologyTemplate. + */ +public class TopologyTemplate { + + /** The substitution mappings. */ + private SubstitutionMappings substitution_mappings; + + /** The inputs. */ + private Map inputs; + + /** The node templates. */ + private Map node_templates; + + /** The groups. */ + private Map groups; + + /** + * Instantiates a new topology template. + */ + public TopologyTemplate() { + substitution_mappings = new SubstitutionMappings(); + inputs = new HashMap (); + node_templates = new HashMap (); + groups = new HashMap (); + } + + /** + * Gets the substitution mappings. + * + * @return the substitution mappings + */ + public SubstitutionMappings getsubstitution_mappings() { + return this.substitution_mappings; + } + + /** + * Sets the substitution mappings. + * + * @param substitution_mappings the new substitution mappings + */ + public void setsubstitution_mappings(SubstitutionMappings substitution_mappings) { + this.substitution_mappings = substitution_mappings; + } + + /** + * Gets the inputs. + * + * @return the inputs + */ + public Map getInputs() { + return inputs; + } + + /** + * Sets the inputs. + * + * @param inputs the inputs + */ + public void setInputs(Map inputs) { + this.inputs = inputs; + } + + /** + * Gets the node templates. + * + * @return the node templates + */ + public Map getnode_templates() { + return node_templates; + } + + /** + * Setnode templates. + * + * @param node_templates the node templates + */ + public void setnode_templates(Map node_templates) { + this.node_templates = node_templates; + } + + /** + * Gets the groups. + * + * @return the groups + */ + public Map getGroups() { + return groups; + } + + /** + * Sets the groups. + * + * @param groups the groups + */ + public void setGroups(Map groups) { + this.groups = groups; + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/ToscaCsar.java b/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/ToscaCsar.java new file mode 100644 index 000000000..678583573 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/ToscaCsar.java @@ -0,0 +1,101 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.asdc.beans.tosca; + +import java.util.Collection; +import java.util.LinkedList; + +/** + * The Class ToscaCsar. + */ +public class ToscaCsar { + + /** The parent. */ + private final ToscaModel parent; + + /** The children. */ + private final Collection children; + + /** + * The Class Builder. + */ + public static class Builder { + + /** The parent. */ + private final ToscaModel parent; + + /** The children. */ + private Collection children = new LinkedList (); + + /** + * Instantiates a new builder. + * + * @param parent the parent + */ + public Builder(ToscaModel parent) { + this.parent = parent; + } + + /** + * Adds the vnf. + * + * @param child the child + * @return the builder + */ + public Builder addVnf(ToscaModel child) { + children.add(child); + return this; + } + + /** + * Builds the. + * + * @return the tosca csar + */ + public ToscaCsar build() { + return new ToscaCsar(this); + } + } + + /** + * Instantiates a new tosca csar. + * + * @param builder the builder + */ + public ToscaCsar(Builder builder) { + this.parent = builder.parent; + this.children = builder.children; + } + + /** + * Gets the parent. + * + * @return the parent + */ + public ToscaModel getParent() { return parent; } + + /** + * Gets the children. + * + * @return the children + */ + public Collection getChildren() { return children; } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/ToscaMeta.java b/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/ToscaMeta.java new file mode 100644 index 000000000..a7a6c6296 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/ToscaMeta.java @@ -0,0 +1,124 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.asdc.beans.tosca; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.util.HashMap; +import java.util.Map; + +import org.onap.vid.asdc.AsdcCatalogException; + +/** + * The Class ToscaMeta. + */ +public class ToscaMeta { + + /** The metadata. */ + private final Map metadata; + + /** + * Instantiates a new tosca meta. + * + * @param builder the builder + * @throws IOException Signals that an I/O exception has occurred. + * @throws AsdcCatalogException the asdc catalog exception + */ + private ToscaMeta(Builder builder) throws IOException, AsdcCatalogException { + metadata = new HashMap (); + + read(builder.inputStream); + } + + /** + * The Class Builder. + */ + public static class Builder { + + /** The input stream. */ + private final InputStream inputStream; + + /** + * Instantiates a new builder. + * + * @param inputStream the input stream + */ + public Builder(InputStream inputStream) { + this.inputStream = inputStream; + } + + /** + * Builds the. + * + * @return the tosca meta + * @throws IOException Signals that an I/O exception has occurred. + * @throws AsdcCatalogException the asdc catalog exception + */ + public ToscaMeta build() throws IOException, AsdcCatalogException { + return new ToscaMeta(this); + } + } + + /** + * Gets the. + * + * @param property the property + * @return the string + */ + public String get(String property) { + return metadata.get(property); + } + + /** + * Read. + * + * @param inputStream the input stream + * @throws IOException Signals that an I/O exception has occurred. + * @throws AsdcCatalogException the asdc catalog exception + */ + private void read(InputStream inputStream) throws IOException, AsdcCatalogException { + + final BufferedReader br = new BufferedReader(new InputStreamReader(inputStream)); + + String line; + + try { + while ((line = br.readLine()) != null) { + if ( line.length() > 0 ) { + final String[] entry = line.split(":"); + + if (entry.length != 2) throw new AsdcCatalogException("TOSCA.meta file cannot be parsed (more than 1 colon found on a single line"); + if (!entry[1].startsWith(" ")) throw new AsdcCatalogException("TOSCA.meta file cannot be parsed (: not immediately followed by ' ')"); + + metadata.put(entry[0], entry[1].substring(1)); + } + } + } catch (IOException e) { + metadata.clear(); + throw e; + } catch (AsdcCatalogException e) { + metadata.clear(); + throw e; + } + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/ToscaMetadata.java b/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/ToscaMetadata.java new file mode 100644 index 000000000..32e9fbac6 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/ToscaMetadata.java @@ -0,0 +1,461 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.asdc.beans.tosca; + +/** + * The Class ToscaMetadata. + */ +public class ToscaMetadata { + + /** The template name. */ + private String template_name; + + /** The invariant UUID. */ + private String invariantUUID; + + /** The customization UUID. */ + private String customizationUUID; + + /** The uuid. */ + private String uuid; + + /** The version. */ + private String version; + + /** The name. */ + private String name; + + /** The description. */ + private String description; + + /** The category. */ + private String category; + + /** The subcategory. */ + private String subcategory; + + /** The type. */ + private String type; + + /** The resource vendor. */ + private String resourceVendor; + + /** The resource vendor release. */ + private String resourceVendorRelease; + + /** The service ecomp naming. */ + private String serviceEcompNaming; + + /** The ecomp generated naming - duplicate for serviceEcompNaming */ + private boolean ecompGeneratedNaming; + + /** The naming policy */ + private String namingPolicy; + + /** The service homing. */ + private boolean serviceHoming; + + /** The vf module model name. */ + //ToscaMetadata for VF Modules + private String vfModuleModelName; + + /** The vf module model invariant UUID. */ + private String vfModuleModelInvariantUUID; + + /** The vf module model customization UUID. */ + private String vfModuleModelCustomizationUUID; + + /** The vf module model UUID. */ + private String vfModuleModelUUID; + + /** The vf module model version. */ + private String vfModuleModelVersion; + + /** + * Instantiates a new tosca metadata. + */ + public ToscaMetadata() {} + + /** + * Gets the type. + * + * @return the type + */ + public String getType() { + return type; + } + + /** + * Gets the invariant UUID. + * + * @return the invariant UUID + */ + public String getInvariantUUID() { + return invariantUUID; + } + /** + * Gets the customization UUID. + * + * @return the customization UUID + */ + public String getCustomizationUUID() { + return customizationUUID; + } + /** + * Gets the uuid. + * + * @return the uuid + */ + public String getUUID() { + return uuid; + } + + /** + * Gets the version. + * + * @return the version + */ + public String getVersion() { + return version; + } + + /** + * Gets the name. + * + * @return the name + */ + public String getName() { + return name; + } + + /** + * Gets the description. + * + * @return the description + */ + public String getDescription() { + return description; + } + + /** + * Gets the category. + * + * @return the category + */ + public String getCategory() { + return category; + } + + /** + * Gets the subcategory. + * + * @return the subcategory + */ + public String getSubcategory() { + return subcategory; + } + + /** + * Gets the resource vendor. + * + * @return the resource vendor + */ + public String getResourceVendor() { + return resourceVendor; + } + + /** + * Gets the resource vendor release. + * + * @return the resource vendor release + */ + public String getResourceVendorRelease() { + return resourceVendorRelease; + } + + /** + * Returns the value of service ecomp naming. + * + * @return serviceEcompNaming + */ + public String getServiceEcompNaming() { + return serviceEcompNaming; + } + /** + * Returns the value of the naming policy. + * + * @return namingPolicy + */ + public String getNamingPolicy() { + return namingPolicy; + } + /** + * Checks if is service homing. + * + * @return true, if is service homing + */ + public boolean isServiceHoming() { + return serviceHoming; + } + /** + * Checks if is ecomp generated naming. + * + * @return true, if ecomp generated naming is true + */ + public boolean isEcompGeneratedNaming() { + return ecompGeneratedNaming; + } + /** + * Sets the type. + * + * @param type the new type + */ + public void setType(String type) { + this.type = type; + } + + /** + * Sets the invariant UUID. + * + * @param invariantUUID the new invariant UUID + */ + public void setInvariantUUID(String invariantUUID) { + this.invariantUUID = invariantUUID; + } + /** + * Sets the naming policy. + * + * @param namingPolicy the new naming policy + */ + public void setNamingPolicy(String namingPolicy) { + this.namingPolicy = namingPolicy; + } + /** + * Sets the uuid. + * + * @param uuid the new uuid + */ + public void setUUID(String uuid) { + this.uuid = uuid; + } + /** + * Sets the customization uuid. + * + * @param u the new customization uuid + */ + public void setCustomizationUUID(String u) { + this.customizationUUID = u; + } + /** + * Sets the version. + * + * @param version the new version + */ + public void setVersion(String version) { + this.version = version; + } + + /** + * Sets the name. + * + * @param name the new name + */ + public void setName(String name) { + this.name = name; + } + + /** + * Sets the description. + * + * @param description the new description + */ + public void setDescription(String description) { + this.description = description; + } + + /** + * Sets the category. + * + * @param category the new category + */ + public void setCategory(String category) { + this.category = category; + } + + /** + * Sets the service ecomp naming. + * + * @param serviceEcompNaming the new service ecomp naming + */ + public void setServiceEcompNaming(String serviceEcompNaming) { + this.serviceEcompNaming = serviceEcompNaming; + } + + /** + * Sets the service homing. + * + * @param serviceHoming the new service homing + */ + public void setServiceHoming(boolean serviceHoming) { + this.serviceHoming = serviceHoming; + } + /** + * Sets the ecomp generated naming. + * + * @param ecompGeneratedNaming the new ecomp generated naming + */ + public void setEcompGeneratedNaming(boolean ecompGeneratedNaming) { + this.ecompGeneratedNaming = ecompGeneratedNaming; + } + /** + * Gets the template name. + * + * @return the template name + */ + public String gettemplate_name() { + return template_name; + } + + /** + * Sets the template name. + * + * @param template_name the new template name + */ + public void settemplate_name(String template_name) { + this.template_name = template_name; + } + + /** + * Sets the subcategory. + * + * @param subcategory the new subcategory + */ + public void setSubcategory(String subcategory) { + this.subcategory = subcategory; + } + + /** + * Sets the resource vendor. + * + * @param resourceVendor the new resource vendor + */ + public void setResourceVendor(String resourceVendor) { + this.resourceVendor = resourceVendor; + } + + /** + * Sets the resource vendor release. + * + * @param resourceVendorRelease the new resource vendor release + */ + public void setResourceVendorRelease(String resourceVendorRelease) { + this.resourceVendorRelease = resourceVendorRelease; + } + + /** + * Gets the vf module model name. + * + * @return the vf module model name + */ + public String getVfModuleModelName() { + return vfModuleModelName; + } + + /** + * Sets the vf module model name. + * + * @param vfModuleModelName the new vf module model name + */ + public void setVfModuleModelName(String vfModuleModelName) { + this.vfModuleModelName = vfModuleModelName; + } + + /** + * Gets the vf module model invariant UUID. + * + * @return the vf module model invariant UUID + */ + public String getVfModuleModelInvariantUUID() { + return vfModuleModelInvariantUUID; + } + + /** + * Sets the vf module model invariant UUID. + * + * @param vfModuleModelInvariantUUID the new vf module model invariant UUID + */ + public void setVfModuleModelInvariantUUID(String vfModuleModelInvariantUUID) { + this.vfModuleModelInvariantUUID = vfModuleModelInvariantUUID; + } + + /** + * Gets the vf module model UUID. + * + * @return the vf module model UUID + */ + public String getVfModuleModelUUID() { + return vfModuleModelUUID; + } + + /** + * Sets the vf module model UUID. + * + * @param vfModuleModelUUID the new vf module model UUID + */ + public void setVfModuleModelUUID(String vfModuleModelUUID) { + this.vfModuleModelUUID = vfModuleModelUUID; + } + + /** + * Gets the vf module model version. + * + * @return the vf module model version + */ + public String getVfModuleModelVersion() { + return vfModuleModelVersion; + } + + /** + * Sets the vf module model version. + * + * @param vfModuleModelVersion the new vf module model version + */ + public void setVfModuleModelVersion(String vfModuleModelVersion) { + this.vfModuleModelVersion = vfModuleModelVersion; + } + /** + * Sets the vf module customization uuid. + * + * @param u the new vf module model customization uuid + */ + public void setVfModuleModelCustomizationUUID(String u) { + this.vfModuleModelCustomizationUUID = u; + } + /** + * Gets the vf module model customization uuid. + * + * @return the vf module model customization uuid + */ + public String getVfModuleModelCustomizationUUID() { + + return vfModuleModelCustomizationUUID; + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/ToscaModel.java b/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/ToscaModel.java new file mode 100644 index 000000000..972d366cf --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/ToscaModel.java @@ -0,0 +1,166 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.asdc.beans.tosca; + +import java.util.Collection; +import java.util.LinkedList; +import java.util.Map; + +/** + * The Class ToscaModel. + */ +public class ToscaModel { + + /** The tosca definitions version. */ + private String tosca_definitions_version; + + /** The description. */ + private String description; + + /** The metadata. */ + private ToscaMetadata metadata; + + /** The topology template. */ + private TopologyTemplate topology_template; + + /** The imports. */ + private Collection>> imports; + + /** The node types. */ + private Map node_types; + + /** + * Instantiates a new tosca model. + */ + public ToscaModel() { + metadata = new ToscaMetadata(); + topology_template = new TopologyTemplate(); + imports = new LinkedList>> (); + } + + /** + * Gets the metadata. + * + * @return the metadata + */ + public ToscaMetadata getMetadata() { + return metadata; + } + + /** + * Sets the metadata. + * + * @param metadata the new metadata + */ + public void setMetadata(ToscaMetadata metadata) { + this.metadata = metadata; + } + + /** + * Gets the tosca definitions version. + * + * @return the tosca definitions version + */ + public String gettosca_definitions_version() { + return tosca_definitions_version; + } + + /** + * Sets the tosca definitions version. + * + * @param tosca_definitions_version the new tosca definitions version + */ + public void settosca_definitions_version(String tosca_definitions_version) { + this.tosca_definitions_version = tosca_definitions_version; + } + + /** + * Gets the topology template. + * + * @return the topology template + */ + public TopologyTemplate gettopology_template() { + return topology_template; + } + + /** + * Sets the topology template. + * + * @param topology_template the new topology template + */ + public void settopology_template(TopologyTemplate topology_template) { + this.topology_template = topology_template; + } + + /** + * Gets the description. + * + * @return the description + */ + public String getDescription() { + return description; + } + + /** + * Sets the description. + * + * @param description the new description + */ + public void setDescription(String description) { + this.description = description; + } + + /** + * Gets the imports. + * + * @return the imports + */ + public Collection>> getImports() { + return imports; + } + + /** + * Sets the imports. + * + * @param imports the imports + */ + public void setImports(Collection>> imports) { + this.imports = imports; + } + + /** + * Gets the node types. + * + * @return the node types + */ + public Map getnode_types() { + return node_types; + } + + /** + * Setnode types. + * + * @param node_types the node types + */ + public void setnode_types(Map node_types) { + this.node_types = node_types; + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/asdc/local/LocalAsdcClient.java b/vid-app-common/src/main/java/org/onap/vid/asdc/local/LocalAsdcClient.java new file mode 100644 index 000000000..3c04e5ce8 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/asdc/local/LocalAsdcClient.java @@ -0,0 +1,394 @@ +package org.onap.vid.asdc.local; + +import org.codehaus.jackson.JsonParseException; +import org.codehaus.jackson.map.JsonMappingException; +import org.codehaus.jackson.map.ObjectMapper; +import org.json.JSONArray; +import org.json.JSONObject; +import org.onap.vid.asdc.AsdcCatalogException; +import org.onap.vid.asdc.AsdcClient; +import org.onap.vid.asdc.beans.Artifact; +import org.onap.vid.asdc.beans.Resource; +import org.onap.vid.asdc.beans.Service; +import org.onap.vid.asdc.beans.tosca.ToscaCsar; +import org.onap.vid.asdc.beans.tosca.ToscaMeta; +import org.onap.vid.asdc.beans.tosca.ToscaModel; +import org.yaml.snakeyaml.Yaml; + +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.StandardCopyOption; +import java.util.Collection; +import java.util.LinkedList; +import java.util.Map; +import java.util.UUID; +import java.util.zip.ZipFile; + +/** + * The Class LocalAsdcClient. + */ +public class LocalAsdcClient implements AsdcClient { + + + /** + * The catalog. + */ + private final JSONObject catalog; + + /** + * The mapper. + */ + private final ObjectMapper mapper; + + /** + * Instantiates a new in local sdc client. + * + * @param builder the builder + */ + public LocalAsdcClient(org.onap.vid.asdc.local.LocalAsdcClient.Builder builder) { + catalog = builder.catalog; + mapper = builder.mapper; + } + + /** + * Gets the catalog. + * + * @return the catalog + */ + private JSONObject getCatalog() { + return catalog; + } + + /** + * Gets the mapper. + * + * @return the mapper + */ + private ObjectMapper getMapper() { + return mapper; + } + + /** + * Convert. + * + * @param the generic type + * @param json the json + * @param clazz the clazz + * @return the t + * @throws AsdcCatalogException the sdc catalog exception + */ + private T convert(JSONObject json, Class clazz) throws AsdcCatalogException { + try { + return getMapper().readValue(json.toString(), clazz); + } catch (JsonParseException e) { + throw new AsdcCatalogException("Failed to parse SDC response (bad data)", e); + } catch (JsonMappingException e) { + throw new AsdcCatalogException("Failed to map SDC response to internal VID data structure(s)", e); + } catch (IOException e) { + throw new AsdcCatalogException("Failed to get a response from SDC", e); + } + } + + /* (non-Javadoc) + * @see org.openecomp.vid.asdc.AsdcClient#getResource(java.util.UUID) + */ + public Resource getResource(UUID uuid) throws AsdcCatalogException { + final JSONObject resource = getCatalog().getJSONObject("resources") + .getJSONObject(uuid.toString()); + return convert(resource, Resource.class); + } + + /* (non-Javadoc) + * @see org.openecomp.vid.asdc.AsdcClient#getResources() + */ + public Collection getResources() throws AsdcCatalogException { + final Collection resources = new LinkedList(); + + for (String key : getCatalog().getJSONObject("resources").keySet()) { + final JSONObject json = getCatalog().getJSONObject("resources").getJSONObject(key); + final Resource resource = convert(json, Resource.class); + resources.add(resource); + } + + return resources; + } + + /* (non-Javadoc) + * @see org.openecomp.vid.asdc.AsdcClient#getResources(java.util.Map) + */ + public Collection getResources(Map filter) throws AsdcCatalogException { + final Collection resources = new LinkedList(); + + for (String key : getCatalog().getJSONObject("resources").keySet()) { + final JSONObject json = getCatalog().getJSONObject("resources").getJSONObject(key); + + boolean filterMatch = true; + + for (Map.Entry entry : filter.entrySet()) { + for (int i = 0; i < entry.getValue().length; i++) { + if (!json.getString(entry.getKey()).equals(entry.getValue()[i])) { + filterMatch = false; + break; + } + } + } + + if (filterMatch) resources.add(convert(json, Resource.class)); + } + + return resources; + } + + /* (non-Javadoc) + * @see org.openecomp.vid.asdc.AsdcClient#getService(java.util.UUID) + */ + public Service getService(UUID uuid) throws AsdcCatalogException { + + JSONObject serviceJsonObject = null; + final JSONArray categoryJsonArray = getCatalog().getJSONArray("services"); + + for (int i = 0; i < categoryJsonArray.length(); i++) { + JSONObject jsonServiceObject = categoryJsonArray.getJSONObject(i); + if (jsonServiceObject.get("uuid").equals(uuid.toString())) { + serviceJsonObject = jsonServiceObject; + break; + } + } + + if (serviceJsonObject != null) + return convert(serviceJsonObject, Service.class); + else return null; + } + + /* (non-Javadoc) + * @see org.openecomp.vid.asdc.AsdcClient#getServices() + */ + public Collection getServices() throws AsdcCatalogException { + final Collection services = new LinkedList(); + + JSONArray servicesArr = getCatalog().getJSONArray("services"); + + for (Object objService : servicesArr) { + JSONObject jsonServiceItem = (JSONObject) objService; + final Service service = convert(jsonServiceItem, Service.class); + services.add(service); + } + + return services; + } + + /* (non-Javadoc) + * @see org.openecompt.vid.asdc.AsdcClient#getServices(java.util.Map) + */ + public Collection getServices(Map filter) throws AsdcCatalogException { + final Collection services = new LinkedList(); + + JSONArray catalogServices = catalog.getJSONArray("services"); + + for (int i = 0; i < catalogServices.length(); i++) { + + JSONObject serviceJson = catalogServices.getJSONObject(i); + + boolean filterMatch = true; + + for (Map.Entry entry : filter.entrySet()) { + for (int j = 0; j < entry.getValue().length; j++) { + if (!serviceJson.getString(entry.getKey()).equals(entry.getValue()[j])) { + filterMatch = false; + break; + } + } + } + if (filterMatch) services.add(convert(serviceJson, Service.class)); + } + return services; + } + + /* (non-Javadoc) + * @see org.openecomp.vid.asdc.AsdcClient#getResourceArtifact(java.util.UUID, java.util.UUID) + */ + public Artifact getResourceArtifact(UUID resourceUuid, UUID artifactUuid) throws AsdcCatalogException { + final JSONArray artifacts = getCatalog().getJSONObject("resources") + .getJSONObject(resourceUuid.toString()) + .getJSONArray("artifacts"); + + for (int i = 0; i < artifacts.length(); i++) { + final JSONObject artifact = artifacts.getJSONObject(i); + + if (artifact.getString("artifactUUID").equals(artifactUuid.toString())) { + return convert(artifact, Artifact.class); + } + } + + return null; + } + + /* (non-Javadoc) + * @see org.openecomp.vid.asdc.AsdcClient#getServiceArtifact(java.util.UUID, java.util.UUID) + */ + public Artifact getServiceArtifact(UUID serviceUuid, UUID artifactUuid) throws AsdcCatalogException { + final JSONArray artifacts = getCatalog().getJSONObject("services") + .getJSONObject(serviceUuid.toString()) + .getJSONArray("artifacts"); + + for (int i = 0; i < artifacts.length(); i++) { + final JSONObject artifact = artifacts.getJSONObject(i); + + if (artifact.getString("artifactUUID").equals(artifactUuid.toString())) { + return convert(artifact, Artifact.class); + } + } + + return null; + } + + /* (non-Javadoc) + * @see org.openecomp.vid.asdc.AsdcClient#getResourceToscaModel(java.util.UUID) + */ + public Path getResourceToscaModel(UUID resourceUuid) throws AsdcCatalogException { + final String toscaModelURL = getCatalog().getJSONObject("resources") + .getJSONObject(resourceUuid.toString()) + .getString("toscaModelURL"); + + + final InputStream toscaModelStream = getClass().getClassLoader().getResourceAsStream(toscaModelURL); + + if (toscaModelStream == null) return null; + + return null;//getToscaModel(toscaModelStream); + } + + /* (non-Javadoc) + * @see org.openecomp.vid.asdc.AsdcClient#getServiceToscaModel(java.util.UUID) + */ + public Path getServiceToscaModel(UUID serviceUuid) throws AsdcCatalogException { + + String toscaModelURL = null; + + final JSONArray categoryJsonArray = getCatalog().getJSONArray("services"); + + for (int i = 0; i < categoryJsonArray.length(); i++) { + + JSONObject jsonServiceObject = categoryJsonArray.getJSONObject(i); + if (jsonServiceObject.get("uuid").equals(serviceUuid.toString())) { + toscaModelURL = jsonServiceObject.getString("toscaModelURL"); + break; + } + } + if (toscaModelURL == null) { + return null; + } + final InputStream toscaModelStream = getClass().getClassLoader().getResourceAsStream(toscaModelURL); + + ClassLoader classLoader = getClass().getClassLoader(); + File file = new File(classLoader.getResource(toscaModelURL).getFile()); + Path path = Paths.get(file.getPath()); + + if (toscaModelStream == null) return null; + + return path; + } + + /** + * Gets the tosca model. + * + * @param csarInputStream the csar input stream + * @return the tosca model + * @throws AsdcCatalogException the asdc catalog exception + */ + private ToscaCsar getToscaModel(InputStream csarInputStream) throws AsdcCatalogException { + final Path csarFile; + + try { + csarFile = Files.createTempFile("csar", ".zip"); + Files.copy(csarInputStream, csarFile, StandardCopyOption.REPLACE_EXISTING); + } catch (IOException e) { + throw new AsdcCatalogException("Caught IOException while creating CSAR", e); + } + + try (final ZipFile csar = new ZipFile(csarFile.toFile())) { + + final InputStream toscaMetaStream = csar.getInputStream(csar.getEntry("TOSCA-Metadata/TOSCA.meta")); + final ToscaMeta toscaMeta = new ToscaMeta.Builder(toscaMetaStream).build(); + final String entryDefinitions = toscaMeta.get("Entry-Definitions"); + final InputStream toscaParentEntryYamlStream = csar.getInputStream(csar.getEntry(entryDefinitions)); + + final Yaml yaml = new Yaml(); + final ToscaModel parentModel = yaml.loadAs(toscaParentEntryYamlStream, ToscaModel.class); + + final ToscaCsar.Builder csarBuilder = new ToscaCsar.Builder(parentModel); + + for (Map> imports : parentModel.getImports()) { + for (Map.Entry> entry : imports.entrySet()) { + final InputStream toscaChildEntryYamlStream = csar.getInputStream(csar.getEntry("Definitions/" + entry.getValue().get("file"))); + final ToscaModel childModel = yaml.loadAs(toscaChildEntryYamlStream, ToscaModel.class); + csarBuilder.addVnf(childModel); + } + } + + return csarBuilder.build(); + } catch (IOException e) { + throw new AsdcCatalogException("Caught IOException while processing CSAR", e); + } + } + + /** + * The Class Builder. + */ + public static class Builder { + + /** + * The catalog. + */ + private JSONObject catalog = new JSONObject() + .put("resources", new JSONObject()) + .put("services", new JSONObject()); + + /** + * The mapper. + */ + private ObjectMapper mapper = new ObjectMapper(); + + /** + * Instantiates a new builder. + */ + public Builder() { + } + + /** + * Catalog. + * + * @param catalog the catalog + * @return the builder + */ + public org.onap.vid.asdc.local.LocalAsdcClient.Builder catalog(JSONObject catalog) { + this.catalog = catalog; + return this; + } + + /** + * Mapper. + * + * @param mapper the mapper + * @return the builder + */ + public org.onap.vid.asdc.local.LocalAsdcClient.Builder mapper(ObjectMapper mapper) { + this.mapper = mapper; + return this; + } + + /** + * Builds the. + * + * @return the in local sdc client + */ + public org.onap.vid.asdc.local.LocalAsdcClient build() { + return new org.onap.vid.asdc.local.LocalAsdcClient(this); + } + } + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/asdc/memory/InMemoryAsdcClient.java b/vid-app-common/src/main/java/org/onap/vid/asdc/memory/InMemoryAsdcClient.java new file mode 100644 index 000000000..a7b934e99 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/asdc/memory/InMemoryAsdcClient.java @@ -0,0 +1,372 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.asdc.memory; + +import java.io.IOException; +import java.io.InputStream; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.StandardCopyOption; +import java.util.Collection; +import java.util.LinkedList; +import java.util.Map; +import java.util.Map.Entry; +import java.util.UUID; +import java.util.zip.ZipFile; + +import org.codehaus.jackson.JsonParseException; +import org.codehaus.jackson.map.JsonMappingException; +import org.codehaus.jackson.map.ObjectMapper; +import org.json.JSONArray; +import org.json.JSONObject; +import org.yaml.snakeyaml.Yaml; + +import org.onap.vid.asdc.AsdcCatalogException; +import org.onap.vid.asdc.AsdcClient; +import org.onap.vid.asdc.beans.Artifact; +import org.onap.vid.asdc.beans.Resource; +import org.onap.vid.asdc.beans.Service; +import org.onap.vid.asdc.beans.tosca.ToscaCsar; +import org.onap.vid.asdc.beans.tosca.ToscaMeta; +import org.onap.vid.asdc.beans.tosca.ToscaModel; + +/** + * The Class InMemoryAsdcClient. + */ +public class InMemoryAsdcClient implements AsdcClient { + + /** The catalog. */ + private final JSONObject catalog; + + /** The mapper. */ + private final ObjectMapper mapper; + + /** + * The Class Builder. + */ + public static class Builder { + + /** The catalog. */ + private JSONObject catalog = new JSONObject() + .put("resources", new JSONObject()) + .put("services", new JSONObject()); + + /** The mapper. */ + private ObjectMapper mapper = new ObjectMapper(); + + /** + * Instantiates a new builder. + */ + public Builder() {} + + /** + * Catalog. + * + * @param catalog the catalog + * @return the builder + */ + public Builder catalog(JSONObject catalog) { + this.catalog = catalog; + return this; + } + + /** + * Mapper. + * + * @param mapper the mapper + * @return the builder + */ + public Builder mapper(ObjectMapper mapper) { + this.mapper = mapper; + return this; + } + + /** + * Builds the. + * + * @return the in memory sdc client + */ + public InMemoryAsdcClient build() { + return new InMemoryAsdcClient(this); + } + } + + /** + * Instantiates a new in memory sdc client. + * + * @param builder the builder + */ + private InMemoryAsdcClient(Builder builder) { + catalog = builder.catalog; + mapper = builder.mapper; + } + + /** + * Gets the catalog. + * + * @return the catalog + */ + private JSONObject getCatalog() { + return catalog; + } + + /** + * Gets the mapper. + * + * @return the mapper + */ + private ObjectMapper getMapper() { + return mapper; + } + + /** + * Convert. + * + * @param the generic type + * @param json the json + * @param clazz the clazz + * @return the t + * @throws AsdcCatalogException the sdc catalog exception + */ + private T convert(JSONObject json, Class clazz) throws AsdcCatalogException { + try { + return getMapper().readValue(json.toString(), clazz); + } catch (JsonParseException e) { + throw new AsdcCatalogException("Failed to parse SDC response (bad data)", e); + } catch (JsonMappingException e) { + throw new AsdcCatalogException("Failed to map SDC response to internal VID data structure(s)", e); + } catch (IOException e) { + throw new AsdcCatalogException("Failed to get a response from SDC", e); + } + } + + /* (non-Javadoc) + * @see org.openecomp.vid.asdc.AsdcClient#getResource(java.util.UUID) + */ + public Resource getResource(UUID uuid) throws AsdcCatalogException { + final JSONObject resource = getCatalog().getJSONObject("resources") + .getJSONObject(uuid.toString()); + return convert(resource, Resource.class); + } + + /* (non-Javadoc) + */ + public Collection getResources() throws AsdcCatalogException { + final Collection resources = new LinkedList (); + + for (String key : getCatalog().getJSONObject("resources").keySet()) { + final JSONObject json = getCatalog().getJSONObject("resources").getJSONObject(key); + final Resource resource = convert(json, Resource.class); + resources.add(resource); + } + + return resources; + } + + /* (non-Javadoc) + * @see org.openecomp.vid.asdc.AsdcClient#getResources(java.util.Map) + */ + public Collection getResources(Map filter) throws AsdcCatalogException { + final Collection resources = new LinkedList (); + + for (String key : getCatalog().getJSONObject("resources").keySet()) { + final JSONObject json = getCatalog().getJSONObject("resources").getJSONObject(key); + + boolean filterMatch = true; + + for (Entry entry : filter.entrySet()) { + for (int i = 0; i < entry.getValue().length; i++) { + if (!json.getString(entry.getKey()).equals(entry.getValue()[i])) { + filterMatch = false; + break; + } + } + } + + if (filterMatch) resources.add(convert(json, Resource.class)); + } + + return resources; + } + + /* (non-Javadoc) + * @see org.openecomp.vid.asdc.AsdcClient#getService(java.util.UUID) + */ + public Service getService(UUID uuid) throws AsdcCatalogException { + final JSONObject service = getCatalog().getJSONObject("services") + .getJSONObject(uuid.toString()); + return convert(service, Service.class); + } + + /* (non-Javadoc) + * @see org.openecomp.vid.asdc.AsdcClient#getServices() + */ + public Collection getServices() throws AsdcCatalogException { + final Collection services = new LinkedList (); + + for (String key : getCatalog().getJSONObject("services").keySet()) { + final JSONObject json = getCatalog().getJSONObject("services").getJSONObject(key); + final Service service = convert(json, Service.class); + services.add(service); + } + + return services; + } + + /* (non-Javadoc) + * @see org.openecompt.vid.asdc.AsdcClient#getServices(java.util.Map) + */ + public Collection getServices(Map filter) throws AsdcCatalogException { + final Collection services = new LinkedList (); + + for (String key : getCatalog().getJSONObject("services").keySet()) { + final JSONObject json = getCatalog().getJSONObject("services").getJSONObject(key); + + boolean filterMatch = true; + + for (Entry entry : filter.entrySet()) { + for (int i = 0; i < entry.getValue().length; i++) { + if (!json.getString(entry.getKey()).equals(entry.getValue()[i])) { + filterMatch = false; + break; + } + } + } + + if (filterMatch) services.add(convert(json, Service.class)); + } + + return services; + } + + /* (non-Javadoc) + * @see org.openecomp.vid.asdc.AsdcClient#getResourceArtifact(java.util.UUID, java.util.UUID) + */ + public Artifact getResourceArtifact(UUID resourceUuid, UUID artifactUuid) throws AsdcCatalogException { + final JSONArray artifacts = getCatalog().getJSONObject("resources") + .getJSONObject(resourceUuid.toString()) + .getJSONArray("artifacts"); + + for (int i = 0; i < artifacts.length(); i++) { + final JSONObject artifact = artifacts.getJSONObject(i); + + if (artifact.getString("artifactUUID").equals(artifactUuid.toString())) { + return convert(artifact, Artifact.class); + } + } + + return null; + } + + /* (non-Javadoc) + * @see org.openecomp.vid.asdc.AsdcClient#getServiceArtifact(java.util.UUID, java.util.UUID) + */ + public Artifact getServiceArtifact(UUID serviceUuid, UUID artifactUuid) throws AsdcCatalogException { + final JSONArray artifacts = getCatalog().getJSONObject("services") + .getJSONObject(serviceUuid.toString()) + .getJSONArray("artifacts"); + + for (int i = 0; i < artifacts.length(); i++) { + final JSONObject artifact = artifacts.getJSONObject(i); + + if (artifact.getString("artifactUUID").equals(artifactUuid.toString())) { + return convert(artifact, Artifact.class); + } + } + + return null; + } + + /* (non-Javadoc) + * @see org.openecomp.vid.asdc.AsdcClient#getResourceToscaModel(java.util.UUID) + */ + public Path getResourceToscaModel(UUID resourceUuid) throws AsdcCatalogException { + final String toscaModelURL = getCatalog().getJSONObject("resources") + .getJSONObject(resourceUuid.toString()) + .getString("toscaModelURL"); + + + final InputStream toscaModelStream = getClass().getClassLoader().getResourceAsStream(toscaModelURL); + + if (toscaModelStream == null) return null; + + return null;//getToscaModel(toscaModelStream); + } + + /* (non-Javadoc) + * @see org.openecomp.vid.asdc.AsdcClient#getServiceToscaModel(java.util.UUID) + */ + public Path getServiceToscaModel(UUID serviceUuid) throws AsdcCatalogException { + final String toscaModelURL = getCatalog().getJSONObject("services") + .getJSONObject(serviceUuid.toString()) + .getString("toscaModelURL"); + + final InputStream toscaModelStream = getClass().getClassLoader().getResourceAsStream(toscaModelURL); + + if (toscaModelStream == null) return null; + + return null;//getToscaModel(toscaModelStream); + } + + /** + * Gets the tosca model. + * + * @param csarInputStream the csar input stream + * @return the tosca model + * @throws AsdcCatalogException the asdc catalog exception + */ + private ToscaCsar getToscaModel(InputStream csarInputStream) throws AsdcCatalogException { + final Path csarFile; + + try { + csarFile = Files.createTempFile("csar", ".zip"); + Files.copy(csarInputStream, csarFile, StandardCopyOption.REPLACE_EXISTING); + } catch (IOException e) { + throw new AsdcCatalogException("Caught IOException while creating CSAR", e); + } + + try (final ZipFile csar = new ZipFile(csarFile.toFile())) { + + final InputStream toscaMetaStream = csar.getInputStream(csar.getEntry("TOSCA-Metadata/TOSCA.meta")); + final ToscaMeta toscaMeta = new ToscaMeta.Builder(toscaMetaStream).build(); + final String entryDefinitions = toscaMeta.get("Entry-Definitions"); + final InputStream toscaParentEntryYamlStream = csar.getInputStream(csar.getEntry(entryDefinitions)); + + final Yaml yaml = new Yaml(); + final ToscaModel parentModel = yaml.loadAs(toscaParentEntryYamlStream, ToscaModel.class); + + final ToscaCsar.Builder csarBuilder = new ToscaCsar.Builder(parentModel); + + for (Map> imports : parentModel.getImports()) { + for (Entry> entry : imports.entrySet()) { + final InputStream toscaChildEntryYamlStream = csar.getInputStream(csar.getEntry("Definitions/" + entry.getValue().get("file"))); + final ToscaModel childModel = yaml.loadAs(toscaChildEntryYamlStream, ToscaModel.class); + csarBuilder.addVnf(childModel); + } + } + + return csarBuilder.build(); + } catch (IOException e) { + throw new AsdcCatalogException("Caught IOException while processing CSAR", e); + } + } + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/asdc/parser/ToscaParser.java b/vid-app-common/src/main/java/org/onap/vid/asdc/parser/ToscaParser.java new file mode 100644 index 000000000..890752afe --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/asdc/parser/ToscaParser.java @@ -0,0 +1,15 @@ +package org.onap.vid.asdc.parser; + +import java.nio.file.Path; + +import org.openecomp.sdc.tosca.parser.exceptions.SdcToscaParserException; +import org.onap.vid.asdc.AsdcCatalogException; +import org.onap.vid.asdc.beans.tosca.ToscaCsar; +import org.onap.vid.asdc.beans.Service; +import org.onap.vid.model.ServiceModel; + +public interface ToscaParser{ + ToscaCsar parse(Path path) throws AsdcCatalogException; + + ServiceModel makeServiceModel(String uuid,Path path,Service asdcServiceMetadata) throws Exception; +} \ No newline at end of file diff --git a/vid-app-common/src/main/java/org/onap/vid/asdc/parser/ToscaParserImpl.java b/vid-app-common/src/main/java/org/onap/vid/asdc/parser/ToscaParserImpl.java new file mode 100644 index 000000000..12881b64f --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/asdc/parser/ToscaParserImpl.java @@ -0,0 +1,226 @@ +package org.onap.vid.asdc.parser; + +import java.io.IOException; +import java.io.InputStream; +import java.nio.file.Path; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; +import java.util.Set; +import java.util.UUID; +import java.util.Map.Entry; +import java.util.zip.ZipFile; + +import org.apache.commons.lang3.mutable.MutableBoolean; +import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.openecomp.sdc.tosca.parser.exceptions.SdcToscaParserException; +import org.onap.vid.asdc.AsdcCatalogException; +import org.onap.vid.asdc.beans.Service; +import org.onap.vid.asdc.beans.tosca.NodeTemplate; +import org.onap.vid.asdc.beans.tosca.ToscaCsar; +import org.onap.vid.asdc.beans.tosca.ToscaMeta; +import org.onap.vid.asdc.beans.tosca.ToscaModel; +import org.onap.vid.model.ModelConstants; +import org.onap.vid.model.Network; +import org.onap.vid.model.Node; +import org.onap.vid.model.ServiceModel; +import org.onap.vid.model.VNF; +import org.onap.vid.properties.VidProperties; +import org.springframework.beans.factory.annotation.Autowired; +import org.yaml.snakeyaml.Yaml; +import org.yaml.snakeyaml.error.YAMLException; + +public class ToscaParserImpl implements ToscaParser { + /** The Constant LOG. */ + static final EELFLoggerDelegate LOG = EELFLoggerDelegate.getLogger(ToscaParserImpl.class); + + @Autowired + private final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); + + + private static final String asdcModelNamespace = VidProperties.getAsdcModelNamespace(); + private static final String vnfTag = asdcModelNamespace + ModelConstants.VNF; + private static final String networkTag = asdcModelNamespace + ModelConstants.NETWORK; + private static final String vfModuleTag = asdcModelNamespace + ModelConstants.VF_MODULE; + + + @Override + public ToscaCsar parse(Path path) throws AsdcCatalogException { + return getToscaCsar(path); + } + + private ToscaCsar getToscaCsar(final Path csarFile) throws AsdcCatalogException { + try (final ZipFile csar = new ZipFile(csarFile.toFile())) { + + final InputStream toscaMetaStream = csar.getInputStream(csar.getEntry("TOSCA-Metadata/TOSCA.meta")); + final ToscaMeta toscaMeta = new ToscaMeta.Builder(toscaMetaStream).build(); + final String entryDefinitions = toscaMeta.get("Entry-Definitions"); + final InputStream toscaParentEntryYamlStream = csar.getInputStream(csar.getEntry(entryDefinitions)); + + try { + final Yaml yaml = new Yaml(); + final ToscaModel parentModel = yaml.loadAs(toscaParentEntryYamlStream, ToscaModel.class); + + final ToscaCsar.Builder csarBuilder = new ToscaCsar.Builder(parentModel); + + for (Map> imports : parentModel.getImports()) { + LOG.debug("imports = " + imports.toString()); + for (Entry> entry : imports.entrySet()) { + if (entry.getValue() != null) { + String fname = entry.getValue().get("file"); + if ((fname != null) && (fname.startsWith("service") || fname.startsWith("resource"))) { + LOG.debug("fname = " + fname); + final InputStream toscaChildEntryYamlStream = csar + .getInputStream(csar.getEntry("Definitions/" + fname)); + + final ToscaModel childModel = yaml.loadAs(toscaChildEntryYamlStream, ToscaModel.class); + csarBuilder.addVnf(childModel); + } + } + } + } + + return csarBuilder.build(); + } catch (YAMLException e) { + throw new AsdcCatalogException("Caught exception while processing TOSCA YAML", e); + } + } catch (IOException e) { + throw new AsdcCatalogException("Caught IOException while processing CSAR", e); + } + } + + public ServiceModel makeServiceModel(String uuid, final Path serviceCsar,Service service ) throws AsdcCatalogException, SdcToscaParserException { + + + final ServiceModel serviceModel = new ServiceModel(); + ToscaCsar toscaCsar = getToscaCsar(serviceCsar); + String methodName = "getServices"; + LOG.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + methodName + " start"); + MutableBoolean isNewFlow = new MutableBoolean(false); + final Map vnfs = new HashMap(); + final Map networks = new HashMap(); + final ToscaModel asdcServiceToscaModel = toscaCsar.getParent(); + serviceModel.setService(ServiceModel.extractService(asdcServiceToscaModel, service)); + + + populateVnfsAndNetwork(methodName, isNewFlow, vnfs, networks, asdcServiceToscaModel, serviceModel); + + // If we see customization uuid under vnf or network, follow 1702 flow + if (isNewFlow.getValue()) { + return (getCustomizedServices(asdcServiceToscaModel, serviceModel)); + } else { + VNF vnf = null; + for (ToscaModel vnfModel : toscaCsar.getChildren()) { + // using uuid to match should only be valid for 1610 models + final String vnfUuid = (vnfModel.getMetadata().getUUID()); + // find the VNF with that uuid, uuid is not the key anymore + vnf = findVNFAccordingToUUID(vnfs, vnfUuid); + if (vnf == null) { + LOG.warn("Couldn't find VNF object " + vnfUuid + ". Problem with Tosca model?"); + continue; + } + extractAndUpdateInputs(vnf, vnfModel); + ServiceModel.extractGroups(vnfModel, serviceModel); + } + + serviceModel.setVnfs(vnfs); + serviceModel.setNetworks(networks); + return serviceModel; + } + } + + private VNF findVNFAccordingToUUID(final Map vnfs, final String vnfUuid) { + VNF vnf = null; + for (Entry vnfComp : vnfs.entrySet()) { + if (((vnfComp.getValue().getUuid()).equalsIgnoreCase(vnfUuid))) { + // found the vnf + vnf = vnfComp.getValue(); + } + } + return vnf; + } + + private void extractAndUpdateInputs(VNF vnf, ToscaModel vnfModel) { + vnf.setInputs(vnfModel.gettopology_template().getInputs()); + } + + private static void populateVnfsAndNetwork(String methodName, MutableBoolean isNewFlow, final Map vnfs, + final Map networks, final ToscaModel asdcServiceToscaModel, ServiceModel serviceModel) + throws AsdcCatalogException, SdcToscaParserException { + for (Entry component : extractNodeTemplates(asdcServiceToscaModel)) { + final String modelCustomizationName = component.getKey(); + LOG.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + methodName + + " model customization name: " + modelCustomizationName); + final NodeTemplate nodeTemplate = component.getValue(); + final String type = nodeTemplate.getType(); + + if (type.startsWith(vnfTag)) { + LOG.debug(EELFLoggerDelegate.debugLogger, + dateFormat.format(new Date()) + methodName + " found node template type: " + type); + final VNF vnf = new VNF(); + vnf.extractVnf(modelCustomizationName, nodeTemplate); +// populateNodeVersionIfMissing(nodeTemplate, vnf,service); + LOG.debug(EELFLoggerDelegate.debugLogger, + dateFormat.format(new Date()) + methodName + " VNF commands: " + vnf.getCommands()); + vnfs.put(modelCustomizationName, vnf); + isNewFlow.setValue(isNewFlow(vnf)); + } + // Networks + if (type.startsWith(networkTag)) { + LOG.debug(EELFLoggerDelegate.debugLogger, + dateFormat.format(new Date()) + methodName + " found node template type: " + type); + final Network network = new Network(); + network.extractNetwork(modelCustomizationName, nodeTemplate); +// populateNodeVersionIfMissing(nodeTemplate, network, service); + isNewFlow.setValue(isNewFlow(network)); + networks.put(modelCustomizationName, network); + + } + } + serviceModel.setVnfs(vnfs); + serviceModel.setNetworks(networks); + + } + + private static Set> extractNodeTemplates(final ToscaModel asdcServiceToscaModel) { + return asdcServiceToscaModel.gettopology_template().getnode_templates().entrySet(); + } + + private static boolean isNewFlow(Node node) { + return (node.getCustomizationUuid() != null) && (node.getCustomizationUuid().length() > 0); + } + + private static boolean isNodeVersionMissing(Node Node) { + return Node.getVersion() == null; + } + + private static void populateNodeVersionIfMissing(final NodeTemplate nodeTemplate, final Node node, Service service) + throws AsdcCatalogException { + if (isNodeVersionMissing(node)) { + node.setVersion(service.getVersion()); + } + } + + private ServiceModel getCustomizedServices(ToscaModel asdcServiceToscaModel, ServiceModel serviceModel) { + String methodName = "asdcServiceToscaModel"; + LOG.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + methodName + " start"); + + // asdcServiceToscaModel should have vf modules and vol groups populated + // at this point but + // they are not associated with the VNFs + ServiceModel.extractGroups(asdcServiceToscaModel,serviceModel); + // Now put the vf modules and volume groups under the VNF they belong + // too + serviceModel.associateGroups(); + return (serviceModel); + } + + + private UUID extractUUIDFromNodeTemplate(final NodeTemplate nodeTemplate) { + return UUID.fromString(nodeTemplate.getMetadata().getUUID()); + } + + +} \ No newline at end of file diff --git a/vid-app-common/src/main/java/org/onap/vid/asdc/parser/ToscaParserImpl2.java b/vid-app-common/src/main/java/org/onap/vid/asdc/parser/ToscaParserImpl2.java new file mode 100644 index 000000000..4a5ab3af3 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/asdc/parser/ToscaParserImpl2.java @@ -0,0 +1,354 @@ +package org.onap.vid.asdc.parser; + +import org.onap.vid.asdc.beans.Service; +import org.onap.vid.model.*; +import org.openecomp.sdc.tosca.parser.api.ISdcCsarHelper; +import org.openecomp.sdc.tosca.parser.exceptions.SdcToscaParserException; +import org.openecomp.sdc.tosca.parser.impl.FilterType; +import org.openecomp.sdc.tosca.parser.impl.SdcToscaParserFactory; +import org.openecomp.sdc.tosca.parser.impl.SdcTypes; +import org.openecomp.sdc.toscaparser.api.*; +import org.openecomp.sdc.toscaparser.api.parameters.Input; + +import java.nio.file.Path; +import java.util.*; +import java.util.stream.Collectors; + +import static java.util.stream.Collectors.toMap; + +public class ToscaParserImpl2 { + + + public class Constants { + public final static String uuid = "UUID"; + public final static String description = "description"; + public final static String serviceType = "serviceType"; + public final static String serviceRole = "serviceRole"; + public final static String ecompGeneratedNaming = "ecompGeneratedNaming"; + + public final static String customizationUUID = "customizationUUID"; + public final static String vfModuleModelVersion = "vfModuleModelVersion"; + public final static String vfModuleModelCustomizationUUID = "vfModuleModelCustomizationUUID"; + public final static String volume_group = "volume_group"; + public final static String vfModuleModelInvariantUUID = "vfModuleModelInvariantUUID"; + public final static String vfModuleModelUUID = "vfModuleModelUUID"; + public final static String invariantUUID = "invariantUUID"; + public final static String version = "version"; + public final static String name = "name"; + public final static String category = "category"; + public final static String vfModuleModelName = "vfModuleModelName"; + public final static String getInput = "get_input"; + + public final static String instantiationType = "instantiationType"; + //Instantiation Types + public final static String both = "Both"; + public final static String macro = "Macro"; + public final static String aLaCarte = "A-La-Carte"; + public final static String clientConfig = "ClientConfig"; + + + } + + public ToscaParserImpl2() { + + } + + public ServiceModel makeServiceModel(Path path, Service asdcServiceMetadata) throws Exception { + ServiceModel serviceModel = new ServiceModel(); + SdcToscaParserFactory factory = SdcToscaParserFactory.getInstance(); + ISdcCsarHelper sdcCsarHelper = factory.getSdcCsarHelper(path.toFile().getAbsolutePath(),false); + serviceModel.setService(extractServiceFromCsar(asdcServiceMetadata, sdcCsarHelper)); + + serviceModel.setVolumeGroups(extractVolumeGroups(sdcCsarHelper)); + serviceModel.setVfModules(extractVfModuleFromCsar(sdcCsarHelper)); + serviceModel.setVnfs(extractVnfsFromCsar(serviceModel,sdcCsarHelper)); + serviceModel.setConfigurations(extractPortMirroringConfigFromCsar(sdcCsarHelper)); + serviceModel.setServiceProxies(extractServiceProxyFromCsar(sdcCsarHelper)); + serviceModel.setNetworks(extractNetworksFromCsar(sdcCsarHelper)); + serviceModel.setPnfs(extractPnfsFromCsar(sdcCsarHelper)); + return serviceModel; + } + + private org.onap.vid.model.Service extractServiceFromCsar(Service asdcServiceMetadata, ISdcCsarHelper csarHelper) throws SdcToscaParserException { + org.onap.vid.model.Service service = new org.onap.vid.model.Service(); + + service.setName(csarHelper.getServiceMetadata().getValue(Constants.name)); + service.setCategory(csarHelper.getServiceMetadata().getValue(Constants.category)); + service.setInvariantUuid(csarHelper.getServiceMetadata().getValue(Constants.invariantUUID)); + service.setUuid(csarHelper.getServiceMetadata().getValue(Constants.uuid)); + service.setVersion(asdcServiceMetadata.getVersion()); + service.setDescription(csarHelper.getServiceMetadata().getValue(Constants.description)); + service.setInputs(inputsListToInputsMap(csarHelper.getServiceInputs())); + service.setServiceEcompNaming(csarHelper.getServiceMetadata().getValue(Constants.ecompGeneratedNaming)); + service.setServiceType(csarHelper.getServiceMetadata().getValue(Constants.serviceType)); + service.setServiceRole(csarHelper.getServiceMetadata().getValue(Constants.serviceRole)); + service.setInstantiationType(validateInstantiationType(csarHelper)); + return service; + } + + + private Map extractVnfsFromCsar(ServiceModel serviceModel,ISdcCsarHelper csarHelper) { + List nodeTemplates = csarHelper.getServiceVfList(); + Map vnfsMaps = new HashMap(); + + for (NodeTemplate nodeTemplate : nodeTemplates) { + VNF vnf = new VNF(); + populateNodeFromNodeTemplate(nodeTemplate, csarHelper, vnf); + + vnf.setModelCustomizationName(nodeTemplate.getName()); + Map vfModuleHashMap = getVfModulesFromVF(csarHelper, vnf.getCustomizationUuid()); + vnf.setVfModules(vfModuleHashMap); + + Map volumeGroupMap = getVolumeGroupsFromVF(csarHelper, vnf.getCustomizationUuid()); + vnf.setVolumeGroups(volumeGroupMap); + + vnfsMaps.put(nodeTemplate.getName(), vnf); + } + return vnfsMaps; + } + + private Map extractPortMirroringConfigFromCsar(ISdcCsarHelper csarHelper) { + List nodeTemplates = csarHelper.getServiceNodeTemplateBySdcType(SdcTypes.CONFIGURATION); + Map configMaps = new HashMap<>(); + + for (NodeTemplate nodeTemplate : nodeTemplates) { + PortMirroringConfig pmConfig = new PortMirroringConfig(); + populateNodeFromNodeTemplate(nodeTemplate, csarHelper, pmConfig); + + pmConfig.setModelCustomizationName(nodeTemplate.getName()); + pmConfig.setRequirementAssignments(nodeTemplate.getRequirements()); + setSourceAndCollectorProxyNodes(csarHelper, pmConfig, nodeTemplate); + + configMaps.put(nodeTemplate.getName(), pmConfig); + } + + return configMaps; + } + + private Map extractServiceProxyFromCsar(ISdcCsarHelper csarHelper) { + List nodeTemplates = csarHelper.getServiceNodeTemplateBySdcType(SdcTypes.SERVICE_PROXY); + Map serviceProxies = new HashMap<>(); + for (NodeTemplate nodeTemplate: nodeTemplates) { + ServiceProxy serviceProxy = new ServiceProxy(); + populateNodeFromNodeTemplate(nodeTemplate, csarHelper, serviceProxy); + + Map metadata = nodeTemplate.getMetaData().getAllProperties(); + serviceProxy.setSourceModelUuid(metadata.get("sourceModelUuid")); + serviceProxy.setSourceModelInvariant(metadata.get("sourceModelInvariant")); + serviceProxy.setSourceModelName(metadata.get("sourceModelName")); + + serviceProxies.put(nodeTemplate.getName(), serviceProxy); + } + + return serviceProxies; + } + + private void setSourceAndCollectorProxyNodes(ISdcCsarHelper csarHelper, PortMirroringConfig portMirroringConfig, NodeTemplate nodeTemplate) { + RequirementAssignments requirementAssignments = nodeTemplate.getRequirements(); + + List sourceNodes = getRequirementsNodesNames(requirementAssignments.getRequirementsByName("source").getAll()); + portMirroringConfig.setSourceNodes(sourceNodes); + + List collectorNodes = getRequirementsNodesNames(requirementAssignments.getRequirementsByName("collector").getAll()); + if (!collectorNodes.isEmpty()) { // vprobe + portMirroringConfig.setCollectorNodes(collectorNodes); + } else { // pprobe - configuration by policy + String collectorNodeName = csarHelper.getNodeTemplatePropertyLeafValue(nodeTemplate, "collector_node"); + if (collectorNodeName != null) { + portMirroringConfig.setCollectorNodes(Arrays.asList(collectorNodeName)); + portMirroringConfig.setConfigurationByPolicy(true); + } + } + } + + private List getRequirementsNodesNames(List requirements) { + + List requirementsNodes = new ArrayList<>(); + if (requirements != null && requirements.size() > 0) { + requirementsNodes = requirements.stream().map(RequirementAssignment::getNodeTemplateName).collect(Collectors.toList()); + } + + return requirementsNodes; + } + + Map getVfModulesFromVF(ISdcCsarHelper csarHelper, String vfUuid) { + List vfModulesByVf = csarHelper.getVfModulesByVf(vfUuid); + return vfModulesByVf.stream() + .collect(toMap(Group::getName, this::populateVfModuleFromGroup)); + } + + Map getVolumeGroupsFromVF(ISdcCsarHelper csarHelper, String vfCustomizationUuid) { + List vfModulesByVf = csarHelper.getVfModulesByVf(vfCustomizationUuid); + return vfModulesByVf.stream() + .filter((group -> isVolumeGroup(group))) + .collect(toMap(Group::getName, this::populateVolumeGroupFromGroup)); + } + + private static Boolean isVolumeGroup(Group group) { + return Boolean.valueOf(group.getPropertyValue(Constants.volume_group).toString()); + } + + private Map extractNetworksFromCsar(ISdcCsarHelper csarHelper) { + List nodeTemplates = csarHelper.getServiceVlList(); + Map networksMap = new HashMap(); + + for (NodeTemplate nodeTemplate : nodeTemplates) { + Network newNetwork = new Network(); + populateNodeFromNodeTemplate(nodeTemplate, csarHelper, newNetwork); + newNetwork.setModelCustomizationName(nodeTemplate.getName()); + networksMap.put(nodeTemplate.getName(), newNetwork); + } + return networksMap; + } + + private Map extractPnfsFromCsar(ISdcCsarHelper csarHelper) { + List nodeTemplates = csarHelper.getServiceNodeTemplateBySdcType(SdcTypes.PNF); + HashMap pnfHashMap = new HashMap<>(); + + for (NodeTemplate nodeTemplate : nodeTemplates) { + Node pnf = new Node(); + populateNodeFromNodeTemplate(nodeTemplate, csarHelper, pnf); + pnfHashMap.put(nodeTemplate.getName(), pnf); + } + return pnfHashMap; + } + + private Map extractVfModuleFromCsar(ISdcCsarHelper csarHelper) { + List serviceVfList = csarHelper.getServiceVfList(); + HashMap vfModuleHashMap = new HashMap<>(); + + for (NodeTemplate nodeTemplate : serviceVfList) { + Map nodeTemplateVfModule = + getVfModulesFromVF(csarHelper, nodeTemplate.getMetaData().getValue(Constants.customizationUUID)); + vfModuleHashMap.putAll(nodeTemplateVfModule); + } + return vfModuleHashMap; + } + + private Map extractVolumeGroups(ISdcCsarHelper csarHelper) { + HashMap volumeGroupHashMap = new HashMap<>(); + for (NodeTemplate nodeTemplate : csarHelper.getServiceVfList()) { + Map nodeTemplateVolumeGroups = + getVolumeGroupsFromVF(csarHelper, csarHelper.getNodeTemplateCustomizationUuid(nodeTemplate)); + volumeGroupHashMap.putAll(nodeTemplateVolumeGroups); + } + return volumeGroupHashMap; + } + + private Map inputsListToInputsMap(List inputList) { + Map inputs = new HashMap<>(); + for (org.openecomp.sdc.toscaparser.api.parameters.Input input : inputList) { + inputs.put(input.getName(), convertInput(input, new org.onap.vid.asdc.beans.tosca.Input())); + } + return inputs; + } + + private Node populateNodeFromNodeTemplate(NodeTemplate nodeTemplate, ISdcCsarHelper csarHelper, Node newNode) { + newNode.setCustomizationUuid(csarHelper.getNodeTemplateCustomizationUuid(nodeTemplate)); + newNode.setDescription(nodeTemplate.getMetaData().getValue(Constants.description)); + newNode.setInvariantUuid(nodeTemplate.getMetaData().getValue(Constants.invariantUUID)); + newNode.setUuid(nodeTemplate.getMetaData().getValue(Constants.uuid)); + newNode.setName(nodeTemplate.getMetaData().getValue(Constants.name)); + newNode.setVersion(nodeTemplate.getMetaData().getValue(Constants.version)); + newNode.setInputs(extractInputsAndCommandsForNodeTemplate(nodeTemplate, csarHelper, newNode)); + newNode.setType(nodeTemplate.getMetaData().getValue("type")); + Map propertiesMap = setPropertiesOfVnf(nodeTemplate.getPropertiesObjects()); + newNode.setProperties(propertiesMap); + return newNode; + } + + private VfModule populateVfModuleFromGroup(Group group){ + VfModule vfModule = new VfModule(); + + vfModule.setVersion(group.getMetadata().getValue(Constants.vfModuleModelVersion)); + vfModule.setCustomizationUuid(group.getMetadata().getValue(Constants.vfModuleModelCustomizationUUID)); + vfModule.setModelCustomizationName(group.getMetadata().getValue(Constants.vfModuleModelName)); + vfModule.setName(group.getMetadata().getValue(Constants.vfModuleModelName)); + vfModule.setVolumeGroupAllowed(isVolumeGroup(group)); + vfModule.setDescription(group.getDescription()); + vfModule.setInvariantUuid(group.getMetadata().getValue(Constants.vfModuleModelInvariantUUID)); + vfModule.setUuid(group.getMetadata().getValue(Constants.vfModuleModelUUID)); + return vfModule; + } + + private VolumeGroup populateVolumeGroupFromGroup(Group group){ + VolumeGroup volumeGroup = new VolumeGroup(); + volumeGroup.setDescription(group.getDescription()); + volumeGroup.setInvariantUuid(group.getMetadata().getValue(Constants.vfModuleModelInvariantUUID)); + volumeGroup.setName(group.getMetadata().getValue(Constants.vfModuleModelName)); + volumeGroup.setModelCustomizationName(group.getMetadata().getValue(Constants.vfModuleModelName)); + volumeGroup.setVersion(group.getMetadata().getValue(Constants.vfModuleModelVersion)); + volumeGroup.setUuid(group.getMetadata().getValue(Constants.vfModuleModelUUID)); + volumeGroup.setCustomizationUuid(group.getMetadata().getValue(Constants.vfModuleModelCustomizationUUID)); + + return volumeGroup; + } + + + private Map extractInputsAndCommandsForNodeTemplate(NodeTemplate nodeTemplate, ISdcCsarHelper csarHelper, Node newNode){ + Map inputMap = new HashMap<>(); + Map commandPropertyMap = new HashMap<>(); + + List inputs = csarHelper.getServiceInputs(); + Map properties = csarHelper.filterNodeTemplatePropertiesByValue(nodeTemplate, FilterType.CONTAINS, Constants.getInput); + for (Map.Entry property : properties.entrySet()) { + String inputKey = property.getValue(); + String key = extractInputValue(inputKey); + for (Input input: inputs){ + if(input.getName().equals(key)){ + org.onap.vid.asdc.beans.tosca.Input localInput = new org.onap.vid.asdc.beans.tosca.Input(); + localInput = convertInput(input, localInput); + String name = property.getKey(); + commandPropertyMap.put(name, extractCommands(name, key)); + inputMap.put(name, localInput); + } + } + } + newNode.setCommands(commandPropertyMap); + return inputMap; + } + + private String extractInputValue(String inputKey) { + return inputKey.substring(inputKey.indexOf(":") + 1); + } + + private org.onap.vid.asdc.beans.tosca.Input convertInput(Input parserInput, org.onap.vid.asdc.beans.tosca.Input localInput){ + localInput.setDefault(parserInput.getDefault()); + localInput.setDescription(parserInput.getDescription()); + localInput.setRequired(parserInput.isRequired()); + localInput.setType(parserInput.getType()); + localInput.setConstraints(parserInput.getConstraints()); +// localInput.setentry_schema() + return localInput; + } + + private CommandProperty extractCommands(String displayName, String inputName){ + CommandProperty commandProperty = new CommandProperty(); + commandProperty.setDisplayName(displayName); + commandProperty.setCommand(Constants.getInput); + commandProperty.setInputName(inputName); + return commandProperty; + } + + private Map setPropertiesOfVnf(List properties) { + Map propertiesMap = new HashMap(); + for (Property property : properties) { + propertiesMap.put(property.getName(), property.getValue().toString()); + } + return propertiesMap; + } + + private String validateInstantiationType(ISdcCsarHelper csarHelper){ + String instantiationType = csarHelper.getServiceMetadata().getValue(Constants.instantiationType); + String validatedInstantiationType = Constants.clientConfig; + if(instantiationType != null && !instantiationType.isEmpty()){ + if(instantiationType.equalsIgnoreCase(Constants.macro) || instantiationType.equalsIgnoreCase(Constants.both)) + validatedInstantiationType = Constants.macro; + else if(instantiationType.equalsIgnoreCase(Constants.aLaCarte)) + validatedInstantiationType = Constants.aLaCarte; + } + return validatedInstantiationType; + } + + +} \ No newline at end of file diff --git a/vid-app-common/src/main/java/org/onap/vid/asdc/rest/RestfulAsdcClient.java b/vid-app-common/src/main/java/org/onap/vid/asdc/rest/RestfulAsdcClient.java new file mode 100644 index 000000000..a8dc28716 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/asdc/rest/RestfulAsdcClient.java @@ -0,0 +1,480 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.asdc.rest; + +import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider; +import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.vid.asdc.AsdcCatalogException; +import org.onap.vid.asdc.AsdcClient; +import org.onap.vid.asdc.beans.Artifact; +import org.onap.vid.asdc.beans.Resource; +import org.onap.vid.asdc.beans.Service; +import org.onap.vid.asdc.parser.ToscaParserImpl; +import org.onap.vid.model.ModelConstants; +import org.onap.vid.properties.VidProperties; + +import javax.ws.rs.NotFoundException; +import javax.ws.rs.ProcessingException; +import javax.ws.rs.WebApplicationException; +import javax.ws.rs.client.Client; +import javax.ws.rs.client.ResponseProcessingException; +import javax.ws.rs.client.WebTarget; +import javax.ws.rs.core.GenericType; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.MultivaluedHashMap; +import java.io.IOException; +import java.io.InputStream; +import java.net.URI; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.StandardCopyOption; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.Collection; +import java.util.Collections; +import java.util.Map; +import java.util.Map.Entry; +import java.util.UUID; + +import static org.onap.vid.utils.Logging.getHttpServletRequest; +import static org.onap.vid.utils.Logging.requestIdHeaderKey; +/** + * The Class RestfulAsdcClient. + */ +@SuppressWarnings("Duplicates") +public class RestfulAsdcClient implements AsdcClient { + + + /** + * The Class Builder. + */ + public static class Builder { + + /** + * The client. + */ + private final Client client; + + /** + * The uri. + */ + private final URI uri; + + /** + * The auth. + */ + private String auth = null; + + /** + * Instantiates a new builder. + * + * @param client the client + * @param uri the uri + */ + public Builder(Client client, URI uri) { + this.client = client; + this.client.register(JacksonJsonProvider.class); + this.uri = uri; + } + + /** + * Auth. + * + * @param auth the auth + * @return the builder + */ + public Builder auth(String auth) { + this.auth = auth; + return this; + } + + /** + * Builds the. + * + * @return the restful asdc client + */ + public RestfulAsdcClient build() { + return new RestfulAsdcClient(this); + } + } + + /** + * The Constant LOG. + */ + static final EELFLoggerDelegate LOG = EELFLoggerDelegate.getLogger(RestfulAsdcClient.class); + + /** + * The Constant dateFormat. + */ + final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); + + /** + * The client. + */ + private final Client client; + + /** + * The uri. + */ + private final URI uri; + + /** + * The common headers. + */ + private final MultivaluedHashMap commonHeaders; + + /** + * The auth. + */ + private final String auth; + + ToscaParserImpl p = new ToscaParserImpl(); + + /** + * Instantiates a new restful asdc client. + * + * @param builder the builder + */ + private RestfulAsdcClient(Builder builder) { + client = builder.client; + uri = builder.uri; + auth = builder.auth; + + commonHeaders = new MultivaluedHashMap(); + commonHeaders.put("Authorization", Collections.singletonList((Object) (auth))); + } + + private Path createTmpFile(InputStream csarInputStream) throws AsdcCatalogException { + final Path csarFile; + try { + csarFile = Files.createTempFile("csar", ".zip"); + Files.copy(csarInputStream, csarFile, StandardCopyOption.REPLACE_EXISTING); + } catch (IOException e) { + throw new AsdcCatalogException("Caught IOException while creating CSAR", e); + } + return csarFile; + } + + /** + * Gets the client. + * + * @return the client + */ + private Client getClient() { + return client; + } + + /* (non-Javadoc) + * @see org.onap.vid.asdc.AsdcClient#getResource(java.util.UUID) + */ + public Resource getResource(UUID uuid) throws AsdcCatalogException { + + String path = VidProperties.getPropertyWithDefault(ModelConstants.ASDC_RESOURCE_API_PATH, ModelConstants.DEFAULT_ASDC_RESOURCE_API_PATH); + try { + return getClient() + .target(uri) + .path(path + "/" + uuid.toString() + "/metadata") + .request(MediaType.APPLICATION_JSON_TYPE) + .headers(commonHeaders) + .header("Content-Type", MediaType.APPLICATION_JSON) + .header(requestIdHeaderKey, getHttpServletRequest().getHeader(requestIdHeaderKey)) + .get(Resource.class); + } catch (ResponseProcessingException e) { + //Couldn't convert response to Java type + throw new AsdcCatalogException("ASDC response could not be processed", e); + } catch (ProcessingException e) { + //IO problems during request + throw new AsdcCatalogException("Failed to get a response from ASDC service", e); + } catch (WebApplicationException e) { + //Web service returned data, but the response status wasn't a good one (i.e. non 2xx) + throw new AsdcCatalogException(e); + } + } + + /* (non-Javadoc) + * @see org.onap.vid.asdc.AsdcClient#getResourceArtifact(java.util.UUID, java.util.UUID) + */ + public Artifact getResourceArtifact(UUID resourceUuid, UUID artifactUuid) throws AsdcCatalogException { + String path = VidProperties.getPropertyWithDefault(ModelConstants.ASDC_RESOURCE_API_PATH, ModelConstants.DEFAULT_ASDC_RESOURCE_API_PATH); + try { + return getClient() + .target(uri) + .path(path + "/" + resourceUuid + "/artifacts/" + artifactUuid) + .request(MediaType.APPLICATION_JSON_TYPE) + .headers(commonHeaders) + .header("Content-Type", MediaType.APPLICATION_JSON) + .header(requestIdHeaderKey, getHttpServletRequest().getHeader(requestIdHeaderKey)) + .get(Artifact.class); + } catch (ResponseProcessingException e) { + //Couldn't convert response to Java type + throw new AsdcCatalogException("ASDC response could not be processed", e); + } catch (ProcessingException e) { + //IO problems during request + throw new AsdcCatalogException("Failed to get a response from ASDC service", e); + } catch (WebApplicationException e) { + //Web service returned data, but the response status wasn't a good one (i.e. non 2xx) + throw new AsdcCatalogException(e); + } + } + + /* (non-Javadoc) + * @see org.onap.vid.asdc.AsdcClient#getResources() + */ + public Collection getResources() throws AsdcCatalogException { + String path = VidProperties.getPropertyWithDefault(ModelConstants.ASDC_RESOURCE_API_PATH, ModelConstants.DEFAULT_ASDC_RESOURCE_API_PATH); + try { + return getClient() + .target(uri) + .path(path) + .request(MediaType.APPLICATION_JSON_TYPE) + .headers(commonHeaders) + .header("Content-Type", MediaType.APPLICATION_JSON) + .header(requestIdHeaderKey, getHttpServletRequest().getHeader(requestIdHeaderKey)) + .get(new GenericType>() { + }); + } catch (ResponseProcessingException e) { + //Couldn't convert response to Java type + throw new AsdcCatalogException("ASDC response could not be processed", e); + } catch (ProcessingException e) { + //IO problems during request + throw new AsdcCatalogException("Failed to get a response from ASDC service", e); + } catch (WebApplicationException e) { + //Web service returned data, but the response status wasn't a good one (i.e. non 2xx) + throw new AsdcCatalogException(e); + } + } + + /* (non-Javadoc) + * @see org.onap.vid.asdc.AsdcClient#getResources(java.util.Map) + */ + public Collection getResources(Map filter) throws AsdcCatalogException { + String path = VidProperties.getPropertyWithDefault(ModelConstants.ASDC_RESOURCE_API_PATH, ModelConstants.DEFAULT_ASDC_RESOURCE_API_PATH); + WebTarget target = getClient() + .target(uri) + .path(path); + + for (Entry filterEntry : filter.entrySet()) { + target = target.queryParam(filterEntry.getKey(), (Object[]) filterEntry.getValue()); + } + + try { + return target.request() + .accept(MediaType.APPLICATION_JSON_TYPE) + .headers(commonHeaders) + .header("Content-Type", MediaType.APPLICATION_JSON) + .header(requestIdHeaderKey, getHttpServletRequest().getHeader(requestIdHeaderKey)) + .get(new GenericType>() { + }); + } catch (ResponseProcessingException e) { + //Couldn't convert response to Java type + throw new AsdcCatalogException("ASDC response could not be processed", e); + } catch (ProcessingException e) { + //IO problems during request + throw new AsdcCatalogException("Failed to get a response from ASDC service", e); + } catch (NotFoundException e) { + throw e; + } catch (WebApplicationException e) { + //Web service returned data, but the response status wasn't a good one (i.e. non 2xx) + throw new AsdcCatalogException(e); + } + } + + /* (non-Javadoc) + * @see org.onap.vid.asdc.AsdcClient#getResourceToscaModel(java.util.UUID) + */ + public Path getResourceToscaModel(UUID resourceUuid) throws AsdcCatalogException { + String path = VidProperties.getPropertyWithDefault(ModelConstants.ASDC_RESOURCE_API_PATH, ModelConstants.DEFAULT_ASDC_RESOURCE_API_PATH); + try (final InputStream csarInputStream = (InputStream) getClient() + .target(uri) + .path(path + "/" + resourceUuid + "/toscaModel") + .request(MediaType.APPLICATION_OCTET_STREAM_TYPE) + .headers(commonHeaders) + .header("Content-Type", MediaType.APPLICATION_OCTET_STREAM) + .header(requestIdHeaderKey, getHttpServletRequest().getHeader(requestIdHeaderKey)) + .get(InputStream.class)) { + + return getToscaCsar(csarInputStream); + } catch (IOException e) { + throw new AsdcCatalogException("Failed to retrieve resource TOSCA model from ASDC", e); + } + } + + /* (non-Javadoc) + * @see org.onap.vid.asdc.AsdcClient#getService(java.util.UUID) + */ + public Service getService(UUID uuid) throws AsdcCatalogException { + + String path = VidProperties.getPropertyWithDefault(ModelConstants.ASDC_SVC_API_PATH, ModelConstants.DEFAULT_ASDC_SVC_API_PATH); + try { + return getClient() + .target(uri) + .path(path + "/" + uuid.toString() + "/metadata") + .request(MediaType.APPLICATION_JSON) + .headers(commonHeaders) + .header(requestIdHeaderKey, getHttpServletRequest().getHeader(requestIdHeaderKey)) + .get(Service.class); + } catch (ResponseProcessingException e) { + //Couldn't convert response to Java type + throw new AsdcCatalogException("ASDC response could not be processed", e); + } catch (ProcessingException e) { + //IO problems during request + throw new AsdcCatalogException("Failed to get a response from ASDC service", e); + } catch (WebApplicationException e) { + //Web service returned data, but the response status wasn't a good one (i.e. non 2xx) + throw new AsdcCatalogException(e); + } + } + + /* (non-Javadoc) + * @see org.onap.vid.asdc.AsdcClient#getServiceArtifact(java.util.UUID, java.util.UUID) + */ + public Artifact getServiceArtifact(UUID serviceUuid, UUID artifactUuid) throws AsdcCatalogException { + String path = VidProperties.getPropertyWithDefault(ModelConstants.ASDC_SVC_API_PATH, ModelConstants.DEFAULT_ASDC_SVC_API_PATH); + + try { + return getClient() + .target(uri) + .path(path + "/" + serviceUuid + "/artifacts/" + artifactUuid) + .request(MediaType.APPLICATION_JSON_TYPE) + .headers(commonHeaders) + .header("Content-Type", MediaType.APPLICATION_JSON) + .header(requestIdHeaderKey, getHttpServletRequest().getHeader(requestIdHeaderKey)) + .get(Artifact.class); + } catch (ResponseProcessingException e) { + //Couldn't convert response to Java type + throw new AsdcCatalogException("ASDC response could not be processed", e); + } catch (ProcessingException e) { + //IO problems during request + throw new AsdcCatalogException("Failed to get a response from ASDC service", e); + } catch (WebApplicationException e) { + //Web service returned data, but the response status wasn't a good one (i.e. non 2xx) + throw new AsdcCatalogException(e); + } + } + + /* (non-Javadoc) + * @see org.onap.vid.asdc.AsdcClient#getServices() + */ + public Collection getServices() throws AsdcCatalogException { + String path = VidProperties.getPropertyWithDefault(ModelConstants.ASDC_SVC_API_PATH, ModelConstants.DEFAULT_ASDC_SVC_API_PATH); + try { + return getClient() + .target(uri) + .path(path) + .request() + .accept(MediaType.APPLICATION_JSON_TYPE) + .headers(commonHeaders) + .header("Content-Type", MediaType.APPLICATION_JSON) + .header(requestIdHeaderKey, getHttpServletRequest().getHeader(requestIdHeaderKey)) + .get(new GenericType>() { + }); + } catch (ResponseProcessingException e) { + //Couldn't convert response to Java type + throw new AsdcCatalogException("ASDC response could not be processed", e); + } catch (ProcessingException e) { + //IO problems during request + throw new AsdcCatalogException("Failed to get a response from ASDC service", e); + } catch (WebApplicationException e) { + //Web service returned data, but the response status wasn't a good one (i.e. non 2xx) + throw new AsdcCatalogException(e); + } + } + + /* (non-Javadoc) + * @see org.onap.vid.asdc.AsdcClient#getServices(java.util.Map) + */ + public Collection getServices(Map filter) throws AsdcCatalogException { + + String path = VidProperties.getPropertyWithDefault(ModelConstants.ASDC_SVC_API_PATH, ModelConstants.DEFAULT_ASDC_SVC_API_PATH); + WebTarget target = getClient() + .target(uri) + .path(path); + + + for (Entry filterEntry : filter.entrySet()) { + target = target.queryParam(filterEntry.getKey(), (Object[]) filterEntry.getValue()); + } + + try { + return target.request() + .accept(MediaType.APPLICATION_JSON_TYPE) + .headers(commonHeaders) + .header("Content-Type", MediaType.APPLICATION_JSON) + .header(requestIdHeaderKey, getHttpServletRequest().getHeader(requestIdHeaderKey)) + .get(new GenericType>() { + }); + } catch (ResponseProcessingException e) { + //Couldn't convert response to Java type + throw new AsdcCatalogException("ASDC response could not be processed", e); + } catch (ProcessingException e) { + //IO problems during request + throw new AsdcCatalogException("Failed to get a response from ASDC service", e); + } catch (NotFoundException e) { + throw e; + } catch (WebApplicationException e) { + //Web service returned data, but the response status wasn't a good one (i.e. non 2xx) + throw new AsdcCatalogException(e); + } + } + + + /* (non-Javadoc) + * @see org.onap.vid.asdc.AsdcClient#getServiceToscaModel(java.util.UUID) + */ + public Path getServiceToscaModel(UUID serviceUuid) throws AsdcCatalogException { + String path = VidProperties.getPropertyWithDefault(ModelConstants.ASDC_SVC_API_PATH, ModelConstants.DEFAULT_ASDC_SVC_API_PATH); + try { + final InputStream csarInputStream = (InputStream) getClient() + .target(uri) + .path(path + "/" + serviceUuid + "/toscaModel") + .request(MediaType.APPLICATION_OCTET_STREAM_TYPE) + .headers(commonHeaders) + .header("Content-Type", MediaType.APPLICATION_OCTET_STREAM) + .header(requestIdHeaderKey, getHttpServletRequest().getHeader(requestIdHeaderKey)) + .get(InputStream.class); + + + return getToscaCsar(csarInputStream); + } catch (ResponseProcessingException e) { + //Couldn't convert response to Java type + throw new AsdcCatalogException("ASDC response could not be processed", e); + } catch (ProcessingException e) { + //IO problems during request + throw new AsdcCatalogException("Failed to get a response from ASDC service", e); + } catch (WebApplicationException e) { + //Web service returned data, but the response status wasn't a good one (i.e. non 2xx) + throw new AsdcCatalogException(e); + } + } + + + /** + * Gets the tosca model. + * + * @param csarInputStream the csar input stream + * @return the tosca model + * @throws AsdcCatalogException the asdc catalog exception + */ + private Path getToscaCsar(InputStream csarInputStream) throws AsdcCatalogException { + return createTmpFile(csarInputStream); + } +} + diff --git a/vid-app-common/src/main/java/org/onap/vid/category/AddCategoryOptionResponse.java b/vid-app-common/src/main/java/org/onap/vid/category/AddCategoryOptionResponse.java new file mode 100644 index 000000000..89d3963ac --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/category/AddCategoryOptionResponse.java @@ -0,0 +1,15 @@ +package org.onap.vid.category; + +import org.onap.vid.model.ListOfErrorsResponse; + +import java.util.List; + +public class AddCategoryOptionResponse extends ListOfErrorsResponse { + + public AddCategoryOptionResponse() { + } + + public AddCategoryOptionResponse(List errors) { + super(errors); + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/category/AddCategoryOptionsRequest.java b/vid-app-common/src/main/java/org/onap/vid/category/AddCategoryOptionsRequest.java new file mode 100644 index 000000000..5db474627 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/category/AddCategoryOptionsRequest.java @@ -0,0 +1,13 @@ +package org.onap.vid.category; + +import java.util.ArrayList; +import java.util.List; + +public class AddCategoryOptionsRequest { + + public List options; + + public AddCategoryOptionsRequest() { + options = new ArrayList<>(); + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/category/CategoryParameterOptionRep.java b/vid-app-common/src/main/java/org/onap/vid/category/CategoryParameterOptionRep.java new file mode 100644 index 000000000..355e54838 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/category/CategoryParameterOptionRep.java @@ -0,0 +1,31 @@ +package org.onap.vid.category; + +public class CategoryParameterOptionRep { + + private String id; + private String name; + + public CategoryParameterOptionRep() { + } + + public CategoryParameterOptionRep(String id, String name) { + this.id = id; + this.name = name; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/category/CategoryParametersResponse.java b/vid-app-common/src/main/java/org/onap/vid/category/CategoryParametersResponse.java new file mode 100644 index 000000000..be7886698 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/category/CategoryParametersResponse.java @@ -0,0 +1,27 @@ +package org.onap.vid.category; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import java.util.List; +import java.util.Map; + +public class CategoryParametersResponse { + + private Map> categoryParameters; + + public CategoryParametersResponse() { + } + + public CategoryParametersResponse(Map> categoryParameters) { + this.categoryParameters = categoryParameters; + } + + @JsonProperty("categoryParameters") + public Map> getCategoryParameters() { + return categoryParameters; + } + + public void setCategoryParameters(Map> categoryParameters) { + this.categoryParameters = categoryParameters; + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/changeManagement/ChangeManagementRequest.java b/vid-app-common/src/main/java/org/onap/vid/changeManagement/ChangeManagementRequest.java new file mode 100644 index 000000000..ec375b621 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/changeManagement/ChangeManagementRequest.java @@ -0,0 +1,73 @@ +package org.onap.vid.changeManagement; + +import java.util.List; +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +@JsonPropertyOrder({ + "requestDetails", + "requestType" +}) + +public class ChangeManagementRequest { + + public static class MsoChangeManagementRequest { + public final static String SOFTWARE_UPDATE = "inPlaceSoftwareUpdate"; + public static final String REPLACE = "replace"; + public final static String CONFIG_UPDATE = "applyUpdatedConfig"; + + } + + public final static String VNF_IN_PLACE_SOFTWARE_UPDATE = "vnf in place software update"; + public static final String UPDATE = "update"; + public static final String REPLACE = "replace"; + public final static String CONFIG_UPDATE = "vnf config update"; + + @JsonProperty("requestDetails") + private List requestDetails; + + @JsonProperty("requestType") + private String requestType; + + @JsonIgnore + private Map additionalProperties = new HashMap(); + + @JsonProperty("requestDetails") + public List getRequestDetails() { + return requestDetails; + } + + @JsonProperty("requestDetails") + public void setRequestDetails(List requestDetails) { + this.requestDetails = requestDetails; + } + + @JsonProperty("requestType") + public String getRequestType() { + return requestType; + } + + @JsonProperty("requestType") + public void setRequestType(String requestType) { + this.requestType = requestType; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/changeManagement/ChangeManagementResponse.java b/vid-app-common/src/main/java/org/onap/vid/changeManagement/ChangeManagementResponse.java new file mode 100644 index 000000000..05d6e0496 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/changeManagement/ChangeManagementResponse.java @@ -0,0 +1,19 @@ +package org.onap.vid.changeManagement; + +import java.util.ArrayList; +import java.util.List; + +public class ChangeManagementResponse { + public List cmResponses = null; + + + + public ChangeManagementResponse(String vnfName) { + List cmResponses = new ArrayList<>(); + cmResponses.add(new CmResponse(vnfName)); + this.cmResponses = cmResponses; + + } + + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/changeManagement/CloudConfiguration.java b/vid-app-common/src/main/java/org/onap/vid/changeManagement/CloudConfiguration.java new file mode 100644 index 000000000..43d6a6a0a --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/changeManagement/CloudConfiguration.java @@ -0,0 +1,55 @@ +package org.onap.vid.changeManagement; + +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ +"lcpCloudRegionId", +"tenantId" +}) +public class CloudConfiguration { + @JsonProperty("lcpCloudRegionId") + private String lcpCloudRegionId; + @JsonProperty("tenantId") + private String tenantId; + @JsonIgnore + private Map additionalProperties = new HashMap(); + + @JsonProperty("lcpCloudRegionId") + public String getLcpCloudRegionId() { + return lcpCloudRegionId; + } + + @JsonProperty("lcpCloudRegionId") + public void setLcpCloudRegionId(String lcpCloudRegionId) { + this.lcpCloudRegionId = lcpCloudRegionId; + } + + @JsonProperty("tenantId") + public String getTenantId() { + return tenantId; + } + + @JsonProperty("tenantId") + public void setTenantId(String tenantId) { + this.tenantId = tenantId; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/changeManagement/CmResponse.java b/vid-app-common/src/main/java/org/onap/vid/changeManagement/CmResponse.java new file mode 100644 index 000000000..8aba0124a --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/changeManagement/CmResponse.java @@ -0,0 +1,17 @@ +package org.onap.vid.changeManagement; + +public class CmResponse { + + public String orchestratorRequestId; + public String serviceInstanceId; + public String vnfInstanceId; + public String vnfName; + + public CmResponse(String vnfName){ + this.orchestratorRequestId = "Request Id"; + this.serviceInstanceId = "Service instance Id"; + this.vnfInstanceId = "Vnf instance Id"; + this.vnfName = vnfName; + } + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/changeManagement/GetVnfWorkflowRelationRequest.java b/vid-app-common/src/main/java/org/onap/vid/changeManagement/GetVnfWorkflowRelationRequest.java new file mode 100644 index 000000000..0412204f9 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/changeManagement/GetVnfWorkflowRelationRequest.java @@ -0,0 +1,28 @@ +package org.onap.vid.changeManagement; + +import java.util.List; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class GetVnfWorkflowRelationRequest { + + public GetVnfWorkflowRelationRequest() { + } + + public GetVnfWorkflowRelationRequest(List vnfsDetails) { + this.vnfsDetails = vnfsDetails; + } + + @JsonProperty("vnfsDetails") + private List vnfsDetails; + + @JsonProperty("vnfsDetails") + public List getVnfDetails() { + return vnfsDetails; + } + + @JsonProperty("vnfsDetails") + public void setVnfDetails(List vnfDetails) { + this.vnfsDetails = vnfDetails; + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/changeManagement/GetWorkflowsResponse.java b/vid-app-common/src/main/java/org/onap/vid/changeManagement/GetWorkflowsResponse.java new file mode 100644 index 000000000..05295fbc6 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/changeManagement/GetWorkflowsResponse.java @@ -0,0 +1,24 @@ +package org.onap.vid.changeManagement; + +import java.util.List; + +public class GetWorkflowsResponse { + private List workflows; + + public GetWorkflowsResponse() { + } + + public GetWorkflowsResponse(List workflows) { + this.workflows = workflows; + } + + public List getWorkflows() { + return workflows; + } + + public void setWorkflows(List workflows) { + this.workflows = workflows; + } + + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/changeManagement/LeanCloudConfiguration.java b/vid-app-common/src/main/java/org/onap/vid/changeManagement/LeanCloudConfiguration.java new file mode 100644 index 000000000..6011c7ebb --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/changeManagement/LeanCloudConfiguration.java @@ -0,0 +1,20 @@ +package org.onap.vid.changeManagement; + +/** + * Created by Oren on 9/5/17. + */ +public class LeanCloudConfiguration { + + public LeanCloudConfiguration() { + } + + public LeanCloudConfiguration(org.onap.vid.domain.mso.CloudConfiguration cloudConfiguration) { + this.tenantId = cloudConfiguration.getTenantId(); + this.lcpCloudRegionId = cloudConfiguration.getLcpCloudRegionId(); + + } + public String lcpCloudRegionId; + + public String tenantId; + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/changeManagement/ModelInfo.java b/vid-app-common/src/main/java/org/onap/vid/changeManagement/ModelInfo.java new file mode 100644 index 000000000..8f44a4bf6 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/changeManagement/ModelInfo.java @@ -0,0 +1,138 @@ +package org.onap.vid.changeManagement; +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ +"modelType", +"modelInvariantId", +"modelVersionId", +"modelName", +"modelVersion", +"modelCustomizationName", +"modelCustomizationId" +}) +public class ModelInfo { + + public ModelInfo(){ + + } + + public ModelInfo(org.onap.vid.domain.mso.ModelInfo modelInfo){ + this.setModelType(modelInfo.getModelType().toString()); + this.setModelInvariantId(modelInfo.getModelInvariantId()); + this.setModelVersionId(modelInfo.getModelNameVersionId()); + this.setModelName(modelInfo.getModelName()); + this.setModelVersion(modelInfo.getModelVersion()); + this.setModelCustomizationId(modelInfo.getModelCustomizationId()); + this.setModelVersionId(modelInfo.getModelVersionId()); + } + + + @JsonProperty("modelType") + private String modelType; + @JsonProperty("modelInvariantId") + private String modelInvariantId; + @JsonProperty("modelVersionId") + private String modelVersionId; + @JsonProperty("modelName") + private String modelName; + @JsonProperty("modelVersion") + private String modelVersion; + @JsonProperty("modelCustomizationName") + private String modelCustomizationName; + @JsonProperty("modelCustomizationId") + private String modelCustomizationId; + @JsonIgnore + private Map additionalProperties = new HashMap(); + + @JsonProperty("modelType") + public String getModelType() { + return modelType; + } + + @JsonProperty("modelType") + public void setModelType(String modelType) { + this.modelType = modelType; + } + + @JsonProperty("modelInvariantId") + public String getModelInvariantId() { + return modelInvariantId; + } + + @JsonProperty("modelInvariantId") + public void setModelInvariantId(String modelInvariantId) { + this.modelInvariantId = modelInvariantId; + } + + @JsonProperty("modelVersionId") + public String getModelVersionId() { + return modelVersionId; + } + + @JsonProperty("modelVersionId") + public void setModelVersionId(String modelVersionId) { + this.modelVersionId = modelVersionId; + } + + @JsonProperty("modelName") + public String getModelName() { + return modelName; + } + + @JsonProperty("modelName") + public void setModelName(String modelName) { + this.modelName = modelName; + } + + @JsonProperty("modelVersion") + public String getModelVersion() { + return modelVersion; + } + + @JsonProperty("modelVersion") + public void setModelVersion(String modelVersion) { + this.modelVersion = modelVersion; + } + + @JsonProperty("modelCustomizationName") + public String getModelCustomizationName() { + return modelCustomizationName; + } + + @JsonProperty("modelCustomizationName") + public void setModelCustomizationName(String modelCustomizationName) { + this.modelCustomizationName = modelCustomizationName; + } + + @JsonProperty("modelCustomizationId") + public String getModelCustomizationId() { + return modelCustomizationId; + } + + @JsonProperty("modelCustomizationId") + public void setModelCustomizationId(String modelCustomizationId) { + this.modelCustomizationId = modelCustomizationId; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + + + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/changeManagement/ModelInfoOfRelatedInstance.java b/vid-app-common/src/main/java/org/onap/vid/changeManagement/ModelInfoOfRelatedInstance.java new file mode 100644 index 000000000..7e8760987 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/changeManagement/ModelInfoOfRelatedInstance.java @@ -0,0 +1,122 @@ +package org.onap.vid.changeManagement; + +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ +"modelType", +"modelInvariantId", +"modelVersionId", +"modelName", +"modelVersion", +"modelCustomizationName", +"modelCustomizationId" +}) + +public class ModelInfoOfRelatedInstance { + + @JsonProperty("modelType") + private String modelType; + @JsonProperty("modelInvariantId") + private String modelInvariantId; + @JsonProperty("modelVersionId") + private String modelVersionId; + @JsonProperty("modelName") + private String modelName; + @JsonProperty("modelVersion") + private String modelVersion; + @JsonProperty("modelCustomizationName") + private String modelCustomizationName; + @JsonProperty("modelCustomizationId") + private String modelCustomizationId; + @JsonIgnore + private Map additionalProperties = new HashMap(); + + @JsonProperty("modelType") + public String getModelType() { + return modelType; + } + + @JsonProperty("modelType") + public void setModelType(String modelType) { + this.modelType = modelType; + } + + @JsonProperty("modelInvariantId") + public String getModelInvariantId() { + return modelInvariantId; + } + + @JsonProperty("modelInvariantId") + public void setModelInvariantId(String modelInvariantId) { + this.modelInvariantId = modelInvariantId; + } + + @JsonProperty("modelVersionId") + public String getModelVersionId() { + return modelVersionId; + } + + @JsonProperty("modelVersionId") + public void setModelVersionId(String modelVersionId) { + this.modelVersionId = modelVersionId; + } + + @JsonProperty("modelName") + public String getModelName() { + return modelName; + } + + @JsonProperty("modelName") + public void setModelName(String modelName) { + this.modelName = modelName; + } + + @JsonProperty("modelVersion") + public String getModelVersion() { + return modelVersion; + } + + @JsonProperty("modelVersion") + public void setModelVersion(String modelVersion) { + this.modelVersion = modelVersion; + } + + @JsonProperty("modelCustomizationName") + public String getModelCustomizationName() { + return modelCustomizationName; + } + + @JsonProperty("modelCustomizationName") + public void setModelCustomizationName(String modelCustomizationName) { + this.modelCustomizationName = modelCustomizationName; + } + + @JsonProperty("modelCustomizationId") + public String getModelCustomizationId() { + return modelCustomizationId; + } + + @JsonProperty("modelCustomizationId") + public void setModelCustomizationId(String modelCustomizationId) { + this.modelCustomizationId = modelCustomizationId; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/changeManagement/MsoRequestDetails.java b/vid-app-common/src/main/java/org/onap/vid/changeManagement/MsoRequestDetails.java new file mode 100644 index 000000000..913fa0787 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/changeManagement/MsoRequestDetails.java @@ -0,0 +1,32 @@ +package org.onap.vid.changeManagement; + + +import java.util.ArrayList; +import java.util.List; + +/** + * Created by Oren on 9/5/17. + */ +public class MsoRequestDetails { + + public ModelInfo modelInfo; + + public LeanCloudConfiguration cloudConfiguration; + + public UpdateRequestInfo requestInfo; + + public List relatedInstanceList; + + public Object requestParameters; + + public MsoRequestDetails(RequestDetails r) { + this.modelInfo = new ModelInfo(r.getModelInfo()); + this.cloudConfiguration = new LeanCloudConfiguration(r.getCloudConfiguration()); + this.requestInfo = new UpdateRequestInfo(r.getRequestInfo()); + this.relatedInstanceList = new ArrayList<>(); + this.requestParameters = r.getRequestParameters(); + relatedInstanceList = r.getRelatedInstList(); + + + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/changeManagement/RelatedInstance.java b/vid-app-common/src/main/java/org/onap/vid/changeManagement/RelatedInstance.java new file mode 100644 index 000000000..c29aee454 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/changeManagement/RelatedInstance.java @@ -0,0 +1,29 @@ +package org.onap.vid.changeManagement; + +import com.fasterxml.jackson.annotation.*; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "instanceId", + "modelInfo" +}) +public class RelatedInstance { + + @JsonProperty("instanceId") + public String instanceId; + + + @JsonProperty("modelInfo") + public ModelInfo modelInfo; + + @JsonGetter + public String getInstanceId() { + return instanceId; + } + + @JsonSetter + public void setInstanceId(String instanceId) { + this.instanceId = instanceId; + } + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/changeManagement/RelatedInstanceList.java b/vid-app-common/src/main/java/org/onap/vid/changeManagement/RelatedInstanceList.java new file mode 100644 index 000000000..b3e67a020 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/changeManagement/RelatedInstanceList.java @@ -0,0 +1,23 @@ +package org.onap.vid.changeManagement; + +import com.fasterxml.jackson.annotation.*; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "relatedInstance" +}) +public class RelatedInstanceList { + + @JsonProperty("relatedInstance") + public RelatedInstance relatedInstance; + + @JsonSetter + public RelatedInstance getRelatedInstance() { + return relatedInstance; + } + + @JsonSetter + public void setRelatedInstance(RelatedInstance relatedInstance) { + this.relatedInstance = relatedInstance; + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/changeManagement/RequestDetails.java b/vid-app-common/src/main/java/org/onap/vid/changeManagement/RequestDetails.java new file mode 100644 index 000000000..36452f67f --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/changeManagement/RequestDetails.java @@ -0,0 +1,56 @@ +package org.onap.vid.changeManagement; + +import com.fasterxml.jackson.annotation.*; + +import java.util.List; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ +"modelInfo", +"cloudConfiguration", +"requestInfo", +"requestParameters", +"vnfName", +"vnfInstanceId" +}) +public class RequestDetails extends org.onap.vid.mso.rest.RequestDetails{ + + @JsonProperty("vnfName") + private String vnfName; + @JsonProperty("vnfInstanceId") + private String vnfInstanceId; + + /** The related model list. */ + @JsonProperty("relatedInstanceList") + public List relatedInstList; + + @JsonProperty("vnfName") + public String getVnfName() { + return vnfName; + } + + @JsonProperty("vnfName") + public void setVnfName(String vnfName) { + this.vnfName = vnfName; + } + @JsonProperty("vnfInstanceId") + public String getVnfInstanceId() { + return vnfInstanceId; + } + + @JsonProperty("vnfInstanceId") + public void setVnfInstanceId(String vnfInstanceId) { + this.vnfInstanceId = vnfInstanceId; + } + + @JsonGetter + public List getRelatedInstList() { + return relatedInstList; + } + + @JsonSetter + public void setRelatedInstList(List relatedInstList) { + this.relatedInstList = relatedInstList; + } + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/changeManagement/RequestDetailsWrapper.java b/vid-app-common/src/main/java/org/onap/vid/changeManagement/RequestDetailsWrapper.java new file mode 100644 index 000000000..92fb57c2d --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/changeManagement/RequestDetailsWrapper.java @@ -0,0 +1,16 @@ +package org.onap.vid.changeManagement; + +/** + * Created by Oren on 9/5/17. + */ +public class RequestDetailsWrapper { + + public RequestDetailsWrapper(T requestDetails) { + this.requestDetails = requestDetails; + } + + public RequestDetailsWrapper() { + } + + public T requestDetails; +} diff --git a/vid-app-common/src/main/java/org/onap/vid/changeManagement/RequestInfo.java b/vid-app-common/src/main/java/org/onap/vid/changeManagement/RequestInfo.java new file mode 100644 index 000000000..4aa3724af --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/changeManagement/RequestInfo.java @@ -0,0 +1,69 @@ +package org.onap.vid.changeManagement; + +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ +"source", +"suppressRollback", +"requestorId" +}) +public class RequestInfo { + @JsonProperty("source") + private String source; + @JsonProperty("suppressRollback") + private Boolean suppressRollback; + @JsonProperty("requestorId") + private String requestorId; + @JsonIgnore + private Map additionalProperties = new HashMap(); + + @JsonProperty("source") + public String getSource() { + return source; + } + + @JsonProperty("source") + public void setSource(String source) { + this.source = source; + } + + @JsonProperty("suppressRollback") + public Boolean getSuppressRollback() { + return suppressRollback; + } + + @JsonProperty("suppressRollback") + public void setSuppressRollback(Boolean suppressRollback) { + this.suppressRollback = suppressRollback; + } + + @JsonProperty("requestorId") + public String getRequestorId() { + return requestorId; + } + + @JsonProperty("requestorId") + public void setRequestorId(String requestorId) { + this.requestorId = requestorId; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/changeManagement/UpdateRequestInfo.java b/vid-app-common/src/main/java/org/onap/vid/changeManagement/UpdateRequestInfo.java new file mode 100644 index 000000000..024e9c3c1 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/changeManagement/UpdateRequestInfo.java @@ -0,0 +1,26 @@ +package org.onap.vid.changeManagement; + +import org.onap.vid.domain.mso.*; + +/** + * Created by Oren on 9/5/17. + */ +public class UpdateRequestInfo { + + public UpdateRequestInfo() { + } + + + public UpdateRequestInfo(org.onap.vid.domain.mso.RequestInfo requestInfo) { + this.requestorId = requestInfo.getRequestorId(); + this.suppressRollback = requestInfo.getSuppressRollback(); + this.source = requestInfo.getSource(); + } + public String source; + + public Boolean suppressRollback; + + public String requestorId; + + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/changeManagement/VnfDetails.java b/vid-app-common/src/main/java/org/onap/vid/changeManagement/VnfDetails.java new file mode 100644 index 000000000..5cc2f4d32 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/changeManagement/VnfDetails.java @@ -0,0 +1,67 @@ +package org.onap.vid.changeManagement; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.google.common.base.MoreObjects; + +public class VnfDetails { + + public VnfDetails() { + } + + public VnfDetails(String UUID, String invariantUUID) { + this.UUID = UUID; + this.invariantUUID = invariantUUID; + } + + @JsonProperty("UUID") + private String UUID; + + @JsonProperty("invariantUUID") + private String invariantUUID; + + @JsonProperty("UUID") + public String getUUID() { + return UUID; + } + + @JsonProperty("UUID") + public void setUUID(String uUID) { + UUID = uUID; + } + + @JsonProperty("invariantUUID") + public String getInvariantUUID() { + return invariantUUID; + } + + @JsonProperty("invariantUUID") + public void setInvariantUUID(String invariantUUID) { + this.invariantUUID = invariantUUID; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + + VnfDetails that = (VnfDetails) o; + + if (getUUID() != null ? !getUUID().equals(that.getUUID()) : that.getUUID() != null) return false; + return getInvariantUUID() != null ? getInvariantUUID().equals(that.getInvariantUUID()) : that.getInvariantUUID() == null; + } + + @Override + public int hashCode() { + int result = getUUID() != null ? getUUID().hashCode() : 0; + result = 31 * result + (getInvariantUUID() != null ? getInvariantUUID().hashCode() : 0); + return result; + } + + @Override + public String toString() { + return "VnfDetails{" + + "UUID='" + UUID + '\'' + + ", invariantUUID='" + invariantUUID + '\'' + + '}'; + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/changeManagement/VnfDetailsWithWorkflows.java b/vid-app-common/src/main/java/org/onap/vid/changeManagement/VnfDetailsWithWorkflows.java new file mode 100644 index 000000000..db162999f --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/changeManagement/VnfDetailsWithWorkflows.java @@ -0,0 +1,36 @@ +package org.onap.vid.changeManagement; + +import org.onap.vid.model.VNFDao; +import org.onap.vid.model.VidWorkflow; + +import java.util.List; +import java.util.stream.Collectors; + +public class VnfDetailsWithWorkflows extends VnfDetails { + + private List workflows; + + public VnfDetailsWithWorkflows() { + } + + + @SuppressWarnings("WeakerAccess") + public VnfDetailsWithWorkflows(String UUID, String invariantUUID, List workflows) { + super(UUID, invariantUUID); + this.workflows = workflows; + } + + public VnfDetailsWithWorkflows(VNFDao vnfDao) { + this(vnfDao.getVnfUUID(), + vnfDao.getVnfInvariantUUID(), + vnfDao.getWorkflows().stream().map(VidWorkflow::getWokflowName).collect(Collectors.toList())); + } + + public List getWorkflows() { + return workflows; + } + + public void setWorkflows(List workflows) { + this.workflows = workflows; + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/changeManagement/VnfWorkflowRelationAllResponse.java b/vid-app-common/src/main/java/org/onap/vid/changeManagement/VnfWorkflowRelationAllResponse.java new file mode 100644 index 000000000..5c9af661e --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/changeManagement/VnfWorkflowRelationAllResponse.java @@ -0,0 +1,23 @@ +package org.onap.vid.changeManagement; + +import java.util.List; + +public class VnfWorkflowRelationAllResponse { + + private List vnfs; + + public VnfWorkflowRelationAllResponse() { + } + + public VnfWorkflowRelationAllResponse(List vnfs) { + this.vnfs = vnfs; + } + + public List getVnfs() { + return vnfs; + } + + public void setVnfs(List vnfs) { + this.vnfs = vnfs; + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/changeManagement/VnfWorkflowRelationRequest.java b/vid-app-common/src/main/java/org/onap/vid/changeManagement/VnfWorkflowRelationRequest.java new file mode 100644 index 000000000..cc9abae27 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/changeManagement/VnfWorkflowRelationRequest.java @@ -0,0 +1,31 @@ +package org.onap.vid.changeManagement; + +import java.util.List; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class VnfWorkflowRelationRequest { + + public VnfWorkflowRelationRequest() { + } + + public VnfWorkflowRelationRequest(List workflowsDetails) { + this.workflowsDetails = workflowsDetails; + } + + @JsonProperty("workflowsDetails") + private List workflowsDetails; + + @JsonProperty("workflowsDetails") + public List getWorkflowsDetails() { + return workflowsDetails; + } + + @JsonProperty("workflowsDetails") + public void setWorkflowsDetails(List workflowsDetails) { + this.workflowsDetails = workflowsDetails; + } + + + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/changeManagement/VnfWorkflowRelationResponse.java b/vid-app-common/src/main/java/org/onap/vid/changeManagement/VnfWorkflowRelationResponse.java new file mode 100644 index 000000000..98ebc89ea --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/changeManagement/VnfWorkflowRelationResponse.java @@ -0,0 +1,15 @@ +package org.onap.vid.changeManagement; + +import org.onap.vid.model.ListOfErrorsResponse; + +import java.util.List; + +public class VnfWorkflowRelationResponse extends ListOfErrorsResponse { + + public VnfWorkflowRelationResponse() { + } + + public VnfWorkflowRelationResponse(List errors) { + super(errors); + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/changeManagement/WorkflowsDetail.java b/vid-app-common/src/main/java/org/onap/vid/changeManagement/WorkflowsDetail.java new file mode 100644 index 000000000..e833ecb28 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/changeManagement/WorkflowsDetail.java @@ -0,0 +1,44 @@ +package org.onap.vid.changeManagement; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.google.common.base.MoreObjects; + +public class WorkflowsDetail { + + public WorkflowsDetail() { + } + + public WorkflowsDetail(VnfDetails vnfDetails, String workflowName) { + this.vnfDetails = vnfDetails; + this.workflowName = workflowName; + } + + @JsonProperty("vnfDetails") + private VnfDetails vnfDetails; + + @JsonProperty("workflowName") + private String workflowName; + + @JsonProperty("vnfDetails") + public VnfDetails getVnfDetails() { + return vnfDetails; + } + @JsonProperty("vnfDetails") + public void setVnfDetails(VnfDetails vnfDetails) { + this.vnfDetails = vnfDetails; + } + @JsonProperty("workflowName") + public String getWorkflowName() { + return workflowName; + } + @JsonProperty("workflowName") + public void setWorkflowName(String workflowName) { + this.workflowName = workflowName; + } + + @Override + public String toString() { + return vnfDetails + + ", workflowName='" + workflowName; + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/client/FakeHttpSession.java b/vid-app-common/src/main/java/org/onap/vid/client/FakeHttpSession.java new file mode 100644 index 000000000..69ce11f4b --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/client/FakeHttpSession.java @@ -0,0 +1,224 @@ +package org.onap.vid.client; + +import org.apache.commons.io.IOUtils; +import org.json.JSONArray; +import org.json.JSONObject; +import org.json.JSONTokener; + +import javax.servlet.ServletContext; +import javax.servlet.http.HttpSession; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.util.Collections; +import java.util.Enumeration; +import java.util.HashMap; +import java.util.Map; + +/** + * Created by pickjonathan on 03/07/2017. + */ +public class FakeHttpSession implements HttpSession { + + /** + * Setup the creation time + */ + public FakeHttpSession() { + File file = new File("resources/roles.json"); + + String rolesInputStream = null; + try { + rolesInputStream = IOUtils.toString(FakeHttpSession.class.getClassLoader().getResourceAsStream("roles.json"),"UTF8"); + } catch (IOException e) { + e.printStackTrace(); + } + JSONTokener tokener = new JSONTokener(rolesInputStream); + JSONObject roles = new JSONObject(tokener); + + JSONArray rolesArray = roles.getJSONArray("roles"); + + //set permissions to the roles from file. + this.setAttribute("role", rolesArray); + + creationTime = System.currentTimeMillis(); + } + + + /** + * Setup the creation time + * @param id The new session id + */ + public FakeHttpSession(String id) + { + this.id = id; + creationTime = System.currentTimeMillis(); + } + + /* (non-Javadoc) + * @see javax.servlet.http.HttpSession#getCreationTime() + */ + public long getCreationTime() + { + return creationTime; + } + + /* (non-Javadoc) + * @see javax.servlet.http.HttpSession#getId() + */ + public String getId() + { + if (id == null) + { + System.out.println("Inventing data in FakeHttpSession.getId() to remain plausible."); + id = "fake"; + } + + return id; + } + + /* (non-Javadoc) + * @see javax.servlet.http.HttpSession#getLastAccessedTime() + */ + public long getLastAccessedTime() + { + return creationTime; + } + + /* (non-Javadoc) + * @see javax.servlet.http.HttpSession#getServletContext() + */ + public ServletContext getServletContext() + { + return null; + } + + /* (non-Javadoc) + * @see javax.servlet.http.HttpSession#setMaxInactiveInterval(int) + */ + public void setMaxInactiveInterval(int maxInactiveInterval) + { + this.maxInactiveInterval = maxInactiveInterval; + } + + /* (non-Javadoc) + * @see javax.servlet.http.HttpSession#getMaxInactiveInterval() + */ + public int getMaxInactiveInterval() + { + return maxInactiveInterval; + } + + /** + * @see javax.servlet.http.HttpSession#getSessionContext() + * @deprecated + */ + @SuppressWarnings({"UnnecessaryFullyQualifiedName"}) + @Deprecated + public javax.servlet.http.HttpSessionContext getSessionContext() + { + return null; + } + + /* (non-Javadoc) + * @see javax.servlet.http.HttpSession#getAttribute(java.lang.String) + */ + public Object getAttribute(String name) + { + return attributes.get(name); + } + + /* (non-Javadoc) + * @see javax.servlet.http.HttpSession#getValue(java.lang.String) + */ + @Deprecated + public Object getValue(String name) + { + return attributes.get(name); + } + + /* (non-Javadoc) + * @see javax.servlet.http.HttpSession#getAttributeNames() + */ + public Enumeration getAttributeNames() + { + return Collections.enumeration(attributes.keySet()); + } + + /* (non-Javadoc) + * @see javax.servlet.http.HttpSession#getValueNames() + */ + @Deprecated + public String[] getValueNames() + { + return attributes.keySet().toArray(new String[attributes.keySet().size()]); + } + + /* (non-Javadoc) + * @see javax.servlet.http.HttpSession#setAttribute(java.lang.String, java.lang.Object) + */ + public void setAttribute(String name, Object value) + { + attributes.put(name, value); + } + + /* (non-Javadoc) + * @see javax.servlet.http.HttpSession#putValue(java.lang.String, java.lang.Object) + */ + @Deprecated + public void putValue(String name, Object value) + { + attributes.put(name, value); + } + + /* (non-Javadoc) + * @see javax.servlet.http.HttpSession#removeAttribute(java.lang.String) + */ + public void removeAttribute(String name) + { + attributes.remove(name); + } + + /* (non-Javadoc) + * @see javax.servlet.http.HttpSession#removeValue(java.lang.String) + */ + @Deprecated + public void removeValue(String name) + { + attributes.remove(name); + } + + /* (non-Javadoc) + * @see javax.servlet.http.HttpSession#invalidate() + */ + public void invalidate() + { + } + + /* (non-Javadoc) + * @see javax.servlet.http.HttpSession#isNew() + */ + public boolean isNew() + { + return true; + } + + /** + * The session id + */ + private String id = null; + + /** + * The list of attributes + */ + private Map attributes = new HashMap(); + + /** + * When were we created + */ + private long creationTime; + + /** + * How long before we timeout? + */ + private int maxInactiveInterval = 30 * 60 * 1000; +} diff --git a/vid-app-common/src/main/java/org/onap/vid/client/HttpBasicClient.java b/vid-app-common/src/main/java/org/onap/vid/client/HttpBasicClient.java new file mode 100644 index 000000000..d0a34ce38 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/client/HttpBasicClient.java @@ -0,0 +1,67 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.client; + + +import java.text.DateFormat; +import java.text.SimpleDateFormat; + +import javax.servlet.ServletContext; +import javax.ws.rs.client.Client; +import javax.ws.rs.client.ClientBuilder; + +import org.glassfish.jersey.client.ClientConfig; +import org.glassfish.jersey.client.ClientProperties; +import org.springframework.beans.factory.annotation.Autowired; + +import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; + +/** + * General HTTP client. + */ + +public class HttpBasicClient{ + + /** The servlet context. */ + @Autowired + private ServletContext servletContext; + + /** The logger. */ + EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(HttpBasicClient.class); + + /** The Constant dateFormat. */ + final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); + + /** + * Obtain a basic HTTP client . + * + * @return Client client object + * @throws Exception the exception + */ + public static Client getClient() throws Exception { + + ClientConfig config = new ClientConfig(); + config.property(ClientProperties.SUPPRESS_HTTP_COMPLIANCE_VALIDATION, true); + + return ClientBuilder.newClient(config) + .register(org.onap.vid.aai.util.CustomJacksonJaxBJsonProvider.class); + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/client/HttpsBasicClient.java b/vid-app-common/src/main/java/org/onap/vid/client/HttpsBasicClient.java new file mode 100644 index 000000000..28a4d0f9f --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/client/HttpsBasicClient.java @@ -0,0 +1,143 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.client; + +import java.io.File; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.Date; + +import javax.net.ssl.HostnameVerifier; +import javax.net.ssl.HttpsURLConnection; +import javax.net.ssl.SSLContext; +import javax.net.ssl.SSLSession; +import javax.ws.rs.client.Client; +import javax.ws.rs.client.ClientBuilder; + +import org.eclipse.jetty.util.security.Password; +import org.glassfish.jersey.client.ClientConfig; +import org.glassfish.jersey.client.ClientProperties; +import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.vid.properties.VidProperties; + + /** + * General SSL client using the VID tomcat keystore. It doesn't use client certificates. + */ + +public class HttpsBasicClient{ + + /** The logger. */ + static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(HttpsBasicClient.class); + + /** The Constant dateFormat. */ + final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); + + /** + * Retrieve an SSL client. + * + * @return Client The SSL client + * @throws Exception the exception + */ + public static Client getClient() throws Exception { + String methodName = "getClient"; + ClientConfig config = new ClientConfig(); + //config.getFeatures().put(JSONConfiguration.FEATURE_POJO_MAPPING, Boolean.TRUE); + //config.getClasses().add(org.openecomp.aai.util.CustomJacksonJaxBJsonProvider.class); + + SSLContext ctx = null; + + try { + + config.property(ClientProperties.SUPPRESS_HTTP_COMPLIANCE_VALIDATION, true); + + String truststore_path = SystemProperties.getProperty(VidProperties.VID_TRUSTSTORE_FILENAME); + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + " " + methodName + " truststore_path=" + truststore_path); + String truststore_password = SystemProperties.getProperty(VidProperties.VID_TRUSTSTORE_PASSWD_X); + + + String decrypted_truststore_password = Password.deobfuscate(truststore_password); + //logger.debug(dateFormat.format(new Date()) + " " + methodName + " decrypted_truststore_password=" + decrypted_truststore_password); + + File tr = new File (truststore_path); + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + " " + methodName + " absolute truststore path=" + tr.getAbsolutePath()); + + //String keystore_path = certFilePath + AAIProperties.FILESEPARTOR + SystemProperties.getProperty(AAIProperties.AAI_KEYSTORE_FILENAME); + //String keystore_password = SystemProperties.getProperty(AAIProperties.AAI_KEYSTORE_PASSWD_X); + //String decrypted_keystore_password = EncryptedPropValue.decryptTriple(keystore_password); + + System.setProperty("javax.net.ssl.trustStore", truststore_path); + System.setProperty("javax.net.ssl.trustStorePassword", decrypted_truststore_password); + HttpsURLConnection.setDefaultHostnameVerifier( new HostnameVerifier(){ + public boolean verify(String string,SSLSession ssls) { + return true; + } + }); + + //May need to make the algorithm a parameter. MSO requires TLSv1.1 or TLSv1.2 + ctx = SSLContext.getInstance("TLSv1.2"); + + /* + KeyManagerFactory kmf = null; + try { + kmf = KeyManagerFactory.getInstance("SunX509"); + FileInputStream fin = new FileInputStream(keystore_path); + KeyStore ks = KeyStore.getInstance("PKCS12"); + char[] pwd = decrypted_keystore_password.toCharArray(); + ks.load(fin, pwd); + kmf.init(ks, pwd); + } catch (Exception e) { + System.out.println("Error setting up kmf: exiting"); + e.printStackTrace(); + System.exit(1); + } + + ctx.init(kmf.getKeyManagers(), null, null); + */ + ctx.init(null, null, null); + //config.getProperties().put(HTTPSProperties.PROPERTY_HTTPS_PROPERTIES, + // new HTTPSProperties( , ctx)); + + return ClientBuilder.newBuilder() + .sslContext(ctx) + .hostnameVerifier(new HostnameVerifier() { + @Override + public boolean verify( String s, SSLSession sslSession ) { + return true; + } + }).withConfig(config) + .build() + .register(org.onap.vid.aai.util.CustomJacksonJaxBJsonProvider.class); + + } catch (Exception e) { + logger.debug(EELFLoggerDelegate.debugLogger, "Error setting up config: exiting"); + //System.out.println("Error setting up config: exiting"); + e.printStackTrace(); + return null; + } + + //Client client = ClientBuilder.newClient(config); + // uncomment this line to get more logging for the request/response + // client.addFilter(new LoggingFilter(System.out)); + + //return client; + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/AaiController.java b/vid-app-common/src/main/java/org/onap/vid/controller/AaiController.java new file mode 100644 index 000000000..1719ff6d4 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/controller/AaiController.java @@ -0,0 +1,750 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.controller; + +import org.codehaus.jackson.JsonGenerationException; +import org.codehaus.jackson.map.JsonMappingException; +import org.codehaus.jackson.map.ObjectMapper; +import org.onap.vid.aai.AaiResponse; +import org.onap.vid.aai.ServiceInstancesSearchResults; +import org.onap.vid.aai.SubscriberData; +import org.onap.vid.aai.SubscriberFilteredResults; +import org.onap.vid.aai.model.AaiGetOperationalEnvironments.OperationalEnvironmentList; +import org.onap.vid.aai.model.AaiGetPnfs.Pnf; +import org.onap.vid.aai.model.AaiGetTenatns.GetTenantsResponse; +import org.onap.vid.aai.util.AAIRestInterface; +import org.onap.vid.model.VersionByInvariantIdsRequest; +import org.onap.vid.roles.Role; +import org.onap.vid.roles.RoleProvider; +import org.onap.vid.roles.RoleValidator; +import org.onap.vid.services.AaiService; +import org.openecomp.portalsdk.core.controller.RestrictedBaseController; +import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.openecomp.portalsdk.core.util.SystemProperties; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.HandlerMapping; +import org.springframework.web.servlet.ModelAndView; + +import javax.servlet.ServletContext; +import javax.servlet.http.HttpServletRequest; +import javax.ws.rs.BadRequestException; +import javax.ws.rs.DefaultValue; +import javax.ws.rs.QueryParam; +import javax.ws.rs.WebApplicationException; +import javax.ws.rs.core.Response; +import java.io.File; +import java.io.IOException; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.*; + +import static org.onap.vid.utils.Logging.getMethodName; + +/** + * Controller to handle a&ai requests. + */ + +@RestController +public class +AaiController extends RestrictedBaseController { + /** + * The Constant dateFormat. + */ + final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); + /** + * The from app id. + */ + protected String fromAppId = "VidAaiController"; + /** + * The logger. + */ + private static final EELFLoggerDelegate LOGGER = EELFLoggerDelegate.getLogger(AaiController.class); + /** + * The model. + */ + private Map model = new HashMap(); + /** + * The servlet context. + */ + @Autowired + private ServletContext servletContext; + /** + * aai service + */ + @Autowired + private AaiService aaiService; + @Autowired + private RoleProvider roleProvider; + + public AaiController() { + + } + + public AaiController(ServletContext servletContext) { + this.servletContext = servletContext; + + } + + /** + * Welcome method. + * + * @param request the request + * @return ModelAndView The view + */ + @RequestMapping(value = {"/subscriberSearch"}, method = RequestMethod.GET) + public ModelAndView welcome(HttpServletRequest request) { + LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== AaiController welcome start"); + return new ModelAndView(getViewName()); + } + + @RequestMapping(value = {"/aai_get_aic_zones"}, method = RequestMethod.GET) + public ResponseEntity getAicZones(HttpServletRequest request) throws JsonGenerationException, JsonMappingException, IOException { + LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== getAicZones controller start"); + AaiResponse response = aaiService.getAaiZones(); + return aaiResponseToResponseEntity(response); + } + + @RequestMapping(value = {"/aai_get_aic_zone_for_pnf/{globalCustomerId}/{serviceType}/{serviceId}"}, method = RequestMethod.GET) + public ResponseEntity getAicZoneForPnf(@PathVariable("globalCustomerId") String globalCustomerId ,@PathVariable("serviceType") String serviceType , @PathVariable("serviceId") String serviceId ,HttpServletRequest request) throws JsonGenerationException, JsonMappingException, IOException { + LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== getAicZoneForPnf controller start"); + AaiResponse response = aaiService.getAicZoneForPnf(globalCustomerId , serviceType , serviceId); + return aaiResponseToResponseEntity(response); + } + + /** + * Get services from a&ai. + * + * @return ResponseEntity The response entity with the logged in user uuid. + * @throws IOException Signals that an I/O exception has occurred. + * @throws InterruptedException the interrupted exception + */ + @RequestMapping(value = {"/getuserID"}, method = RequestMethod.GET) + public ResponseEntity getUserID(HttpServletRequest request) throws IOException, InterruptedException { + + String userId = ControllersUtils.extractUserId(request); + + return new ResponseEntity(userId, HttpStatus.OK); + } + + /** + * Get services from a&ai. + * + * @return ResponseEntity The response entity + * @throws IOException Signals that an I/O exception has occurred. + * @throws InterruptedException the interrupted exception + */ + @RequestMapping(value = "/aai_get_services", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) + public ResponseEntity doGetServices(HttpServletRequest request) throws IOException, InterruptedException { + RoleValidator roleValidator = new RoleValidator(roleProvider.getUserRoles(request)); + + AaiResponse subscriberList = aaiService.getServices(roleValidator); + ResponseEntity responseEntity = aaiResponseToResponseEntity(subscriberList); + + return responseEntity; + } + + + @RequestMapping(value = {"/aai_get_version_by_invariant_id"}, method = RequestMethod.POST) + public ResponseEntity getVersionByInvariantId(HttpServletRequest request, @RequestBody VersionByInvariantIdsRequest versions) throws IOException { + ResponseEntity responseEntity; + ObjectMapper objectMapper = new ObjectMapper(); + + Response result = aaiService.getVersionByInvariantId(versions.versions); + + return new ResponseEntity(result.readEntity(String.class), HttpStatus.OK); + } + + + private ResponseEntity aaiResponseToResponseEntity(AaiResponse aaiResponseData) + throws IOException, JsonGenerationException, JsonMappingException { + ResponseEntity responseEntity; + ObjectMapper objectMapper = new ObjectMapper(); + if (aaiResponseData.getHttpCode() == 200) { + responseEntity = new ResponseEntity(objectMapper.writeValueAsString(aaiResponseData.getT()), HttpStatus.OK); + } else { + responseEntity = new ResponseEntity(aaiResponseData.getErrorMessage(), HttpStatus.valueOf(aaiResponseData.getHttpCode())); + } + return responseEntity; + } + + /** + * Lookup single service instance in a&ai. Get the service-subscription and customer, too, i guess? + * + * @param serviceInstanceId the service instance Id + * @return ResponseEntity The response entity + * @throws IOException Signals that an I/O exception has occurred. + * @throws InterruptedException the interrupted exception + */ + @RequestMapping(value = "/aai_get_service_instance/{service-instance-id}/{service-instance-type}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) + public ResponseEntity doGetServiceInstance(@PathVariable("service-instance-id") String serviceInstanceId, @PathVariable("service-instance-type") String serviceInstanceType) throws IOException, InterruptedException { + File certiPath = GetCertificatesPath(); + Response resp = null; + + if (serviceInstanceType.equalsIgnoreCase("Service Instance Id")) { + resp = doAaiGet(certiPath.getAbsolutePath(), + "search/nodes-query?search-node-type=service-instance&filter=service-instance-id:EQUALS:" + + serviceInstanceId, false); + } else { + resp = doAaiGet(certiPath.getAbsolutePath(), + "search/nodes-query?search-node-type=service-instance&filter=service-instance-name:EQUALS:" + + serviceInstanceId, false); + } + return convertResponseToResponseEntity(resp); + } + + /** + * Get services from a&ai. + * + * @param globalCustomerId the global customer id + * @param serviceSubscriptionId the service subscription id + * @return ResponseEntity The response entity + * @throws IOException Signals that an I/O exception has occurred. + * @throws InterruptedException the interrupted exception + */ + @RequestMapping(value = "/aai_get_service_subscription/{global-customer-id}/{service-subscription-id}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) + public ResponseEntity doGetServices(@PathVariable("global-customer-id") String globalCustomerId, + @PathVariable("service-subscription-id") String serviceSubscriptionId) throws IOException, InterruptedException { + File certiPath = GetCertificatesPath(); + Response resp = doAaiGet(certiPath.getAbsolutePath(), "business/customers/customer/" + globalCustomerId + + "/service-subscriptions/service-subscription/" + serviceSubscriptionId + "?depth=0", false); + return convertResponseToResponseEntity(resp); + } + + /** + * Obtain the subscriber list from a&ai. + * + * @param fullSet the full set + * @return ResponseEntity The response entity + * @throws IOException Signals that an I/O exception has occurred. + * @throws InterruptedException the interrupted exception + */ + @RequestMapping(value = "/aai_get_subscribers", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) + public ResponseEntity doGetSubscriberList(HttpServletRequest request, @DefaultValue("n") @QueryParam("fullSet") String fullSet) throws IOException, InterruptedException { + return getFullSubscriberList(request); + } + + /** + * Obtain the Target Prov Status from the System.Properties file. + * + * @return ResponseEntity The response entity + * @throws IOException Signals that an I/O exception has occurred. + * @throws InterruptedException the interrupted exception + */ + @RequestMapping(value = "/get_system_prop_vnf_prov_status", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) + public ResponseEntity getTargetProvStatus() throws IOException, InterruptedException { + String p = SystemProperties.getProperty("aai.vnf.provstatus"); + return new ResponseEntity(p, HttpStatus.OK); + } + + + /** + * Obtain the Target Prov Status from the System.Properties file. + * + * @return ResponseEntity The response entity + * @throws IOException Signals that an I/O exception has occurred. + * @throws InterruptedException the interrupted exception + */ + @RequestMapping(value = "/get_operational_environments", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) + public AaiResponse getOperationalEnvironments(@RequestParam(value="operationalEnvironmentType", required = false) String operationalEnvironmentType, + @RequestParam(value="operationalEnvironmentStatus", required = false) String operationalEnvironmentStatus) throws IOException, InterruptedException { + LOGGER.debug(EELFLoggerDelegate.debugLogger, "start {}({}, {})", getMethodName(), operationalEnvironmentType, operationalEnvironmentStatus); + AaiResponse response = aaiService.getOperationalEnvironments(operationalEnvironmentType,operationalEnvironmentStatus); + if (response.getHttpCode() != 200) { + String errorMessage = getAaiErrorMessage(response.getErrorMessage()); + if(errorMessage != null) { + response = new AaiResponse(response.getT(), errorMessage, response.getHttpCode()); + } + } + + LOGGER.debug(EELFLoggerDelegate.debugLogger, "end {}() => {}", getMethodName(), response); + return response; + } + + /** + * Obtain the full subscriber list from a&ai. + *

    + * g @return ResponseEntity The response entity + * + * @throws IOException Signals that an I/O exception has occurred. + * @throws InterruptedException the interrupted exception + */ + @RequestMapping(value = "/aai_get_full_subscribers", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) + public ResponseEntity getFullSubscriberList(HttpServletRequest request) throws IOException, InterruptedException { + ObjectMapper objectMapper = new ObjectMapper(); + ResponseEntity responseEntity; + RoleValidator roleValidator = new RoleValidator(roleProvider.getUserRoles(request)); + SubscriberFilteredResults subscriberList = aaiService.getFullSubscriberList(roleValidator); + if (subscriberList.getHttpCode() == 200) { + responseEntity = new ResponseEntity(objectMapper.writeValueAsString(subscriberList.getSubscriberList()), HttpStatus.OK); + } else { + responseEntity = new ResponseEntity(subscriberList.getErrorMessage(), HttpStatus.valueOf(subscriberList.getHttpCode())); + } + + + return responseEntity; + } + + + @RequestMapping(value = "/get_vnf_data_by_globalid_and_service_type/{globalCustomerId}/{serviceType}", + method = RequestMethod.GET, + produces = MediaType.APPLICATION_JSON_VALUE) + public ResponseEntity getVnfDataByGlobalIdAndServiceType(HttpServletRequest request, + @PathVariable("globalCustomerId") String globalCustomerId, + @PathVariable("serviceType") String serviceType) throws IOException { + + Response resp = aaiService.getVNFData(globalCustomerId, serviceType); + return convertResponseToResponseEntity(resp); + } + + + /** + * Refresh the subscriber list from a&ai. + * + * @return ResponseEntity The response entity + * @throws IOException Signals that an I/O exception has occurred. + */ + @RequestMapping(value = "/aai_refresh_subscribers", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) + public ResponseEntity doRefreshSubscriberList() throws IOException { + Response resp = getSubscribers(false); + return convertResponseToResponseEntity(resp); + } + + /** + * Refresh the full subscriber list from a&ai. + * + * @return ResponseEntity The response entity + * @throws IOException Signals that an I/O exception has occurred. + */ + @RequestMapping(value = "/aai_refresh_full_subscribers", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) + public ResponseEntity doRefreshFullSubscriberList() throws IOException { + Response resp = getSubscribers(false); + return convertResponseToResponseEntity(resp); + } + + /** + * Get subscriber details from a&ai. + * + * @param subscriberId the subscriber id + * @return ResponseEntity The response entity + */ + @RequestMapping(value = "/aai_sub_details/{subscriberId}", method = RequestMethod.GET) + public ResponseEntity GetSubscriberDetails(HttpServletRequest request, @PathVariable("subscriberId") String subscriberId) throws IOException { + ObjectMapper objectMapper = new ObjectMapper(); + ResponseEntity responseEntity; + List roles = roleProvider.getUserRoles(request); + RoleValidator roleValidator = new RoleValidator(roles); + AaiResponse subscriberData = aaiService.getSubscriberData(subscriberId, roleValidator); + String httpMessage = subscriberData.getT() != null ? + objectMapper.writeValueAsString(subscriberData.getT()) : + subscriberData.getErrorMessage(); + + responseEntity = new ResponseEntity(httpMessage, HttpStatus.valueOf(subscriberData.getHttpCode())); + return responseEntity; + } + + /** + * Get service instances that match the query from a&ai. + * + * @param subscriberId the subscriber id + * @param instanceIdentifier the service instance name or id. + * @param projects the projects that are related to the instance + * @param owningEntities the owningEntities that are related to the instance + * @return ResponseEntity The response entity + */ + @RequestMapping(value = "/search_service_instances", method = RequestMethod.GET) + public ResponseEntity SearchServiceInstances(HttpServletRequest request, + @RequestParam(value="subscriberId", required = false) String subscriberId, + @RequestParam(value="serviceInstanceIdentifier", required = false) String instanceIdentifier, + @RequestParam(value="project", required = false) List projects, + @RequestParam(value="owningEntity", required = false) List owningEntities) throws IOException { + ObjectMapper objectMapper = new ObjectMapper(); + ResponseEntity responseEntity; + + List roles = roleProvider.getUserRoles(request); + RoleValidator roleValidator = new RoleValidator(roles); + + AaiResponse searchResult = aaiService.getServiceInstanceSearchResults(subscriberId, instanceIdentifier, roleValidator, owningEntities, projects); + + String httpMessage = searchResult.getT() != null ? + objectMapper.writeValueAsString(searchResult.getT()) : + searchResult.getErrorMessage(); + + + if(searchResult.getT().serviceInstances.size() == 0){ + responseEntity = new ResponseEntity(httpMessage, HttpStatus.NOT_FOUND); + + } else { + responseEntity = new ResponseEntity(httpMessage, HttpStatus.valueOf(searchResult.getHttpCode())); + + } + return responseEntity; + } + + + + /** + * Issue a named query to a&ai. + * + * @param namedQueryId the named query id + * @param globalCustomerId the global customer id + * @param serviceType the service type + * @param serviceInstance the service instance + * @return ResponseEntity The response entity + */ + @RequestMapping(value = "/aai_sub_viewedit/{namedQueryId}/{globalCustomerId}/{serviceType}/{serviceInstance}", method = RequestMethod.GET) + public ResponseEntity viewEditGetComponentList( + @PathVariable("namedQueryId") String namedQueryId, + @PathVariable("globalCustomerId") String globalCustomerId, + @PathVariable("serviceType") String serviceType, + @PathVariable("serviceInstance") String serviceInstance) { + + String componentListPayload = getComponentListPutPayload(namedQueryId, globalCustomerId, serviceType, serviceInstance); + File certiPath = GetCertificatesPath(); + + Response resp = doAaiPost(certiPath.getAbsolutePath(), "search/named-query", componentListPayload, false); + return convertResponseToResponseEntity(resp); + } + + @RequestMapping(value = "/aai_get_vnf_data/{globalCustomerId}/{serviceType}/{serviceInstanceId}", method = RequestMethod.GET) + public AaiResponse getVnfData( + @PathVariable("globalCustomerId") String globalCustomerId, + @PathVariable("serviceType") String serviceType, + @PathVariable("serviceInstanceId") String serviceInstanceId) { + + return aaiService.getVNFData(globalCustomerId, serviceType, serviceInstanceId); + + } + + + /** + * Issue a named query to a&ai. + * + * @param namedQueryId the named query id + * @param globalCustomerId the global customer id + * @param serviceType the service type + * @return ResponseEntity The response entity + */ + @RequestMapping(value = "/aai_get_models_by_service_type/{namedQueryId}/{globalCustomerId}/{serviceType}", method = RequestMethod.GET) + public ResponseEntity viewEditGetComponentList( + @PathVariable("namedQueryId") String namedQueryId, + @PathVariable("globalCustomerId") String globalCustomerId, + @PathVariable("serviceType") String serviceType) { + + String componentListPayload = getModelsByServiceTypePayload(namedQueryId, globalCustomerId, serviceType); + File certiPath = GetCertificatesPath(); + + Response resp = doAaiPost(certiPath.getAbsolutePath(), "search/named-query", componentListPayload, false); + return convertResponseToResponseEntity(resp); + } + + @RequestMapping(value = "/aai_get_vnf_instances/{globalCustomerId}/{serviceType}/{modelVersionId}/{modelInvariantId}/{cloudRegion}", method = RequestMethod.GET) + public ResponseEntity getNodeTemplateInstances( + @PathVariable("globalCustomerId") String globalCustomerId, + @PathVariable("serviceType") String serviceType, + @PathVariable("modelVersionId") String modelVersionId, + @PathVariable("modelInvariantId") String modelInvariantId, + @PathVariable("cloudRegion") String cloudRegion) { + + AaiResponse resp = aaiService.getNodeTemplateInstances(globalCustomerId, serviceType, modelVersionId, modelInvariantId, cloudRegion); + return new ResponseEntity(resp.getT(), HttpStatus.valueOf(resp.getHttpCode())); + } + + @RequestMapping(value = "/aai_get_by_uri/**", method = RequestMethod.GET) + public ResponseEntity getByUri(HttpServletRequest request) { + File certiPath = GetCertificatesPath(); + + String restOfTheUrl = (String) request.getAttribute( + HandlerMapping.PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE); + String formattedUri = restOfTheUrl.replaceFirst("/aai_get_by_uri/", "").replaceFirst("^aai/v[\\d]+/", ""); + + Response resp = doAaiGet(certiPath.getAbsolutePath(), formattedUri, false); + + return convertResponseToResponseEntity(resp); + } + + @RequestMapping(value = "/aai_get_configuration/{configuration_id}", method = RequestMethod.GET) + public ResponseEntity getSpecificConfiguration(@PathVariable("configuration_id") String configurationId) { + File certiPath = GetCertificatesPath(); + + Response resp = doAaiGet(certiPath.getAbsolutePath(), "network/configurations/configuration/"+configurationId, false); + + return convertResponseToResponseEntity(resp); + } + + @RequestMapping(value = "/aai_get_service_instance_pnfs/{globalCustomerId}/{serviceType}/{serviceInstanceId}", method = RequestMethod.GET) + public List getServiceInstanceAssociatedPnfs( + @PathVariable("globalCustomerId") String globalCustomerId, + @PathVariable("serviceType") String serviceType, + @PathVariable("serviceInstanceId") String serviceInstanceId) { + + return aaiService.getServiceInstanceAssociatedPnfs(globalCustomerId, serviceType, serviceInstanceId); + } + + /** + * PNF section + */ + @RequestMapping(value = "/aai_get_pnfs/pnf/{pnf_id}", method = RequestMethod.GET) + public ResponseEntity getSpecificPnf(@PathVariable("pnf_id") String pnfId) { + //logger.trace(EELFLoggerDelegate.debugLogger, "start {}({})", getMethodName(), pnfId); + AaiResponse resp; + ResponseEntity re; + try { + resp = aaiService.getSpecificPnf(pnfId); + re = new ResponseEntity(resp.getT(), HttpStatus.valueOf(resp.getHttpCode())); + } catch (Exception e){ + return new ResponseEntity(e.getMessage(), HttpStatus.INTERNAL_SERVER_ERROR); + } + //logger.trace(EELFLoggerDelegate.debugLogger, "end {}() => {}", getMethodName(), resp.getHttpCode()); + return re; + } + + + /** + * Obtain tenants for a given service type. + * + * @param globalCustomerId the global customer id + * @param serviceType the service type + * @return ResponseEntity The response entity + */ + @RequestMapping(value = "/aai_get_tenants/{global-customer-id}/{service-type}", method = RequestMethod.GET) + public ResponseEntity viewEditGetTenantsFromServiceType(HttpServletRequest request, + @PathVariable("global-customer-id") String globalCustomerId, @PathVariable("service-type") String serviceType) { + + ResponseEntity responseEntity; + try { + ObjectMapper objectMapper = new ObjectMapper(); + List roles = roleProvider.getUserRoles(request); + RoleValidator roleValidator = new RoleValidator(roles); + AaiResponse response = aaiService.getTenants(globalCustomerId, serviceType, roleValidator); + if (response.getHttpCode() == 200) { + responseEntity = new ResponseEntity(objectMapper.writeValueAsString(response.getT()), HttpStatus.OK); + } else { + responseEntity = new ResponseEntity(response.getErrorMessage(), HttpStatus.valueOf(response.getHttpCode())); + } + } catch (Exception e) { + responseEntity = new ResponseEntity("Unable to proccess getTenants reponse", HttpStatus.INTERNAL_SERVER_ERROR); + } + return responseEntity; + } + + @RequestMapping(value = "/aai_get_pnf_instances/{globalCustomerId}/{serviceType}/{modelVersionId}/{modelInvariantId}/{cloudRegion}/{equipVendor}/{equipModel}", method = RequestMethod.GET) + public ResponseEntity getPnfInstances( + @PathVariable("globalCustomerId") String globalCustomerId, + @PathVariable("serviceType") String serviceType, + @PathVariable("modelVersionId") String modelVersionId, + @PathVariable("modelInvariantId") String modelInvariantId, + @PathVariable("cloudRegion") String cloudRegion, + @PathVariable("equipVendor") String equipVendor, + @PathVariable("equipModel") String equipModel) { + + AaiResponse resp = aaiService.getPNFData(globalCustomerId, serviceType, modelVersionId, modelInvariantId, cloudRegion, equipVendor, equipModel); + return new ResponseEntity(resp.getT(), HttpStatus.valueOf(resp.getHttpCode())); + } + + private ResponseEntity convertResponseToResponseEntity(Response resp) { + ResponseEntity respEnt; + ObjectMapper objectMapper = new ObjectMapper(); + if (resp == null) { + respEnt = new ResponseEntity("Failed to fetch data from A&AI, check server logs for details.", HttpStatus.INTERNAL_SERVER_ERROR); + } else { + respEnt = new ResponseEntity(resp.readEntity(String.class), HttpStatus.valueOf(resp.getStatus())); + } + return respEnt; + } + + /** + * Gets the subscribers. + * + * @param isFullSet the is full set + * @return the subscribers + */ + private Response getSubscribers(boolean isFullSet) { + + File certiPath = GetCertificatesPath(); + String depth = "0"; + + Response resp = doAaiGet(certiPath.getAbsolutePath(), "business/customers?subscriber-type=INFRA&depth=" + depth, false); + if (resp != null) { + LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "getSubscribers() resp=" + resp.getStatusInfo().toString()); + } + return resp; + } + + /** + * Gets the subscriber details. + * + * @param subscriberId the subscriber id + * @return the subscriber details + */ + private Response getSubscriberDetails(String subscriberId) { + File certiPath = GetCertificatesPath(); + Response resp = doAaiGet(certiPath.getAbsolutePath(), "business/customers/customer/" + subscriberId + "?depth=2", false); + //String resp = doAaiGet(certiPath.getAbsolutePath(), "business/customers/customer/" + subscriberId, false); + LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "getSubscriberDetails() resp=" + resp.getStatusInfo().toString()); + return resp; + } + + /** + * Gets the certificates path. + * + * @return the file + */ + private File GetCertificatesPath() { + if (servletContext != null) + return new File(servletContext.getRealPath("/WEB-INF/cert/")); + return null; + } + + /** + * Send a GET request to a&ai. + * + * @param certiPath the certi path + * @param uri the uri + * @param xml the xml + * @return String The response + */ + protected Response doAaiGet(String certiPath, String uri, boolean xml) { + String methodName = "getSubscriberList"; + String transId = UUID.randomUUID().toString(); + LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + Response resp = null; + try { + + AAIRestInterface restContrller = new AAIRestInterface(certiPath); + resp = restContrller.RestGet(fromAppId, transId, uri, xml); + + } catch (WebApplicationException e) { + final String message = ((BadRequestException) e).getResponse().readEntity(String.class); + LOGGER.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + message); + LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + message); + } catch (Exception e) { + LOGGER.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); + LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); + } + + return resp; + } + + /** + * Send a POST request to a&ai. + * + * @param certiPath the certi path + * @param uri the uri + * @param payload the payload + * @param xml the xml + * @return String The response + */ + protected Response doAaiPost(String certiPath, String uri, String payload, boolean xml) { + String methodName = "getSubscriberList"; + String transId = UUID.randomUUID().toString(); + LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + Response resp = null; + try { + + AAIRestInterface restContrller = new AAIRestInterface(certiPath); + resp = restContrller.RestPost(fromAppId, transId, uri, payload, xml); + + } catch (Exception e) { + LOGGER.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); + LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); + } + + return resp; + } + + /** + * Gets the component list put payload. + * + * @param namedQueryId the named query id + * @param globalCustomerId the global customer id + * @param serviceType the service type + * @param serviceInstance the service instance + * @return the component list put payload + */ + private String getComponentListPutPayload(String namedQueryId, String globalCustomerId, String serviceType, String serviceInstance) { + return + " {" + + " \"instance-filters\": {" + + " \"instance-filter\": [" + + " {" + + " \"customer\": {" + + " \"global-customer-id\": \"" + globalCustomerId + "\"" + + " }," + + " \"service-instance\": {" + + " \"service-instance-id\": \"" + serviceInstance + "\"" + + " }," + + " \"service-subscription\": {" + + " \"service-type\": \"" + serviceType + "\"" + + " }" + + " }" + + " ]" + + " }," + + " \"query-parameters\": {" + + " \"named-query\": {" + + " \"named-query-uuid\": \"" + namedQueryId + "\"" + + " }" + + " }" + + "}"; + + } + + private String getModelsByServiceTypePayload(String namedQueryId, String globalCustomerId, String serviceType) { + // TODO Auto-generated method stub + return " {" + + " \"instance-filters\": {" + + " \"instance-filter\": [" + + " {" + + " \"customer\": {" + + " \"global-customer-id\": \"" + globalCustomerId + "\"" + + " }," + + " \"service-subscription\": {" + + " \"service-type\": \"" + serviceType + "\"" + + " }" + + " }" + + " ]" + + " }," + + " \"query-parameters\": {" + + " \"named-query\": {" + + " \"named-query-uuid\": \"" + namedQueryId + "\"" + + " }" + + " }" + + "}"; + + } + + private String getAaiErrorMessage(String message) { + try { + org.json.JSONObject json = new org.json.JSONObject(message); + json = json.getJSONObject("requestError").getJSONObject("serviceException"); + + return json.getString("messageId") + ": " + json.getString("text"); + + } catch (Exception e) { + return null; + } + } +} \ No newline at end of file diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/ChangeManagementController.java b/vid-app-common/src/main/java/org/onap/vid/controller/ChangeManagementController.java new file mode 100644 index 000000000..4f307ed96 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/controller/ChangeManagementController.java @@ -0,0 +1,193 @@ +package org.onap.vid.controller; + +import com.fasterxml.jackson.databind.ObjectMapper; +import org.apache.commons.lang3.exception.ExceptionUtils; +import org.apache.commons.lang3.tuple.Pair; +import org.json.simple.JSONArray; +import org.openecomp.portalsdk.core.controller.UnRestrictedBaseController; +import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.vid.changeManagement.*; +import org.onap.vid.exceptions.NotFoundException; +import org.onap.vid.model.ExceptionResponse; +import org.onap.vid.model.MsoExceptionResponse; +import org.onap.vid.mso.MsoResponseWrapper2; +import org.onap.vid.mso.MsoResponseWrapperInterface; +import org.onap.vid.mso.rest.Request; +import org.onap.vid.services.ChangeManagementService; +import org.onap.vid.services.WorkflowService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.servlet.http.HttpServletRequest; +import javax.ws.rs.WebApplicationException; +import java.io.IOException; +import java.util.Collection; +import java.util.Collections; + +import static org.onap.vid.utils.Logging.getMethodName; +import static org.springframework.http.HttpStatus.*; + +/** + * Controller to handle ChangeManagement feature requests. + */ +@RestController +@RequestMapping(ChangeManagementController.CHANGE_MANAGEMENT) +public class ChangeManagementController extends UnRestrictedBaseController { + private static final String GetWorkflowsResponse = null; + public static final String VNF_WORKFLOW_RELATION = "vnf_workflow_relation"; + public static final String CHANGE_MANAGEMENT = "change-management"; + public static final String GET_VNF_WORKFLOW_RELATION = "get_vnf_workflow_relation"; + public static final String SCHEDULER_BY_SCHEDULE_ID = "/scheduler/schedules/{scheduleId}"; + private static final EELFLoggerDelegate LOGGER = EELFLoggerDelegate.getLogger(ChangeManagementController.class); + private String fromAppId; + private final WorkflowService workflowService; + private final ChangeManagementService changeManagementService; + private final ObjectMapper objectMapper; + + + @Autowired + public ChangeManagementController(WorkflowService workflowService, ChangeManagementService changeManagementService, ObjectMapper objectMapper) { + this.fromAppId = "VidChangeManagementController"; + this.workflowService = workflowService; + this.changeManagementService = changeManagementService; + this.objectMapper = objectMapper; + } + + @RequestMapping(value = {"/workflow"}, method = RequestMethod.GET) + public ResponseEntity> getWorkflow(@RequestParam("vnfs") Collection vnfs) throws IOException, InterruptedException { + Collection result = this.workflowService.getWorkflowsForVNFs(vnfs); + return new ResponseEntity<>(result, OK); + } + + @RequestMapping(value = {"/mso"}, method = RequestMethod.GET) + public ResponseEntity> getMSOChangeManagements() throws Exception, IOException, InterruptedException { + + Collection result = this.changeManagementService.getMSOChangeManagements(); + return new ResponseEntity<>(result, OK); + } + + @RequestMapping(value = "/workflow/{vnfName}", method = RequestMethod.POST) + public ResponseEntity changeManagement(@PathVariable("vnfName") String vnfName, + HttpServletRequest request, + @RequestBody ChangeManagementRequest changeManagmentRequest) + throws Exception { + return this.changeManagementService.doChangeManagement(changeManagmentRequest, vnfName); + } + + @RequestMapping(value = "/uploadConfigUpdateFile", method = RequestMethod.POST) + public @ResponseBody ResponseEntity uploadConfigUpdateFile(@RequestPart("file") MultipartFile file) + throws Exception { + try { + String jsonString = this.changeManagementService.uploadConfigUpdateFile(file); + return new ResponseEntity<>(jsonString, HttpStatus.OK); + } + catch(WebApplicationException e){ + return new ResponseEntity<>(handleException(e), HttpStatus.valueOf(e.getResponse().getStatus())); + } + catch (Exception e) { + return new ResponseEntity<>(handleException(e), INTERNAL_SERVER_ERROR); + } + } + + + @RequestMapping(value = {"/scheduler"}, method = RequestMethod.GET) + public ResponseEntity getSchedulerChangeManagements() throws IOException, InterruptedException { + JSONArray result = this.changeManagementService.getSchedulerChangeManagements(); + return new ResponseEntity<>(result, OK); + } + + @RequestMapping(value = {SCHEDULER_BY_SCHEDULE_ID}, method = RequestMethod.DELETE) + public ResponseEntity deleteSchedule(@PathVariable("scheduleId") String scheduleId) throws IOException, InterruptedException { + Pair result = this.changeManagementService.deleteSchedule(scheduleId); + return ResponseEntity.status(result.getRight()).build(); + } + + + @RequestMapping(value = {GET_VNF_WORKFLOW_RELATION}, method = RequestMethod.POST) + public ResponseEntity getWorkflows(@RequestBody GetVnfWorkflowRelationRequest getVnfWorkflowRelationRequest) throws IOException, InterruptedException { + try { + GetWorkflowsResponse response = new GetWorkflowsResponse(changeManagementService.getWorkflowsForVnf(getVnfWorkflowRelationRequest)); + return ResponseEntity.status(OK).body(response); + } + catch (NotFoundException exception) { + LOGGER.error(exception.getMessage(), exception); + return new ResponseEntity<>(new VnfWorkflowRelationResponse(Collections.singletonList(exception.getMessage())),HttpStatus.NOT_FOUND); + } + catch (Exception exception) { + return handleException(exception, "Failed to get workflows for vnf"); + } + } + + @RequestMapping(value = {VNF_WORKFLOW_RELATION}, method = RequestMethod.POST) + public ResponseEntity createWorkflowRelation(@RequestBody VnfWorkflowRelationRequest vnfWorkflowRelationRequest) throws IOException, InterruptedException { + VnfWorkflowRelationResponse vnfWorkflowRelationResponse; + try { + vnfWorkflowRelationResponse = changeManagementService.addVnfWorkflowRelation(vnfWorkflowRelationRequest); + } + catch (Exception exception) { + return handleException(exception, "Failed to add vnf to workflow relation"); + } + + return new ResponseEntity<>(vnfWorkflowRelationResponse, OK); + } + + @RequestMapping(value = {VNF_WORKFLOW_RELATION}, method = RequestMethod.GET) + public ResponseEntity getAllWorkflowRelation() throws IOException, InterruptedException { + + try { + VnfWorkflowRelationAllResponse vnfWorkflowRelationAllResponse = changeManagementService.getAllVnfWorkflowRelations(); + return new ResponseEntity<>(vnfWorkflowRelationAllResponse, OK); + } + catch (Exception exception) { + return handleException(exception, "Failed to get all vnf to workflow relations"); + } + } + + @RequestMapping(value = {VNF_WORKFLOW_RELATION}, method = RequestMethod.DELETE) + public ResponseEntity deleteWorkflowRelation(@RequestBody VnfWorkflowRelationRequest vnfWorkflowRelationRequest) throws IOException, InterruptedException { + VnfWorkflowRelationResponse vnfWorkflowRelationResponse; + try { + vnfWorkflowRelationResponse = changeManagementService.deleteVnfWorkflowRelation(vnfWorkflowRelationRequest); + } + catch (Exception exception) { + return handleException(exception, "Failed to delete vnf from workflow relation"); + } + + return new ResponseEntity<>(vnfWorkflowRelationResponse, OK); + } + + private ResponseEntity handleException(Exception exception, String msg) { + LOGGER.error(msg, exception); + return new ResponseEntity<>(new VnfWorkflowRelationResponse(Collections.singletonList(msg)), HttpStatus.INTERNAL_SERVER_ERROR); + } + + + private ExceptionResponse handleException(Exception e) { + return ControllersUtils.handleException(e, LOGGER); + } + + @ExceptionHandler(Exception.class) + @ResponseStatus(value=OK) //return 200 for Backwards compatibility with the previous responses to scheduler + private MsoResponseWrapperInterface exceptionHandler(Exception e) { + return exceptionHandler(e, INTERNAL_SERVER_ERROR); + } + + @ExceptionHandler({ + javax.ws.rs.BadRequestException.class, + }) + @ResponseStatus(value = OK) //return 200 for Backwards compatibility with the previous responses to scheduler + public MsoResponseWrapperInterface clientDerivedExceptionAsBadRequest(Exception e) { + // same handler, different HTTP Code + return exceptionHandler(e, BAD_REQUEST); + } + + private MsoResponseWrapperInterface exceptionHandler(Exception e, HttpStatus httpStatus) { + LOGGER.error(EELFLoggerDelegate.errorLogger, "{}: {}", getMethodName(), ExceptionUtils.getMessage(e), e); + MsoResponseWrapper2 responseWrapper2 = new MsoResponseWrapper2<>(httpStatus.value(), new MsoExceptionResponse(e)); + return responseWrapper2; + } + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/ControllersUtils.java b/vid-app-common/src/main/java/org/onap/vid/controller/ControllersUtils.java new file mode 100644 index 000000000..1df4f42bc --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/controller/ControllersUtils.java @@ -0,0 +1,40 @@ +package org.onap.vid.controller; + +import org.apache.commons.lang3.exception.ExceptionUtils; +import org.openecomp.portalsdk.core.domain.User; +import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.vid.model.ExceptionResponse; +import org.slf4j.MDC; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpSession; + +import static com.att.eelf.configuration.Configuration.MDC_KEY_REQUEST_ID; +import static org.onap.vid.utils.Logging.getMethodName; + +public class ControllersUtils { + + + public static String extractUserId(HttpServletRequest request) { + String userId = ""; + HttpSession session = request.getSession(); + if (session != null) { + User user = (User) session.getAttribute(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME)); + if (user != null) { + //userId = user.getHrid(); + userId = user.getLoginId(); + if (userId == null) + userId = user.getOrgUserId(); + } + } + return userId; + } + + public static ExceptionResponse handleException(Exception e, EELFLoggerDelegate logger) { + logger.error(EELFLoggerDelegate.errorLogger, "{}: {}", getMethodName(), ExceptionUtils.getMessage(e), e); + + ExceptionResponse exceptionResponse = new ExceptionResponse(e); + return exceptionResponse; + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/HealthCheckController.java b/vid-app-common/src/main/java/org/onap/vid/controller/HealthCheckController.java new file mode 100644 index 000000000..2368649a4 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/controller/HealthCheckController.java @@ -0,0 +1,192 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.controller; + +import org.openecomp.portalsdk.core.controller.UnRestrictedBaseController; +import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.vid.dao.FnAppDoaImpl; +import org.springframework.http.MediaType; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import java.io.IOException; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.Date; + +/** + * Controller for user profile view. The view is restricted to authenticated + * users. The view name resolves to page user_profile.jsp which uses Angular. + */ + +@RestController +@RequestMapping("/") +public class HealthCheckController extends UnRestrictedBaseController { + + + /** The logger. */ + private static final EELFLoggerDelegate LOGGER = EELFLoggerDelegate.getLogger(HealthCheckController.class); + + /** The Constant dateFormat. */ + final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); + + private static final String HEALTH_CHECK_PATH = "/healthCheck"; + + /** + * Model for JSON response with health-check results. + */ + public class HealthStatus { + // Either 200 or 500 + public int statusCode; + + // Additional detail in case of error, empty in case of success. + public String message; + + public String date; + + public HealthStatus(int code, String msg) { + this.statusCode = code; + this.message = msg; + } + + public HealthStatus(int code,String date, String msg) { + this.statusCode = code; + this.message = msg; + this.date=date; + } + + public int getStatusCode() { + return statusCode; + } + + public void setStatusCode(int code) { + this.statusCode = code; + } + + public String getMessage() { + return message; + } + + public void setMessage(String msg) { + this.message = msg; + } + + public String getDate() { + return date; + } + + public void setDate(String date) { + this.date = date; + } + + } + + @SuppressWarnings("unchecked") + public int getProfileCount(String driver, String URL, String username, String password) { + FnAppDoaImpl doa= new FnAppDoaImpl(); + int count= doa.getProfileCount(driver,URL,username,password); + return count; + } + + + + /** + * Obtain the HealthCheck Status from the System.Properties file. + * Used by IDNS for redundancy + * @return ResponseEntity The response entity + * @throws IOException Signals that an I/O exception has occurred. + * @throws InterruptedException the interrupted exception + */ + @RequestMapping(value="/healthCheck",method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) + public HealthStatus gethealthCheckStatusforIDNS() throws IOException, InterruptedException { + + String driver = SystemProperties.getProperty("db.driver"); + String URL = SystemProperties.getProperty("db.connectionURL"); + String username = SystemProperties.getProperty("db.userName"); + String password = SystemProperties.getProperty("db.password"); + + LOGGER.debug(EELFLoggerDelegate.debugLogger, "driver ::" + driver); + LOGGER.debug(EELFLoggerDelegate.debugLogger, "URL::" + URL); + LOGGER.debug(EELFLoggerDelegate.debugLogger, "username::" + username); + LOGGER.debug(EELFLoggerDelegate.debugLogger,"password::" + password); + + + HealthStatus healthStatus = null; + try { + LOGGER.debug(EELFLoggerDelegate.debugLogger, "Performing health check"); + int count=getProfileCount(driver,URL,username,password); + LOGGER.debug(EELFLoggerDelegate.debugLogger,"count:::"+count); + healthStatus = new HealthStatus(200, "health check succeeded"); + } catch (Exception ex) { + + LOGGER.error(EELFLoggerDelegate.errorLogger, "Failed to perform health check", ex); + healthStatus = new HealthStatus(500, "health check failed: " + ex.toString()); + } + return healthStatus; + } + + /** + * Obtain the HealthCheck Status from the System.Properties file. + * + * @return ResponseEntity The response entity + * @throws IOException Signals that an I/O exception has occurred. + * @throws InterruptedException the interrupted exception + * Project : + */ + @RequestMapping(value="rest/healthCheck/{User-Agent}/{X-ECOMP-RequestID}",method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) + public HealthStatus getHealthCheck( + @PathVariable("User-Agent") String UserAgent, + @PathVariable("X-ECOMP-RequestID") String ECOMPRequestID) throws IOException, InterruptedException { + + String driver = SystemProperties.getProperty("db.driver"); + String URL = SystemProperties.getProperty("db.connectionURL"); + String username = SystemProperties.getProperty("db.userName"); + String password = SystemProperties.getProperty("db.password"); + + LOGGER.debug(EELFLoggerDelegate.debugLogger, "driver ::" + driver); + LOGGER.debug(EELFLoggerDelegate.debugLogger, "URL::" + URL); + LOGGER.debug(EELFLoggerDelegate.debugLogger, "username::" + username); + LOGGER.debug(EELFLoggerDelegate.debugLogger,"password::" + password); + + + HealthStatus healthStatus = null; + try { + LOGGER.debug(EELFLoggerDelegate.debugLogger, "Performing health check"); + LOGGER.debug(EELFLoggerDelegate.debugLogger, "User-Agent" + UserAgent); + LOGGER.debug(EELFLoggerDelegate.debugLogger, "X-ECOMP-RequestID" + ECOMPRequestID); + + + int count=getProfileCount(driver,URL,username,password); + + LOGGER.debug(EELFLoggerDelegate.debugLogger,"count:::"+count); + healthStatus = new HealthStatus(200,dateFormat.format(new Date()) ,"health check succeeded"); + } catch (Exception ex) { + + LOGGER.error(EELFLoggerDelegate.errorLogger, "Failed to perform health check", ex); + healthStatus = new HealthStatus(500,dateFormat.format(new Date()),"health check failed: " + ex.toString()); + } + return healthStatus; + } +} + diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/LoggerController.java b/vid-app-common/src/main/java/org/onap/vid/controller/LoggerController.java new file mode 100644 index 000000000..e70c87115 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/controller/LoggerController.java @@ -0,0 +1,115 @@ +package org.onap.vid.controller; + +import ch.qos.logback.classic.LoggerContext; +import ch.qos.logback.core.Appender; +import ch.qos.logback.core.FileAppender; +import ch.qos.logback.core.spi.AppenderAttachable; +import org.apache.commons.io.input.ReversedLinesFileReader; +import org.apache.commons.lang3.StringUtils; +import org.openecomp.portalsdk.core.controller.RestrictedBaseController; +import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.vid.model.ExceptionResponse; +import org.onap.vid.roles.Role; +import org.onap.vid.roles.RoleProvider; +import org.onap.vid.utils.Streams; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletRequest; +import javax.ws.rs.InternalServerErrorException; +import javax.ws.rs.NotAuthorizedException; +import java.io.File; +import java.io.IOException; +import java.util.List; +import java.util.Objects; +import java.util.function.Supplier; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +import static com.att.eelf.configuration.Configuration.GENERAL_LOGGER_NAME; + + +@RestController +@RequestMapping("logger") +public class LoggerController extends RestrictedBaseController { + + private static final EELFLoggerDelegate LOGGER = EELFLoggerDelegate.getLogger(LoggerController.class); + + @Autowired + RoleProvider roleProvider; + + @RequestMapping(value = "/{loggerName:audit|error|metrics}", method = RequestMethod.GET) + public String getLog(@PathVariable String loggerName, HttpServletRequest request, + @RequestParam(value="limit", defaultValue = "5000") Integer limit) throws IOException { + + List roles = roleProvider.getUserRoles(request); + boolean userPermitted = roleProvider.userPermissionIsReadLogs(roles); + if (!userPermitted) { + throw new NotAuthorizedException("User not authorized to get logs"); + } + + String logfilePath = getLogfilePath(loggerName); + + try (final ReversedLinesFileReader reader = new ReversedLinesFileReader(new File(logfilePath))) { + Supplier reverseLinesSupplier = () -> { + try { + return reader.readLine(); + } catch (NullPointerException e) { + // EOF Reached + return null; + } catch (IOException e) { + throw new InternalServerErrorException("error while reading " + logfilePath, e); + } + }; + + return Streams.takeWhile( + Stream.generate(reverseLinesSupplier), + line -> !StringUtils.contains(line, "Logging is started")) + .limit(limit) + .limit(5_000) + .filter(Objects::nonNull) + .collect(Collectors.joining("\n")); + } + } + + private String getLogfilePath(String loggerName) { + /* + Find the requested logger, and pull all of it's appenders. + Find the first of the appenders that is a FileAppender, and return it's + write-out filename. + */ + LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory(); + return context.getLoggerList().stream() + .filter(logger -> logger.getName().equals(GENERAL_LOGGER_NAME + "." + loggerName)) + .flatMap(this::pullSubAppenders) + .flatMap(appender -> { + // Appender might be "attachable", if so - roll-up its sub-appenders + return (appender instanceof AppenderAttachable) ? + pullSubAppenders((AppenderAttachable) appender) : Stream.of(appender); + }) + .filter(appender -> appender instanceof FileAppender) + .map(appender -> (FileAppender) appender) + .map(FileAppender::getFile) + .findFirst() + .orElseThrow(() -> new InternalServerErrorException("logfile for " + loggerName + " not found")); + } + + private Stream> pullSubAppenders(AppenderAttachable logger) { + return Streams.fromIterator(logger.iteratorForAppenders()); + } + + @ExceptionHandler({ NotAuthorizedException.class }) + @ResponseStatus(HttpStatus.UNAUTHORIZED) + public String notAuthorizedHandler(NotAuthorizedException e) { + return "UNAUTHORIZED"; + } + + @ExceptionHandler({ IOException.class, InternalServerErrorException.class }) + @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR) + public ExceptionResponse ioExceptionHandler(Exception e) { + return org.onap.vid.controller.ControllersUtils.handleException(e, LOGGER); + } + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/MaintenanceController.java b/vid-app-common/src/main/java/org/onap/vid/controller/MaintenanceController.java new file mode 100644 index 000000000..df1e6e421 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/controller/MaintenanceController.java @@ -0,0 +1,135 @@ +package org.onap.vid.controller; + + +import org.openecomp.portalsdk.core.controller.UnRestrictedBaseController; +import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.vid.category.AddCategoryOptionResponse; +import org.onap.vid.category.AddCategoryOptionsRequest; +import org.onap.vid.category.CategoryParameterOptionRep; +import org.onap.vid.category.CategoryParametersResponse; +import org.onap.vid.model.CategoryParameter.Family; +import org.onap.vid.model.CategoryParameterOption; +import org.onap.vid.services.CategoryParameterService; +import org.onap.vid.services.CategoryParameterServiceImpl; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletRequest; +import javax.ws.rs.ForbiddenException; +import java.util.Arrays; +import java.util.Collections; + +import static org.onap.vid.utils.Logging.getMethodName; + +/** + * Controler for APIs that are used only by vid operators + */ + +@RestController +@RequestMapping(MaintenanceController.Maintenance) +public class MaintenanceController extends UnRestrictedBaseController { + + public static final String Maintenance = "maintenance"; + + @Autowired + protected CategoryParameterService categoryParameterService; + private static final EELFLoggerDelegate LOGGER = EELFLoggerDelegate.getLogger(MaintenanceController.class); + + /** + * Add list of options to one category parameter + * @param request the request + * @return the new option + * @throws Exception the exception + */ + @RequestMapping(value = "/category_parameter/{categoryName}", method = RequestMethod.POST) + public ResponseEntity addCategoryOptions ( + HttpServletRequest request, @PathVariable String categoryName, @RequestBody AddCategoryOptionsRequest option) throws Exception { + LOGGER.debug(EELFLoggerDelegate.debugLogger, "start {}({})", getMethodName()); + try { + AddCategoryOptionResponse response = categoryParameterService.createCategoryParameterOptions(categoryName, option); + HttpStatus httpStatus = response.getErrors().size()>0 ? HttpStatus.MULTI_STATUS : HttpStatus.OK; + LOGGER.debug(EELFLoggerDelegate.debugLogger, "end {}() => {}", getMethodName(), response); + return new ResponseEntity<>(response, httpStatus); + } + catch (CategoryParameterServiceImpl.UnfoundedCategoryException exception) { + return new ResponseEntity<>(new AddCategoryOptionResponse(Collections.singletonList(exception.getMessage())), HttpStatus.NOT_FOUND); + } + catch (Exception exception) { + LOGGER.error("failed to add option to parameter category " + categoryName, exception); + return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR); + } + } + + @RequestMapping(value = "/category_parameter/{categoryName}", method = RequestMethod.PUT) + public ResponseEntity updateNameForOption ( + HttpServletRequest request, @PathVariable String categoryName, @RequestBody CategoryParameterOptionRep option) throws Exception { + LOGGER.debug(EELFLoggerDelegate.debugLogger, "start {}({})", getMethodName()); + try { + AddCategoryOptionResponse response = categoryParameterService.updateCategoryParameterOption(categoryName, option); + HttpStatus httpStatus = response.getErrors().size()>0 ? HttpStatus.MULTI_STATUS : HttpStatus.OK; + LOGGER.debug(EELFLoggerDelegate.debugLogger, "end {}() => {}", getMethodName(), response); + return new ResponseEntity<>(response, httpStatus); + } + catch (ForbiddenException exception) { + return new ResponseEntity<>(new AddCategoryOptionResponse(Collections.singletonList(exception.getMessage())), HttpStatus.FORBIDDEN); + } + catch (CategoryParameterServiceImpl.UnfoundedCategoryException|CategoryParameterServiceImpl.UnfoundedCategoryOptionException exception) { + return new ResponseEntity<>(new AddCategoryOptionResponse(Collections.singletonList(exception.getMessage())), HttpStatus.NOT_FOUND); + } + catch (CategoryParameterServiceImpl.AlreadyExistOptionNameException exception) { + return new ResponseEntity<>(new AddCategoryOptionResponse(Collections.singletonList(exception.getMessage())), HttpStatus.CONFLICT); + } + catch (Exception exception) { + LOGGER.error("failed to update option to parameter category " + categoryName, exception); + return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR); + } + } + + /** + * Gets the owning entity properties. + * @param request the request + * @return the property + * @throws Exception the exception + */ + @RequestMapping(value = "/category_parameter", method = RequestMethod.GET) + public ResponseEntity getCategoryParameter(HttpServletRequest request, @RequestParam(value="familyName", required = true) Family familyName) throws Exception { + LOGGER.debug(EELFLoggerDelegate.debugLogger, "start {}({})", getMethodName()); + try { + CategoryParametersResponse response = categoryParameterService.getCategoryParameters(familyName); + LOGGER.debug(EELFLoggerDelegate.debugLogger, "end {}() => {}", getMethodName(), response); + return new ResponseEntity<>(response, HttpStatus.OK); + } + catch (Exception exception) { + LOGGER.error("failed to retrieve category parameter list from DB.", exception); + return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR); + } + } + + + /** + * Delete option of the category. + * @param request the request + * @throws Exception the exception + */ + @RequestMapping(value = "/delete_category_parameter/{categoryName}", method = RequestMethod.POST) + public ResponseEntity deleteCategoryOption ( + HttpServletRequest request, @PathVariable String categoryName, @RequestBody CategoryParameterOption option) throws Exception { + LOGGER.debug(EELFLoggerDelegate.debugLogger, "start {}({})", getMethodName()); + + try { + categoryParameterService.deleteCategoryOption(categoryName, option); + LOGGER.debug(EELFLoggerDelegate.debugLogger, "end {}() => {}", getMethodName(), HttpStatus.OK); + return new ResponseEntity<>(HttpStatus.OK); + } + catch (CategoryParameterServiceImpl.UnfoundedCategoryException exception) { + return new ResponseEntity<>(new AddCategoryOptionResponse(Arrays.asList(exception.getMessage())), HttpStatus.NOT_FOUND); + } + catch (Exception exception) { + LOGGER.error("failed to add/update owning entity option", exception); + return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR); + } + } + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/MsoConfig.java b/vid-app-common/src/main/java/org/onap/vid/controller/MsoConfig.java new file mode 100644 index 000000000..2aa52b858 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/controller/MsoConfig.java @@ -0,0 +1,42 @@ +package org.onap.vid.controller; + +import com.fasterxml.jackson.databind.ObjectMapper; +import org.onap.vid.factories.MsoRequestFactory; +import org.onap.vid.mso.MsoBusinessLogic; +import org.onap.vid.mso.MsoBusinessLogicImpl; +import org.onap.vid.mso.MsoInterface; +import org.onap.vid.mso.rest.MsoRestClientNew; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + + +@Configuration +public class MsoConfig { + + /** + * Gets the object mapper. + * + * @return the object mapper + */ + @Bean + public ObjectMapper getObjectMapper() { + return new ObjectMapper(); + } + + @Bean + public MsoRequestFactory createRequestDetailsFactory(){ + return new MsoRequestFactory(); + } + + @Bean + public MsoInterface getMsoClient(){ + return new MsoRestClientNew(); + } + + @Bean + public MsoBusinessLogic getMsoBusinessLogic(){ + return new MsoBusinessLogicImpl(getMsoClient()); + } + + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/MsoController.java b/vid-app-common/src/main/java/org/onap/vid/controller/MsoController.java new file mode 100644 index 000000000..1ce1d64c4 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/controller/MsoController.java @@ -0,0 +1,655 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.controller; + + +import com.fasterxml.jackson.databind.ObjectMapper; +import org.onap.vid.model.ExceptionResponse; +import org.onap.vid.mso.MsoBusinessLogic; +import org.onap.vid.mso.MsoResponseWrapper; +import org.onap.vid.mso.rest.Request; +import org.onap.vid.mso.rest.RequestDetails; +import org.onap.vid.mso.rest.Task; +import org.openecomp.portalsdk.core.controller.RestrictedBaseController; +import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.io.PrintWriter; +import java.io.StringWriter; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.List; + +//import java.util.UUID; +//import org.springframework.http.ResponseEntity; +//import org.springframework.http.RequestEntity; + +/** + * The Class MsoController. + */ +@RestController +@RequestMapping("mso") +public class MsoController extends RestrictedBaseController { + + /** + * The logger. + */ + private static final EELFLoggerDelegate LOGGER = EELFLoggerDelegate.getLogger(MsoController.class); + + /** + * The Constant dateFormat. + */ + final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); + + /** + * The Constant SVC_INSTANCE_ID. + */ + public final static String SVC_INSTANCE_ID = ""; + public final static String REQUEST_TYPE = ""; + + /** + * The Constant CONFIGURATION_ID + */ + public final static String CONFIGURATION_ID = ""; + + /** + * The Constant VNF_INSTANCE_ID. + */ + public final static String VNF_INSTANCE_ID = ""; + + private final MsoBusinessLogic msoBusinessLogic; + + @Autowired + public MsoController(MsoBusinessLogic msoBusinessLogic) { + this.msoBusinessLogic = msoBusinessLogic; + } + + /** + * Creates the svc instance. + * + * @param request the request + * @return the response entity + * @throws Exception the exception + */ + @RequestMapping(value = "/mso_create_svc_instance", method = RequestMethod.POST) + public ResponseEntity createSvcInstance(HttpServletRequest request, @RequestBody RequestDetails mso_request) throws Exception { + String methodName = "createSvcInstance"; + + LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + // always return OK, the MSO status code is embedded in the body + + MsoResponseWrapper w = msoBusinessLogic.createSvcInstance(mso_request); + + return (new ResponseEntity<>(w.getResponse(), HttpStatus.OK)); + + } + + /** + * Creates the vnf. + * + * @param serviceInstanceId the service instance id + * @param request the request + * @return the response entity + * @throws Exception the exception + */ + @RequestMapping(value = "/mso_create_vnf_instance/{serviceInstanceId}", method = RequestMethod.POST) + public ResponseEntity createVnf(@PathVariable("serviceInstanceId") String serviceInstanceId, HttpServletRequest request, @RequestBody RequestDetails mso_request) throws Exception { + + MsoResponseWrapper w = msoBusinessLogic.createVnf(mso_request, serviceInstanceId); + + // always return OK, the MSO status code is embedded in the body + + return (new ResponseEntity(w.getResponse(), HttpStatus.OK)); + + } + + /** + * Creates the nw instance. + * + * @param serviceInstanceId the service instance id + * @param request the request + * @return the response entity + * @throws Exception the exception + */ + @RequestMapping(value = "/mso_create_nw_instance/{serviceInstanceId}", method = RequestMethod.POST) + public ResponseEntity createNwInstance(@PathVariable("serviceInstanceId") String serviceInstanceId, HttpServletRequest request, @RequestBody RequestDetails mso_request) throws Exception { + String methodName = "createNwInstance"; + LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start, serviceInstanceId = " + serviceInstanceId); + + MsoResponseWrapper w = msoBusinessLogic.createNwInstance(mso_request, serviceInstanceId); + + return (new ResponseEntity(w.getResponse(), HttpStatus.OK)); + + } + + /** + * Creates the volume group instance. + * + * @param serviceInstanceId the service instance id + * @param vnfInstanceId the vnf instance id + * @param request the request + * @return the response entity + * @throws Exception the exception + */ + @RequestMapping(value = "/mso_create_volumegroup_instance/{serviceInstanceId}/vnfs/{vnfInstanceId}", method = RequestMethod.POST) + public ResponseEntity createVolumeGroupInstance(@PathVariable("serviceInstanceId") String serviceInstanceId, @PathVariable("vnfInstanceId") String vnfInstanceId, + HttpServletRequest request, @RequestBody RequestDetails mso_request) throws Exception { + String methodName = "createVolumeGroupInstance"; + LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + MsoResponseWrapper w = msoBusinessLogic.createVolumeGroupInstance(mso_request, serviceInstanceId, vnfInstanceId); + + // always return OK, the MSO status code is embedded in the body + return (new ResponseEntity(w.getResponse(), HttpStatus.OK)); + } + + /** + * Creates the vf module instance. + * + * @param serviceInstanceId the service instance id + * @param vnfInstanceId the vnf instance id + * @param request the request + * @return the response entity + * @throws Exception the exception + */ + @RequestMapping(value = "/mso_create_vfmodule_instance/{serviceInstanceId}/vnfs/{vnfInstanceId}", method = RequestMethod.POST) + public ResponseEntity createVfModuleInstance(@PathVariable("serviceInstanceId") String serviceInstanceId, + @PathVariable("vnfInstanceId") String vnfInstanceId, HttpServletRequest request, @RequestBody RequestDetails mso_request) throws Exception { + String methodName = "createVfModuleInstance"; + + LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + MsoResponseWrapper w = msoBusinessLogic.createVfModuleInstance(mso_request, serviceInstanceId, vnfInstanceId); + + // always return OK, the MSO status code is embedded in the body + + return (new ResponseEntity(w.getResponse(), HttpStatus.OK)); + } + + /** + * Creates a configuration instance. + * + * @param serviceInstanceId the service instance id + * @param request the request + * @return the response entity + * @throws Exception the exception + */ + @RequestMapping(value = "/mso_create_configuration_instance/{serviceInstanceId}/configurations/", method = RequestMethod.POST) + public ResponseEntity createConfigurationInstance(@PathVariable("serviceInstanceId") String serviceInstanceId, + HttpServletRequest request, @RequestBody RequestDetails mso_request) throws Exception { + String methodName = "createConfigurationInstance"; + LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + MsoResponseWrapper w = msoBusinessLogic.createConfigurationInstance(mso_request, serviceInstanceId); + + // always return OK, the MSO status code is embedded in the body + + return (new ResponseEntity<>(w.getResponse(), HttpStatus.OK)); + } + + /** + * Delete svc instance. + * + * @param serviceInstanceId the service instance id + * @param request the request + * @return the response entity + * @throws Exception the exception + */ + @RequestMapping(value = "/mso_delete_svc_instance/{serviceInstanceId}", method = RequestMethod.POST) + public ResponseEntity deleteSvcInstance(@PathVariable("serviceInstanceId") String serviceInstanceId, + HttpServletRequest request, @RequestBody RequestDetails mso_request) throws Exception { + + String methodName = "deleteSvcInstance"; + LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + MsoResponseWrapper w = msoBusinessLogic.deleteSvcInstance(mso_request, serviceInstanceId); + + LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " w=" + w.getResponse()); + // always return OK, the MSO status code is embedded in the body + + return (new ResponseEntity(w.getResponse(), HttpStatus.OK)); + + } + + /** + * Delete vnf. + * + * @param serviceInstanceId the service instance id + * @param vnfInstanceId the vnf instance id + * @param request the request + * @return the response entity + * @throws Exception the exception + */ + @RequestMapping(value = "/mso_delete_vnf_instance/{serviceInstanceId}/vnfs/{vnfInstanceId}", method = RequestMethod.POST) + + public ResponseEntity deleteVnf(@PathVariable("serviceInstanceId") String serviceInstanceId, @PathVariable("vnfInstanceId") String vnfInstanceId, + HttpServletRequest request, @RequestBody RequestDetails mso_request) throws Exception { + String methodName = "deleteVnf"; + + LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + MsoResponseWrapper w = msoBusinessLogic.deleteVnf(mso_request, serviceInstanceId, vnfInstanceId); + + // always return OK, the MSO status code is embedded in the body + return (new ResponseEntity(w.getResponse(), HttpStatus.OK)); + + } + + /** + * Delete configuration instance + * @param serviceInstanceId the service instance id + * @param configurationId the configuration id + * @param mso_request the request + * @return the response entity + * @throws Exception the exception + */ + @RequestMapping(value = "mso_delete_configuration/{serviceInstanceId}/configurations/{configurationId}", + method = RequestMethod.POST) + public ResponseEntity deleteConfiguration( + @PathVariable("serviceInstanceId") String serviceInstanceId, + @PathVariable ("configurationId") String configurationId, + @RequestBody RequestDetails mso_request) throws Exception { + + String methodName = "deleteConfiguration"; + LOGGER.debug(EELFLoggerDelegate.debugLogger, + dateFormat.format(new Date()) + "<== " + methodName + " start"); + + MsoResponseWrapper w = msoBusinessLogic.deleteConfiguration(mso_request, serviceInstanceId, configurationId); + + // always return OK, the MSO status code is embedded in the body + return (new ResponseEntity(w.getResponse(), HttpStatus.OK)); + } + + /** + * Activate configuration instance + * @param serviceInstanceId the service instace id + * @param configurationId the configuration id + * @param mso_request the request + * @return the response entity + * @throws Exception the exception + */ + @RequestMapping(value = "mso_activate_configuration/{serviceInstanceId}/configurations/{configurationId}", + method = RequestMethod.POST) + public ResponseEntity activateConfiguration( + @PathVariable("serviceInstanceId") String serviceInstanceId, + @PathVariable("configurationId") String configurationId, + @RequestBody RequestDetails mso_request) throws Exception { + + MsoResponseWrapper w = msoBusinessLogic.setConfigurationActiveStatus(mso_request, serviceInstanceId, configurationId, true); + + // always return OK, the MSO status code is embedded in the body + return (new ResponseEntity(w.getResponse(), HttpStatus.OK)); + } + + /** + * Deactivate configuration instance + * @param serviceInstanceId the service instace id + * @param configurationId the configuration id + * @param mso_request the request + * @return the response entity + * @throws Exception the exception + */ + @RequestMapping(value = "mso_deactivate_configuration/{serviceInstanceId}/configurations/{configurationId}", + method = RequestMethod.POST) + public ResponseEntity deactivateConfiguration( + @PathVariable("serviceInstanceId") String serviceInstanceId, + @PathVariable("configurationId") String configurationId, + @RequestBody RequestDetails mso_request) throws Exception { + + MsoResponseWrapper w = msoBusinessLogic.setConfigurationActiveStatus(mso_request, serviceInstanceId, configurationId, false); + + // always return OK, the MSO status code is embedded in the body + return (new ResponseEntity(w.getResponse(), HttpStatus.OK)); + } + + /** + * Disable port on configuration instance + * @param serviceInstanceId the service instance id + * @param configurationId the configuration instance id + * @param mso_request the request + * @return the response entity + * @throws Exception the exception + */ + @RequestMapping(value = "mso_disable_port_configuration/{serviceInstanceId}/configurations/{configurationId}", + method = RequestMethod.POST) + public ResponseEntity disablePortOnConfiguration( + @PathVariable("serviceInstanceId") String serviceInstanceId, + @PathVariable("configurationId") String configurationId, + @RequestBody RequestDetails mso_request) throws Exception { + + MsoResponseWrapper w = msoBusinessLogic.setPortOnConfigurationStatus(mso_request, serviceInstanceId, configurationId, false); + + // always return OK, the MSO status code is embedded in the body + return (new ResponseEntity(w.getResponse(), HttpStatus.OK)); + } + + /** + * Enable port on configuration instance + * @param serviceInstanceId the service instance id + * @param configurationId the configuration instance id + * @param mso_request the request + * @return the response entity + * @throws Exception the exception + */ + @RequestMapping(value = "mso_enable_port_configuration/{serviceInstanceId}/configurations/{configurationId}", + method = RequestMethod.POST) + public ResponseEntity enablePortOnConfiguration( + @PathVariable("serviceInstanceId") String serviceInstanceId, + @PathVariable("configurationId") String configurationId, + @RequestBody RequestDetails mso_request) throws Exception { + + MsoResponseWrapper w = msoBusinessLogic.setPortOnConfigurationStatus(mso_request, serviceInstanceId, configurationId, true); + + // always return OK, the MSO status code is embedded in the body + return (new ResponseEntity(w.getResponse(), HttpStatus.OK)); + } + + /** + * Delete vf module. + * + * @param serviceInstanceId the service instance id + * @param vnfInstanceId the vnf instance id + * @param vfModuleId the vf module id + * @param request the request + * @return the response entity + * @throws Exception the exception + */ + //mso_delete_vf_module/bc305d54-75b4-431b-adb2-eb6b9e546014/vnfs/fe9000-0009-9999/vfmodules/abeeee-abeeee-abeeee + @RequestMapping(value = "/mso_delete_vfmodule_instance/{serviceInstanceId}/vnfs/{vnfInstanceId}/vfModules/{vfModuleId}", method = RequestMethod.POST) + public ResponseEntity deleteVfModule( + @PathVariable("serviceInstanceId") String serviceInstanceId, @PathVariable("vnfInstanceId") String vnfInstanceId, + @PathVariable("vfModuleId") String vfModuleId, HttpServletRequest request, @RequestBody RequestDetails mso_request) throws Exception { + + String methodName = "deleteVfModule"; + LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + MsoResponseWrapper w = msoBusinessLogic.deleteVfModule(mso_request, serviceInstanceId, vnfInstanceId, vfModuleId); + + // always return OK, the MSO status code is embedded in the body + return (new ResponseEntity(w.getResponse(), HttpStatus.OK)); + + } + + /** + * Delete volume group instance. + * + * @param serviceInstanceId the service instance id + * @param vnfInstanceId the vnf instance id + * @param volumeGroupId the volume group id + * @param request the request + * @return the response entity + * @throws Exception the exception + */ + @RequestMapping(value = "/mso_delete_volumegroup_instance/{serviceInstanceId}/vnfs/{vnfInstanceId}/volumeGroups/{volumeGroupId}", method = RequestMethod.POST) + public ResponseEntity deleteVolumeGroupInstance( + @PathVariable("serviceInstanceId") String serviceInstanceId, @PathVariable("vnfInstanceId") String vnfInstanceId, @PathVariable("volumeGroupId") String volumeGroupId, + HttpServletRequest request, @RequestBody RequestDetails mso_request) throws Exception { + String methodName = "deleteVolumeGroupInstance"; + LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + MsoResponseWrapper w = msoBusinessLogic.deleteVolumeGroupInstance(mso_request, serviceInstanceId, vnfInstanceId, volumeGroupId); + + // always return OK, the MSO status code is embedded in the body + return (new ResponseEntity(w.getResponse(), HttpStatus.OK)); + } + + /** + * Delete nw instance. + * + * @param serviceInstanceId the service instance id + * @param networkInstanceId the network instance id + * @param request the request + * @return the response entity + * @throws Exception the exception + */ + @RequestMapping(value = "/mso_delete_nw_instance/{serviceInstanceId}/networks/{networkInstanceId}", method = RequestMethod.POST) + public ResponseEntity deleteNwInstance(@PathVariable("serviceInstanceId") String serviceInstanceId, + @PathVariable("networkInstanceId") String networkInstanceId, HttpServletRequest request, @RequestBody RequestDetails mso_request) throws Exception { + String methodName = "deleteNwInstance"; + LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + MsoResponseWrapper w = msoBusinessLogic.deleteNwInstance(mso_request, serviceInstanceId, networkInstanceId); + + // always return OK, the MSO status code is embedded in the body + return (new ResponseEntity(w.getResponse(), HttpStatus.OK)); + + } + + /** + * Gets the orchestration request. + * + * @param requestId the request id + * @param request the request + * @return the orchestration request + * @throws Exception the exception + */ + @RequestMapping(value = "/mso_get_orch_req/{requestId}", method = RequestMethod.GET) + public ResponseEntity getOrchestrationRequest(@PathVariable("requestId") String requestId, + HttpServletRequest request) throws Exception { + + String methodName = "getOrchestrationRequest"; + LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + + MsoResponseWrapper w = msoBusinessLogic.getOrchestrationRequest(requestId); + + // always return OK, the MSO status code is embedded in the body + return (new ResponseEntity(w.getResponse(), HttpStatus.OK)); + } + + + /** + * Gets the orchestration requests. + * + * @param filterString the filter string + * @param request the request + * @return the orchestration requests + * @throws Exception the exception + */ + @RequestMapping(value = "/mso_get_orch_reqs/{filterString}", method = RequestMethod.GET) + public ResponseEntity getOrchestrationRequests(@PathVariable("filterString") String filterString, + HttpServletRequest request) throws Exception { + + String methodName = "getOrchestrationRequests"; + LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + + MsoResponseWrapper w = msoBusinessLogic.getOrchestrationRequests(filterString); + + // always return OK, the MSO status code is embedded in the body + return (new ResponseEntity(w.getResponse(), HttpStatus.OK)); + } + + + /** + * activate to a pnf instance. + * + * @param serviceInstanceId the id of the service. + * @param requestDetails the body of the request. + * @return the response entity + * @throws Exception the exception + */ + @RequestMapping(value = "/mso_activate_service_instance/{serviceInstanceId}", method = RequestMethod.POST) + public ResponseEntity activateServiceInstance(@PathVariable("serviceInstanceId") String serviceInstanceId, @RequestBody RequestDetails requestDetails) throws Exception { + String methodName = "activateServiceInstance"; + LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + MsoResponseWrapper w = msoBusinessLogic.setServiceInstanceStatus(requestDetails, serviceInstanceId, true); + return new ResponseEntity<>(w.getResponse(), HttpStatus.OK); + } + + /** + * deactivate a service instance. + * + * @param serviceInstanceId the id of the service. + * @param requestDetails the body of the request. + * @return the response entity + * @throws Exception the exception + */ + @RequestMapping(value = "/mso_deactivate_service_instance/{serviceInstanceId}", method = RequestMethod.POST) + public ResponseEntity deactivateServiceInstance(@PathVariable("serviceInstanceId") String serviceInstanceId, @RequestBody RequestDetails requestDetails) throws Exception { + String methodName = "deactivateServiceInstance"; + LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + MsoResponseWrapper w = msoBusinessLogic.setServiceInstanceStatus(requestDetails, serviceInstanceId, false); + return new ResponseEntity<>(w.getResponse(), HttpStatus.OK); + } + + + /** + * Gets the orchestration requests for the dashboard. + * currently its all the orchestration requests with RequestType updateInstance or replaceInstance. + * @return the orchestration requests + * @throws Exception the exception + */ + @RequestMapping(value = "/mso_get_orch_reqs/dashboard", method = RequestMethod.GET) + public List getOrchestrationRequestsForDashboard() throws Exception { + + String methodName = "getOrchestrationRequestsForDashboard"; + LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + + return msoBusinessLogic.getOrchestrationRequestsForDashboard(); + } + + /** + * Gets the Manual Tasks for the given request id. + * + * @param originalRequestId the id of the original request. + * @return the tasks + * @throws Exception the exception + */ + @RequestMapping(value = "/mso_get_man_task/{originalRequestId}", method = RequestMethod.GET) + public List getManualTasksByRequestId(@PathVariable("originalRequestId") String originalRequestId) throws Exception { + + String methodName = "getManualTasksByRequestId"; + LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + return msoBusinessLogic.getManualTasksByRequestId(originalRequestId); + } + + + + /** + * Complete the manual task. + * + * @param taskId the id of the task to complete. + * @param requestDetails the body of the request. + * @return the response entity + * @throws Exception the exception + */ + @RequestMapping(value = "/mso_post_man_task/{taskId}", method = RequestMethod.POST) + public ResponseEntity manualTaskComplete(@PathVariable("taskId") String taskId , @RequestBody RequestDetails requestDetails) throws Exception { + + String methodName = "manualTaskComplete"; + LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + MsoResponseWrapper w = msoBusinessLogic.completeManualTask(requestDetails, taskId); + return new ResponseEntity(w.getResponse(), HttpStatus.OK); + } + + @RequestMapping(value = "/mso_remove_relationship/{serviceInstanceId}", method = RequestMethod.POST) + public ResponseEntity removeRelationshipFromServiceInstance(@PathVariable("serviceInstanceId") String serviceInstanceId , + @RequestBody RequestDetails requestDetails) throws Exception { + + String methodName = "removeRelationshipFromServiceInstance"; + LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + MsoResponseWrapper w; + try { + w = msoBusinessLogic.removeRelationshipFromServiceInstance(requestDetails, serviceInstanceId); + } catch (Exception e){ + LOGGER.error("Internal error when calling MSO controller logic for {}", methodName, e); + return new ResponseEntity<>(e.getMessage(), HttpStatus.INTERNAL_SERVER_ERROR); + } + return new ResponseEntity<>(w.getResponse(), HttpStatus.OK); + } + + @RequestMapping(value = "/mso_add_relationship/{serviceInstanceId}", method = RequestMethod.POST) + public ResponseEntity addRelationshipToServiceInstance(@PathVariable("serviceInstanceId") String serviceInstanceId , + @RequestBody RequestDetails requestDetails) throws Exception { + + String methodName = "addRelationshipToServiceInstance"; + LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + MsoResponseWrapper w; + try { + w = msoBusinessLogic.addRelationshipToServiceInstance(requestDetails, serviceInstanceId); + } catch (Exception e){ + LOGGER.error("Internal error when calling MSO controller logic for {}", methodName, e); + return new ResponseEntity<>(e.getMessage(), HttpStatus.INTERNAL_SERVER_ERROR); + } + return new ResponseEntity<>(w.getResponse(), HttpStatus.OK); + } + + + /** + * Exception handler. + * + * @param e the e + * @param response the response + * @throws IOException Signals that an I/O exception has occurred. + */ + @ExceptionHandler(Exception.class) + private void exceptionHandler(Exception e, HttpServletResponse response) throws IOException { + + /* + * The following "logger.error" lines "should" be sufficient for logging the exception. + * However, the console output in my Eclipse environment is NOT showing ANY of the + * logger statements in this class. Thus the temporary "e.printStackTrace" statement + * is also included. + */ + + String methodName = "exceptionHandler"; + LOGGER.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); + StringWriter sw = new StringWriter(); + e.printStackTrace(new PrintWriter(sw)); + LOGGER.error(EELFLoggerDelegate.errorLogger, sw.toString()); + + /* + * Temporary - IF the above mentioned "logger.error" glitch is resolved ... + * this statement could be removed since it would then likely result in duplicate + * trace output. + */ + e.printStackTrace(System.err); + + response.setContentType("application/json; charset=UTF-8"); + response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); + + ExceptionResponse exceptionResponse = new ExceptionResponse(); + exceptionResponse.setException(e.getClass().toString().replaceFirst("^.*\\.", "")); + exceptionResponse.setMessage(e.getMessage()); + + response.getWriter().write(new ObjectMapper().writeValueAsString(exceptionResponse)); + + response.flushBuffer(); + + } + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/OperationalEnvironmentController.java b/vid-app-common/src/main/java/org/onap/vid/controller/OperationalEnvironmentController.java new file mode 100644 index 000000000..e57aab392 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/controller/OperationalEnvironmentController.java @@ -0,0 +1,354 @@ +package org.onap.vid.controller; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.google.common.base.MoreObjects; +import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang3.exception.ExceptionUtils; +import org.openecomp.portalsdk.core.controller.RestrictedBaseController; +import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.vid.changeManagement.RequestDetailsWrapper; +import org.onap.vid.model.ExceptionResponse; +import org.onap.vid.model.RequestReferencesContainer; +import org.onap.vid.mso.MsoBusinessLogic; +import org.onap.vid.mso.MsoResponseWrapper2; +import org.onap.vid.mso.RestMsoImplementation; +import org.onap.vid.mso.RestObject; +import org.onap.vid.mso.model.OperationalEnvironmentActivateInfo; +import org.onap.vid.mso.model.OperationalEnvironmentDeactivateInfo; +import org.onap.vid.mso.rest.MsoRestClientNew; +import org.onap.vid.mso.rest.OperationalEnvironment.OperationEnvironmentRequestDetails; +import org.onap.vid.mso.rest.RequestDetails; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.MissingServletRequestParameterException; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletRequest; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +import static org.onap.vid.utils.Logging.getMethodCallerName; +import static org.onap.vid.utils.Logging.getMethodName; +import static org.springframework.http.HttpStatus.INTERNAL_SERVER_ERROR; + +@RestController +@RequestMapping("operationalEnvironment") +public class OperationalEnvironmentController extends RestrictedBaseController { + + private static final EELFLoggerDelegate LOGGER = EELFLoggerDelegate.getLogger(OperationalEnvironmentController.class); + private final RestMsoImplementation restMso; + private final MsoBusinessLogic msoBusinessLogic; + + private static final Pattern RECOVERY_ACTION_MESSAGE_PATTERN = Pattern.compile("String value \'(.*)\': value not"); + + + @Autowired + public OperationalEnvironmentController(MsoBusinessLogic msoBusinessLogic, MsoRestClientNew msoClientInterface) { + this.restMso = msoClientInterface; + this.msoBusinessLogic = msoBusinessLogic; + } + + @RequestMapping(value = "/create", method = RequestMethod.POST) + public MsoResponseWrapper2 createOperationalEnvironment(HttpServletRequest request, @RequestBody OperationalEnvironmentCreateBody operationalEnvironment) throws Exception { + LOGGER.debug(EELFLoggerDelegate.debugLogger, "start {}({})", getMethodName(), operationalEnvironment); + String userId = ControllersUtils.extractUserId(request); + RequestDetailsWrapper requestDetailsWrapper = msoBusinessLogic.convertParametersToRequestDetails(operationalEnvironment, userId); + String path = msoBusinessLogic.getOperationalEnvironmentCreationPath(); + RestObject msoResponse = restMso.PostForObject(requestDetailsWrapper, "", + path, RequestReferencesContainer.class); + debugEnd(msoResponse); + return new MsoResponseWrapper2<>(msoResponse); + } + + @RequestMapping(value = "/activate", method = RequestMethod.POST) + public MsoResponseWrapper2 activate(HttpServletRequest request, + @RequestParam("operationalEnvironment") String operationalEnvironmentId, + @RequestBody OperationalEnvironmentActivateBody activateRequest) throws Exception { + + verifyIsNotEmpty(operationalEnvironmentId, "operationalEnvironment"); + + //manifest is null in case of wrong manifest structure (deserialization failure of the manifest) + if (activateRequest.getManifest()==null || activateRequest.getManifest().getServiceModelList()==null) { + throw new BadManifestException("Manifest structure is wrong"); + } + + String userId = ControllersUtils.extractUserId(request); + + OperationalEnvironmentActivateInfo activateInfo = new OperationalEnvironmentActivateInfo(activateRequest, userId, operationalEnvironmentId); + debugStart(activateInfo); + + String path = msoBusinessLogic.getOperationalEnvironmentActivationPath(activateInfo); + RequestDetailsWrapper requestDetailsWrapper = msoBusinessLogic.createOperationalEnvironmentActivationRequestDetails(activateInfo); + + RestObject msoResponse = restMso.PostForObject(requestDetailsWrapper, "", + path, RequestReferencesContainer.class); + + debugEnd(msoResponse); + return new MsoResponseWrapper2<>(msoResponse); + } + + @RequestMapping(value = "/deactivate", method = RequestMethod.POST) + public MsoResponseWrapper2 deactivate(HttpServletRequest request, + @RequestParam("operationalEnvironment") String operationalEnvironmentId, + @RequestBody Map deactivationRequest) throws Exception { + + verifyIsNotEmpty(operationalEnvironmentId, "operationalEnvironment"); + + String userId = ControllersUtils.extractUserId(request); + + OperationalEnvironmentDeactivateInfo deactivateInfo = new OperationalEnvironmentDeactivateInfo(userId, operationalEnvironmentId); + debugStart(deactivateInfo); + + String path = msoBusinessLogic.getOperationalEnvironmentDeactivationPath(deactivateInfo); + RequestDetailsWrapper requestDetailsWrapper = msoBusinessLogic.createOperationalEnvironmentDeactivationRequestDetails(deactivateInfo); + + RestObject msoResponse = restMso.PostForObject(requestDetailsWrapper, "", + path, RequestReferencesContainer.class); + + debugEnd(msoResponse); + return new MsoResponseWrapper2<>(msoResponse); + } + + @RequestMapping(value = "/requestStatus", method = RequestMethod.GET) + public MsoResponseWrapper2 status(HttpServletRequest request, @RequestParam("requestId") String requestId) throws Exception { + + LOGGER.debug(EELFLoggerDelegate.debugLogger, "start {}({})", getMethodName(), requestId); + + verifyIsNotEmpty(requestId, "requestId"); + String path = msoBusinessLogic.getCloudResourcesRequestsStatusPath(requestId); + + final RestObject msoResponse = restMso.GetForObject("", path, HashMap.class); + + LOGGER.debug(EELFLoggerDelegate.debugLogger, "end {}() => {}", getMethodName(), msoResponse); + return new MsoResponseWrapper2<>(msoResponse); + } + + @ExceptionHandler(Exception.class) + @ResponseStatus(value=INTERNAL_SERVER_ERROR) + private ExceptionResponse exceptionHandler(Exception e) { + return ControllersUtils.handleException(e, LOGGER); + } + + @ExceptionHandler({ + org.springframework.web.bind.MissingServletRequestParameterException.class, + BadManifestException.class + }) + @ResponseStatus(value = HttpStatus.BAD_REQUEST) + public ExceptionResponse clientDerivedExceptionAsBadRequest(Exception e) { + // same handler, different HTTP Code + return exceptionHandler(e); + } + + @ExceptionHandler({ + org.springframework.http.converter.HttpMessageNotReadableException.class, + }) + @ResponseStatus(value = HttpStatus.BAD_REQUEST) + public ExceptionResponse handlingHttpMessageNotReadableException(Exception e) { + //in case of wrong value in manifest for RecoveryAction the message contains the class name. + //The wrong value is in also part of this messages + //within the pattern of: String value '': value not + //so we use regex to find the wrong value + if (e.getMessage().contains(OperationalEnvironmentRecoveryAction.class.getName())) { + LOGGER.error(EELFLoggerDelegate.errorLogger, "{}: {}", getMethodName(), ExceptionUtils.getMessage(e), e); + String message = "Wrong value for RecoveryAction in manifest. Allowed options are: "+OperationalEnvironmentRecoveryAction.options; + + Matcher matcher = RECOVERY_ACTION_MESSAGE_PATTERN.matcher(e.getMessage()); + if (matcher.find()) { + String wrongValue = matcher.group(1); + message = message+". Wrong value is: "+wrongValue; + } + return new ExceptionResponse(new BadManifestException(message)); + } + return exceptionHandler(e); + } + + + public enum OperationalEnvironmentRecoveryAction { + abort, + retry, + skip; + + public static final String options = Stream.of(OperationalEnvironmentRecoveryAction.values()).map(OperationalEnvironmentRecoveryAction::name).collect(Collectors.joining(", ")); + } + + public static class ActivateServiceModel { + private String serviceModelVersionId; + private OperationalEnvironmentRecoveryAction recoveryAction; + + public ActivateServiceModel() { + } + + public ActivateServiceModel(String serviceModelVersionId, OperationalEnvironmentRecoveryAction recoveryAction) { + this.serviceModelVersionId = serviceModelVersionId; + this.recoveryAction = recoveryAction; + } + + public String getServiceModelVersionId() { + return serviceModelVersionId; + } + + public void setServiceModelVersionId(String serviceModelVersionId) { + this.serviceModelVersionId = serviceModelVersionId; + } + + public OperationalEnvironmentRecoveryAction getRecoveryAction() { + return recoveryAction; + } + + public void setRecoveryAction(OperationalEnvironmentRecoveryAction recoveryAction) { + this.recoveryAction = recoveryAction; + } + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static class OperationalEnvironmentManifest { + + + private List serviceModelList; + + public OperationalEnvironmentManifest() { + } + + public OperationalEnvironmentManifest(List serviceModelList) { + this.serviceModelList = serviceModelList; + } + + public List getServiceModelList() { + return serviceModelList; + } + + public void setServiceModelList(List serviceModelList) { + this.serviceModelList = serviceModelList; + } + } + + public static class OperationalEnvironmentActivateBody { + private final String relatedInstanceId; + private final String relatedInstanceName; + private final String workloadContext; + private final OperationalEnvironmentManifest manifest; + + public OperationalEnvironmentActivateBody(@JsonProperty(value = "relatedInstanceId", required = true) String relatedInstanceId, + @JsonProperty(value = "relatedInstanceName", required = true) String relatedInstanceName, + @JsonProperty(value = "workloadContext", required = true) String workloadContext, + @JsonProperty(value = "manifest", required = true) OperationalEnvironmentManifest manifest) { + this.relatedInstanceId = relatedInstanceId; + this.relatedInstanceName = relatedInstanceName; + this.workloadContext = workloadContext; + this.manifest = manifest; + } + + + public String getRelatedInstanceId() { + return relatedInstanceId; + } + + public String getRelatedInstanceName() { + return relatedInstanceName; + } + + public String getWorkloadContext() { + return workloadContext; + } + + public OperationalEnvironmentManifest getManifest() { + return manifest; + } + + @Override + public String toString() { + return MoreObjects.toStringHelper(this) + .add("relatedInstanceId", relatedInstanceId) + .add("relatedInstanceName", relatedInstanceName) + .add("workloadContext", workloadContext) + .add("manifest", manifest) + .toString(); + } + } + + public static class OperationalEnvironmentCreateBody { + private final String instanceName; + private final String ecompInstanceId; + private final String ecompInstanceName; + private final String operationalEnvironmentType; + private final String tenantContext; + private final String workloadContext; + + public OperationalEnvironmentCreateBody(@JsonProperty(value = "instanceName", required = true) String instanceName, + @JsonProperty(value = "ecompInstanceId", required = true) String ecompInstanceId, + @JsonProperty(value = "ecompInstanceName", required = true) String ecompInstanceName, + @JsonProperty(value = "operationalEnvironmentType", required = true) String operationalEnvironmentType, + @JsonProperty(value = "tenantContext", required = true) String tenantContext, + @JsonProperty(value = "workloadContext", required = true) String workloadContext) { + this.instanceName = instanceName; + this.ecompInstanceId = ecompInstanceId; + this.ecompInstanceName = ecompInstanceName; + this.operationalEnvironmentType = operationalEnvironmentType; + this.tenantContext = tenantContext; + this.workloadContext = workloadContext; + } + + public String getInstanceName() { + return instanceName; + } + + public String getEcompInstanceId() { + return ecompInstanceId; + } + + public String getEcompInstanceName() { + return ecompInstanceName; + } + + public String getOperationalEnvironmentType() { + return operationalEnvironmentType; + } + + public String getTenantContext() { + return tenantContext; + } + + public String getWorkloadContext() { + return workloadContext; + } + + @Override + public String toString() { + return MoreObjects.toStringHelper(this) + .add("instanceName", instanceName) + .add("ecompInstanceId", ecompInstanceId) + .add("ecompInstanceName", ecompInstanceName) + .add("operationalEnvironmentType", operationalEnvironmentType) + .add("tenantContext", tenantContext) + .add("workloadContext", workloadContext) + .toString(); + } + } + + private void debugEnd(RestObject msoResponse) { + LOGGER.debug(EELFLoggerDelegate.debugLogger, "end {}() => {}", getMethodCallerName(), msoResponse); + } + + private void debugStart(Object requestInfo) { + LOGGER.debug(EELFLoggerDelegate.debugLogger, "start {}({})", getMethodCallerName(), requestInfo); + } + + private void verifyIsNotEmpty(String fieldValue, String fieldName) throws MissingServletRequestParameterException { + if (StringUtils.isEmpty(fieldValue)) { + throw new MissingServletRequestParameterException(fieldName, "String"); + } + } + + public static class BadManifestException extends RuntimeException { + public BadManifestException(String message) { + super(message); + } + } + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/PolicyController.java b/vid-app-common/src/main/java/org/onap/vid/controller/PolicyController.java new file mode 100644 index 000000000..4e9ec2539 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/controller/PolicyController.java @@ -0,0 +1,84 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.controller; + +import org.json.simple.JSONObject; +import org.openecomp.portalsdk.core.controller.RestrictedBaseController; +import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.vid.policy.*; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import javax.servlet.http.HttpServletRequest; +import java.util.UUID; + +/** + * Controller to handle Policy requests. + */ + +@RestController +public class PolicyController extends RestrictedBaseController{ + + /** The logger. */ + private static final EELFLoggerDelegate LOGGER = EELFLoggerDelegate.getLogger(PolicyController.class); + + @RequestMapping(value="/get_policy",method = RequestMethod.POST) + public ResponseEntity getPolicyInfo( HttpServletRequest request, @RequestBody JSONObject policy_request) throws Exception { + + LOGGER.debug("#####################POLICY API CALL STARTED ###############"+ PolicyProperties.POLICY_GET_CONFIG_VAL); + LOGGER.debug("#####################Policy Request ###############"+policy_request.toString()); + + String path = PolicyProperties.getProperty(PolicyProperties.POLICY_GET_CONFIG_VAL); + PolicyResponseWrapper policyResWrapper = getPolicyConfig(policy_request,path); + + LOGGER.debug("$$$$$$$$$$$$$$$$$$$$$$ " + new ResponseEntity(policyResWrapper.getResponse(), HttpStatus.OK).toString()); + + return ( new ResponseEntity(policyResWrapper.getResponse(), HttpStatus.valueOf(policyResWrapper.getStatus())) ); + } + + protected static PolicyResponseWrapper getPolicyConfig(JSONObject request, String path) throws Exception { + String methodName = "getPolicyConfig"; + String uuid = UUID.randomUUID().toString(); + LOGGER.debug( "starting getPolicyConfig "); + + try { + //STARTING REST API CALL AS AN FACTORY INSTACE + PolicyRestInterfaceIfc restController = PolicyRestInterfaceFactory.getInstance(); + + RestObject restObjStr = new RestObject(); + String str = new String(); + restObjStr.set(str); + restController.Post(str, request, uuid, path, restObjStr ); + PolicyResponseWrapper policyRespWrapper = PolicyUtil.wrapResponse (restObjStr); + + LOGGER.debug( "<== " + methodName + " w=" + policyRespWrapper.getResponse()); + return policyRespWrapper; + } catch (Exception e) { + LOGGER.debug( "EXCEPTION in getPolicyConfig <== " + "." + methodName + e.toString()); + throw e; + } + } +} + diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/PropertyController.java b/vid-app-common/src/main/java/org/onap/vid/controller/PropertyController.java new file mode 100644 index 000000000..2d282edb8 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/controller/PropertyController.java @@ -0,0 +1,132 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.controller; + +import org.openecomp.portalsdk.core.controller.RestrictedBaseController; +import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.vid.category.CategoryParametersResponse; +import org.onap.vid.model.CategoryParameter.Family; +import org.onap.vid.services.CategoryParameterService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.ModelAndView; + +import javax.servlet.http.HttpServletRequest; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.Date; + +import static org.onap.vid.utils.Logging.getMethodName; + +/** + * The Class PropertyController. + */ +@RestController +public class PropertyController extends RestrictedBaseController{ + + + /** The logger. */ + private static final EELFLoggerDelegate LOGGER = EELFLoggerDelegate.getLogger(PropertyController.class); + + /** The Constant dateFormat. */ + final protected static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); + + @Autowired + protected CategoryParameterService categoryParameterService; + + + /** + * Welcome. + * + * @param request the request + * @return the model and view + */ + @RequestMapping(value = {"/propertyhome" }, method = RequestMethod.GET) + public ModelAndView welcome(HttpServletRequest request) { + LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== PropertyController welcome start"); + return new ModelAndView(getViewName()); + } + + /** + * Gets the property. + * + * @param name the name + * @param defaultvalue the defaultvalue + * @param request the request + * @return the property + * @throws Exception the exception + */ + @RequestMapping(value = "/get_property/{name}/{defaultvalue}", method = RequestMethod.GET) + public ResponseEntity getProperty (@PathVariable("name") String name, @PathVariable("defaultvalue") String defaultvalue, + HttpServletRequest request) throws Exception { + + String methodName = "getProperty"; + ResponseEntity resp = null; + String pvalue = null; + LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + try { + // convert "_" to "." in the property name + if (name == null || name.length() == 0 ) { + return ( new ResponseEntity (defaultvalue, HttpStatus.OK)); + } + // convert "_" to "." in the property name + String propertyName = name.replace('_', '.'); + pvalue = SystemProperties.getProperty(propertyName); + if ( ( pvalue == null ) || ( pvalue.length() == 0 ) ) { + pvalue = defaultvalue; + } + resp = new ResponseEntity(pvalue, HttpStatus.OK); + } + catch (Exception e) { + LOGGER.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); + LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); + throw e; + } + LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " returning " + pvalue); + return ( resp ); + } + + /** + * Gets the owning entity properties. + * @param request the request + * @return the property + * @throws Exception the exception + */ + @RequestMapping(value = "/category_parameter", method = RequestMethod.GET) + public ResponseEntity getCategoryParameter(HttpServletRequest request, @RequestParam(value="familyName", required = true) Family familyName) throws Exception { + LOGGER.debug(EELFLoggerDelegate.debugLogger, "start {}({})", getMethodName()); + try { + CategoryParametersResponse response = categoryParameterService.getCategoryParameters(familyName); + LOGGER.debug(EELFLoggerDelegate.debugLogger, "end {}() => {}", getMethodName(), response); + return new ResponseEntity<>(response, HttpStatus.OK); + } + catch (Exception exception) { + LOGGER.error("failed to retrieve category parameter list from DB.", exception); + return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR); + } + } + + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/RoleGeneratorController.java b/vid-app-common/src/main/java/org/onap/vid/controller/RoleGeneratorController.java new file mode 100644 index 000000000..3e15153ac --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/controller/RoleGeneratorController.java @@ -0,0 +1,31 @@ +package org.onap.vid.controller; + +import fj.test.Bool; +import org.json.JSONObject; +import org.openecomp.portalsdk.core.controller.UnRestrictedBaseController; +import org.onap.vid.services.RoleGeneratorService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import javax.servlet.http.HttpServletRequest; + +@RestController +public class RoleGeneratorController extends UnRestrictedBaseController { + @Autowired + private RoleGeneratorService roleGeneratorService; + public static final String GENERATE_ROLE_SCRIPT = "generateRoleScript"; + @RequestMapping(value = GENERATE_ROLE_SCRIPT +"/{firstRun}", method = RequestMethod.GET ) + public ResponseEntity generateRoleScript (@PathVariable("firstRun") boolean firstRun) throws Exception { + ResponseEntity response = null; + String query = roleGeneratorService.generateRoleScript(firstRun); + response = new ResponseEntity(query, HttpStatus.OK); + return response; + } + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/VidController.java b/vid-app-common/src/main/java/org/onap/vid/controller/VidController.java new file mode 100644 index 000000000..c93d8027f --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/controller/VidController.java @@ -0,0 +1,149 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.controller; + +import org.openecomp.portalsdk.core.controller.RestrictedBaseController; +import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.openecomp.sdc.tosca.parser.exceptions.SdcToscaParserException; +import org.onap.vid.asdc.AsdcCatalogException; +import org.onap.vid.asdc.beans.SecureServices; +import org.onap.vid.exceptions.VidServiceUnavailableException; +import org.onap.vid.model.ServiceModel; +import org.onap.vid.roles.Role; +import org.onap.vid.roles.RoleProvider; +import org.onap.vid.services.AaiService; +import org.onap.vid.services.VidService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.servlet.ModelAndView; + +import javax.servlet.http.HttpServletRequest; +import java.util.List; + +//import org.onap.vid.model.Service; + +@RestController +public class VidController extends RestrictedBaseController { + + private static final EELFLoggerDelegate LOG = EELFLoggerDelegate.getLogger(VidController.class); + + private final VidService service; + + @Autowired + public VidController(VidService vidService) throws SdcToscaParserException{ + + service = vidService; + } + + @Autowired + private AaiService aaiService; + + @Autowired + RoleProvider roleProvider; + +// /** +// * Gets the services. +// * +// * @param request the request +// * @return the services +// * @throws VidServiceUnavailableException the vid service unavailable exception +// */ +// @RequestMapping(value={"/rest/models/services"}, method = RequestMethod.GET) +// public SecureServices getServices(HttpServletRequest request) throws VidServiceUnavailableException { +// try { +// AaiService aaiService = new AaiServiceImpl(); +// LOG.info("Start API for browse ASDC was called"); +// SecureServices secureServices = new SecureServices(); +// Map requestParams = request.getParameterMap(); +// List roles = roleProvider.getUserRoles(request); +// secureServices.setServices(aaiService.getServicesByDistributionStatus()); +// secureServices.setServices(service.getServices(requestParams)); +// secureServices.setReadOnly(roleProvider.userPermissionIsReadOnly(roles)); +// return secureServices; +// } catch (AsdcCatalogException e) { +// LOG.error("Failed to retrieve service definitions from SDC", e); +// throw new VidServiceUnavailableException("Failed to retrieve service definitions from SDC", e); +// } catch (Throwable t) { +// LOG.debug("Unexpected error while retrieving service definitions from SDC: " + t.getMessage() + ":", t); +// t.printStackTrace(); +// throw new VidServiceUnavailableException("Unexpected error while retrieving service definitions from SDC: " + t.getMessage(), t); +// } +// } + + /** + * Gets the services. + * + * @param request the request + * @return the services + * @throws VidServiceUnavailableException the vid service unavailable exception + */ + @RequestMapping(value={"/rest/models/services"}, method = RequestMethod.GET) + public SecureServices getServices(HttpServletRequest request) throws VidServiceUnavailableException { + try { + LOG.info("Start API for browse ASDC was called"); + SecureServices secureServices = new SecureServices(); + List roles = roleProvider.getUserRoles(request); + secureServices.setServices(aaiService.getServicesByDistributionStatus()); + secureServices.setReadOnly(roleProvider.userPermissionIsReadOnly(roles)); + return secureServices; + } + catch (Exception t) { + LOG.debug("Unexpected error while retrieving service definitions from A&AI: " + t.getMessage() + ":", t); + t.printStackTrace(); + throw new VidServiceUnavailableException("Unexpected error while retrieving service definitions from A&AI: " + t.getMessage(), t); + } + } + + + + /** + * Gets the services. + * + * @param uuid the uuid + * @return the services + * @throws VidServiceUnavailableException the vid service unavailable exception + */ + @RequestMapping(value={"/rest/models/services/{uuid}"}, method = RequestMethod.GET) + public ServiceModel getServices(@PathVariable("uuid") String uuid, HttpServletRequest request) throws VidServiceUnavailableException { + try { + return service.getService(uuid); + } catch (AsdcCatalogException e) { + LOG.error("Failed to retrieve service definitions from SDC", e); + throw new VidServiceUnavailableException("Failed to retrieve service definitions from SDC", e); + } + } + + + /** + * Gets the services view. + * + * @param request the request + * @return the services view + * @throws VidServiceUnavailableException the vid service unavailable exception + */ + @RequestMapping(value={"/serviceModels"}, method=RequestMethod.GET) + public ModelAndView getServicesView(HttpServletRequest request) throws VidServiceUnavailableException { + return new ModelAndView("serviceModels"); + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/ViewLogController.java b/vid-app-common/src/main/java/org/onap/vid/controller/ViewLogController.java new file mode 100644 index 000000000..4a87df10d --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/controller/ViewLogController.java @@ -0,0 +1,65 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.controller; + +import org.openecomp.portalsdk.core.controller.RestrictedBaseController; +import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.servlet.ModelAndView; + +import javax.servlet.ServletContext; +import javax.servlet.http.HttpServletRequest; +import java.text.DateFormat; +import java.text.SimpleDateFormat; + + +/** + * The Class ViewLogController. + */ +@RestController +public class ViewLogController extends RestrictedBaseController{ + + /** The logger. */ + private static final EELFLoggerDelegate LOGGER = EELFLoggerDelegate.getLogger(ViewLogController.class); + + /** The Constant dateFormat. */ + final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); + + /** The servlet context. */ + private @Autowired ServletContext servletContext; + + /** + * Welcome. + * + * @param request the request + * @return the model and view + */ + @RequestMapping(value = {"/viewlog" }, method = RequestMethod.GET) + public ModelAndView welcome(HttpServletRequest request) { + + return new ModelAndView(getViewName()); + } + + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/WebConfig.java b/vid-app-common/src/main/java/org/onap/vid/controller/WebConfig.java new file mode 100644 index 000000000..2838e7f3c --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/controller/WebConfig.java @@ -0,0 +1,123 @@ +package org.onap.vid.controller; + +import com.fasterxml.jackson.databind.ObjectMapper; +import org.apache.commons.io.IOUtils; +import org.json.JSONObject; +import org.json.JSONTokener; +import org.onap.vid.aai.AaiClient; +import org.onap.vid.aai.AaiClientInterface; +import org.onap.vid.asdc.AsdcClient; +import org.onap.vid.asdc.local.LocalAsdcClient; +import org.onap.vid.asdc.memory.InMemoryAsdcClient; +import org.onap.vid.asdc.parser.ToscaParserImpl2; +import org.onap.vid.asdc.rest.RestfulAsdcClient; +import org.onap.vid.properties.AsdcClientConfiguration; +import org.onap.vid.properties.AsdcClientConfiguration.AsdcClientType; +import org.onap.vid.services.AaiService; +import org.onap.vid.services.AaiServiceImpl; +import org.onap.vid.services.VidService; +import org.onap.vid.services.VidServiceImpl; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +import javax.net.ssl.SSLContext; +import javax.ws.rs.client.Client; +import javax.ws.rs.client.ClientBuilder; +import java.io.IOException; +import java.io.InputStream; +import java.net.URI; +import java.net.URISyntaxException; +import java.security.KeyManagementException; +import java.security.NoSuchAlgorithmException; +import java.util.Arrays; + +@Configuration +public class WebConfig { + + /** + * Gets the object mapper. + * + * @return the object mapper + */ + @Bean + public ObjectMapper getObjectMapper() { + return new ObjectMapper(); + } + + + + + @Bean + public VidService vidService(AsdcClient asdcClient) { + return new VidServiceImpl(asdcClient); + } + + @Bean + public AaiService getAaiService(){ + return new AaiServiceImpl(); + } + + @Bean + public AaiClientInterface getAaiClientInterface(){ + return new AaiClient(); + } + + @Bean + public AsdcClient asdcClient(AsdcClientConfiguration asdcClientConfig) throws IOException { + switch (asdcClientConfig.getAsdcClientType()) { + case IN_MEMORY: + final InputStream asdcCatalogFile = VidController.class.getClassLoader().getResourceAsStream("catalog.json"); + final JSONTokener tokener = new JSONTokener(asdcCatalogFile); + final JSONObject catalog = new JSONObject(tokener); + + return new InMemoryAsdcClient.Builder().catalog(catalog).build(); + case REST: + + final String protocol = asdcClientConfig.getAsdcClientProtocol(); + final String host = asdcClientConfig.getAsdcClientHost(); + final int port = asdcClientConfig.getAsdcClientPort(); + final String auth = asdcClientConfig.getAsdcClientAuth(); + Client cl = null; + if (protocol.equalsIgnoreCase("https")) { + try { + SSLContext ctx = SSLContext.getInstance("TLSv1.2"); + ctx.init(null, null, null); + cl = ClientBuilder.newBuilder().sslContext(ctx).build(); + } catch (NoSuchAlgorithmException n) { + throw new RuntimeException("SDC Client could not be instantiated due to unsupported protocol TLSv1.2", n); + } catch (KeyManagementException k) { + throw new RuntimeException("SDC Client could not be instantiated due to a key management exception", k); + } + } else { + cl = ClientBuilder.newBuilder().build(); + } + + try { + final URI uri = new URI(protocol + "://" + host + ":" + port + "/"); + return new RestfulAsdcClient.Builder(cl, uri) + .auth(auth) + .build(); + } catch (URISyntaxException e) { + throw new RuntimeException("SDC Client could not be instantiated due to a syntax error in the URI", e); + } + + case LOCAL: + + final InputStream asdcServicesFile = VidController.class.getClassLoader().getResourceAsStream("sdcservices.json"); + + final JSONTokener jsonTokener = new JSONTokener(IOUtils.toString(asdcServicesFile)); + final JSONObject sdcServicesCatalog = new JSONObject(jsonTokener); + + return new LocalAsdcClient.Builder().catalog(sdcServicesCatalog).build(); + + default: + throw new RuntimeException(asdcClientConfig.getAsdcClientType() + " is invalid; must be one of " + Arrays.toString(AsdcClientType.values())); + } + } + + @Bean + public ToscaParserImpl2 getToscaParser() { + return new ToscaParserImpl2(); + } + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/filter/PromiseEcompRequestIdFilter.java b/vid-app-common/src/main/java/org/onap/vid/controller/filter/PromiseEcompRequestIdFilter.java new file mode 100644 index 000000000..a83fa281b --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/controller/filter/PromiseEcompRequestIdFilter.java @@ -0,0 +1,94 @@ +package org.onap.vid.controller.filter; + + +import com.google.common.collect.ImmutableList; +import org.apache.commons.lang3.StringUtils; +import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.springframework.web.filter.GenericFilterBean; + +import javax.servlet.FilterChain; +import javax.servlet.ServletException; +import javax.servlet.ServletRequest; +import javax.servlet.ServletResponse; +import javax.servlet.annotation.WebFilter; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletRequestWrapper; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.Collections; +import java.util.Enumeration; +import java.util.UUID; + +import static org.openecomp.portalsdk.core.util.SystemProperties.ECOMP_REQUEST_ID; + +@WebFilter(urlPatterns = "/*") +public class PromiseEcompRequestIdFilter extends GenericFilterBean { + + private final static EELFLoggerDelegate LOGGER = EELFLoggerDelegate.getLogger(PromiseEcompRequestIdFilter.class); + private final static String REQUEST_ID_RESPONSE_HEADER = ECOMP_REQUEST_ID + "-echo"; + + + @Override + public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) + throws IOException, ServletException { + + if (request instanceof HttpServletRequest) { + request = wrapIfNeeded(request); + + if (response instanceof HttpServletResponse) { + final String actualRequestId = ((HttpServletRequest) request).getHeader(ECOMP_REQUEST_ID); + ((HttpServletResponse) response).addHeader(REQUEST_ID_RESPONSE_HEADER, actualRequestId); + } + } + + chain.doFilter(request, response); + } + + public static ServletRequest wrapIfNeeded(ServletRequest request) { + final HttpServletRequest httpRequest = (HttpServletRequest) request; + final String originalRequestId = httpRequest.getHeader(ECOMP_REQUEST_ID); + + if (StringUtils.isEmpty(originalRequestId)) { + request = new PromiseEcompRequestIdRequestWrapper(httpRequest); + } + + return request; + } + + private static class PromiseEcompRequestIdRequestWrapper extends HttpServletRequestWrapper { + + private final UUID requestId; + + PromiseEcompRequestIdRequestWrapper(HttpServletRequest request) { + super(request); + requestId = UUID.randomUUID(); + } + + @Override + public String getHeader(String name) { + return isRequestIdHeaderName(name) ? + requestId.toString() : super.getHeader(name); + } + + @Override + public Enumeration getHeaders(String name) { + if (isRequestIdHeaderName(name)) { + return Collections.enumeration(Collections.singleton(requestId.toString())); + } else { + return super.getHeaders(name); + } + } + + @Override + public Enumeration getHeaderNames() { + return Collections.enumeration(ImmutableList.builder() + .add(ECOMP_REQUEST_ID) + .addAll(Collections.list(super.getHeaderNames())) + .build()); + } + + private boolean isRequestIdHeaderName(String name) { + return ECOMP_REQUEST_ID.equalsIgnoreCase(name); + } + } +} \ No newline at end of file diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/filter/TempFilterForCORS.java b/vid-app-common/src/main/java/org/onap/vid/controller/filter/TempFilterForCORS.java new file mode 100644 index 000000000..02dcde095 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/controller/filter/TempFilterForCORS.java @@ -0,0 +1,48 @@ +package org.onap.vid.controller.filter; + +import org.apache.commons.lang3.StringUtils; +import org.openecomp.portalsdk.core.util.SystemProperties; +import org.springframework.web.filter.GenericFilterBean; + +import javax.servlet.FilterChain; +import javax.servlet.ServletException; +import javax.servlet.ServletRequest; +import javax.servlet.ServletResponse; +import javax.servlet.annotation.WebFilter; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +@WebFilter(urlPatterns = "/*") +public class TempFilterForCORS extends GenericFilterBean { + + private static final String ENV_MODE = "env.mode"; + private Boolean devMode = null; + + //dev mode is initialized here since @WebFilter doesn't support @Autowired + //So we are sure that SystemProperties bean was initialed only after the first call to doFilter + private boolean isDevMode() { + if (devMode!=null) { + return devMode; + } + else { + if (!SystemProperties.containsProperty(ENV_MODE)) { + devMode = Boolean.FALSE; + return devMode; + } + + String envMode = SystemProperties.getProperty(ENV_MODE); + devMode = StringUtils.equalsIgnoreCase(envMode, "dev") ; + } + return devMode; + } + + @Override + public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { + + if (isDevMode() && response instanceof HttpServletResponse) { + ((HttpServletResponse) response).addHeader("Access-Control-Allow-Origin", "http://localhost:3000"); + ((HttpServletResponse) response).addHeader("Access-Control-Allow-Credentials", "true"); + } + chain.doFilter(request, response); + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/test/TestAaiController.java b/vid-app-common/src/main/java/org/onap/vid/controller/test/TestAaiController.java new file mode 100644 index 000000000..29e7a4d7d --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/controller/test/TestAaiController.java @@ -0,0 +1,87 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.controller.test; + +import org.codehaus.jackson.map.ObjectMapper; +import org.openecomp.portalsdk.core.controller.RestrictedBaseController; +import org.onap.vid.model.ExceptionResponse; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +/** + * The Class TestAaiController. + */ +@RestController +@RequestMapping("testaai") +public class TestAaiController extends RestrictedBaseController { + + /** + * Gets the subscription service type list. + * + * @param globalCustomerId the global customer id + * @param request the request + * @return the subscription service type list + * @throws Exception the exception + */ + @RequestMapping(value = "/getSubscriptionServiceTypeList/{globalCustomerId}", method = RequestMethod.GET) + public String getSubscriptionServiceTypeList(@PathVariable("globalCustomerId") String globalCustomerId, HttpServletRequest request) + throws Exception { + + System.err.println("GET SUBSCRIPTION SERVICE TYPE LIST: globalCustomerId: " + globalCustomerId); + + return "[\"vMOG\", \"sevice type 2\", \"sevice type 3\", \"sevice type 4\"]"; + } + + /** + * Exception. + * + * @param e the e + * @param response the response + * @throws IOException Signals that an I/O exception has occurred. + */ + @ExceptionHandler(Exception.class) + private void exception(Exception e, HttpServletResponse response) throws IOException { + + /* + * This logging step should preferably be replaced with an appropriate + * logging method consistent whatever logging mechanism the rest of the + * application code uses. + */ + + e.printStackTrace(System.err); + + response.setContentType("application/json; charset=UTF-8"); + response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); + + ExceptionResponse exceptionResponse = new ExceptionResponse(); + exceptionResponse.setException(e.getClass().toString().replaceFirst("^.*\\.", "")); + exceptionResponse.setMessage(e.getMessage()); + + response.getWriter().write(new ObjectMapper().writeValueAsString(exceptionResponse)); + + response.flushBuffer(); + + } + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/test/TestAsdcController.java b/vid-app-common/src/main/java/org/onap/vid/controller/test/TestAsdcController.java new file mode 100644 index 000000000..2b289b91a --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/controller/test/TestAsdcController.java @@ -0,0 +1,106 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.controller.test; + +import org.codehaus.jackson.map.ObjectMapper; +import org.openecomp.portalsdk.core.controller.RestrictedBaseController; +import org.onap.vid.model.ExceptionResponse; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +/** + * The Class TestAsdcController. + */ +@RestController +@RequestMapping("testasdc") +public class TestAsdcController extends RestrictedBaseController { + + /** + * Gets the model. + * + * @param modelId the model id + * @param request the request + * @return the model + * @throws Exception the exception + */ + @RequestMapping(value = "/getModel/{modelId}", method = RequestMethod.GET) + public String getModel(@PathVariable("modelId") String modelId, HttpServletRequest request) throws Exception { + + System.err.println("SDC: GET MODEL: modelId: " + modelId); + + // @formatter:off + return + "{" + + "\"uuid\": \"5be686dc-fdca-4d54-8548-5d0ed23e962b\"," + + "\"invariantUUID\": \"e5962da9-fe4f-433a-bc99-b43e0d88a9a1\"," + + "\"name\": \"DE220127\"," + + "\"version\": \"0.1\"," + + "\"inputs\": {" + + "\"defaultGateway\": {" + + "\"type\": \"String\"," + + "\"default\": \"192.168.1.1\"," + + "\"description\": \"Router default gateway - use any valid IPv4 address\"" + + "}," + + "\"subnetMask\": {" + + "\"type\": \"String\"," + + "\"default\": \"255.255.255.0\"," + + "\"description\": \"Router subnet mask - example (255.255.255.0)\"" + + "}" + + "}" + + "}"; + // @formatter:on + } + + /** + * Exception. + * + * @param e the e + * @param response the response + * @throws IOException Signals that an I/O exception has occurred. + */ + @ExceptionHandler(Exception.class) + private void exception(Exception e, HttpServletResponse response) throws IOException { + + /* + * This logging step should preferably be replaced with an appropriate + * logging method consistent whatever logging mechanism the rest of the + * application code uses. + */ + + e.printStackTrace(System.err); + + response.setContentType("application/json; charset=UTF-8"); + response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); + + ExceptionResponse exceptionResponse = new ExceptionResponse(); + exceptionResponse.setException(e.getClass().toString().replaceFirst("^.*\\.", "")); + exceptionResponse.setMessage(e.getMessage()); + + response.getWriter().write(new ObjectMapper().writeValueAsString(exceptionResponse)); + + response.flushBuffer(); + + } + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/test/TestMsoController.java b/vid-app-common/src/main/java/org/onap/vid/controller/test/TestMsoController.java new file mode 100644 index 000000000..9d6a3de9c --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/controller/test/TestMsoController.java @@ -0,0 +1,723 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.controller.test; + +import org.codehaus.jackson.map.ObjectMapper; +import org.openecomp.portalsdk.core.controller.RestrictedBaseController; +import org.onap.vid.model.ExceptionResponse; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.stream.Collectors; + +/* + * The "TestMsoController" class is primarily designed to help test "msoCommitController.js" + * + * This class expects and receives JSON data in the same format as expected + * in the "real" application version of this code. However, string versions of JSON are + * maintained internally here instead of marshalled / unmarshalled JSON objects. + * The primary reasons for this were to encapsulate all the test code in this single file and + * minimize the time required to support initial test cases. + * + * The non-test equivalent of this controller could alternatively incorporate POJO objects + * instead of strings. However, the same data format sent to / received from the browser + * JavaScript code would still be expected. + * + * Two specific mechanisms used in this test class may be useful to the application version: + * + * 1) The use of "{variable}" elements in @RequestMappings along with the corresponding + * @PathVariable declarations. + * + * 2) The use of @ExceptionHandler for general purpose exception handler. + * (See @ExceptionHandler comments) + * + * This class is intended to be used in either: + * + * A) Eclipse environments + * OR + * B) Linux environments with ONLY a single user running tests. + * The "quick and dirty" error simulation approach used here makes use of static states for some + * scenarios. Thus multiple users simultaneously testing in Linux environments + * may have contention issues. + */ + +/** + * The Class TestMsoController. + */ +@RestController +@RequestMapping("testmso") +public class TestMsoController extends RestrictedBaseController { + + /* + * Artificial delay (in milliseconds) added before responding to create / + * delete requests + */ + + /** The Constant TEST_DELAY_SHORT_MSEC. */ + private final static int TEST_DELAY_SHORT_MSEC = 1000; + + /* + * Long delay to simulate non-responsive server test + */ + + /** The Constant TEST_DELAY_LONG_MSEC. */ + private final static int TEST_DELAY_LONG_MSEC = 15000; + + /* + * Default number of polls expected before transaction complete. + */ + + /** The Constant MAXIMUM_POLLS_DEFAULT. */ + private final static int MAXIMUM_POLLS_DEFAULT = 4; + + /* + * Number of polls to simulate "maximum polls exceeded" test. + */ + + /** The Constant MAXIMUM_POLLS_LARGE. */ + private final static int MAXIMUM_POLLS_LARGE = 10; + + /* + * Simulated error types. The GUI front end is expected to set these values + * in the "modelName" field of the "mso_create_svc_instance" request. + */ + + /** The Constant ERROR_POLICY_EXCEPTION. */ + private final static String ERROR_POLICY_EXCEPTION = "ERROR_POLICY_EXCEPTION"; + + /** The Constant ERROR_SERVICE_EXCEPTION. */ + private final static String ERROR_SERVICE_EXCEPTION = "ERROR_SERVICE_EXCEPTION"; + + /** The Constant ERROR_POLL_FAILURE. */ + private final static String ERROR_POLL_FAILURE = "ERROR_POLL_FAILURE"; + + /** The Constant ERROR_INVALID_FIELD_INITIAL. */ + private final static String ERROR_INVALID_FIELD_INITIAL = "ERROR_INVALID_FIELD_INITIAL"; + + /** The Constant ERROR_INVALID_FIELD_POLL. */ + private final static String ERROR_INVALID_FIELD_POLL = "ERROR_INVALID_FIELD_POLL"; + + /** The Constant ERROR_GENERAL_SERVER_EXCEPTION. */ + private final static String ERROR_GENERAL_SERVER_EXCEPTION = "ERROR_GENERAL_SERVER_EXCEPTION"; + + /** The Constant ERROR_MAX_POLLS. */ + private final static String ERROR_MAX_POLLS = "ERROR_MAX_POLLS"; + + /** The Constant ERROR_SERVER_TIMEOUT_INITIAL. */ + private final static String ERROR_SERVER_TIMEOUT_INITIAL = "ERROR_SERVER_TIMEOUT_INITIAL"; + + /** The Constant ERROR_SERVER_TIMEOUT_POLL. */ + private final static String ERROR_SERVER_TIMEOUT_POLL = "ERROR_SERVER_TIMEOUT_POLL"; + + /** The simulated error. */ + private String simulatedError = ""; + + /** The maximum polls. */ + private int maximumPolls = 0; + + /** The attempt count. */ + private int attemptCount = 0; + + /** + * Creates the svc instance. + * + * @param request the request + * @return the response entity + * @throws Exception the exception + */ + @RequestMapping(value = "/mso_create_svc_instance", method = RequestMethod.POST) + public ResponseEntity createSvcInstance(HttpServletRequest request) throws Exception { + readAndLogRequest("CREATE SERVICE INSTANCE", request); + Thread.sleep(TEST_DELAY_SHORT_MSEC); + maximumPolls = MAXIMUM_POLLS_DEFAULT; // Simulates MSO polling behavior + attemptCount = 0; + + /* + * This block of code simulates various errors and would NOT be expected + * in a non-test method + */ + System.err.println("simulatedError: " + simulatedError); + + if (simulatedError.equals(ERROR_POLICY_EXCEPTION)) { + return new ResponseEntity(policyExceptionResponse, HttpStatus.OK); + } + if (simulatedError.equals(ERROR_SERVICE_EXCEPTION)) { + return new ResponseEntity(serviceExceptionResponse, HttpStatus.OK); + } + if (simulatedError.equals(ERROR_INVALID_FIELD_INITIAL)) { + /* + * Force invalid response field name. Return + * "XXXXXrequestReferences" instead of "requestReferences" + */ + return new ResponseEntity(acceptResponse.replace("requestReferences", "XXXXXrequestReferences"), + HttpStatus.OK); + } + + if (simulatedError.equals(ERROR_GENERAL_SERVER_EXCEPTION)) { + throw new IOException("an example of an IO exception"); + } + + if (simulatedError.equals(ERROR_SERVER_TIMEOUT_INITIAL)) { + Thread.sleep(TEST_DELAY_LONG_MSEC); + } + + if (simulatedError.equals(ERROR_MAX_POLLS)) { + maximumPolls = MAXIMUM_POLLS_LARGE; + } + + /* + * End of block of simulated error code. + */ + + return new ResponseEntity(acceptResponse, HttpStatus.OK); + } + + /** + * Delete svc instance. + * + * @param serviceInstanceId the service instance id + * @param request the request + * @return the response entity + * @throws Exception the exception + */ + @RequestMapping(value = "/mso_delete_svc_instance/{serviceInstanceId}", method = RequestMethod.POST) + public ResponseEntity deleteSvcInstance(@PathVariable("serviceInstanceId") String serviceInstanceId, + HttpServletRequest request) throws Exception { + readAndLogRequest("DELETE SERVICE INSTANCE: serviceInstanceId: " + serviceInstanceId, request); + Thread.sleep(TEST_DELAY_SHORT_MSEC); + maximumPolls = MAXIMUM_POLLS_DEFAULT; // Simulates MSO polling behavior + attemptCount = 0; + return new ResponseEntity(acceptResponse, HttpStatus.OK); + } + + /** + * Creates the vnf instance. + * + * @param serviceInstanceId the service instance id + * @param request the request + * @return the response entity + * @throws Exception the exception + */ + @RequestMapping(value = "/mso_create_vnf_instance/{serviceInstanceId}", method = RequestMethod.POST) + public ResponseEntity createVnfInstance(@PathVariable("serviceInstanceId") String serviceInstanceId, + HttpServletRequest request) throws Exception { + readAndLogRequest("CREATE VNF INSTANCE: serviceInstanceId: " + serviceInstanceId, request); + Thread.sleep(TEST_DELAY_SHORT_MSEC); + maximumPolls = MAXIMUM_POLLS_DEFAULT; // Simulates MSO polling behavior + attemptCount = 0; + return new ResponseEntity(acceptResponse, HttpStatus.OK); + } + + /** + * Delete vnf instance. + * + * @param serviceInstanceId the service instance id + * @param vnfInstanceId the vnf instance id + * @param request the request + * @return the response entity + * @throws Exception the exception + */ + @RequestMapping(value = "/mso_delete_vnf_instance/{serviceInstanceId}/vnfs/{vnfInstanceId}", method = RequestMethod.POST) + public ResponseEntity deleteVnfInstance(@PathVariable("serviceInstanceId") String serviceInstanceId, + @PathVariable("vnfInstanceId") String vnfInstanceId, HttpServletRequest request) throws Exception { + readAndLogRequest( + "DELETE VNF INSTANCE: serviceInstanceId: " + serviceInstanceId + " vnfInstanceId: " + vnfInstanceId, + request); + Thread.sleep(TEST_DELAY_SHORT_MSEC); + maximumPolls = MAXIMUM_POLLS_DEFAULT; // Simulates MSO polling behavior + attemptCount = 0; + return new ResponseEntity(acceptResponse, HttpStatus.OK); + } + + /** + * Creates the vf module instance. + * + * @param serviceInstanceId the service instance id + * @param vnfInstanceId the vnf instance id + * @param request the request + * @return the response entity + * @throws Exception the exception + */ + // /serviceInstances/v2/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs/ff305d54-75b4-ff1b-adb2-eb6b9e5460ff/vfModules + @RequestMapping(value = "/mso_create_vfmodule_instance/{serviceInstanceId}/vnfs/{vnfInstanceId}", method = RequestMethod.POST) + public ResponseEntity createVfModuleInstance(@PathVariable("serviceInstanceId") String serviceInstanceId, + @PathVariable("vnfInstanceId") String vnfInstanceId, HttpServletRequest request) throws Exception { + readAndLogRequest("CREATE VF MODULE INSTANCE: serviceInstanceId: " + serviceInstanceId + " vnfInstanceId: " + + vnfInstanceId, request); + Thread.sleep(TEST_DELAY_SHORT_MSEC); + maximumPolls = MAXIMUM_POLLS_DEFAULT; // Simulates MSO polling behavior + attemptCount = 0; + return new ResponseEntity(acceptResponse, HttpStatus.OK); + } + + /** + * Delete vf module instance. + * + * @param serviceInstanceId the service instance id + * @param vnfInstanceId the vnf instance id + * @param vfModuleInstanceId the vf module instance id + * @param request the request + * @return the response entity + * @throws Exception the exception + */ + // /serviceInstances/v2/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs/ff305d54-75b4-ff1b-adb2-eb6b9e5460ff/vfModules/ff305d54-75b4-ff1b-bdb2-eb6b9e5460ff + @RequestMapping(value = "/mso_delete_vfmodule_instance/{serviceInstanceId}/vnfs/{vnfInstanceId}/vfModules/{vfModuleInstanceId}", method = RequestMethod.POST) + public ResponseEntity deleteVfModuleInstance(@PathVariable("serviceInstanceId") String serviceInstanceId, + @PathVariable("vnfInstanceId") String vnfInstanceId, + @PathVariable("vfModuleInstanceId") String vfModuleInstanceId, HttpServletRequest request) + throws Exception { + readAndLogRequest("DELETE VF MODULE INSTANCE: serviceInstanceId: " + serviceInstanceId + " vnfInstanceId: " + + vnfInstanceId + " vfModuleInstanceId: " + vfModuleInstanceId, request); + Thread.sleep(TEST_DELAY_SHORT_MSEC); + maximumPolls = MAXIMUM_POLLS_DEFAULT; // Simulates MSO polling behavior + attemptCount = 0; + return new ResponseEntity(acceptResponse, HttpStatus.OK); + } + + // POST + /** + * Creates the volume group instance. + * + * @param serviceInstanceId the service instance id + * @param vnfInstanceId the vnf instance id + * @param request the request + * @return the response entity + * @throws Exception the exception + */ + // /serviceInstances/v2/ff305d54-75b4-431b-adb2-eb6b9e5ff000/volumeGroups + @RequestMapping(value = "/mso_create_volumegroup_instance/{serviceInstanceId}/vnfs/{vnfInstanceId}", method = RequestMethod.POST) + public ResponseEntity createVolumeGroupInstance(@PathVariable("serviceInstanceId") String serviceInstanceId, + @PathVariable("vnfInstanceId") String vnfInstanceId, HttpServletRequest request) throws Exception { + readAndLogRequest("CREATE VOLUME GROUP INSTANCE: seviceInstanceId: " + serviceInstanceId + " vnfInstanceId: " + + vnfInstanceId, request); + Thread.sleep(TEST_DELAY_SHORT_MSEC); + maximumPolls = MAXIMUM_POLLS_DEFAULT; // Simulates MSO polling behavior + attemptCount = 0; + return new ResponseEntity(acceptResponse, HttpStatus.OK); + } + + /** + * Delete volume group instance. + * + * @param serviceInstanceId the service instance id + * @param vnfInstanceId the vnf instance id + * @param volumeGroupInstanceId the volume group instance id + * @param request the request + * @return the response entity + * @throws Exception the exception + */ + // /serviceInstances/v2/ff305d54-75b4-431b-adb2-eb6b9e5ff000/volumeGroups/ff305d54-75b4-ff1b-cdb2-eb6b9e5460ff + @RequestMapping(value = "/mso_delete_volumegroup_instance/{serviceInstanceId}/vnfs/{vnfInstanceId}/volumeGroups/{volumeGroupInstanceId}", method = RequestMethod.POST) + public ResponseEntity deleteVolumeGroupInstance(@PathVariable("serviceInstanceId") String serviceInstanceId, + @PathVariable("vnfInstanceId") String vnfInstanceId, + @PathVariable("volumeGroupInstanceId") String volumeGroupInstanceId, HttpServletRequest request) + throws Exception { + readAndLogRequest("DELETE NW INSTANCE: serviceInstanceId: " + serviceInstanceId + " vnfInstanceId: " + + vnfInstanceId + " volumeGroupInstanceId: " + volumeGroupInstanceId, request); + Thread.sleep(TEST_DELAY_SHORT_MSEC); + maximumPolls = MAXIMUM_POLLS_DEFAULT; // Simulates MSO polling behavior + attemptCount = 0; + return new ResponseEntity(acceptResponse, HttpStatus.OK); + } + + /** + * Creates the nw instance. + * + * @param serviceInstanceId the service instance id + * @param request the request + * @return the response entity + * @throws Exception the exception + */ + @RequestMapping(value = "/mso_create_nw_instance/{serviceInstanceId}", method = RequestMethod.POST) + public ResponseEntity createNwInstance(@PathVariable("serviceInstanceId") String serviceInstanceId, + HttpServletRequest request) throws Exception { + readAndLogRequest("CREATE NW INSTANCE: serviceInstanceId: " + serviceInstanceId, request); + Thread.sleep(TEST_DELAY_SHORT_MSEC); + maximumPolls = MAXIMUM_POLLS_DEFAULT; // Simulates MSO polling behavior + attemptCount = 0; + return new ResponseEntity(acceptResponse, HttpStatus.OK); + } + + /** + * Delete nw instance. + * + * @param serviceInstanceId the service instance id + * @param networkInstanceId the network instance id + * @param request the request + * @return the response entity + * @throws Exception the exception + */ + @RequestMapping(value = "/mso_delete_nw_instance/{serviceInstanceId}/networks/{networkInstanceId}", method = RequestMethod.POST) + public ResponseEntity deleteNwInstance(@PathVariable("serviceInstanceId") String serviceInstanceId, + @PathVariable("networkInstanceId") String networkInstanceId, HttpServletRequest request) throws Exception { + readAndLogRequest("DELETE NW INSTANCE: serviceInstanceId: " + serviceInstanceId + " networkInstanceId: " + + networkInstanceId, request); + Thread.sleep(TEST_DELAY_SHORT_MSEC); + maximumPolls = MAXIMUM_POLLS_DEFAULT; // Simulates MSO polling behavior + attemptCount = 0; + return new ResponseEntity(acceptResponse, HttpStatus.OK); + } + + /** + * Gets the orchestration request. + * + * @param requestId the request id + * @param request the request + * @return the orchestration request + * @throws Exception the exception + */ + @RequestMapping(value = "/mso_get_orch_req/{requestId}", method = RequestMethod.GET) + public ResponseEntity getOrchestrationRequest(@PathVariable("requestId") String requestId, + HttpServletRequest request) throws Exception { + + System.err.println("GET ORCHESTRATION REQUEST: requestId: " + requestId); + + /* + * This block of code simulates various errors and would NOT be expected + * in a non-test method + */ + + if (simulatedError.equals(ERROR_INVALID_FIELD_POLL)) { + /* + * Force invalid response field name. Return "XXXXXrequestStatus" + * instead of "requestStatus" + */ + return new ResponseEntity(inProgressResponse.replace("requestStatus", "XXXXXrequestStatus"), + HttpStatus.OK); + } + + if (simulatedError.equals(ERROR_POLL_FAILURE)) { + /* + * Force status field with "Failure" + */ + return new ResponseEntity(inProgressResponse.replace("InProgress", "Failure"), HttpStatus.OK); + } + + if (simulatedError.equals(ERROR_SERVER_TIMEOUT_POLL)) { + Thread.sleep(TEST_DELAY_LONG_MSEC); + } + + /* + * End of block of simulated error code. + */ + + /* + * This logic simulates how MSO might behave ... i.e. return different + * results depending on the value of 'maximumPolls'. + * + */ + int percentProgress = (++attemptCount * 100) / maximumPolls; + + System.err.println("attempts: " + attemptCount + " max: " + maximumPolls + " percent: " + percentProgress); + + String response = inProgressResponse.replace("\"50\"", "\"" + Integer.toString(percentProgress) + "\""); + + if (attemptCount < maximumPolls) { + if (attemptCount > 1) { + response = response.replace("vLan setup", "setup step " + Integer.toString(attemptCount)); + } + return new ResponseEntity(response, HttpStatus.OK); + } else { + return new ResponseEntity( + response.replace("InProgress", "Complete").replace("vLan setup complete", ""), HttpStatus.OK); + } + } + + /** + * Gets the orchestration requests. + * + * @param filterString the filter string + * @param request the request + * @return the orchestration requests + * @throws Exception the exception + */ + @RequestMapping(value = "/mso_get_orch_reqs/{filterString}", method = RequestMethod.GET) + public ResponseEntity getOrchestrationRequests(@PathVariable("filterString") String filterString, + HttpServletRequest request) throws Exception { + + System.err.println("GET ORCHESTRATION REQUESTS: filterString: " + filterString); + + return new ResponseEntity(getOrchestrationRequestsResponse, HttpStatus.OK); + + } + + /* + * General purpose exception handler that could be used in application code. + * + * The method returns exceptions as error code 500. Both the exception type + * and message are written as a JSON object. + * + * See the following references: + * + * 1) The ExceptionResponse POJO. + * + * 2) The "getHttpErrorMessage" function in "utilityService.js" - an example + * of how the browser JavaScript code can interpret this response. + */ + + /** + * Exception. + * + * @param e the e + * @param response the response + * @throws IOException Signals that an I/O exception has occurred. + */ + @ExceptionHandler(Exception.class) + private void exception(Exception e, HttpServletResponse response) throws IOException { + + /* + * This logging step should preferably be replaced with an appropriate + * logging method consistent whatever logging mechanism the rest of the + * application code uses. + */ + + e.printStackTrace(System.err); + + response.setContentType("application/json; charset=UTF-8"); + response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); + + ExceptionResponse exceptionResponse = new ExceptionResponse(); + exceptionResponse.setException(e.getClass().toString().replaceFirst("^.*\\.", "")); + exceptionResponse.setMessage(e.getMessage()); + + response.getWriter().write(new ObjectMapper().writeValueAsString(exceptionResponse)); + + response.flushBuffer(); + + } + + /* + * 'readAndLogRequest' only intended to be used for testing. + * + * The method reads JSON from the input stream and thus prevents other + * mechanisms from reading the input. + */ + + /** + * Read and log request. + * + * @param label the label + * @param request the request + * @throws Exception the exception + */ + private void readAndLogRequest(String label, HttpServletRequest request) throws Exception { + String input = request.getReader().lines().collect(Collectors.joining(System.lineSeparator())); + + ObjectMapper mapper = new ObjectMapper(); + Object json = mapper.readValue(input, Object.class); + + System.err.println(label + "\n" + mapper.writerWithDefaultPrettyPrinter().writeValueAsString(json)); + + /* + * Only needed for error simulation ... + */ + if (input.matches("^.*modelName.*$")) { + simulatedError = input.replaceAll("^.*\"modelName\":\"", "").replaceAll("\".*$", ""); + } + } + + /* + * Various test responses: + */ + + // @formatter:off + + /** The accept response. */ + /* + * Sample responses to initial create / delete transaction + */ + private String acceptResponse = + "{" + + " \"status\": 202," + + " \"entity\": {" + + " \"requestReferences\": {" + + " \"instanceId\": \"bc305d54-75b4-431b-adb2-eb6b9e546014\"," + + " \"requestId\": \"rq1234d1-5a33-55df-13ab-12abad84e331\"" + + " }" + + " }" + + "}"; + + /** The policy exception response. */ + private String policyExceptionResponse = + "{" + + " \"status\": 400," + + " \"entity\": { " + + " \"requestError\": {" + + " \"policyException\": {" + + " \"messageId\": \"POL9003\"," + + " \"text\": \"Message content size exceeds the allowable limit\"" + + " }" + + " }" + + " }" + + "}"; + + /** The service exception response. */ + private String serviceExceptionResponse = + "{" + + " \"status\": 400," + + " \"entity\": { " + + " \"requestError\": {" + + " \"serviceException\": {" + + " \"messageId\": \"SVC2000\"," + + " \"text\": \"Missing Parameter: %1. Error code is %2\"," + + " \"variables\": [" + + " \"severity\"," + + " \"400\"" + + " ]" + + " }" + + " }" + + " }" + + "}" + + ""; + + /** The in progress response. */ + /* + * Sample response to subsequent getOrchestrationRequest + */ + private String inProgressResponse = + "{" + + " \"status\": 200," + + " \"entity\": {" + + " \"request\": {" + + " \"requestId\": \"rq1234d1-5a33-55df-13ab-12abad84e333\"," + + " \"startTime\": \"Thu, 04 Jun 2009 02:51:59 GMT\"," + + " \"instanceIds\": {" + + " \"serviceInstanceId\": \"bc305d54-75b4-431b-adb2-eb6b9e546014\"" + + " }," + + " \"requestScope\": \"service\"," + + " \"requestType\": \"createInstance\"," + + " \"requestDetails\": {" + + " \"modelInfo\": {" + + " \"modelType\": \"service\"," + + " \"modelId\": \"sn5256d1-5a33-55df-13ab-12abad84e764\"," + + " \"modelNameVersionId\": \"ab6478e4-ea33-3346-ac12-ab121484a333\"," + + " \"modelName\": \"WanBonding\"," + + " \"modelVersion\": \"1\"" + + " }," + + " \"subscriberInfo\": {" + + " \"globalSubscriberId\": \"C12345\"," + + " \"subscriberName\": \"General Electric Division 12\"" + + " }," + + " \"requestParameters\": {" + + " \"vpnId\": \"1a2b3c4d5e6f\"," + + " \"productName\": \"Trinity\"," + + " \"customerId\": \"icore9883749\"" + + " }" + + " }," + + " \"requestStatus\": {" + + " \"timestamp\": \"Thu, 04 Jun 2009 02:53:39 GMT\"," + + " \"requestState\": \"InProgress\"," + + " \"statusMessage\": \"vLan setup complete\"," + + " \"percentProgress\": \"50\"" + + " }" + + " }" + + " }" + + "}"; + + /* + * Sample response to subsequent getOrchestrationRequests + */ + + /** The get orchestration requests response. */ + private String getOrchestrationRequestsResponse = + "{" + + " \"status\": 200," + + " \"entity\": {" + + " \"requestList\": [" + + " {" + + " \"request\": {" + + " \"requestId\": \"rq1234d1-5a33-55df-13ab-12abad84e333\"," + + " \"startTime\": \"Thu, 04 Jun 2009 02:51:59 GMT\"," + + " \"finishTime\": \"Thu, 04 Jun 2009 02:55:59 GMT\"," + + " \"instanceReferences\": {" + + " \"serviceInstanceId\": \"bc305d54-75b4-431b-adb2-eb6b9e546014\"" + + " }," + + " \"requestScope\": \"service\"," + + " \"requestType\": \"createInstance\"," + + " \"requestDetails\": {" + + " \"modelInfo\": {" + + " \"modelType\": \"service\"," + + " \"modelId\": \"sn5256d1-5a33-55df-13ab-12abad84e764\"," + + " \"modelNameVersionId\": \"ab6478e4-ea33-3346-ac12-ab121484a333\"," + + " \"modelName\": \"WanBonding\"," + + " \"modelVersion\": \"1\"" + + " }," + + " \"subscriberInfo\": {" + + " \"globalSubscriberId\": \"C12345\"," + + " \"subscriberName\": \"General Electric Division 12\"" + + " }," + + " \"requestParameters\": {" + + " \"vpnId\": \"1a2b3c4d5e6f\"," + + " \"productName\": \"Trinity\"," + + " \"customerId\": \"icore9883749\"" + + " }" + + " }," + + " \"requestStatus\": {" + + " \"timestamp\": \"Thu, 04 Jun 2009 02:54:49 GMT\"," + + " \"requestState\": \"complete\"," + + " \"statusMessage\": \"Resource Created\"," + + " \"percentProgress\": \"100\"" + + " }" + + " }" + + " }," + + " {" + + " \"request\": {" + + " \"requestId\": \"rq1234d1-5a33-55df-13ab-12abad84e334\"," + + " \"startTime\": \"Thu, 04 Jun 2009 03:52:59 GMT\"," + + " \"instanceReferences\": {" + + " \"serviceInstanceId\": \"bc305d54-75b4-431b-adb2-eb6b9e546014\"" + + " }," + + " \"requestScope\": \"service\"," + + " \"requestType\": \"updateInstance\"," + + " \"requestDetails\": {" + + " \"modelInfo\": {" + + " \"modelType\": \"service\"," + + " \"modelId\": \"sn5256d1-5a33-55df-13ab-12abad84e764\"," + + " \"modelNameVersionId\": \"ab6478e4-ea33-3346-ac12-ab121484a333\"," + + " \"modelName\": \"WanBonding\"," + + " \"modelVersion\": \"1\"" + + " }," + + " \"subscriberInfo\": {" + + " \"globalSubscriberId\": \"C12345\"," + + " \"subscriberName\": \"General Electric Division 12\"" + + " }," + + " \"requestParameters\": {" + + " \"vpnId\": \"1a2b3c4d5e70\"," + + " \"productName\": \"Trinity\"," + + " \"customerId\": \"icore9883749\"" + + " }" + + " }," + + " \"requestStatus\": {" + + " \"timestamp\": \"Thu, 04 Jun 2009 03:53:39 GMT\"," + + " \"requestState\": \"InProgress\"," + + " \"statusMessage\": \"vLan setup complete\"," + + " \"percentProgress\": \"50\"" + + " }" + + " }" + + " }" + + " ]" + + " }" + + "}"; +} diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/test/TestPageController.java b/vid-app-common/src/main/java/org/onap/vid/controller/test/TestPageController.java new file mode 100644 index 000000000..48ccdf8d8 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/controller/test/TestPageController.java @@ -0,0 +1,55 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.controller.test; + +import org.openecomp.portalsdk.core.controller.RestrictedBaseController; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.servlet.ModelAndView; + +/** + * The Class TestPageController. + */ +@Controller +public class TestPageController extends RestrictedBaseController { + + /** + * Test mso page. + * + * @return the model and view + */ + @RequestMapping(value = { "testMso.htm" }, method = RequestMethod.GET) + public ModelAndView testMsoPage() { + return new ModelAndView(getViewName()); + } + + /** + * Test view edit page. + * + * @return the model and view + */ + @RequestMapping(value = { "testViewEdit" }, method = RequestMethod.GET) + public ModelAndView testViewEditPage() { + return new ModelAndView(getViewName()); + } + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/dao/FnAppDoaImpl.java b/vid-app-common/src/main/java/org/onap/vid/dao/FnAppDoaImpl.java new file mode 100644 index 000000000..c27d17e1e --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/dao/FnAppDoaImpl.java @@ -0,0 +1,112 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.dao; + +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.net.URI; +import java.net.URL; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.Properties; + +import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; + + +public class FnAppDoaImpl { + + /** The logger. */ + static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(FnAppDoaImpl.class); + + public int getProfileCount(String driver, String URL, String username, String password) { + Connection dbc = null; + PreparedStatement pst = null; + ResultSet rs = null; + String q = null; + int count = 0; + try { + dbc = getConnection(driver,URL,username,password); + logger.debug(EELFLoggerDelegate.debugLogger, "getConnection:::"+ dbc); + q = "select count(*) from fn_app"; + pst = dbc.prepareStatement(q); + rs = pst.executeQuery(); + + if (rs.next()) + count = rs.getInt(1); + } catch(Exception ex) { + logger.error(EELFLoggerDelegate.errorLogger, "Failed to perform health check", ex); + } finally { + cleanup(rs,pst,dbc); + } + logger.debug(EELFLoggerDelegate.debugLogger, "count:::"+ count); + return count; + } + + public static Connection getConnection(String driver2, String url, String username, String password) throws IOException, SQLException, ClassNotFoundException{ + java.sql.Connection con=null; + + if( url!=null && username!=null && password!=null ){ + con = DriverManager.getConnection(url, username, password); + } + + System.out.println("Connection Successful"); + return con; + + } + + public static void cleanup(ResultSet rs, PreparedStatement st, Connection c) { + if (rs != null) { + try { + rs.close(); + } catch (Exception e) { + if (logger != null) + logger.error("Error when trying to close result set", e); + } + } + if (st != null) { + try { + st.close(); + } catch (Exception e) { + if (logger != null) + logger.error("Error when trying to close statement", e); + } + } + if (c != null) { + try { + c.rollback(); + } catch (Exception e) { + if (logger != null) + logger.error("Error when trying to rollback connection", e); + } + try { + c.close(); + } catch (Exception e) { + if (logger != null) + logger.error("Error when trying to close connection", e); + } + } + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/dao/ProfileDao.java b/vid-app-common/src/main/java/org/onap/vid/dao/ProfileDao.java new file mode 100644 index 000000000..e6a8a4e54 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/dao/ProfileDao.java @@ -0,0 +1,45 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.dao; + +import java.util.List; +import org.openecomp.portalsdk.core.domain.Profile; + +/** + * The Interface ProfileDao. + */ +public interface ProfileDao { + + /** + * Find all. + * + * @return the list + */ + List findAll(); + + /** + * Gets the profile. + * + * @param id the id + * @return the profile + */ + Profile getProfile(int id); +} diff --git a/vid-app-common/src/main/java/org/onap/vid/exceptions/NotFoundException.java b/vid-app-common/src/main/java/org/onap/vid/exceptions/NotFoundException.java new file mode 100644 index 000000000..0616aa1f1 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/exceptions/NotFoundException.java @@ -0,0 +1,12 @@ +package org.onap.vid.exceptions; + +public class NotFoundException extends RuntimeException { + + public NotFoundException(String message) { + super(message); + } + + public NotFoundException(String message, Throwable cause) { + super(message, cause); + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/exceptions/VidServiceUnavailableException.java b/vid-app-common/src/main/java/org/onap/vid/exceptions/VidServiceUnavailableException.java new file mode 100644 index 000000000..622b34c22 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/exceptions/VidServiceUnavailableException.java @@ -0,0 +1,69 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.exceptions; + +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.ResponseStatus; + +/** + * The Class VidServiceUnavailableException. + */ +@ResponseStatus(value=HttpStatus.SERVICE_UNAVAILABLE) +public class VidServiceUnavailableException extends Exception { + + /** The Constant serialVersionUID. */ + private static final long serialVersionUID = 1L; + + /** + * Instantiates a new vid service unavailable exception. + */ + public VidServiceUnavailableException() { + super(); + } + + /** + * Instantiates a new vid service unavailable exception. + * + * @param msg the msg + */ + public VidServiceUnavailableException(String msg) { + super(msg); + } + + /** + * Instantiates a new vid service unavailable exception. + * + * @param t the t + */ + public VidServiceUnavailableException(Throwable t) { + super(t); + } + + /** + * Instantiates a new vid service unavailable exception. + * + * @param msg the msg + * @param t the t + */ + public VidServiceUnavailableException(String msg, Throwable t) { + super(msg, t); + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/factories/MsoRequestFactory.java b/vid-app-common/src/main/java/org/onap/vid/factories/MsoRequestFactory.java new file mode 100644 index 000000000..22bfa47bc --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/factories/MsoRequestFactory.java @@ -0,0 +1,15 @@ +package org.onap.vid.factories; + +import org.onap.vid.mso.rest.RequestDetails; + +/** + * Created by pickjonathan on 19/06/2017. + */ +public class MsoRequestFactory { + + public RequestDetails createMsoRequest(String path) + { + return null; + } + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/logging/VidLoggerAspect.java b/vid-app-common/src/main/java/org/onap/vid/logging/VidLoggerAspect.java new file mode 100644 index 000000000..e4e0edb8c --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/logging/VidLoggerAspect.java @@ -0,0 +1,85 @@ +package org.onap.vid.logging; + +import org.apache.commons.lang3.StringUtils; +import org.aspectj.lang.ProceedingJoinPoint; +import org.aspectj.lang.annotation.Around; +import org.aspectj.lang.annotation.Aspect; +import org.aspectj.lang.annotation.Pointcut; +import org.openecomp.portalsdk.core.logging.aspect.EELFLoggerAdvice; +import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.openecomp.portalsdk.core.util.SystemProperties; +import org.springframework.beans.factory.annotation.Autowired; + +import java.net.InetAddress; +import java.net.UnknownHostException; + +import static com.att.eelf.configuration.Configuration.MDC_SERVER_FQDN; + + +@Aspect +@org.springframework.context.annotation.Configuration +public class VidLoggerAspect { + + private String canonicalHostName; + @Autowired + EELFLoggerAdvice advice; + + public VidLoggerAspect() { + try { + final InetAddress localHost = InetAddress.getLocalHost(); + canonicalHostName = localHost.getCanonicalHostName(); + } catch (UnknownHostException e) { + // YOLO + canonicalHostName = null; + } + } + + @Pointcut("execution(public * org.onap.vid.controller.*Controller.*(..))") + public void vidControllers() {} + + @Around("vidControllers() && (" + + " @within(org.openecomp.portalsdk.core.logging.aspect.AuditLog)" + + " || @annotation(org.openecomp.portalsdk.core.logging.aspect.AuditLog)" + + " || @annotation(org.springframework.web.bind.annotation.RequestMapping)" + + ")") + public Object logAuditMethodClassAround(ProceedingJoinPoint joinPoint) throws Throwable { + return logAroundMethod(joinPoint, SystemProperties.SecurityEventTypeEnum.INCOMING_REST_MESSAGE); + } + + private Object logAroundMethod(ProceedingJoinPoint joinPoint, SystemProperties.SecurityEventTypeEnum securityEventType) throws Throwable { + //Before + Object[] passOnArgs = new Object[] {joinPoint.getSignature().getDeclaringType().getName(),joinPoint.getSignature().getName()}; + Object[] returnArgs = advice.before(securityEventType, joinPoint.getArgs(), passOnArgs); + + fixServerFqdnInMDC(); + + //Execute the actual method + Object result; + String restStatus = "COMPLETE"; + try { + result = joinPoint.proceed(); + } catch(Exception e) { + restStatus = "ERROR"; + throw e; + } finally { + fixStatusCodeInMDC(restStatus); + advice.after(securityEventType, restStatus, joinPoint.getArgs(), returnArgs, passOnArgs); + } + + return result; + } + + // Set the status code into MDC *before* the metrics log is written by advice.after() + private void fixStatusCodeInMDC(String restStatus) { + EELFLoggerDelegate.mdcPut(SystemProperties.STATUS_CODE, restStatus); + } + + // Override the non-canonical hostname set by EELFLoggerDelegate::setGlobalLoggingContext() + // that was invoked by advice.before() (and some other SDK cases) + private void fixServerFqdnInMDC() { + if (!StringUtils.isBlank(canonicalHostName)) { + EELFLoggerDelegate.mdcPut(MDC_SERVER_FQDN, canonicalHostName); + } + } + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/model/CategoryParameter.java b/vid-app-common/src/main/java/org/onap/vid/model/CategoryParameter.java new file mode 100644 index 000000000..e2939996f --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/model/CategoryParameter.java @@ -0,0 +1,120 @@ +package org.onap.vid.model; + +//import org.hibernate.annotations.Table; +import org.openecomp.portalsdk.core.domain.support.DomainVo; +import org.onap.vid.controller.MaintenanceController; + +//import javax.persistence.*; +import javax.persistence.*; +import java.io.Serializable; +import java.util.Date; +import java.util.HashSet; +import java.util.Set; + +@Entity +@Table(name = "vid_category_parameter", uniqueConstraints = @UniqueConstraint(columnNames = "name")) +public class CategoryParameter extends DomainVo { + + public enum Family { + PARAMETER_STANDARDIZATION, + TENANT_ISOLATION + } + + private String name; + private boolean idSupported; + + @Column(name = "FAMILY") + @Enumerated(EnumType.STRING) + private String family; + + public String getFamily() { + return family; + } + + public void setFamily(String family) { + this.family = family; + } + + private Set options = new HashSet<>(0); + + @Override + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "CATEGORY_ID") + public Long getId() { + return super.getId(); + } + + @Override + @Column(name = "CREATED_DATE") + public Date getCreated() { + return super.getCreated(); + } + + @Override + @Column(name = "MODIFIED_DATE") + public Date getModified() { + return super.getModified(); + } + + @Override + @Transient + public Long getCreatedId() { + return super.getCreatedId(); + } + + @Override + @Transient + public Long getModifiedId() { + return super.getModifiedId(); + } + + @Column(name = "NAME", unique = true, nullable = false, length=50) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + @Override + @Transient + public Serializable getAuditUserId() { + return super.getAuditUserId(); + } + + @Override + @Transient + public Long getRowNum() { + return super.getRowNum(); + } + + @Override + @Transient + public Set getAuditTrail() { + return super.getAuditTrail(); + } + + @OneToMany(fetch = FetchType.EAGER, mappedBy = "categoryParameter") + public Set getOptions() { + return options; + } + + public void setOptions(Set options) { + this.options = options; + } + + public boolean addOption(CategoryParameterOption option) { + return options.add(option); + } + + @Column(name = "ID_SUPPORTED") + public boolean isIdSupported() { + return idSupported; + } + + public void setIdSupported(boolean idSupported) { + this.idSupported = idSupported; + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/model/CategoryParameterOption.java b/vid-app-common/src/main/java/org/onap/vid/model/CategoryParameterOption.java new file mode 100644 index 000000000..39efb2c57 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/model/CategoryParameterOption.java @@ -0,0 +1,139 @@ +package org.onap.vid.model; + +import org.openecomp.portalsdk.core.domain.support.DomainVo; + +import javax.persistence.*; +import java.io.Serializable; +import java.util.Date; +import java.util.Set; + +@Entity +@Table(name = "vid_category_parameter_option") +public class CategoryParameterOption extends DomainVo { + + private Long id; + private String appId; + private String name; + + private CategoryParameter categoryParameter; + + public CategoryParameterOption() { + } + + public CategoryParameterOption(String appId, String name, CategoryParameter categoryParameter) { + setAppId(appId); + setName(name); + setCategoryParameter(categoryParameter); + } + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "CATEGORY_OPT_DB_ID") + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + @Column(name = "CATEGORY_OPT_APP_ID") + public String getAppId() { + return appId; + } + + public void setAppId(String appId) { + this.appId = appId; + } + + @Column(name = "NAME") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + @ManyToOne + @JoinColumn(name="CATEGORY_ID", nullable=false) + public CategoryParameter getCategoryParameter() { + return categoryParameter; + } + + public void setCategoryParameter(CategoryParameter categoryParameter) { + this.categoryParameter = categoryParameter; + } + + @Override + @Column(name = "CREATED_DATE") + public Date getCreated() { + return super.getCreated(); + } + + @Override + @Column(name = "MODIFIED_DATE") + public Date getModified() { + return super.getModified(); + } + + @Override + @Transient + public Long getCreatedId() { + return super.getCreatedId(); + } + + @Override + @Transient + public Long getModifiedId() { + return super.getModifiedId(); + } + + @Override + @Transient + public Serializable getAuditUserId() { + return super.getAuditUserId(); + } + + @Override + @Transient + public Long getRowNum() { + return super.getRowNum(); + } + + @Override + @Transient + public Set getAuditTrail() { + return super.getAuditTrail(); + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + + CategoryParameterOption that = (CategoryParameterOption) o; + + if (getAppId() != null ? !getAppId().equals(that.getAppId()) : that.getAppId() != null) return false; + if (getName() != null ? !getName().equals(that.getName()) : that.getName() != null) return false; + return getCategoryParameter() != null ? getCategoryParameter().equals(that.getCategoryParameter()) : that.getCategoryParameter() == null; + } + + @Override + public int hashCode() { + int result = getAppId() != null ? getAppId().hashCode() : 0; + result = 31 * result + (getName() != null ? getName().hashCode() : 0); + result = 31 * result + (getCategoryParameter() != null ? getCategoryParameter().hashCode() : 0); + return result; + } + + @Override + public String toString() { + return "CategoryParameterOption{" + + "id=" + id + + ", key='" + appId + '\'' + + ", value='" + name + '\'' + + ", categoryParameterId=" + categoryParameter.getId() + + '}'; + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/model/CommandProperty.java b/vid-app-common/src/main/java/org/onap/vid/model/CommandProperty.java new file mode 100644 index 000000000..4f5ee173f --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/model/CommandProperty.java @@ -0,0 +1,93 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.model; + +import java.util.Map; + +/** + * The Class Command Property. + */ +public class CommandProperty { + + /** The display name for this input */ + private String displayName; + + /** The command, "get_input" */ + private String command; + + /** The input name we refer to back under the inputs section */ + private String inputName; + + /** + * Gets the display name. + * + * @return the displayName + */ + public String getDisplayName() { + return displayName; + } + /** + * Gets the command. + * + * @return the command + */ + public String getCommand() { + return command; + } + /** + * Gets the inputName. + * + * @return the inputName + */ + public String getInputName() { + return inputName; + } + /** + * Sets the display name value. + * + * @param i the new get_input value + */ + public void setDisplayName(String i) { + this.displayName = i; + } + /** + * Sets the command value. + * + * @param i the new command value + */ + public void setCommand(String i) { + this.command = i; + } + + /** + * Sets the input name value. + * + * @param i the new input name value + */ + public void setInputName(String i) { + this.inputName=i; + } + + public String toString () { + String result = "displayName=" + displayName + " command=" + command + " inputName" + inputName; + return result; + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/model/ExceptionResponse.java b/vid-app-common/src/main/java/org/onap/vid/model/ExceptionResponse.java new file mode 100644 index 000000000..444a4ba11 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/model/ExceptionResponse.java @@ -0,0 +1,91 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.model; + +import org.slf4j.MDC; + +import static com.att.eelf.configuration.Configuration.MDC_KEY_REQUEST_ID; + +/** + * The Class ExceptionResponse. + */ +public class ExceptionResponse { + + public ExceptionResponse() { + } + + /** The exception. */ + private String exception; + + /** The message. */ + private String message; + + public ExceptionResponse(String exception, String message) { + this.exception = exception; + this.message = message; + } + + public ExceptionResponse(Exception exception) { + setException(exception); + } + + /** + * Gets the exception. + * + * @return the exception + */ + public String getException() { + return exception; + } + + /** + * Sets the exception. + * + * @param exception the new exception + */ + public void setException(String exception) { + this.exception = exception; + } + + public void setException(Exception exception) { + setException(exception.getClass().toString().replaceFirst("^.*[\\.$]", "")); + setMessage(exception.getMessage() + " (Request id: " + MDC.get(MDC_KEY_REQUEST_ID) + ")"); + } + + /** + * Gets the message. + * + * @return the message + */ + public String getMessage() { + return message; + } + + /** + * Sets the message. + * + * @param message the new message + */ + public void setMessage(String message) { + this.message = message; + } + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/model/ExceptionTranslator.java b/vid-app-common/src/main/java/org/onap/vid/model/ExceptionTranslator.java new file mode 100644 index 000000000..c600243a8 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/model/ExceptionTranslator.java @@ -0,0 +1,39 @@ +package org.onap.vid.model; + +import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.exception.ExceptionUtils; +import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.springframework.web.bind.annotation.ControllerAdvice; +import org.springframework.web.bind.annotation.ExceptionHandler; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.method.annotation.MethodArgumentTypeMismatchException; + +import static org.onap.vid.utils.Logging.getMethodCallerName; + +@ControllerAdvice +public class ExceptionTranslator { + + /** The logger. */ + EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ExceptionTranslator.class); + + @ExceptionHandler(MethodArgumentTypeMismatchException.class) + @ResponseBody + public ExceptionResponse handleMethodArgumentTypeMismatchException(MethodArgumentTypeMismatchException e) { + logger.error(EELFLoggerDelegate.errorLogger, "{}: {}", getMethodCallerName(), ExceptionUtils.getMessage(e), e); + Class type = e.getRequiredType(); + String message; + if (type.isEnum()) { + message = "The parameter " + e.getName() + " must have a value among : " + StringUtils.join(type.getEnumConstants(), ", "); + } + else { + message = "The parameter " + e.getName() + " must be of type " + type.getTypeName(); + } + return new ExceptionResponse(new ArgumentTypeMismatchException(message)); + } + + public static class ArgumentTypeMismatchException extends RuntimeException { + public ArgumentTypeMismatchException(String message) { + super(message); + } + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/model/ListOfErrorsResponse.java b/vid-app-common/src/main/java/org/onap/vid/model/ListOfErrorsResponse.java new file mode 100644 index 000000000..9339d7cd8 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/model/ListOfErrorsResponse.java @@ -0,0 +1,24 @@ +package org.onap.vid.model; + +import java.util.ArrayList; +import java.util.List; + +public class ListOfErrorsResponse { + protected List errors; + + public ListOfErrorsResponse() { + this.errors = new ArrayList<>(); + } + + public ListOfErrorsResponse(List errors) { + this.errors = errors; + } + + public List getErrors() { + return errors; + } + + public void setErrors(List errors) { + this.errors = errors; + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/model/ModelConstants.java b/vid-app-common/src/main/java/org/onap/vid/model/ModelConstants.java new file mode 100644 index 000000000..cb1a5f9a0 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/model/ModelConstants.java @@ -0,0 +1,44 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.model; +/** + * The Class ModelConstants + */ +public class ModelConstants { + + /** The Constant GET_INPUT_TAG. */ + public final static String GET_INPUT_TAG = "get_input"; + + public static final String ASDC_MODEL_NAMESPACE = "asdc.model.namespace"; + public static final String ASDC_SVC_API_PATH = "sdc.svc.api.path"; + public static final String ASDC_RESOURCE_API_PATH = "sdc.resource.api.path"; + + public static final String DEFAULT_ASDC_MODEL_NAMESPACE = "org.openecomp."; + public static final String DEFAULT_ASDC_SVC_API_PATH = "sdc/v1/catalog/services"; + public static final String DEFAULT_ASDC_RESOURCE_API_PATH = "sdc/v1/catalog/resources"; + + public final static String VF_MODULE = "groups.VfModule"; + public final static String VNF = "resource.vf"; + public final static String NETWORK = "resource.vl"; + + public final static String ROLE_DELIMITER = "___"; + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/model/ModelUtil.java b/vid-app-common/src/main/java/org/onap/vid/model/ModelUtil.java new file mode 100644 index 000000000..897c6e76c --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/model/ModelUtil.java @@ -0,0 +1,45 @@ +/** + * + */ +package org.onap.vid.model; + +/** + * The Class ModelUtil. + * + */ +public class ModelUtil { + /** + * Gets the tags for the given element according to the configured namespace + * @param namespaces the namespace list from the configuration + * @param constantValue the constant portion of the tag name, i.e. resource.vf... + * @return the tags + */ + public static String[] getTags ( String[] namespaces, String constantValue ) { + String[] tags; + if ( namespaces == null || namespaces.length == 0 ) { + return null; + } + int le = namespaces.length; + tags = new String[le]; + for ( int i = 0; i < le; i++ ) { + tags[i] = namespaces[i] + constantValue; + } + return (tags); + } + /** + * Determine if a note template type matches a set of configurable tags + * @param type the node template type + * @param tags the model configurable namespaces + * @return true if type starts with a tag in the array, false otherwise + */ + public static boolean isType ( String type, String[] tags ) { + if ( (tags != null) && (tags.length > 0) ) { + for ( int i = 0; i < tags.length; i++ ) { + if ( type.startsWith (tags[i]) ) { + return (true); + } + } + } + return (false); + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/model/MsoExceptionResponse.java b/vid-app-common/src/main/java/org/onap/vid/model/MsoExceptionResponse.java new file mode 100644 index 000000000..0fe49d604 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/model/MsoExceptionResponse.java @@ -0,0 +1,32 @@ +package org.onap.vid.model; + +public class MsoExceptionResponse { + + public static class ServiceException { + + public ServiceException(String messageId, String text) { + this.messageId = messageId; + this.text = text; + } + + public ServiceException() { + } + + public String messageId; + public String text; + } + + public ServiceException serviceException; + + public MsoExceptionResponse() { + } + + public MsoExceptionResponse(String messageId, String text) { + this.serviceException = new ServiceException(messageId, text); + } + + public MsoExceptionResponse(Exception exception) { + ExceptionResponse exceptionResponse = new ExceptionResponse(exception); + this.serviceException = new ServiceException(exceptionResponse.getException(), exceptionResponse.getMessage()); + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/model/Network.java b/vid-app-common/src/main/java/org/onap/vid/model/Network.java new file mode 100644 index 000000000..ef342e407 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/model/Network.java @@ -0,0 +1,62 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.model; + +import org.onap.vid.asdc.beans.tosca.NodeTemplate; + +/** + * The Class Network. + */ +public class Network extends Node { + + /** The model customization name. */ + private String modelCustomizationName; + + /** + * Instantiates a new network. + */ + public Network() { + super(); + } + /** + * Gets the model customization name. + * + * @return the model customization name + */ + public String getModelCustomizationName() { + return modelCustomizationName; + } + /** + * Sets the model customization name. + * + * @param modelCustomizationName the new model customization name + */ + public void setModelCustomizationName(String modelCustomizationName) { + this.modelCustomizationName = modelCustomizationName; + } + + public void extractNetwork(String modelCustomizationName, NodeTemplate nodeTemplate) { + + super.extractNode(nodeTemplate); + setModelCustomizationName(modelCustomizationName); + + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/model/NewNetwork.java b/vid-app-common/src/main/java/org/onap/vid/model/NewNetwork.java new file mode 100644 index 000000000..9f1ffd356 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/model/NewNetwork.java @@ -0,0 +1,56 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.model; + +import org.onap.vid.asdc.beans.tosca.NodeTemplate; + +/** + * The Class Network. + */ +public class NewNetwork extends NewNode { + + /** The model customization name. */ + private String modelCustomizationName; + + /** + * Instantiates a new network. + */ + public NewNetwork() { + super(); + } + /** + * Gets the model customization name. + * + * @return the model customization name + */ + public String getModelCustomizationName() { + return modelCustomizationName; + } + /** + * Sets the model customization name. + * + * @param modelCustomizationName the new model customization name + */ + public void setModelCustomizationName(String modelCustomizationName) { + this.modelCustomizationName = modelCustomizationName; + } + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/model/NewNode.java b/vid-app-common/src/main/java/org/onap/vid/model/NewNode.java new file mode 100644 index 000000000..89a808b19 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/model/NewNode.java @@ -0,0 +1,209 @@ +package org.onap.vid.model; + +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.HashMap; +import java.util.Map; + +import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.vid.asdc.beans.tosca.Input; + + +public class NewNode { + + /** The Constant LOG. */ + private static final EELFLoggerDelegate LOG = EELFLoggerDelegate.getLogger(Node.class); + + /** The Constant dateFormat. */ + final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); + + /** The uuid. */ + private String uuid; + + /** The invariant uuid. */ + private String invariantUuid; + + /** The description. */ + private String description; + + /** The name. */ + private String name; + + /** The version. */ + private String version; + + /** The model customization uuid. */ + private String customizationUuid; + + /** The inputs. */ + private Map inputs; + + /** The get_input or other constructs from node template properties. */ + private Map commands; + + /** The get_input or other constructs from node template properties. */ + private Map properties; + /** + * Instantiates a new node. + */ + public NewNode() { + this.commands = new HashMap(); + this.properties = new HashMap(); + } + + /** + * Gets the uuid. + * + * @return the uuid + */ + public String getUuid() { + return uuid; + } + + /** + * Gets the invariant uuid. + * + * @return the invariant uuid + */ + public String getInvariantUuid() { + return invariantUuid; + } + + /** + * Gets the description. + * + * @return the description + */ + public String getDescription() { + return description; + } + + /** + * Gets the name. + * + * @return the name + */ + public String getName() { + return name; + } + + /** + * Gets the version. + * + * @return the version + */ + public String getVersion() { + return version; + } + + /** + * Gets the customization uuid. + * + * @return the model customization uuid + */ + public String getCustomizationUuid() { + return customizationUuid; + } + /** + * Gets the inputs. + * + * @return the inputs + */ + public Map getInputs() { + return inputs; + } + /** + * Gets the commands. + * + * @return the commands + */ + public Map getCommands() { + return commands; + } + /** + * Gets the properties. + * + * @return the properties + */ + public Map getProperties() { + return properties; + } + /** + * Sets the uuid. + * + * @param uuid the new uuid + */ + public void setUuid(String uuid) { + this.uuid = uuid; + } + + /** + * Sets the invariant uuid. + * + * @param invariantUuid the new invariant uuid + */ + public void setInvariantUuid(String invariantUuid) { + this.invariantUuid = invariantUuid; + } + + /** + * Sets the description. + * + * @param description the new description + */ + public void setDescription(String description) { + this.description = description; + } + + /** + * Sets the name. + * + * @param name the new name + */ + public void setName(String name) { + this.name = name; + } + + /** + * Sets the version. + * + * @param version the new version + */ + public void setVersion(String version) { + this.version = version; + } + /** + * Sets the customization uuid. + * + * @param u the new customization uuid + */ + public void setCustomizationUuid(String u) { + this.customizationUuid = u; + } + + /** + * Sets the inputs. + * + * @param inputs the inputs + */ + public void setInputs(Map inputs) { + this.inputs = inputs; + } + /** + * Sets the commands. + * + * @param m the commands + */ + public void setCommands( Mapm ) { + commands = m; + } + /** + * Sets the properties. + * + * @param p the properties + */ + public void setProperties( Mapp) { + properties = p; + } + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/model/NewService.java b/vid-app-common/src/main/java/org/onap/vid/model/NewService.java new file mode 100644 index 000000000..1346c0d95 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/model/NewService.java @@ -0,0 +1,252 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.model; + +import java.util.Map; +import java.util.UUID; + +import org.onap.vid.asdc.beans.tosca.Input; + +/** + * The Class Service. + */ +public class NewService { + + /** The uuid. */ + private String uuid; + + /** The invariant uuid. */ + private String invariantUuid; + + /** The name. */ + private String name; + + /** The version. */ + private String version; + + /** The tosca model URL. */ + private String toscaModelURL; + + /** The category. */ + private String category; + + /** The description. */ + private String description; + + /** The service ecomp naming flag */ + private String serviceEcompNaming; + + /** The inputs. */ + private Map inputs; + + /** + * Gets the uuid. + * + * @return the uuid + */ + public String getUuid() { + return uuid; + } + + /** + * Gets the invariant uuid. + * + * @return the invariant uuid + */ + public String getInvariantUuid() { + return invariantUuid; + } + + /** + * Gets the name. + * + * @return the name + */ + public String getName() { + return name; + } + + /** + * Gets the version. + * + * @return the version + */ + public String getVersion() { + return version; + } + + /** + * Gets the tosca model URL. + * + * @return the tosca model URL + */ + public String getToscaModelURL() { + return toscaModelURL; + } + + /** + * Gets the category. + * + * @return the category + */ + public String getCategory() { + return category; + } + + /** + * Gets the description. + * + * @return the description + */ + public String getDescription() { + return description; + } + + /** + * Gets the inputs. + * + * @return the inputs + */ + public Map getInputs() { + return inputs; + } + /** + * Get the serviceEcompNaming value + * + * @return serviceEcompNaming + */ + public String getServiceEcompNaming() { + return serviceEcompNaming; + } + /** + * Sets the uuid. + * + * @param uuid the new uuid + */ + public void setUuid(String uuid) { + this.uuid = uuid; + } + + /** + * Sets the invariant uuid. + * + * @param invariantUuid the new invariant uuid + */ + public void setInvariantUuid(String invariantUuid) { + this.invariantUuid = invariantUuid; + } + + /** + * Sets the name. + * + * @param name the new name + */ + public void setName(String name) { + this.name = name; + } + + /** + * Sets the version. + * + * @param version the new version + */ + public void setVersion(String version) { + this.version = version; + } + + /** + * Sets the tosca model URL. + * + * @param toscaModelURL the new tosca model URL + */ + public void setToscaModelURL(String toscaModelURL) { + this.toscaModelURL = toscaModelURL; + } + + /** + * Sets the category. + * + * @param category the new category + */ + public void setCategory(String category) { + this.category = category; + } + + /** + * Sets the description. + * + * @param description the new description + */ + public void setDescription(String description) { + this.description = description; + } + + /** + * Sets the inputs. + * + * @param inputs the inputs + */ + public void setInputs(Map inputs) { + this.inputs = inputs; + } + /** + * Sets the service ecomp naming. + * + * @param serviceEcompNaming the new service ecomp naming + */ + public void setServiceEcompNaming(String serviceEcompNaming) { + this.serviceEcompNaming = serviceEcompNaming; + } + /* (non-Javadoc) + * @see java.lang.Object#hashCode() + */ + @Override + public int hashCode() { + final UUID uuid = UUID.fromString(getUuid()); + + return uuid.hashCode(); + } + + /* (non-Javadoc) + * @see java.lang.Object#equals(java.lang.Object) + */ + @Override + public boolean equals(Object o) { + if (o == this) return true; + if (!(o instanceof NewService)) return false; + + final NewService service = (NewService) o; + + return (service.getUuid().equals(getUuid())); + } + /*public static void extractVfModuleCustomizationUUID (Service s, String vnfCustomizationName, VfModule vfMod ) { + + //Look for vnfCustomizationName..vfModuleCustomizationName + String nameToFind = vnfCustomizationName + ".." + vfMod.getModelCustomizationName(); + for (Entry vfModuleComponent : s.getVfModules().entrySet()) { + VfModule xMod = vfModuleComponent.getValue(); + if ( (xMod.getModelCustomizationName() != null) && (xMod.getModelCustomizationName().equalsIgnoreCase(nameToFind)) ) { + vfMod.setCustomizationUuid( xMod.getCustomizationUuid()); + return; + } + } + }*/ +} diff --git a/vid-app-common/src/main/java/org/onap/vid/model/NewServiceModel.java b/vid-app-common/src/main/java/org/onap/vid/model/NewServiceModel.java new file mode 100644 index 000000000..e343b6de0 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/model/NewServiceModel.java @@ -0,0 +1,288 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.model; + +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.HashMap; +import java.util.Map; +import java.util.Map.Entry; + +import org.onap.vid.asdc.beans.tosca.Group; +import org.onap.vid.asdc.beans.tosca.ToscaModel; +import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.vid.properties.VidProperties; +/** + * The Class ServiceModel. + */ + +public class NewServiceModel { + + /** The Constant LOG. */ + private static final EELFLoggerDelegate LOG = EELFLoggerDelegate.getLogger(NewServiceModel.class); + + /** The Constant dateFormat. */ + final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); + /** The service. */ + private Service service; + + /** The vnfs. */ + private Map vnfs; + + /** The networks. */ + private Map networks; + + /** + * The vf modules. The VNF also has vfmodules but the vfmodules at the service level may have additional info + * that is not present in the VNF, like the vf module customization String + */ + private Map vfModules; + /** + * The volume groups. The VNF also has volume groups but the volume groups will be populated at the service level + * for newer models + */ + private Map volumeGroups; + + private Map configurations; + + private Map serviceProxies; + + private Map pnfs; + + /** + * Instantiates a new service model. + */ + public NewServiceModel() {} + + /** + * Gets the service. + * + * @return the service + */ + public Service getService() { + return service; + } + + /** + * Gets the vnfs. + * + * @return the vnfs + */ + public Map getVnfs() { + return vnfs; + } + + /** + * Gets the networks. + * + * @return the networks + */ + public Map getNetworks() { + return networks; + } + + /** + * Sets the service. + * + * @param service the new service + */ + public void setService(Service service) { + this.service = service; + } + + /** + * Sets the vnfs. + * + * @param vnfs the vnfs + */ + public void setVnfs(Map vnfs) { + this.vnfs = vnfs; + } + + /** + * Sets the networks. + * + * @param networks the networks + */ + public void setNetworks(Map networks) { + this.networks = networks; + } + /** + * Gets the vf modules. + * + * @return the vf modules + */ + public Map getVfModules() { + return vfModules; + } + /** + * Gets the volume groups. + * + * @return the volume groups + */ + public Map getVolumeGroups() { + return volumeGroups; + } + + public Map getConfigurations() { + return configurations; + } + + public Map getServiceProxies() { + return serviceProxies; + } + + /** + * Sets the vf modules. + * + * @param vfModules the vf modules + */ + + + public void setVfModules(Map vfModules) { + this.vfModules = vfModules; + } + /** + * Sets the volume groups. + * + * @param volumeGroups the volume groups + */ + public void setVolumeGroups(Map volumeGroups) { + this.volumeGroups = volumeGroups; + } + + + public Map getPnfs() { + return pnfs; + } + + public void setPnfs(Map pnfs) { + this.pnfs = pnfs; + } + + /** + * Extract service. + * + * @param serviceToscaModel the service tosca model + * @param asdcServiceMetadata the asdc service metadata + * @return the service + */ + public static Service extractService(ToscaModel serviceToscaModel, org.onap.vid.asdc.beans.Service asdcServiceMetadata) { + + final Service service = new Service(); + + service.setCategory(serviceToscaModel.getMetadata().getCategory()); + service.setInvariantUuid(serviceToscaModel.getMetadata().getInvariantUUID()); + service.setName(serviceToscaModel.getMetadata().getName()); + service.setUuid(serviceToscaModel.getMetadata().getUUID()); + service.setDescription(serviceToscaModel.getMetadata().getDescription()); + service.setServiceEcompNaming(serviceToscaModel.getMetadata().getServiceEcompNaming()); + service.setInputs(serviceToscaModel.gettopology_template().getInputs()); + //FIXME: SDC is not sending the Version with the Tosca Model for 1610 - they should send it in 1702 + //THIS IS A TEMPORARY FIX, AT SOME POINT UNCOMMENT ME + //service.setVersion(serviceToscaModel.getMetadata().getVersion()); + service.setVersion(asdcServiceMetadata.getVersion()); + + return service; + } + public static void extractGroups (ToscaModel serviceToscaModel,NewServiceModel serviceModel) { + // Get the groups. The groups may duplicate the groups that are in the VNF model and have + // additional data like the VF module customization String> + + final Map vfModules = new HashMap (); + final Map volumeGroups = new HashMap (); + + String asdcModelNamespace = VidProperties.getAsdcModelNamespace(); + String vfModuleTag = asdcModelNamespace + ModelConstants.VF_MODULE; + + for (Entry component : serviceToscaModel.gettopology_template().getGroups().entrySet()) { + final Group group = component.getValue(); + final String type = group.getType(); + final String customizationName = component.getKey(); + + if (type.startsWith(vfModuleTag)) { + VfModule vfMod = VfModule.extractVfModule(customizationName, group); + vfModules.put(customizationName, vfMod); + if ( vfMod.isVolumeGroupAllowed() ) { + //volume groups have the same customization name as the vf module + volumeGroups.put(customizationName, VolumeGroup.extractVolumeGroup(customizationName,group)); + } + } + } + // add this point vfModules and volume groups are disconnected from VNF + serviceModel.setVfModules (vfModules); + serviceModel.setVolumeGroups (volumeGroups); + + } + /** + * Populate the vf modules and volume groups that we may have under the service level under each VNF. + */ +// public void associateGroups() { +// String methodName = "associateGroups()"; +// LOG.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + methodName + " start"); +// // go through the vnfs, get the vnf normalized name and look for a vf module with a customization name that starts +// // with vnf + ".." +// String vnfCustomizationName = null; +// String normalizedVnfCustomizationName = null; +// String vfModuleCustomizationName = null; +// NewVNF tmpVnf = null; +// +// if ( ( getVnfs() != null ) && (!(getVnfs().isEmpty())) ) { +// for (Entry vnfComponent : getVnfs().entrySet()) { +// vnfCustomizationName = vnfComponent.getValue().getModelCustomizationName(); +// normalizedVnfCustomizationName = VNF.normalizeName(vnfCustomizationName); +// +// LOG.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + methodName + +// " VNF customizationName=" + vnfCustomizationName + "normalized customization name=" + normalizedVnfCustomizationName); +// +// // now check to see if there is a vf module with customization name that starts with normalizedVnfCustomizationName +// +// if (( getVfModules() != null ) && (!(getVfModules().isEmpty()))) { +// for (Entry vfModuleComponent : getVfModules().entrySet()) { +// vfModuleCustomizationName = vfModuleComponent.getValue().getModelCustomizationName(); +// +// LOG.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + methodName + +// " VF Module customizationName=" + vfModuleCustomizationName ); +// if ( vfModuleCustomizationName.startsWith(normalizedVnfCustomizationName + ".." )) { +// +// // this vf module belongs to the VNF +// tmpVnf = vnfComponent.getValue(); +// (tmpVnf.getVfModules()).put(vfModuleComponent.getKey(), vfModuleComponent.getValue()); +// +// LOG.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + methodName + +// " Associated VF Module customizationName=" + vfModuleComponent.getKey() + " with VNF customization name=" + vnfCustomizationName); +// +// // now find if this vf module has volume groups, if so, find the volume group with the same customization name and put it under the VNF +// if ( vfModuleComponent.getValue().isVolumeGroupAllowed() ) { +// if (( getVolumeGroups() != null ) && (!(getVolumeGroups().isEmpty()))) { +// if (getVolumeGroups().containsKey((vfModuleCustomizationName))) { +// (vnfComponent.getValue().getVolumeGroups()).put(vfModuleCustomizationName, (getVolumeGroups()).get(vfModuleCustomizationName)); +// } +// } +// } +// } +// } +// } +// } +// } + +// } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/model/NewVNF.java b/vid-app-common/src/main/java/org/onap/vid/model/NewVNF.java new file mode 100644 index 000000000..8e8c89f51 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/model/NewVNF.java @@ -0,0 +1,123 @@ +package org.onap.vid.model; + +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.HashMap; +import java.util.Map; +import java.util.regex.Pattern; + +import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.vid.asdc.beans.tosca.NodeTemplate; + +public class NewVNF extends NewNode { + + /** The Constant LOG. */ + private static final EELFLoggerDelegate LOG = EELFLoggerDelegate.getLogger(VNF.class); + + /** The Constant dateFormat. */ + final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); + + /** The pattern used to normalize VNF names */ + final static Pattern COMPONENT_INSTANCE_NAME_DELIMETER_PATTERN = Pattern.compile("[\\.\\-]+"); + + /** The model customization name. */ + private String modelCustomizationName; + + /** The vf modules. */ + private Map vfModules = new HashMap(); + + /** The volume groups. */ + private Map volumeGroups = new HashMap(); + + /** + * Instantiates a newvnf. + */ + public NewVNF() { + super(); + } + + /** + * Gets the model customization name. + * + * @return the model customization name + */ + public String getModelCustomizationName() { + return modelCustomizationName; + } + + /** + * Gets the vf modules. + * + * @return the vf modules + */ + public Map getVfModules() { + return vfModules; + } + + /** + * Sets the vf modules. + * + * @param vfModules the vf modules + */ + public void setVfModules(Map vfModules) { + this.vfModules = vfModules; + } + + /** + * Gets the volume groups. + * + * @return the volume groups + */ + public Map getVolumeGroups() { + return volumeGroups; + } + + /** + * Sets the volume groups. + * + * @param volumeGroups the volume groups + */ + public void setVolumeGroups(Map volumeGroups) { + this.volumeGroups = volumeGroups; + } + + + /** + * Sets the model customization name. + * + * @param modelCustomizationName the new model customization name + */ + public void setModelCustomizationName(String modelCustomizationName) { + this.modelCustomizationName = modelCustomizationName; + } + /** + * Normalize the VNF name + * @param originalName + * @return the normalized name + */ + public static String normalizeName (String originalName) { + + String normalizedName = originalName.toLowerCase(); + normalizedName = COMPONENT_INSTANCE_NAME_DELIMETER_PATTERN.matcher(normalizedName).replaceAll(" "); + String[] splitArr = null; + + try { + splitArr = normalizedName.split(" "); + } + catch (Exception ex ) { + return (normalizedName); + } + StringBuffer sb = new StringBuffer(); + if ( splitArr != null ) { + for (String splitElement : splitArr) { + sb.append(splitElement); + } + return (sb.toString()); + } + else { + return (normalizedName); + } + + } + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/model/Node.java b/vid-app-common/src/main/java/org/onap/vid/model/Node.java new file mode 100644 index 000000000..7623a3869 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/model/Node.java @@ -0,0 +1,322 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.model; + +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; +import java.util.Map.Entry; + +import org.onap.vid.asdc.beans.tosca.Input; +import org.onap.vid.asdc.beans.tosca.NodeTemplate; + +import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +/** + * The Class Node. + */ +public class Node { + /** The Constant LOG. */ + private static final EELFLoggerDelegate LOG = EELFLoggerDelegate.getLogger(Node.class); + + /** The Constant dateFormat. */ + final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); + + /** The uuid. */ + private String uuid; + + /** The invariant uuid. */ + private String invariantUuid; + + /** The description. */ + private String description; + + /** The name. */ + private String name; + + /** The version. */ + private String version; + + /** The model customization uuid. */ + private String customizationUuid; + + /** The inputs. */ + private Map inputs; + + /** The get_input or other constructs from node template properties. */ + private Map commands; + + /** The get_input or other constructs from node template properties. */ + private Map properties; + + /** Type from Metadata */ + private String type; + /** + * Instantiates a new node. + */ + public Node() { + this.commands = new HashMap(); + this.properties = new HashMap(); + } + + /** + * Gets the uuid. + * + * @return the uuid + */ + public String getUuid() { + return uuid; + } + + /** + * Gets the invariant uuid. + * + * @return the invariant uuid + */ + public String getInvariantUuid() { + return invariantUuid; + } + + /** + * Gets the description. + * + * @return the description + */ + public String getDescription() { + return description; + } + + /** + * Gets the name. + * + * @return the name + */ + public String getName() { + return name; + } + + /** + * Gets the version. + * + * @return the version + */ + public String getVersion() { + return version; + } + + /** + * Gets the customization uuid. + * + * @return the model customization uuid + */ + public String getCustomizationUuid() { + return customizationUuid; + } + /** + * Gets the inputs. + * + * @return the inputs + */ + public Map getInputs() { + return inputs; + } + /** + * Gets the commands. + * + * @return the commands + */ + public Map getCommands() { + return commands; + } + /** + * Gets the properties. + * + * @return the properties + */ + public Map getProperties() { + return properties; + } + /** + * Sets the uuid. + * + * @param uuid the new uuid + */ + public void setUuid(String uuid) { + this.uuid = uuid; + } + + /** + * Sets the invariant uuid. + * + * @param invariantUuid the new invariant uuid + */ + public void setInvariantUuid(String invariantUuid) { + this.invariantUuid = invariantUuid; + } + + /** + * Sets the description. + * + * @param description the new description + */ + public void setDescription(String description) { + this.description = description; + } + + /** + * Sets the name. + * + * @param name the new name + */ + public void setName(String name) { + this.name = name; + } + + /** + * Sets the version. + * + * @param version the new version + */ + public void setVersion(String version) { + this.version = version; + } + /** + * Sets the customization uuid. + * + * @param u the new customization uuid + */ + public void setCustomizationUuid(String u) { + this.customizationUuid = u; + } + + /** + * Sets the inputs. + * + * @param inputs the inputs + */ + public void setInputs(Map inputs) { + this.inputs = inputs; + } + /** + * Sets the commands. + * + * @param m the commands + */ + public void setCommands( Mapm ) { + commands = m; + } + /** + * Sets the properties. + * + * @param p the properties + */ + public void setProperties( Mapp) { + properties = p; + } + + + /** + * @return metadata type + */ + public String getType() { + return type; + } + + /** + * Set metadata type + * + * @param type e.g. VF/CP/SERVICE_PROXY + */ + public void setType(String type) { + this.type = type; + } + + /** + * Extract node. + * + * @param modelCustomizationName the model customization name + * @param nodeTemplate the node template + * @return the node + */ + public void extractNode (NodeTemplate nodeTemplate) { + + String methodName = "extractNode"; + + setUuid(nodeTemplate.getMetadata().getUUID()); + setInvariantUuid(nodeTemplate.getMetadata().getInvariantUUID()); + setDescription(nodeTemplate.getMetadata().getDescription()); + setName(nodeTemplate.getMetadata().getName()); + setVersion(nodeTemplate.getMetadata().getVersion()); + // add customizationUUID + setCustomizationUuid(nodeTemplate.getMetadata().getCustomizationUUID()); + + try { + // nodeTemplate.getProperties() map of String->Object + for (Entry e : nodeTemplate.getProperties().entrySet()) { + + String k = e.getKey(); + + LOG.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + methodName + " node template property: " + k ); + + if ( e.getValue() != null ) { + LOG.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + methodName + " property: " + + k + "=" + e.getValue()); + //LOG.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + methodName + " V class name: " + + // e.getValue().getClass().getName()); + Class c = e.getValue().getClass(); + if ( c.getName().equalsIgnoreCase(java.lang.String.class.getName())) { + getProperties().put (k, (String)e.getValue()); + } + else { + Class[] interfaces = e.getValue().getClass().getInterfaces(); + + for(Class ifc: interfaces ) { + //LOG.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + methodName + " ifc name: " + + // ifc.getName()); + if ( ifc.getName().equalsIgnoreCase(java.util.Map.class.getName()) ) { + // only extract get_input for now + @SuppressWarnings("unchecked") + HashMap v = (HashMap)e.getValue(); + for (Entry entry : v.entrySet()) { + // only include get_input for now + if ( ModelConstants.GET_INPUT_TAG.equalsIgnoreCase ( entry.getKey() ) ) { + CommandProperty cp = new CommandProperty(); + cp.setCommand(entry.getKey()); + cp.setInputName(entry.getValue()); + cp.setDisplayName(k); + getCommands().put(k,cp); + } + } + } + } + + } + } + } + } + catch ( Exception e ) { + LOG.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + methodName + " Unable to parse node properties: e=" + + e.toString()); + } + } + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/model/PortMirroringConfig.java b/vid-app-common/src/main/java/org/onap/vid/model/PortMirroringConfig.java new file mode 100644 index 000000000..dd3d5db72 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/model/PortMirroringConfig.java @@ -0,0 +1,77 @@ +package org.onap.vid.model; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.openecomp.sdc.toscaparser.api.NodeTemplate; +import org.openecomp.sdc.toscaparser.api.RequirementAssignments; + +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.List; + +public class PortMirroringConfig extends Node { + + /** The Constant LOG. */ + private static final EELFLoggerDelegate LOG = EELFLoggerDelegate.getLogger(PortMirroringConfig.class); + + /** The Constant dateFormat. */ + final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); + + /** The model customization name. */ + private String modelCustomizationName; + + /** The port miroring requirements for source/collector */ + @JsonIgnore + private RequirementAssignments requirementAssignments; + + private List sourceNodes; + + private List collectorNodes; + + private boolean configurationByPolicy; + + public PortMirroringConfig() { + super(); + this.configurationByPolicy = false; + } + + public String getModelCustomizationName() { + return modelCustomizationName; + } + + public void setModelCustomizationName(String modelCustomizationName) { + this.modelCustomizationName = modelCustomizationName; + } + + public RequirementAssignments getRequirementAssignments() { + return requirementAssignments; + } + + public void setRequirementAssignments(RequirementAssignments requirementAssignments) { + this.requirementAssignments = requirementAssignments; + } + + public List getSourceNodes() { + return sourceNodes; + } + + public void setSourceNodes(List sourceNodes) { + this.sourceNodes = sourceNodes; + } + + public List getCollectorNodes() { + return collectorNodes; + } + + public void setCollectorNodes(List collectorNodes) { + this.collectorNodes = collectorNodes; + } + + public void setConfigurationByPolicy(boolean configurationByPolicy) { + this.configurationByPolicy = configurationByPolicy; + } + + public boolean isConfigurationByPolicy() { + return configurationByPolicy; + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/model/ProxyResponse.java b/vid-app-common/src/main/java/org/onap/vid/model/ProxyResponse.java new file mode 100644 index 000000000..1931fa39e --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/model/ProxyResponse.java @@ -0,0 +1,30 @@ +package org.onap.vid.model; + +import com.google.common.base.MoreObjects; + +/** + * Created by Oren on 7/10/17. + */ +public class ProxyResponse { + + protected String errorMessage; + + protected int httpCode; + + public String getErrorMessage() { + return errorMessage; + } + + + public int getHttpCode() { + return httpCode; + } + + @Override + public String toString() { + return MoreObjects.toStringHelper(this) + .add("httpCode", httpCode) + .add("errorMessage", errorMessage) + .toString(); + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/model/RequestReferencesContainer.java b/vid-app-common/src/main/java/org/onap/vid/model/RequestReferencesContainer.java new file mode 100644 index 000000000..9c12a52a6 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/model/RequestReferencesContainer.java @@ -0,0 +1,42 @@ +package org.onap.vid.model; + +import com.fasterxml.jackson.annotation.*; +import com.google.common.base.MoreObjects; +import org.onap.vid.domain.mso.RequestReferences; + +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_NULL) +public class RequestReferencesContainer { + private final RequestReferences requestReferences; + + @JsonIgnore + private Map additionalProperties = new HashMap(); + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + public RequestReferencesContainer(@JsonProperty("requestReferences") RequestReferences requestReferences) { + this.requestReferences = requestReferences; + } + + public RequestReferences getRequestReferences() { + return requestReferences; + } + + @Override + public String toString() { + return MoreObjects.toStringHelper(this) + .add("requestReferences", requestReferences) + .add("additionalProperties", additionalProperties) + .toString(); + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/model/Resource.java b/vid-app-common/src/main/java/org/onap/vid/model/Resource.java new file mode 100644 index 000000000..184f9ee6e --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/model/Resource.java @@ -0,0 +1,28 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.model; + +/** + * The Class Resource. + */ +public class Resource { + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/model/Result.java b/vid-app-common/src/main/java/org/onap/vid/model/Result.java new file mode 100644 index 000000000..c972bccaa --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/model/Result.java @@ -0,0 +1,58 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.model; + +/** + * The Class Result. + */ +public class Result { + + /** The result. */ + private String result; + + /** + * Instantiates a new result. + * + * @param result the result + */ + public Result(String result) { + this.result = result; + } + + /** + * Gets the result. + * + * @return the result + */ + public String getResult() { + return result; + } + + /** + * Sets the result. + * + * @param result the new result + */ + public void setResult(String result) { + this.result = result; + } + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/model/Service.java b/vid-app-common/src/main/java/org/onap/vid/model/Service.java new file mode 100644 index 000000000..b0597c649 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/model/Service.java @@ -0,0 +1,283 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.model; + +import org.onap.vid.asdc.beans.tosca.Input; + +import java.util.Map; +import java.util.UUID; + +/** + * The Class Service. + */ +public class Service { + + /** The uuid. */ + private String uuid; + + /** The invariant uuid. */ + private String invariantUuid; + + /** The name. */ + private String name; + + /** The version. */ + private String version; + + /** The tosca model URL. */ + private String toscaModelURL; + + /** The category. */ + private String category; + + /** The Service Type. */ + private String serviceType; + + /** The Service Role */ + private String serviceRole; + + /** The description. */ + private String description; + + /** The service ecomp naming flag */ + private String serviceEcompNaming; + + private String instantiationType; + + + /** The inputs. */ + private Map inputs; + + /** + * Gets the uuid. + * + * @return the uuid + */ + public String getUuid() { + return uuid; + } + + /** + * Gets the invariant uuid. + * + * @return the invariant uuid + */ + public String getInvariantUuid() { + return invariantUuid; + } + + /** + * Gets the name. + * + * @return the name + */ + public String getName() { + return name; + } + + /** + * Gets the version. + * + * @return the version + */ + public String getVersion() { + return version; + } + + /** + * Gets the tosca model URL. + * + * @return the tosca model URL + */ + public String getToscaModelURL() { + return toscaModelURL; + } + + /** + * Gets the category. + * + * @return the category + */ + public String getCategory() { + return category; + } + + /** + * Gets the description. + * + * @return the description + */ + public String getDescription() { + return description; + } + + /** + * Gets the inputs. + * + * @return the inputs + */ + public Map getInputs() { + return inputs; + } + /** + * Get the serviceEcompNaming value + * + * @return serviceEcompNaming + */ + public String getServiceEcompNaming() { + return serviceEcompNaming; + } + + + public String getInstantiationType() { return instantiationType; } + + public void setInstantiationType(String instantiationType) { this.instantiationType = instantiationType; } + /** + * Sets the uuid. + * + * @param uuid the new uuid + */ + public void setUuid(String uuid) { + this.uuid = uuid; + } + + /** + * Sets the invariant uuid. + * + * @param invariantUuid the new invariant uuid + */ + public void setInvariantUuid(String invariantUuid) { + this.invariantUuid = invariantUuid; + } + + /** + * Sets the name. + * + * @param name the new name + */ + public void setName(String name) { + this.name = name; + } + + /** + * Sets the version. + * + * @param version the new version + */ + public void setVersion(String version) { + this.version = version; + } + + /** + * Sets the tosca model URL. + * + * @param toscaModelURL the new tosca model URL + */ + public void setToscaModelURL(String toscaModelURL) { + this.toscaModelURL = toscaModelURL; + } + + /** + * Sets the category. + * + * @param category the new category + */ + public void setCategory(String category) { + this.category = category; + } + + /** + * Sets the description. + * + * @param description the new description + */ + public void setDescription(String description) { + this.description = description; + } + + /** + * Sets the inputs. + * + * @param inputs the inputs + */ + public void setInputs(Map inputs) { + this.inputs = inputs; + } + /** + * Sets the service ecomp naming. + * + * @param serviceEcompNaming the new service ecomp naming + */ + public void setServiceEcompNaming(String serviceEcompNaming) { + this.serviceEcompNaming = serviceEcompNaming; + } + /* (non-Javadoc) + * @see java.lang.Object#hashCode() + */ + @Override + public int hashCode() { + final UUID uuid = UUID.fromString(getUuid()); + + return uuid.hashCode(); + } + + /* (non-Javadoc) + * @see java.lang.Object#equals(java.lang.Object) + */ + @Override + public boolean equals(Object o) { + if (o == this) return true; + if (!(o instanceof Service)) return false; + + final Service service = (Service) o; + + return (service.getUuid().equals(getUuid())); + } + + public String getServiceType() { + return serviceType; + } + + public void setServiceType(String serviceType) { + this.serviceType = serviceType; + } + + public String getServiceRole() { + return serviceRole; + } + + public void setServiceRole(String serviceRole) { + this.serviceRole = serviceRole; + } + + /*public static void extractVfModuleCustomizationUUID (Service s, String vnfCustomizationName, VfModule vfMod ) { + + //Look for vnfCustomizationName..vfModuleCustomizationName + String nameToFind = vnfCustomizationName + ".." + vfMod.getModelCustomizationName(); + for (Entry vfModuleComponent : s.getVfModules().entrySet()) { + VfModule xMod = vfModuleComponent.getValue(); + if ( (xMod.getModelCustomizationName() != null) && (xMod.getModelCustomizationName().equalsIgnoreCase(nameToFind)) ) { + vfMod.setCustomizationUuid( xMod.getCustomizationUuid()); + return; + } + } + }*/ +} diff --git a/vid-app-common/src/main/java/org/onap/vid/model/ServiceInstanceSearchResult.java b/vid-app-common/src/main/java/org/onap/vid/model/ServiceInstanceSearchResult.java new file mode 100644 index 000000000..abf60d689 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/model/ServiceInstanceSearchResult.java @@ -0,0 +1,139 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.model; + +public class ServiceInstanceSearchResult { + + private String serviceInstanceId; + + private String globalCustomerId; + + private String serviceType; + + private String serviceInstanceName; + + private String subscriberName; + + private String aaiModelInvariantId; + + private String aaiModelVersionId; + + private boolean isPermitted; + + public ServiceInstanceSearchResult(){ + + } + public ServiceInstanceSearchResult(String serviceInstanceId, String globalCustomerId, String serviceType, + String serviceInstanceName, String subscriberName, String aaiModelInvariantId, + String aaiModelVersionId, boolean isPermitted) { + this.serviceInstanceId = serviceInstanceId; + this.globalCustomerId = globalCustomerId; + this.serviceType = serviceType; + this.serviceInstanceName = serviceInstanceName; + this.subscriberName = subscriberName; + this.aaiModelInvariantId = aaiModelInvariantId; + this.aaiModelVersionId = aaiModelVersionId; + this.isPermitted = isPermitted; + } + + public String getServiceInstanceId() { + return serviceInstanceId; + } + + public void setServiceInstanceId(String serviceInstanceId) { + this.serviceInstanceId = serviceInstanceId; + } + + public String getGlobalCustomerId() { + return globalCustomerId; + } + + public void setGlobalCustomerId(String globalCustomerId) { + this.globalCustomerId = globalCustomerId; + } + + public String getServiceType() { + return serviceType; + } + + public void setServiceType(String serviceType) { + this.serviceType = serviceType; + } + + public String getServiceInstanceName() { + return serviceInstanceName; + } + + public void setServiceInstanceName(String serviceInstanceName) { + this.serviceInstanceName = serviceInstanceName; + } + + public String getSubscriberName() { + return subscriberName; + } + + public void setSubscriberName(String subscriberName) { + this.subscriberName = subscriberName; + } + + public String getAaiModelInvariantId() { + return aaiModelInvariantId; + } + + public void setAaiModelInvariantId(String aaiModelInvariantId) { + this.aaiModelInvariantId = aaiModelInvariantId; + } + + public String getAaiModelVersionId() { + return aaiModelVersionId; + } + + public void setAaiModelVersionId(String aaiModelVersionId) { + this.aaiModelVersionId = aaiModelVersionId; + } + + public boolean getIsPermitted() { + return isPermitted; + } + + public void setIsPermitted(boolean isPermitted) { + this.isPermitted = isPermitted; + } + + @Override + public boolean equals(Object other){ + if (other instanceof ServiceInstanceSearchResult) { + ServiceInstanceSearchResult serviceInstanceSearchResultOther = (ServiceInstanceSearchResult) other; + if (this.getServiceInstanceId().equals(serviceInstanceSearchResultOther.getServiceInstanceId())) { + return true; + } + } + return false; + + } + + @Override + public int hashCode() { + int result = 17; + result = 31 * result + serviceInstanceId.hashCode(); + return result; + } +} \ No newline at end of file diff --git a/vid-app-common/src/main/java/org/onap/vid/model/ServiceModel.java b/vid-app-common/src/main/java/org/onap/vid/model/ServiceModel.java new file mode 100644 index 000000000..dab18d518 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/model/ServiceModel.java @@ -0,0 +1,330 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.model; + +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; +import java.util.Map.Entry; + +import org.onap.vid.asdc.beans.tosca.Group; +import org.onap.vid.asdc.beans.tosca.NodeTemplate; +import org.onap.vid.asdc.beans.tosca.ToscaModel; +import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.vid.properties.VidProperties; +/** + * The Class ServiceModel. + */ +@SuppressWarnings("ALL") +public class ServiceModel { + + /** The Constant LOG. */ + private static final EELFLoggerDelegate LOG = EELFLoggerDelegate.getLogger(ServiceModel.class); + + /** The Constant dateFormat. */ + final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); + /** The service. */ + private Service service; + + /** The vnfs. */ + private Map vnfs; + + /** The networks. */ + private Map networks; + + /** Port Mirroring Configuration node templates */ + private Map configurations; + + /** Service Proxy Nodes */ + private Map serviceProxies; + + /** + * The vf modules. The VNF also has vfmodules but the vfmodules at the service level may have additional info + * that is not present in the VNF, like the vf module customization String + */ + private Map vfModules; + /** + * The volume groups. The VNF also has volume groups but the volume groups will be populated at the service level + * for newer models + */ + private Map volumeGroups; + + /** The pnfs. */ + private Map pnfs; + /** + * Instantiates a new service model. + */ + public ServiceModel() {} + + /** + * Gets the service. + * + * @return the service + */ + public Service getService() { + return service; + } + + /** + * Gets the vnfs. + * + * @return the vnfs + */ + public Map getVnfs() { + return vnfs; + } + + /** + * Gets the networks. + * + * @return the networks + */ + public Map getNetworks() { + return networks; + } + + + /** + * Gets the pnfs. + * + * @return the pnfs + */ + public Map getPnfs() { + return pnfs; + } + + + /** + * Gets the Configuration Node Templates + * + * @return the configuration type node templates + */ + public Map getConfigurations() { + return configurations; + } + + /** + * Gets the Service Proxy Node Templates + * + * @return the Service Proxy type node templates + */ + public Map getServiceProxies() { + return serviceProxies; + } + + /** + * Sets the service. + * + * @param service the new service + */ + public void setService(Service service) { + this.service = service; + } + + /** + * Sets the vnfs. + * + * @param vnfs the vnfs + */ + public void setVnfs(Map vnfs) { + this.vnfs = vnfs; + } + + /** + * Sets the networks. + * + * @param networks the networks + */ + public void setNetworks(Map networks) { + this.networks = networks; + } + + /** + * Sets the configuraion node templates. + * + * @param configurations + */ + public void setConfigurations(Map configurations) { + this.configurations = configurations; + } + + /** + * Sets the service proxy node templates. + * + * @param serviceProxies + */ + public void setServiceProxies(Map serviceProxies) { + this.serviceProxies = serviceProxies; + } + + /** + * Gets the vf modules. + * + * @return the vf modules + */ + public Map getVfModules() { + return vfModules; + } + + + /** + * Gets the volume groups. + * + * @return the volume groups + */ + public Map getVolumeGroups() { + return volumeGroups; + } + /** + * Sets the vf modules. + * + * @param vfModules the vf modules + */ + public void setVfModules(Map vfModules) { + this.vfModules = vfModules; + } + /** + * Sets the volume groups. + * + * @param volumeGroups the volume groups + */ + public void setVolumeGroups(Map volumeGroups) { + this.volumeGroups = volumeGroups; + } + /** + * Sets the pnfs. + * + * @param pnfs the pnfs + */ + public void setPnfs(Map pnfs) {this.pnfs = pnfs;} + + /** + * Extract service. + * + * @param serviceToscaModel the service tosca model + * @param asdcServiceMetadata the asdc service metadata + * @return the service + */ + public static Service extractService(ToscaModel serviceToscaModel, org.onap.vid.asdc.beans.Service asdcServiceMetadata) { + + final Service service = new Service(); + + service.setCategory(serviceToscaModel.getMetadata().getCategory()); + service.setInvariantUuid(serviceToscaModel.getMetadata().getInvariantUUID()); + service.setName(serviceToscaModel.getMetadata().getName()); + service.setUuid(serviceToscaModel.getMetadata().getUUID()); + service.setDescription(serviceToscaModel.getMetadata().getDescription()); + service.setServiceEcompNaming(serviceToscaModel.getMetadata().getServiceEcompNaming()); + service.setInputs(serviceToscaModel.gettopology_template().getInputs()); + //FIXME: SDC is not sending the Version with the Tosca Model for 1610 - they should send it in 1702 + //THIS IS A TEMPORARY FIX, AT SOME POINT UNCOMMENT ME + //service.setVersion(serviceToscaModel.getMetadata().getVersion()); + service.setVersion(asdcServiceMetadata.getVersion()); + + return service; + } + public static void extractGroups (ToscaModel serviceToscaModel,ServiceModel serviceModel) { + // Get the groups. The groups may duplicate the groups that are in the VNF model and have + // additional data like the VF module customization String> + + final Map vfModules = new HashMap (); + final Map volumeGroups = new HashMap (); + + String asdcModelNamespace = VidProperties.getAsdcModelNamespace(); + String vfModuleTag = asdcModelNamespace + ModelConstants.VF_MODULE; + + for (Entry component : serviceToscaModel.gettopology_template().getGroups().entrySet()) { + final Group group = component.getValue(); + final String type = group.getType(); + final String customizationName = component.getKey(); + + if (type.startsWith(vfModuleTag)) { + VfModule vfMod = VfModule.extractVfModule(customizationName, group); + vfModules.put(customizationName, vfMod); + if ( vfMod.isVolumeGroupAllowed() ) { + //volume groups have the same customization name as the vf module + volumeGroups.put(customizationName, VolumeGroup.extractVolumeGroup(customizationName,group)); + } + } + } + // add this point vfModules and volume groups are disconnected from VNF + serviceModel.setVfModules (vfModules); + serviceModel.setVolumeGroups (volumeGroups); + + } + /** + * Populate the vf modules and volume groups that we may have under the service level under each VNF. + */ + public void associateGroups() { + String methodName = "associateGroups()"; + LOG.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + methodName + " start"); + // go through the vnfs, get the vnf normalized name and look for a vf module with a customization name that starts + // with vnf + ".." + String vnfCustomizationName = null; + String normalizedVnfCustomizationName = null; + String vfModuleCustomizationName = null; + VNF tmpVnf = null; + + if ( ( getVnfs() != null ) && (!(getVnfs().isEmpty())) ) { + for (Entry vnfComponent : getVnfs().entrySet()) { + vnfCustomizationName = vnfComponent.getValue().getModelCustomizationName(); + normalizedVnfCustomizationName = VNF.normalizeName(vnfCustomizationName); + + LOG.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + methodName + + " VNF customizationName=" + vnfCustomizationName + "normalized customization name=" + normalizedVnfCustomizationName); + + // now check to see if there is a vf module with customization name that starts with normalizedVnfCustomizationName + + if (( getVfModules() != null ) && (!(getVfModules().isEmpty()))) { + for (Entry vfModuleComponent : getVfModules().entrySet()) { + vfModuleCustomizationName = vfModuleComponent.getValue().getModelCustomizationName(); + + LOG.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + methodName + + " VF Module customizationName=" + vfModuleCustomizationName ); + if ( vfModuleCustomizationName.startsWith(normalizedVnfCustomizationName + ".." )) { + + // this vf module belongs to the VNF + tmpVnf = vnfComponent.getValue(); + (tmpVnf.getVfModules()).put(vfModuleComponent.getKey(), vfModuleComponent.getValue()); + + LOG.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + methodName + + " Associated VF Module customizationName=" + vfModuleComponent.getKey() + " with VNF customization name=" + vnfCustomizationName); + + // now find if this vf module has volume groups, if so, find the volume group with the same customization name and put it under the VNF + if ( vfModuleComponent.getValue().isVolumeGroupAllowed() ) { + if (( getVolumeGroups() != null ) && (!(getVolumeGroups().isEmpty()))) { + if (getVolumeGroups().containsKey((vfModuleCustomizationName))) { + (vnfComponent.getValue().getVolumeGroups()).put(vfModuleCustomizationName, (getVolumeGroups()).get(vfModuleCustomizationName)); + } + } + } + } + } + } + } + } + + } + + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/model/ServiceProxy.java b/vid-app-common/src/main/java/org/onap/vid/model/ServiceProxy.java new file mode 100644 index 000000000..f412a1e51 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/model/ServiceProxy.java @@ -0,0 +1,46 @@ +package org.onap.vid.model; + +import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; + +import java.text.DateFormat; +import java.text.SimpleDateFormat; + +public class ServiceProxy extends Node { + + /** The Constant LOG. */ + private static final EELFLoggerDelegate LOG = EELFLoggerDelegate.getLogger(ServiceProxy.class); + + /** The Constant dateFormat. */ + final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); + + private String sourceModelUuid; + + private String sourceModelInvariant; + + private String sourceModelName; + + public String getSourceModelUuid() { + return sourceModelUuid; + } + + public void setSourceModelUuid(String sourceModelUuid) { + this.sourceModelUuid = sourceModelUuid; + } + + public String getSourceModelInvariant() { + return sourceModelInvariant; + } + + public void setSourceModelInvariant(String sourceModelInvariant) { + this.sourceModelInvariant = sourceModelInvariant; + } + + public String getSourceModelName() { + return sourceModelName; + } + + public void setSourceModelName(String sourceModelName) { + this.sourceModelName = sourceModelName; + } + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/model/Subscriber.java b/vid-app-common/src/main/java/org/onap/vid/model/Subscriber.java new file mode 100644 index 000000000..70711b804 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/model/Subscriber.java @@ -0,0 +1,26 @@ +package org.onap.vid.model; + + +import org.codehaus.jackson.annotate.JsonProperty; + +/** + * Created by Oren on 7/4/17. + */ +public class Subscriber { + + @JsonProperty("global-customer-id") + public String globalCustomerId; + + @JsonProperty("subscriber-name") + public String subscriberName; + + @JsonProperty("subscriber-type") + public String subscriberType; + + @JsonProperty("resource-version") + public String resourceVersion; + + + + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/model/SubscriberList.java b/vid-app-common/src/main/java/org/onap/vid/model/SubscriberList.java new file mode 100644 index 000000000..5f935971e --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/model/SubscriberList.java @@ -0,0 +1,15 @@ +package org.onap.vid.model; + +import org.openecomp.portalsdk.core.web.support.UserUtils; + +import java.util.List; + +/** + * Created by Oren on 7/4/17. + */ +public class SubscriberList { + + public List customer; + + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/model/VNF.java b/vid-app-common/src/main/java/org/onap/vid/model/VNF.java new file mode 100644 index 000000000..e558e9574 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/model/VNF.java @@ -0,0 +1,165 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.model; + +import java.util.Map; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.HashMap; +import java.util.Map.Entry; +import java.util.regex.Pattern; + +import org.onap.vid.asdc.beans.tosca.NodeTemplate; + +import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.vid.controller.VidController; + +import org.onap.vid.asdc.beans.tosca.Group; +import org.onap.vid.asdc.beans.tosca.Input; + +/** + * The Class VNF. + */ +public class VNF extends Node { + + /** The Constant LOG. */ + private static final EELFLoggerDelegate LOG = EELFLoggerDelegate.getLogger(VNF.class); + + /** The Constant dateFormat. */ + final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); + + /** The pattern used to normalize VNF names */ + final static Pattern COMPONENT_INSTANCE_NAME_DELIMETER_PATTERN = Pattern.compile("[\\.\\-]+"); + + /** The model customization name. */ + private String modelCustomizationName; + + /** The vf modules. */ + private Map vfModules = new HashMap(); + + /** The volume groups. */ + private Map volumeGroups = new HashMap(); + + /** + * Instantiates a new vnf. + */ + public VNF() { + super(); + } + + /** + * Gets the model customization name. + * + * @return the model customization name + */ + public String getModelCustomizationName() { + return modelCustomizationName; + } + + /** + * Gets the vf modules. + * + * @return the vf modules + */ + public Map getVfModules() { + return vfModules; + } + + /** + * Sets the vf modules. + * + * @param vfModules the vf modules + */ + public void setVfModules(Map vfModules) { + this.vfModules = vfModules; + } + + /** + * Gets the volume groups. + * + * @return the volume groups + */ + public Map getVolumeGroups() { + return volumeGroups; + } + + /** + * Sets the volume groups. + * + * @param volumeGroups the volume groups + */ + public void setVolumeGroups(Map volumeGroups) { + this.volumeGroups = volumeGroups; + } + + /** + * Extract vnf. + * + * @param modelCustomizationName the model customization name + * @param nodeTemplate the node template + * @return the vnf + */ + public void extractVnf(String modelCustomizationName, NodeTemplate nodeTemplate) { + + super.extractNode(nodeTemplate); + setModelCustomizationName(modelCustomizationName); + + } + + /** + * Sets the model customization name. + * + * @param modelCustomizationName the new model customization name + */ + public void setModelCustomizationName(String modelCustomizationName) { + this.modelCustomizationName = modelCustomizationName; + } + /** + * Normalize the VNF name + * @param originalName + * @return the normalized name + */ + public static String normalizeName (String originalName) { + + String normalizedName = originalName.toLowerCase(); + normalizedName = COMPONENT_INSTANCE_NAME_DELIMETER_PATTERN.matcher(normalizedName).replaceAll(" "); + String[] splitArr = null; + + try { + splitArr = normalizedName.split(" "); + } + catch (Exception ex ) { + return (normalizedName); + } + StringBuffer sb = new StringBuffer(); + if ( splitArr != null ) { + for (String splitElement : splitArr) { + sb.append(splitElement); + } + return (sb.toString()); + } + else { + return (normalizedName); + } + + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/model/VNFDao.java b/vid-app-common/src/main/java/org/onap/vid/model/VNFDao.java new file mode 100644 index 000000000..13e2ebb56 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/model/VNFDao.java @@ -0,0 +1,105 @@ +package org.onap.vid.model; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openecomp.portalsdk.core.domain.support.DomainVo; + +import javax.persistence.*; +import java.io.Serializable; +import java.util.Date; +import java.util.HashSet; +import java.util.Set; + +@Entity +@Table(name = "vid_vnf") +public class VNFDao extends DomainVo { + + private String vnfUUID; + private String vnfInvariantUUID; + private Set workflows = new HashSet<>(0); + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "VNF_DB_ID") + @JsonIgnore + public Long getId() { + return id; + } + + @Override + @Column(name = "CREATED_DATE") + @JsonIgnore + public Date getCreated() { + return super.getCreated(); + } + + @Override + @Column(name = "MODIFIED_DATE") + @JsonIgnore + public Date getModified() { + return super.getModified(); + } + + @Override + @Transient + @JsonIgnore + public Long getCreatedId() { + return super.getCreatedId(); + } + + @Override + @Transient + @JsonIgnore + public Long getModifiedId() { + return super.getModifiedId(); + } + + @Override + @Transient + @JsonIgnore + public Serializable getAuditUserId() { + return super.getAuditUserId(); + } + + @Override + @Transient + @JsonIgnore + public Long getRowNum() { + return super.getRowNum(); + } + + @Override + @Transient + @JsonIgnore + public Set getAuditTrail() { + return super.getAuditTrail(); + } + + @Column(name = "VNF_APP_UUID") + public String getVnfUUID() { + return vnfUUID; + } + + @Column(name = "VNF_APP_INVARIANT_UUID") + public String getVnfInvariantUUID() { + return vnfInvariantUUID; + } + + + public void setVnfUUID(String vnfUUID) { + this.vnfUUID = vnfUUID; + } + + public void setVnfInvariantUUID(String vnfInvariantUUID) { + this.vnfInvariantUUID = vnfInvariantUUID; + } + + @ManyToMany(cascade = CascadeType.ALL, fetch =FetchType.EAGER ) + @JoinTable(name = "vid_vnf_workflow", joinColumns = { @JoinColumn(name = "VNF_DB_ID") }, inverseJoinColumns = { @JoinColumn(name = "WORKFLOW_DB_ID") }) + public Set getWorkflows() { + return workflows; + } + + public void setWorkflows(Set workflows) { + this.workflows = workflows; + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/model/VersionByInvariantIdsRequest.java b/vid-app-common/src/main/java/org/onap/vid/model/VersionByInvariantIdsRequest.java new file mode 100644 index 000000000..907f4938d --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/model/VersionByInvariantIdsRequest.java @@ -0,0 +1,11 @@ +package org.onap.vid.model; + +import java.util.List; + +/** + * Created by Oren on 9/5/17. + */ +public class VersionByInvariantIdsRequest { + + public List versions; +} diff --git a/vid-app-common/src/main/java/org/onap/vid/model/VfModule.java b/vid-app-common/src/main/java/org/onap/vid/model/VfModule.java new file mode 100644 index 000000000..ac19587e1 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/model/VfModule.java @@ -0,0 +1,308 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.model; + +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; +import java.util.Map.Entry; +import org.onap.vid.asdc.beans.tosca.Group; + +import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; + +/** + * The Class VfModule. + */ +public class VfModule { + + /** The Constant LOG. */ + private static final EELFLoggerDelegate LOG = EELFLoggerDelegate.getLogger(VfModule.class); + + /** The Constant dateFormat. */ + final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); + + /** The uuid. */ + private String uuid; + + /** The invariant uuid. */ + private String invariantUuid; + + /** The customization uuid. */ + private String customizationUuid; + + /** The description. */ + private String description; + + /** The name. */ + private String name; + + /** The version. */ + private String version; + + /** The volume group allowed. */ + private boolean volumeGroupAllowed; + + /** The get_input or other constructs for VF Module. */ + private Map commands; + + /** The model customization name. */ + private String modelCustomizationName; + + /** + * Instantiates a new vf module. + */ + public VfModule() { + commands = new HashMap(); + } + /** + * Gets the model customization name. + * + * @return the model customization name + */ + public String getModelCustomizationName() { + return modelCustomizationName; + } + /** + * Gets the uuid. + * + * @return the uuid + */ + public String getUuid() { + return uuid; + } + + /** + * Gets the invariant uuid. + * + * @return the invariant uuid + */ + public String getInvariantUuid() { + return invariantUuid; + } + /** + * Gets the customization uuid. + * + * @return the invariant uuid + */ + public String getCustomizationUuid() { + return customizationUuid; + } + /** + * Gets the description. + * + * @return the description + */ + public String getDescription() { + return description; + } + /** + * Gets the commands. + * + * @return the commands + */ + public Map getCommands() { + return commands; + } + /** + * Gets the name. + * + * @return the name + */ + public String getName() { + return name; + } + + /** + * Gets the version. + * + * @return the version + */ + public String getVersion() { + return version; + } + + /** + * Checks if is volume group allowed. + * + * @return true, if is volume group allowed + */ + public boolean isVolumeGroupAllowed() { + return volumeGroupAllowed; + } + + /** + * Sets the uuid. + * + * @param uuid the new uuid + */ + public void setUuid(String uuid) { + this.uuid = uuid; + } + + /** + * Sets the invariant uuid. + * + * @param invariantUuid the new invariant uuid + */ + public void setInvariantUuid(String invariantUuid) { + this.invariantUuid = invariantUuid; + } + /** + * Sets the customization uuid. + * + * @param customizationUuid the new customization uuid + */ + public void setCustomizationUuid(String customizationUuid) { + this.customizationUuid = customizationUuid; + } + /** + * Sets the description. + * + * @param description the new description + */ + public void setDescription(String description) { + this.description = description; + } + + /** + * Sets the name. + * + * @param name the new name + */ + public void setName(String name) { + this.name = name; + } + + /** + * Sets the version. + * + * @param version the new version + */ + public void setVersion(String version) { + this.version = version; + } + + /** + * Sets the volume group allowed. + * + * @param volumeGroupAllowed the new volume group allowed + */ + public void setVolumeGroupAllowed(boolean volumeGroupAllowed) { + this.volumeGroupAllowed = volumeGroupAllowed; + } + /** + * Sets the commands. + * + * @param m the commands + */ + public void setCommands( Mapm ) { + commands = m; + } + /** + * Sets the model customization name. + * + * @param modelCustomizationName the new model customization name + */ + public void setModelCustomizationName(String modelCustomizationName) { + this.modelCustomizationName = modelCustomizationName; + } + /** + * Extract vf module. + * + * @param group the group + * @return the vf module + */ + public static VfModule extractVfModule(String modelCustomizationName, Group group) { + + String methodName = "extractVfModule"; + + final VfModule vfModule = new VfModule(); + + try { + vfModule.setUuid(group.getMetadata().getVfModuleModelUUID()); + vfModule.setInvariantUuid(group.getMetadata().getVfModuleModelInvariantUUID()); + vfModule.setDescription(group.getMetadata().getDescription()); + vfModule.setName(group.getMetadata().getVfModuleModelName()); + vfModule.setVersion(group.getMetadata().getVfModuleModelVersion()); + vfModule.setCustomizationUuid(group.getMetadata().getVfModuleModelCustomizationUUID()); + vfModule.setModelCustomizationName (modelCustomizationName); + + if (group.getProperties().containsKey("volume_group")) { + if (group.getProperties().get("volume_group") != null) { + + Class c = group.getProperties().get("volume_group").getClass(); + LOG.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + methodName + " class name=" + + c.getName()); + + if ( c.getName().equalsIgnoreCase(Boolean.class.getName()) ) { + Boolean b = (Boolean)group.getProperties().get("volume_group"); + vfModule.setVolumeGroupAllowed( b.booleanValue() ); + } + } + } else { + vfModule.setVolumeGroupAllowed(false); + } + } + catch ( Exception e ) { + LOG.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + methodName + " Unable to parse VF Module from group: e=" + + e.toString()); + } + /* Not extracting other types of properties for 1702 + try { + + for (Entry e : group.getProperties().entrySet()) { + + String k = e.getKey(); + if ( e.getValue() != null ) { + LOG.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + methodName + " property: " + + k + "=" + e.getValue()); + LOG.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + methodName + " V class name: " + + e.getValue().getClass().getName()); + Class[] interfaces = e.getValue().getClass().getInterfaces(); + + for(Class ifc: interfaces ){ + LOG.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + methodName + " ifc name: " + + ifc.getName()); + } + + // only extract get_input for now + for (Entry entry : v.entrySet()) { + // only include get_input for now + if ( ModelConstants.GET_INPUT_TAG.equalsIgnoreCase ( entry.getKey() ) ) { + CommandProperty cp = new CommandProperty(); + cp.setDisplayName(entry.getValue()); + cp.setCommand(entry.getKey()); + cp.setInputName(k); + (vfModule.getCommands()).put(k,cp); + } + } + } + } + } + catch ( Exception e ) { + LOG.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + methodName + " Unable to parse VF Module properties: e=" + + e.toString()); + }*/ + return vfModule; + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/model/VidWorkflow.java b/vid-app-common/src/main/java/org/onap/vid/model/VidWorkflow.java new file mode 100644 index 000000000..985289b4a --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/model/VidWorkflow.java @@ -0,0 +1,83 @@ +package org.onap.vid.model; + + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openecomp.portalsdk.core.domain.support.DomainVo; + +import javax.persistence.*; +import java.io.Serializable; +import java.util.Date; +import java.util.Set; + +@Entity +@Table(name = "vid_workflow") +public class VidWorkflow extends DomainVo { + + private String wokflowName; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "WORKFLOW_DB_ID") + @JsonIgnore + public Long getId() { + return id; + } + + @Override + @Column(name = "CREATED_DATE") + @JsonIgnore + public Date getCreated() { + return super.getCreated(); + } + + @Override + @Column(name = "MODIFIED_DATE") + @JsonIgnore + public Date getModified() { + return super.getModified(); + } + + @Override + @Transient + @JsonIgnore + public Long getCreatedId() { + return super.getCreatedId(); + } + + @Override + @Transient + @JsonIgnore + public Long getModifiedId() { + return super.getModifiedId(); + } + + @Override + @Transient + @JsonIgnore + public Serializable getAuditUserId() { + return super.getAuditUserId(); + } + + @Override + @Transient + @JsonIgnore + public Long getRowNum() { + return super.getRowNum(); + } + + @Override + @Transient + @JsonIgnore + public Set getAuditTrail() { + return super.getAuditTrail(); + } + + @Column(name = "WORKFLOW_APP_NAME") + public String getWokflowName() { + return wokflowName; + } + + public void setWokflowName(String wokflowName) { + this.wokflowName = wokflowName; + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/model/VolumeGroup.java b/vid-app-common/src/main/java/org/onap/vid/model/VolumeGroup.java new file mode 100644 index 000000000..969c287ce --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/model/VolumeGroup.java @@ -0,0 +1,196 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.model; + +import org.onap.vid.asdc.beans.tosca.Group; + +/** + * The Class VolumeGroup. + */ +public class VolumeGroup { + + /** The uuid. */ + private String uuid; + + /** The invariant uuid. */ + private String invariantUuid; + + /** The description. */ + private String description; + + /** The name. */ + private String name; + + /** The version. */ + private String version; + + /** The customization uuid. */ + private String customizationUuid; + + /** The customization uuid. */ + private String modelCustomizationName; + /** + * Instantiates a new volume group. + */ + public VolumeGroup() {} + + /** + * Gets the uuid. + * + * @return the uuid + */ + public String getUuid() { + return uuid; + } + /** + * Gets the customization uuid. + * + * @return the customization uuid + */ + public String getCustomizationUuid() { + return customizationUuid; + } + /** + * Gets the customization name. + * + * @return the customization name + */ + public String getModelCustomizationName() { + return modelCustomizationName; + } + /** + * Gets the invariant uuid. + * + * @return the invariant uuid + */ + public String getInvariantUuid() { + return invariantUuid; + } + + /** + * Gets the description. + * + * @return the description + */ + public String getDescription() { + return description; + } + + /** + * Gets the name. + * + * @return the name + */ + public String getName() { + return name; + } + + /** + * Gets the version. + * + * @return the version + */ + public String getVersion() { + return version; + } + + /** + * Sets the uuid. + * + * @param uuid the new uuid + */ + public void setUuid(String uuid) { + this.uuid = uuid; + } + + /** + * Sets the invariant uuid. + * + * @param invariantUuid the new invariant uuid + */ + public void setInvariantUuid(String invariantUuid) { + this.invariantUuid = invariantUuid; + } + + /** + * Sets the description. + * + * @param description the new description + */ + public void setDescription(String description) { + this.description = description; + } + + /** + * Sets the name. + * + * @param name the new name + */ + public void setName(String name) { + this.name = name; + } + + /** + * Sets the version. + * + * @param version the new version + */ + public void setVersion(String version) { + this.version = version; + } + /** + * Sets the customization uuid. + * + * @param u the new customization uuid + */ + public void setCustomizationUuid(String u) { + this.customizationUuid = u; + + } + /** + * Sets the customization name. + * + * @param u the new customization name + */ + public void setModelCustomizationName(String u) { + this.modelCustomizationName = u; + + } + /** + * Extract volume group. + * + * @param group the group + * @return the volume group + */ + public static VolumeGroup extractVolumeGroup(String modelCustomizationName, Group group) { + final VolumeGroup volumeGroup = new VolumeGroup(); + + volumeGroup.setUuid(group.getMetadata().getVfModuleModelUUID()); + volumeGroup.setInvariantUuid(group.getMetadata().getVfModuleModelInvariantUUID()); + volumeGroup.setDescription(group.getMetadata().getDescription()); + volumeGroup.setName(group.getMetadata().getVfModuleModelName()); + volumeGroup.setVersion(group.getMetadata().getVfModuleModelVersion()); + volumeGroup.setCustomizationUuid(group.getMetadata().getVfModuleModelCustomizationUUID()); + volumeGroup.setModelCustomizationName(modelCustomizationName); + return volumeGroup; + } + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/model/Workflow.java b/vid-app-common/src/main/java/org/onap/vid/model/Workflow.java new file mode 100644 index 000000000..346138dc0 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/model/Workflow.java @@ -0,0 +1,47 @@ +package org.onap.vid.model; + + +import java.util.Collection; + +public class Workflow { + //Private members: + private int id; + private String workflowName; + private Collection vnfNames; + + + //Constructors: + public Workflow() {} + + public Workflow(int id, String workflowName, Collection vnfNames) { + this.id = id; + this.workflowName = workflowName; + this.vnfNames = vnfNames; + } + + + //Setters and getters: + public int getId() { + return id; + } + + public String getWorkflowName() { + return workflowName; + } + + public Collection getVnfNames() { + return this.vnfNames; + } + + public void setId(int id) { + this.id = id; + } + + public void setWorkflowName(String workflowName) { + this.workflowName = workflowName; + } + + public void setVnfName(Collection vnfNames) { + this.vnfNames = vnfNames; + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogic.java b/vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogic.java new file mode 100644 index 000000000..c197299ff --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogic.java @@ -0,0 +1,99 @@ +package org.onap.vid.mso; + +import org.onap.vid.changeManagement.RequestDetailsWrapper; +import org.onap.vid.controller.OperationalEnvironmentController; +import org.onap.vid.mso.model.OperationalEnvironmentActivateInfo; +import org.onap.vid.mso.model.OperationalEnvironmentDeactivateInfo; +import org.onap.vid.mso.rest.OperationalEnvironment.OperationEnvironmentRequestDetails; +import org.onap.vid.mso.rest.Request; +import org.onap.vid.mso.rest.RequestDetails; +import org.onap.vid.mso.rest.Task; + +import java.util.List; + +public interface MsoBusinessLogic { + + // this function should get params from tosca and send them to instance at mso, then return success response. + MsoResponseWrapper createSvcInstance(RequestDetails msoRequest) throws Exception; + + MsoResponseWrapper createVnf(RequestDetails requestDetails, String serviceInstanceId) throws Exception; + + MsoResponseWrapper createNwInstance(RequestDetails requestDetails, String serviceInstanceId) throws Exception; + + MsoResponseWrapper createVolumeGroupInstance(RequestDetails requestDetails, String serviceInstanceId, String vnfInstanceId) throws Exception; + + MsoResponseWrapper createVfModuleInstance(RequestDetails requestDetails, String serviceInstanceId, String vnfInstanceId) throws Exception; + + MsoResponseWrapper createConfigurationInstance(RequestDetails requestDetails, String serviceInstanceId) throws Exception; + + MsoResponseWrapper deleteSvcInstance(RequestDetails requestDetails, String serviceInstanceId) throws Exception; + + MsoResponseWrapper deleteVnf(RequestDetails requestDetails, String serviceInstanceId, String vnfInstanceId) throws Exception; + + MsoResponseWrapper deleteVfModule(RequestDetails requestDetails, String serviceInstanceId, String vnfInstanceId, String vfModuleId) throws Exception; + + MsoResponseWrapper deleteVolumeGroupInstance(RequestDetails requestDetails, String serviceInstanceId, String vnfInstanceId, String volumeGroupId)throws Exception; + + MsoResponseWrapper deleteNwInstance(RequestDetails requestDetails, String serviceInstanceId, String networkInstanceId) throws Exception; + + MsoResponseWrapper getOrchestrationRequest(String requestId)throws Exception; + + MsoResponseWrapper getOrchestrationRequests(String filterString)throws Exception; + + List getOrchestrationRequestsForDashboard()throws Exception; + + List getManualTasksByRequestId(String originalRequestId)throws Exception; + + MsoResponseWrapper completeManualTask(RequestDetails requestDetails, String taskId)throws Exception; + + MsoResponseWrapper activateServiceInstance(RequestDetails requestDetails, String serviceInstanceId)throws Exception; + + MsoResponseWrapperInterface updateVnf(org.onap.vid.changeManagement.RequestDetails requestDetails, String serviceInstanceId, String vnfInstanceId) throws Exception; + + MsoResponseWrapperInterface replaceVnf(org.onap.vid.changeManagement.RequestDetails requestDetails, String serviceInstanceId, String vnfInstanceId) throws Exception; + + MsoResponseWrapperInterface updateVnfSoftware(org.onap.vid.changeManagement.RequestDetails requestDetails, String serviceInstanceId, String vnfInstanceId) throws Exception; + + MsoResponseWrapperInterface updateVnfConfig(org.onap.vid.changeManagement.RequestDetails requestDetails, String serviceInstanceId, String vnfInstanceId) throws Exception; + + MsoResponseWrapper deleteConfiguration( + RequestDetails requestDetails, + String serviceInstanceId, + String configurationId) throws Exception; + + MsoResponseWrapper setConfigurationActiveStatus( + RequestDetails requestDetails, + String serviceInstanceId, + String configurationId, + boolean isActivate) throws Exception; + + MsoResponseWrapper setPortOnConfigurationStatus( + RequestDetails requestDetails, + String serviceInstanceId, + String configurationId, + boolean isEnable) throws Exception; + + RequestDetailsWrapper createOperationalEnvironmentActivationRequestDetails(OperationalEnvironmentActivateInfo details); + + String getOperationalEnvironmentActivationPath(OperationalEnvironmentActivateInfo details); + + RequestDetailsWrapper createOperationalEnvironmentDeactivationRequestDetails(OperationalEnvironmentDeactivateInfo details); + + String getCloudResourcesRequestsStatusPath(String requestId); + + String getOperationalEnvironmentDeactivationPath(OperationalEnvironmentDeactivateInfo details); + + String getOperationalEnvironmentCreationPath(); + + RequestDetailsWrapper convertParametersToRequestDetails(OperationalEnvironmentController.OperationalEnvironmentCreateBody input, String userId); + + MsoResponseWrapper removeRelationshipFromServiceInstance(RequestDetails requestDetails, String serviceInstanceId) throws Exception; + + MsoResponseWrapper addRelationshipToServiceInstance(RequestDetails requestDetails, String serviceInstanceId) throws Exception; + + MsoResponseWrapper setServiceInstanceStatus(RequestDetails requestDetails , String serviceInstanceId, boolean isActivate)throws Exception; + + RequestDetailsWrapper generateInPlaceMsoRequest(org.onap.vid.changeManagement.RequestDetails requestDetails) throws Exception; + + RequestDetailsWrapper generateConfigMsoRequest(org.onap.vid.changeManagement.RequestDetails requestDetails) throws Exception; +} diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogicImpl.java b/vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogicImpl.java new file mode 100644 index 000000000..6ad6b5fd0 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogicImpl.java @@ -0,0 +1,800 @@ +package org.onap.vid.mso; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.vid.changeManagement.ChangeManagementRequest; +import org.onap.vid.changeManagement.RequestDetailsWrapper; +import org.onap.vid.controller.OperationalEnvironmentController; +import org.onap.vid.domain.mso.RequestInfo; +import org.onap.vid.mso.model.OperationalEnvironmentActivateInfo; +import org.onap.vid.mso.model.OperationalEnvironmentDeactivateInfo; +import org.onap.vid.mso.rest.OperationalEnvironment.OperationEnvironmentRequestDetails; +import org.onap.vid.mso.rest.*; +import org.springframework.beans.factory.annotation.Autowired; + +import javax.ws.rs.BadRequestException; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.*; +import java.util.regex.Pattern; + +import static org.onap.vid.changeManagement.ChangeManagementRequest.MsoChangeManagementRequest; +import static org.onap.vid.controller.MsoController.*; +import static org.onap.vid.mso.MsoProperties.*; + +public class MsoBusinessLogicImpl implements MsoBusinessLogic { + + /** + * The Constant dateFormat. + */ + final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); + final static Pattern SOFTWARE_VERSION_PATTERN = Pattern.compile("^[A-Za-z0-9.\\-]+$"); + final static Pattern NUMBER_PATTERN = Pattern.compile("^[0-9]+$"); + private static final String ACTIVATE = "/activate"; + private static final String DEACTIVATE = "/deactivate"; + private static final String ENABLE_PORT = "/enablePort"; + private static final String DISABLE_PORT = "/disablePort"; + private final static String RESOURCE_TYPE_OPERATIONAL_ENVIRONMENT = "operationalEnvironment"; + private final static String SOURCE_OPERATIONAL_ENVIRONMENT = "VID"; + final static private ObjectMapper objectMapper = new ObjectMapper(); + /** + * The Mso REST client + * This should be replaced with mso client factory. + */ + private final MsoInterface msoClientInterface; + /** + * The logger. + */ + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(MsoBusinessLogicImpl.class); + + @Autowired + public MsoBusinessLogicImpl(MsoInterface msoClientInterface) { + this.msoClientInterface = msoClientInterface; + } + + static String validateEndpointPath(String endpointEnvVariable) { + String endpoint = SystemProperties.getProperty(endpointEnvVariable); + if (endpoint == null || endpoint.isEmpty()) { + throw new RuntimeException(endpointEnvVariable + " env variable is not defined"); + } + return endpoint; + } + + // this function should get params from tosca and send them to instance at mso, then return success response. + @Override + public MsoResponseWrapper createSvcInstance(RequestDetails msoRequest) throws Exception { + String methodName = "createSvcInstance "; + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + String endpoint; + try { + endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_SVC_INSTANCE); + } catch (Exception exception) { + throw exception; + } + + return msoClientInterface.createSvcInstance(msoRequest, endpoint); + } + + void validateLineOfBusiness(RequestDetails requestDetails) { + + Object value = requestDetails.getAdditionalProperties(); + + for(String prop: ImmutableList.of("requestDetails", "lineOfBusiness", "lineOfBusinessName")) { + if(value==null ||!(value instanceof Map)) { + value = null; + break; + } + else { + value = ((Map)value).get(prop); + } + } + + if(value == null || value.toString().isEmpty()) { + throw new BadRequestException("lineOfBusiness is required"); + } + + } + + @Override + public MsoResponseWrapper createVnf(RequestDetails requestDetails, String serviceInstanceId) throws Exception { + String methodName = "createVnf"; + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + String endpoint; + try { + endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_VNF_INSTANCE); + } catch (Exception exception) { + throw exception; + } + + String vnf_endpoint = endpoint.replaceFirst(SVC_INSTANCE_ID, serviceInstanceId); + return msoClientInterface.createVnf(requestDetails, vnf_endpoint); + } + + @Override + public MsoResponseWrapper createNwInstance(RequestDetails requestDetails, String serviceInstanceId) throws Exception { + String methodName = "createNwInstance"; + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + String endpoint; + try { + endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_NETWORK_INSTANCE); + } catch (Exception exception) { + throw exception; + } + + String nw_endpoint = endpoint.replaceFirst(SVC_INSTANCE_ID, serviceInstanceId); + return msoClientInterface.createNwInstance(requestDetails, nw_endpoint); + } + + @Override + public MsoResponseWrapper createVolumeGroupInstance(RequestDetails requestDetails, String serviceInstanceId, String vnfInstanceId) throws Exception { + String methodName = "createVolumeGroupInstance"; + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + String endpoint; + try { + endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_VOLUME_GROUP_INSTANCE); + } catch (Exception exception) { + throw exception; + } + + String vnf_endpoint = endpoint.replaceFirst(SVC_INSTANCE_ID, serviceInstanceId); + vnf_endpoint = vnf_endpoint.replaceFirst(VNF_INSTANCE_ID, vnfInstanceId); + + return msoClientInterface.createVolumeGroupInstance(requestDetails, vnf_endpoint); + } + + @Override + public MsoResponseWrapper createVfModuleInstance(RequestDetails requestDetails, String serviceInstanceId, String vnfInstanceId) throws Exception { + String methodName = "createVfModuleInstance"; + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + String endpoint; + try { + endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_VF_MODULE_INSTANCE); + } catch (Exception exception) { + throw exception; + } + + String partial_endpoint = endpoint.replaceFirst(SVC_INSTANCE_ID, serviceInstanceId); + String vf_module_endpoint = partial_endpoint.replaceFirst(VNF_INSTANCE_ID, vnfInstanceId); + + return msoClientInterface.createVfModuleInstance(requestDetails, vf_module_endpoint); + } + + @Override + public MsoResponseWrapper createConfigurationInstance(RequestDetails requestDetails, String serviceInstanceId) throws Exception { + String methodName = "createConfigurationInstance"; + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + String endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_CONFIGURATIONS); + endpoint = endpoint.replace(SVC_INSTANCE_ID, serviceInstanceId); + + return msoClientInterface.createConfigurationInstance(requestDetails, endpoint); + } + + @Override + public MsoResponseWrapper deleteSvcInstance(RequestDetails requestDetails, String serviceInstanceId) throws Exception { + String methodName = "deleteSvcInstance"; + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + String endpoint; + try { + endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_SVC_INSTANCE); + } catch (Exception exception) { + throw exception; + } + + String svc_endpoint = endpoint + "/" + serviceInstanceId; + + return msoClientInterface.deleteSvcInstance(requestDetails, svc_endpoint); + } + + @Override + public MsoResponseWrapper deleteVnf(RequestDetails requestDetails, String serviceInstanceId, String vnfInstanceId) throws Exception { + String methodName = "deleteVnf"; + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + String endpoint; + try { + endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_VNF_INSTANCE); + } catch (Exception exception) { + throw exception; + } + String vnf_endpoint = endpoint.replaceFirst(SVC_INSTANCE_ID, serviceInstanceId); + vnf_endpoint = vnf_endpoint + '/' + vnfInstanceId; + + return msoClientInterface.deleteVnf(requestDetails, vnf_endpoint); + } + + @Override + public MsoResponseWrapper deleteVfModule(RequestDetails requestDetails, String serviceInstanceId, String vnfInstanceId, String vfModuleId) throws Exception { + String methodName = "deleteVfModule"; + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + String endpoint; + try { + endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_VF_MODULE_INSTANCE); + } catch (Exception exception) { + throw exception; + } + + String vf__modules_endpoint = endpoint.replaceFirst(SVC_INSTANCE_ID, serviceInstanceId).replaceFirst(VNF_INSTANCE_ID, vnfInstanceId); + + String delete_vf_endpoint = vf__modules_endpoint + '/' + vfModuleId; + + return msoClientInterface.deleteVfModule(requestDetails, delete_vf_endpoint); + } + + @Override + public MsoResponseWrapper deleteVolumeGroupInstance(RequestDetails requestDetails, String serviceInstanceId, String vnfInstanceId, String volumeGroupId) throws Exception { + String methodName = "deleteVolumeGroupInstance"; + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + String endpoint; + try { + endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_VOLUME_GROUP_INSTANCE); + } catch (Exception exception) { + throw exception; + } + + String svc_endpoint = endpoint.replaceFirst(SVC_INSTANCE_ID, serviceInstanceId); + String vnf_endpoint = svc_endpoint.replaceFirst(VNF_INSTANCE_ID, vnfInstanceId); + String delete_volume_group_endpoint = vnf_endpoint + "/" + volumeGroupId; + + return msoClientInterface.deleteVolumeGroupInstance(requestDetails, delete_volume_group_endpoint); + } + + @Override + public MsoResponseWrapper deleteNwInstance(RequestDetails requestDetails, String serviceInstanceId, String networkInstanceId) throws Exception { + String methodName = "deleteNwInstance"; + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + String endpoint; + try { + endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_NETWORK_INSTANCE); + } catch (Exception exception) { + throw exception; + } + + String svc_endpoint = endpoint.replaceFirst(SVC_INSTANCE_ID, serviceInstanceId); + String delete_nw_endpoint = svc_endpoint + "/" + networkInstanceId; + + return msoClientInterface.deleteNwInstance(requestDetails, delete_nw_endpoint); + } + + @Override + public MsoResponseWrapper getOrchestrationRequest(String requestId) throws Exception { + String methodName = "getOrchestrationRequest"; + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + MsoResponseWrapper w = null; + try { + String p = SystemProperties.getProperty(MsoProperties.MSO_REST_API_GET_ORC_REQ); + String path = p + "/" + requestId; + + RestObject restObjStr = new RestObject(); + String str = new String(); + restObjStr.set(str); + + msoClientInterface.getOrchestrationRequest(str, "", path, restObjStr); + + return MsoUtil.wrapResponse(restObjStr); + + } catch (Exception e) { + logger.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); + throw e; + } + } + + @Override + public MsoResponseWrapper getOrchestrationRequests(String filterString) throws Exception { + String methodName = "getOrchestrationRequest"; + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + MsoResponseWrapper w = null; + try { + String p = SystemProperties.getProperty(MsoProperties.MSO_REST_API_GET_ORC_REQS); + String path = p + filterString; + + RestObject restObjStr = new RestObject(); + String str = new String(); + restObjStr.set(str); + + msoClientInterface.getOrchestrationRequest(str, "", path, restObjStr); + + return MsoUtil.wrapResponse(restObjStr); + + } catch (Exception e) { + logger.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); + throw e; + } + } + + @Override + public List getOrchestrationRequestsForDashboard() throws Exception { + String methodName = "getOrchestrationRequestsForDashboard"; + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + List filteredOrchestrationRequests = new ArrayList<>(); + try { + String path = SystemProperties.getProperty(MsoProperties.MSO_REST_API_GET_ORC_REQS); + path += "filter=modelType:EQUALS:vnf"; + RestObject restObjStr = new RestObject(); + String str = new String(); + restObjStr.set(str); + + MsoResponseWrapper msoResponseWrapper = msoClientInterface.getOrchestrationRequestsForDashboard(str, "", path, restObjStr); + List allOrchestrationRequests = deserializeOrchestrationRequestsJson(msoResponseWrapper.getEntity()); + + ; + for (RequestWrapper currentRequest : allOrchestrationRequests) { + if ((currentRequest.getRequest() != null) && (currentRequest.getRequest().getRequestScope() == Request.RequestScope.VNF) && ((currentRequest.getRequest().getRequestType() == + Request.RequestType.REPLACE_INSTANCE) || (currentRequest.getRequest().getRequestType() == + Request.RequestType.UPDATE_INSTANCE))) { + filteredOrchestrationRequests.add(currentRequest.getRequest()); + } + } + } catch (Exception e) { + logger.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); + } + return filteredOrchestrationRequests; + + } + + private List deserializeOrchestrationRequestsJson(String orchestrationRequestsJson) throws Exception { + String methodName = "deserializeOrchestrationRequestsJson"; + logger.debug(dateFormat.format(new Date()) + "<== " + methodName + " start"); + + ObjectMapper mapper = new ObjectMapper(); + mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + mapper.configure(DeserializationFeature.READ_ENUMS_USING_TO_STRING, true); + RequestList requestList = mapper.readValue(orchestrationRequestsJson, RequestList.class); + return requestList.getRequestList(); + } + + + @Override + public List getManualTasksByRequestId(String originalRequestId) throws Exception { + String methodName = "getManualTasksByRequestId"; + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + try { + String p = SystemProperties.getProperty(MsoProperties.MSO_REST_API_GET_MAN_TASKS); + String path = p + "?originalRequestId=" + originalRequestId; + + RestObject restObjStr = new RestObject(); + String str = new String(); + restObjStr.set(str); + + MsoResponseWrapper msoResponseWrapper = msoClientInterface.getManualTasksByRequestId(str, "", path, restObjStr); + return deserializeManualTasksJson(msoResponseWrapper.getEntity()); + + } catch (Exception e) { + logger.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); + throw e; + } + } + + private List deserializeManualTasksJson(String manualTasksJson) throws Exception { + String methodName = "deserializeManualTasksJson"; + logger.debug(dateFormat.format(new Date()) + "<== " + methodName + " start"); + + ObjectMapper mapper = new ObjectMapper(); + TaskList taskList = mapper.readValue(manualTasksJson, TaskList.class); + return taskList.getTaskList(); + } + + + @Override + public MsoResponseWrapper completeManualTask(RequestDetails requestDetails, String taskId) throws Exception { + String methodName = "completeManualTask"; + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + MsoResponseWrapper w = null; + try { + String p = SystemProperties.getProperty(MsoProperties.MSO_REST_API_GET_MAN_TASKS); + String path = p + "/" + taskId + "/complete"; + + RestObject restObjStr = new RestObject(); + String str = new String(); + restObjStr.set(str); + + msoClientInterface.completeManualTask(requestDetails, str, "", path, restObjStr); + + return MsoUtil.wrapResponse(restObjStr); + + } catch (Exception e) { + logger.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); + throw e; + } + } + + @Override + public MsoResponseWrapper activateServiceInstance(RequestDetails requestDetails, String serviceInstanceId) throws Exception { + String methodName = "activateServiceInstance"; + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + try { + String serviceEndpoint = SystemProperties.getProperty(MsoProperties.MSO_REST_API_SVC_INSTANCE); + String activateServicePath = serviceEndpoint + "/" + serviceInstanceId + "/activate"; + + RestObject restObjStr = new RestObject<>(); + String str = ""; + restObjStr.set(str); + + msoClientInterface.setServiceInstanceStatus(requestDetails, str, "", activateServicePath, restObjStr); + + return MsoUtil.wrapResponse(restObjStr); + + } catch (Exception e) { + logger.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); + throw e; + } + } + + + @Override + public MsoResponseWrapperInterface updateVnf(org.onap.vid.changeManagement.RequestDetails requestDetails, String serviceInstanceId, String vnfInstanceId) throws Exception { + String methodName = "updateVnf"; + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + String endpoint; + try { + endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_VNF_INSTANCE); + } catch (Exception exception) { + throw exception; + } + String vnf_endpoint = endpoint.replaceFirst(SVC_INSTANCE_ID, serviceInstanceId); + vnf_endpoint = vnf_endpoint + '/' + vnfInstanceId; + return msoClientInterface.updateVnf(requestDetails, vnf_endpoint); + } + + @Override + public MsoResponseWrapperInterface replaceVnf(org.onap.vid.changeManagement.RequestDetails requestDetails, String serviceInstanceId, String vnfInstanceId) throws Exception { + String methodName = "replaceVnf"; + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + String endpoint; + try { + endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_VNF_CHANGE_MANAGEMENT_INSTANCE); + } catch (Exception exception) { + throw exception; + } + String vnf_endpoint = endpoint.replaceFirst(SVC_INSTANCE_ID, serviceInstanceId); + vnf_endpoint = vnf_endpoint.replace(VNF_INSTANCE_ID, vnfInstanceId); + vnf_endpoint = vnf_endpoint.replace(REQUEST_TYPE, MsoChangeManagementRequest.REPLACE); + return msoClientInterface.replaceVnf(requestDetails, vnf_endpoint); + } + + public RequestDetailsWrapper generateInPlaceMsoRequest(org.onap.vid.changeManagement.RequestDetails requestDetails) throws Exception { + validateUpdateVnfSoftwarePayload(requestDetails); + RequestDetails inPlaceSoftwareUpdateRequest = new RequestDetails(); + inPlaceSoftwareUpdateRequest.setCloudConfiguration(requestDetails.getCloudConfiguration()); + inPlaceSoftwareUpdateRequest.setRequestParameters(requestDetails.getRequestParameters()); + inPlaceSoftwareUpdateRequest.setRequestInfo(requestDetails.getRequestInfo()); + RequestDetailsWrapper requestDetailsWrapper = new RequestDetailsWrapper(); + requestDetailsWrapper.requestDetails = inPlaceSoftwareUpdateRequest; + return requestDetailsWrapper; + } + + @Override + public RequestDetailsWrapper generateConfigMsoRequest(org.onap.vid.changeManagement.RequestDetails requestDetails) throws Exception { + validateUpdateVnfConfig(requestDetails); + RequestDetails ConfigUpdateRequest = new RequestDetails(); + ConfigUpdateRequest.setRequestParameters(requestDetails.getRequestParameters()); + ConfigUpdateRequest.setRequestInfo(requestDetails.getRequestInfo()); + RequestDetailsWrapper requestDetailsWrapper = new RequestDetailsWrapper(); + requestDetailsWrapper.requestDetails = ConfigUpdateRequest; + return requestDetailsWrapper; + } + + @Override + public MsoResponseWrapperInterface updateVnfSoftware(org.onap.vid.changeManagement.RequestDetails requestDetails, String serviceInstanceId, String vnfInstanceId) throws Exception { + String methodName = "updateVnfSoftware"; + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + String vnf_endpoint = getChangeManagementEndpoint(serviceInstanceId, vnfInstanceId, MsoChangeManagementRequest.SOFTWARE_UPDATE); //workflow name in mso is different than workflow name in vid UI + RequestDetailsWrapper finalRequestDetails = generateInPlaceMsoRequest(requestDetails); + return msoClientInterface.changeManagementUpdate(finalRequestDetails, vnf_endpoint); + } + + @Override + public MsoResponseWrapperInterface updateVnfConfig(org.onap.vid.changeManagement.RequestDetails requestDetails, String serviceInstanceId, String vnfInstanceId) throws Exception { + String methodName = "updateVnfConfig"; + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + RequestDetailsWrapper finalRequestDetails = generateConfigMsoRequest(requestDetails); + String vnf_endpoint = getChangeManagementEndpoint(serviceInstanceId, vnfInstanceId, MsoChangeManagementRequest.CONFIG_UPDATE); + return msoClientInterface.changeManagementUpdate(finalRequestDetails, vnf_endpoint); + } + + private String getChangeManagementEndpoint(String serviceInstanceId, String vnfInstanceId, String vnfRequestType) { + String endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_VNF_CHANGE_MANAGEMENT_INSTANCE); + String vnf_endpoint = endpoint.replaceFirst(SVC_INSTANCE_ID, serviceInstanceId); + vnf_endpoint = vnf_endpoint.replace(VNF_INSTANCE_ID, vnfInstanceId); + vnf_endpoint = vnf_endpoint.replace(REQUEST_TYPE, vnfRequestType); + return vnf_endpoint; + } + + private Map getChangeManagementPayload(RequestDetails requestDetails, String message) throws Exception{ + if(requestDetails.getRequestParameters()==null||requestDetails.getRequestParameters().getAdditionalProperties()==null){ + throw new BadRequestException(message); + } + Object payloadRaw=requestDetails.getRequestParameters().getAdditionalProperties().get("payload"); + try{ + return objectMapper.readValue((String)payloadRaw,Map.class); + } + catch(Exception exception){ + throw new BadRequestException(message); + } + } + + private void validateUpdateVnfSoftwarePayload(RequestDetails requestDetails) throws Exception { + final String noValidPayloadMsg = "No valid payload in " + ChangeManagementRequest.VNF_IN_PLACE_SOFTWARE_UPDATE + " request"; + + Map payload = getChangeManagementPayload(requestDetails, noValidPayloadMsg); + validateUpdateVnfSoftwarePayloadProperty(payload, noValidPayloadMsg, "existing-software-version", SOFTWARE_VERSION_PATTERN); + validateUpdateVnfSoftwarePayloadProperty(payload, noValidPayloadMsg, "new-software-version", SOFTWARE_VERSION_PATTERN); + + //if "operations-timeout" is not integer, trying to read it as String that represent a number + if (!(payload.get("operations-timeout") instanceof Integer)) { + validateUpdateVnfSoftwarePayloadProperty(payload, noValidPayloadMsg, "operations-timeout", NUMBER_PATTERN); + } + + } + + private void validateUpdateVnfSoftwarePayloadProperty(Map payload, String noValidPayloadMsg, String propertyName, Pattern pattern) { + Object forValidation = payload.get(propertyName); + final String noValidPayloadPropertyMsg = noValidPayloadMsg + ", " + propertyName + " property is not valid"; + if (!(forValidation instanceof String)) { + throw new BadRequestException(noValidPayloadPropertyMsg); + } + if (!pattern.matcher((String) forValidation).matches()) { + throw new BadRequestException(noValidPayloadPropertyMsg); + } + } + + private void validateUpdateVnfConfig(RequestDetails requestDetails) throws Exception { + final String noValidPayloadMsg = "No valid payload in " + ChangeManagementRequest.CONFIG_UPDATE + " request"; + + Map payload = getChangeManagementPayload(requestDetails, noValidPayloadMsg); + validateConfigUpdateVnfPayloadProperty(payload, noValidPayloadMsg, "request-parameters"); + validateConfigUpdateVnfPayloadProperty(payload, noValidPayloadMsg, "configuration-parameters"); + } + + private void validateConfigUpdateVnfPayloadProperty(Map payload, String noValidPayloadMsg, String propertyName) { + Object forValidation = payload.get(propertyName); + final String noValidPayloadPropertyMsg = noValidPayloadMsg+ ", "+ propertyName + " property is not valid"; + if(!payload.containsKey(propertyName)) { + throw new BadRequestException( noValidPayloadPropertyMsg); + } + } + + @Override + public MsoResponseWrapper deleteConfiguration( + RequestDetails requestDetails, + String serviceInstanceId, + String configurationId) throws Exception { + + String methodName = "deleteConfiguration"; + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + String endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_CONFIGURATION_INSTANCE); + endpoint = endpoint.replace(SVC_INSTANCE_ID, serviceInstanceId); + endpoint = endpoint.replace(CONFIGURATION_ID, configurationId); + + return msoClientInterface.deleteConfiguration(requestDetails, endpoint); + } + + @Override + public MsoResponseWrapper setConfigurationActiveStatus( + RequestDetails requestDetails, + String serviceInstanceId, + String configurationId, + boolean isActivate) throws Exception { + + String methodName = "setConfigurationActiveStatus"; + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + String endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_CONFIGURATION_INSTANCE); + endpoint = endpoint.replace(SVC_INSTANCE_ID, serviceInstanceId); + endpoint = endpoint.replace(CONFIGURATION_ID, configurationId); + + String isActivateState = (isActivate ? ACTIVATE : DEACTIVATE); + endpoint = endpoint + isActivateState; + + return msoClientInterface.setConfigurationActiveStatus(requestDetails, endpoint); + } + + @Override + public MsoResponseWrapper setServiceInstanceStatus(RequestDetails requestDetails , String serviceInstanceId, boolean isActivate)throws Exception{ + String methodName = "setServiceInstanceStatus"; + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + try { + String serviceEndpoint = validateEndpointPath(MsoProperties.MSO_REST_API_SVC_INSTANCE); + String endpoint = serviceEndpoint + "/" + serviceInstanceId; + + String isActivateState = (isActivate ? ACTIVATE : DEACTIVATE); + endpoint = endpoint + isActivateState; + + + RestObject restObjStr = new RestObject<>(); + String str = ""; + restObjStr.set(str); + + msoClientInterface.setServiceInstanceStatus(requestDetails , str, "", endpoint, restObjStr); + + return MsoUtil.wrapResponse(restObjStr); + + } catch (Exception e) { + logger.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); + throw e; + } + } + + @Override + public MsoResponseWrapper setPortOnConfigurationStatus( + RequestDetails requestDetails, + String serviceInstanceId, + String configurationId, + boolean isEnable) throws Exception { + String methodName = "setPortOnConfigurationStatus"; + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + String endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_CONFIGURATION_INSTANCE); + endpoint = endpoint.replace(SVC_INSTANCE_ID, serviceInstanceId); + endpoint = endpoint.replace(CONFIGURATION_ID, configurationId); + + String isEnablePortStatus = (isEnable ? ENABLE_PORT : DISABLE_PORT); + endpoint = endpoint + isEnablePortStatus; + + return msoClientInterface.setPortOnConfigurationStatus(requestDetails, endpoint); + } + + + @Override + public RequestDetailsWrapper createOperationalEnvironmentActivationRequestDetails(OperationalEnvironmentActivateInfo details) { + RequestDetails requestDetails = new RequestDetails(); + RequestInfo requestInfo = new RequestInfo(); + requestInfo.setAdditionalProperty("resourceType", RESOURCE_TYPE_OPERATIONAL_ENVIRONMENT); + requestInfo.setSource(SOURCE_OPERATIONAL_ENVIRONMENT); + requestInfo.setRequestorId(details.getUserId()); + requestDetails.setRequestInfo(requestInfo); + + org.onap.vid.domain.mso.RelatedInstance relatedInstance = new org.onap.vid.domain.mso.RelatedInstance(); + relatedInstance.setAdditionalProperty("resourceType", RESOURCE_TYPE_OPERATIONAL_ENVIRONMENT); + relatedInstance.setInstanceId(details.getRelatedInstanceId()); + relatedInstance.setInstanceName(details.getRelatedInstanceName()); + requestDetails.setAdditionalProperty("relatedInstanceList", Collections.singletonList(ImmutableMap.of("relatedInstance", relatedInstance))); + + org.onap.vid.domain.mso.RequestParameters requestParameters = new org.onap.vid.domain.mso.RequestParameters(); + requestParameters.setUserParams(null); + requestParameters.setAdditionalProperty("operationalEnvironmentType", "VNF"); + requestParameters.setAdditionalProperty("workloadContext", details.getWorkloadContext()); + requestParameters.setAdditionalProperty("manifest", details.getManifest()); + requestDetails.setRequestParameters(requestParameters); + + RequestDetailsWrapper requestDetailsWrapper = new RequestDetailsWrapper<>(requestDetails); + + debugRequestDetails(requestDetailsWrapper); + + return requestDetailsWrapper; + } + + @Override + public String getOperationalEnvironmentActivationPath(OperationalEnvironmentActivateInfo details) { + String path = validateEndpointPath(MSO_REST_API_OPERATIONAL_ENVIRONMENT_ACTIVATE); + path = path.replace("", details.getOperationalEnvironmentId()); + return path; + } + + @Override + public RequestDetailsWrapper createOperationalEnvironmentDeactivationRequestDetails(OperationalEnvironmentDeactivateInfo details) { + RequestDetails requestDetails = new RequestDetails(); + + RequestInfo requestInfo = new RequestInfo(); + requestInfo.setAdditionalProperty("resourceType", RESOURCE_TYPE_OPERATIONAL_ENVIRONMENT); + requestInfo.setSource(SOURCE_OPERATIONAL_ENVIRONMENT); + requestInfo.setRequestorId(details.getUserId()); + requestDetails.setRequestInfo(requestInfo); + + org.onap.vid.domain.mso.RequestParameters requestParameters = new org.onap.vid.domain.mso.RequestParameters(); + requestParameters.setUserParams(null); + requestParameters.setAdditionalProperty("operationalEnvironmentType", "VNF"); + requestDetails.setRequestParameters(requestParameters); + RequestDetailsWrapper requestDetailsWrapper = new RequestDetailsWrapper<>(requestDetails); + debugRequestDetails(requestDetailsWrapper); + return requestDetailsWrapper; + } + + @Override + public String getCloudResourcesRequestsStatusPath(String requestId) { + String path = validateEndpointPath(MSO_REST_API_CLOUD_RESOURCES_REQUEST_STATUS); + path = path.replace("", requestId); + return path; + } + + @Override + public String getOperationalEnvironmentDeactivationPath(OperationalEnvironmentDeactivateInfo details) { + String path = validateEndpointPath(MSO_REST_API_OPERATIONAL_ENVIRONMENT_DEACTIVATE); + path = path.replace("", details.getOperationalEnvironmentId()); + return path; + } + + private void debugRequestDetails(Object requestDetails) { + if (logger.isDebugEnabled()) { + String requestDetailsAsString; + try { + requestDetailsAsString = new ObjectMapper().enable(SerializationFeature.INDENT_OUTPUT).writeValueAsString(requestDetails); + } catch (JsonProcessingException e) { + requestDetailsAsString = "error: cannot stringify RequestDetails"; + } + logger.debug(EELFLoggerDelegate.debugLogger, "requestDetailsAsString: {}", requestDetailsAsString); + } + } + + @Override + public String getOperationalEnvironmentCreationPath() { + String path = validateEndpointPath(MSO_REST_API_OPERATIONAL_ENVIRONMENT_CREATE); + return path; + } + + @Override + public RequestDetailsWrapper convertParametersToRequestDetails(OperationalEnvironmentController.OperationalEnvironmentCreateBody input, String userId) { + OperationEnvironmentRequestDetails.RequestInfo requestInfo = new OperationEnvironmentRequestDetails.RequestInfo( + RESOURCE_TYPE_OPERATIONAL_ENVIRONMENT, + input.getInstanceName(), + SOURCE_OPERATIONAL_ENVIRONMENT, + userId); + + OperationEnvironmentRequestDetails.RelatedInstance relatedInstance = new OperationEnvironmentRequestDetails.RelatedInstance( + RESOURCE_TYPE_OPERATIONAL_ENVIRONMENT, + input.getEcompInstanceId(), + input.getEcompInstanceName()); + + List relatedInstanceList = Collections.singletonList((relatedInstance)); + + OperationEnvironmentRequestDetails.RequestParameters requestParameters = new OperationEnvironmentRequestDetails.RequestParameters( + input.getOperationalEnvironmentType(), + input.getTenantContext(), + input.getWorkloadContext()); + + OperationEnvironmentRequestDetails requestDetails = new OperationEnvironmentRequestDetails(requestInfo, relatedInstanceList, requestParameters); + RequestDetailsWrapper requestDetailsWrapper = new RequestDetailsWrapper<>(requestDetails); + debugRequestDetails(requestDetailsWrapper); + return requestDetailsWrapper; + } + + @Override + public MsoResponseWrapper removeRelationshipFromServiceInstance(RequestDetails requestDetails, String serviceInstanceId) throws Exception { + String methodName = "removeRelationshipFromServiceInstance"; + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + String serviceEndpoint = SystemProperties.getProperty(MsoProperties.MSO_REST_API_SVC_INSTANCE); + String removeRelationshipsPath = serviceEndpoint + "/" + serviceInstanceId + "/removeRelationships"; + + return msoClientInterface.removeRelationshipFromServiceInstance(requestDetails, removeRelationshipsPath); + } + + @Override + public MsoResponseWrapper addRelationshipToServiceInstance(RequestDetails requestDetails, String serviceInstanceId) throws Exception { + String methodName = "addRelationshipToServiceInstance"; + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + String serviceEndpoint = SystemProperties.getProperty(MsoProperties.MSO_REST_API_SVC_INSTANCE); + String addRelationshipsPath = serviceEndpoint + "/" + serviceInstanceId + "/addRelationships"; + + return msoClientInterface.addRelationshipToServiceInstance(requestDetails, addRelationshipsPath); + } + + +} \ No newline at end of file diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/MsoInterface.java b/vid-app-common/src/main/java/org/onap/vid/mso/MsoInterface.java new file mode 100644 index 000000000..2d09630f0 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/mso/MsoInterface.java @@ -0,0 +1,85 @@ +package org.onap.vid.mso; + +import org.onap.vid.changeManagement.RequestDetailsWrapper; +import org.onap.vid.mso.rest.RequestDetails; + +/** + * Created by pickjonathan on 21/06/2017. + */ +public interface MsoInterface { + + /** + * This function will post MSO service with information about how to instantiate the requested service + * @param requestDetails The details about the service as they come from the web. + * @return MsoResponseWrapper containing information about the service instantiation + * --> success : see JSON at resources folder mso_create_instance_response. + * --> failure : would return 200 with failure data. + * @throws Exception + */ + MsoResponseWrapper createSvcInstance(RequestDetails requestDetails, String endpoint) throws Exception; + + /** + * will create a virtual network function using MSO service. + * @param requestDetails - information about the vnf to create + * @return - the response body recived from MSO + * @throws Exception + */ + MsoResponseWrapper createVnf(RequestDetails requestDetails, String endpoint) throws Exception; + + MsoResponseWrapper createNwInstance(RequestDetails requestDetails, String endpoint) throws Exception; + /** + * + * @param requestDetails + * @param path + * @return + * @throws Exception + */ + MsoResponseWrapper createVolumeGroupInstance(RequestDetails requestDetails, String path) throws Exception; + + /** + * + * @param requestDetails + * @return + * @throws Exception + */ + MsoResponseWrapper createVfModuleInstance(RequestDetails requestDetails, String endpoint) throws Exception; + + MsoResponseWrapper createConfigurationInstance(RequestDetails requestDetails, String endpoint) throws Exception; + + MsoResponseWrapper deleteSvcInstance(RequestDetails requestDetails, String endpoint) throws Exception; + + MsoResponseWrapper deleteVnf(RequestDetails requestDetails, String endpoint) throws Exception; + + MsoResponseWrapper deleteVfModule(RequestDetails requestDetails, String endpoint) throws Exception; + + MsoResponseWrapper deleteVolumeGroupInstance(RequestDetails requestDetails, String endpoint) throws Exception; + + MsoResponseWrapper deleteNwInstance(RequestDetails requestDetails, String endpoint) throws Exception; + + void getOrchestrationRequest(String t, String sourceId, String endpoint, RestObject restObject) throws Exception; + + MsoResponseWrapper getOrchestrationRequestsForDashboard(String t , String sourceId , String endpoint , RestObject restObject) throws Exception; + + MsoResponseWrapper getManualTasksByRequestId(String t , String sourceId , String endpoint , RestObject restObject) throws Exception; + + MsoResponseWrapper completeManualTask(RequestDetails requestDetails, String t, String sourceId, String endpoint, RestObject restObject) throws Exception; + + MsoResponseWrapper updateVnf(org.onap.vid.changeManagement.RequestDetails requestDetails, String vnf_endpoint) throws Exception; + + MsoResponseWrapper replaceVnf(org.onap.vid.changeManagement.RequestDetails requestDetails, String vnf_endpoint) throws Exception; + + MsoResponseWrapper deleteConfiguration(RequestDetails requestDetails, String pmc_endpoint) throws Exception; + + MsoResponseWrapper setConfigurationActiveStatus(RequestDetails requestDetails, String endpoint) throws Exception; + + MsoResponseWrapper setPortOnConfigurationStatus(RequestDetails requestDetails, String endpoint) throws Exception; + + void setServiceInstanceStatus(RequestDetails requestDetails, String t, String sourceId, String endpoint, RestObject restObject) throws Exception; + + MsoResponseWrapperInterface changeManagementUpdate(RequestDetailsWrapper requestDetails, String endpoint) throws Exception; + + MsoResponseWrapper removeRelationshipFromServiceInstance(RequestDetails requestDetails, String endpoint) throws Exception; + + MsoResponseWrapper addRelationshipToServiceInstance(RequestDetails requestDetails, String addRelationshipsPath) throws Exception; +} + diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/MsoProperties.java b/vid-app-common/src/main/java/org/onap/vid/mso/MsoProperties.java new file mode 100644 index 000000000..607d84194 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/mso/MsoProperties.java @@ -0,0 +1,119 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.mso; + +import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.openecomp.portalsdk.core.util.SystemProperties; + +import java.text.DateFormat; +import java.text.SimpleDateFormat; + +/** + * The Class MsoProperties. + */ +public class MsoProperties extends SystemProperties { + + /** The Constant MSO_SERVER_URL. */ + //VID Properties related to MSO + public static final String MSO_SERVER_URL = "mso.server.url"; + + /** The Constant MSO_DME2_SERVER_URL. */ + public static final String MSO_DME2_SERVER_URL = "mso.dme2.server.url"; + + /** The Constant MSO_DME2_CLIENT_TIMEOUT. */ + public static final String MSO_DME2_CLIENT_TIMEOUT = "mso.dme2.client.timeout"; + + /** The Constant MSO_DME2_CLIENT_READ_TIMEOUT. */ + public static final String MSO_DME2_CLIENT_READ_TIMEOUT = "mso.dme2.client.read.timeout"; + + /** The Constant MSO_SERVER_URL_DEFAULT. */ + public static final String MSO_SERVER_URL_DEFAULT= ""; + + /** The Constant MSO_POLLING_INTERVAL_MSECS. */ + // number of msecs to wait between polling requests + public static final String MSO_POLLING_INTERVAL_MSECS = "mso.polling.interval.msecs"; + + /** The Constant MSO_POLLING_INTERVAL_MSECS_DEFAULT. */ + public static final String MSO_POLLING_INTERVAL_MSECS_DEFAULT = "60000"; + + /** The Constant MSO_DME2_ENABLED. */ + public static final String MSO_DME2_ENABLED = "mso.dme2.enabled"; + + /** The Constant MSO_MAX_POLLS. */ + public static final String MSO_MAX_POLLS = "mso.max.polls"; + + /** The Constant MSO_MAX_POLLS_DEFAULT. */ + public static final String MSO_MAX_POLLS_DEFAULT = "10"; //10 + + /** The Constant MSO_USER_NAME. */ + public static final String MSO_USER_NAME = "mso.user.name"; //m03346 + + /** The Constant MSO_PASSWORD. */ + public static final String MSO_PASSWORD = "mso.password.x"; + + /** The Constant MSO_REST_API_SVC_INSTANCE. */ + public static final String MSO_REST_API_SVC_INSTANCE = "mso.restapi.svc.instance"; // /serviceInstances/v2 + + /** The Constant MSO_REST_API_VNF_INSTANCE. */ + public static final String MSO_REST_API_VNF_INSTANCE = "mso.restapi.vnf.instance"; // /serviceInstances/v2/{service_instance_id}/vnfs + + /** The Constant MSO_REST_API_VNF_CHANGE_MANAGEMENT_INSTANCE. */ + public static final String MSO_REST_API_VNF_CHANGE_MANAGEMENT_INSTANCE = "mso.restapi.vnf.changemanagement.instance"; // /serviceInstances/v2/{service_instance_id}/vnfs/{request_type} + + /** The Constant MSO_REST_API_NETWORK_INSTANCE. */ + public static final String MSO_REST_API_NETWORK_INSTANCE = "mso.restapi.network.instance"; // /serviceInstances/v2/{serviceInstanceId}/networks + + /** The Constant MSO_REST_API_GET_ORC_REQ. */ + public static final String MSO_REST_API_GET_ORC_REQ = "mso.restapi.get.orc.req"; + + /** The Constant MSO_REST_API_GET_ORC_REQS. */ + public static final String MSO_REST_API_GET_ORC_REQS = "mso.restapi.get.orc.reqs"; + + /** The Constant MSO_REST_API_GET_MAN_TASK. */ + public static final String MSO_REST_API_GET_MAN_TASKS = "mso.restapi.get.man.tasks"; + + /** The Constant MSO_REST_API_VF_MODULE_INSTANCE. */ + public static final String MSO_REST_API_VF_MODULE_INSTANCE = "mso.restapi.vf.module.instance"; + + /** The Constant MSO_REST_API_VOLUME_GROUP_INSTANCE. */ + public static final String MSO_REST_API_VOLUME_GROUP_INSTANCE = "mso.restapi.volume.group.instance"; //serviceInstances/v2/{serviceInstanceId}/volumeGroups + + /** The Constant MSO_REST_API_CONFIGURATION_INSTANCE. */ + public static final String MSO_REST_API_CONFIGURATIONS = "mso.restapi.configurations"; //serviceInstances/v5/{serviceInstanceId}/configurations/ + public static final String MSO_REST_API_CONFIGURATION_INSTANCE = "mso.restapi.configuration.instance"; //serviceInstances/v5/{serviceInstanceId}/configurations/{configurationId} + + /** The Constant MSO_REST_API_OPERATIONAL_ENVIRONMENT */ + public static final String MSO_REST_API_OPERATIONAL_ENVIRONMENT_ACTIVATE = "mso.restapi.operationalEnvironment.activate"; + public static final String MSO_REST_API_OPERATIONAL_ENVIRONMENT_DEACTIVATE = "mso.restapi.operationalEnvironment.deactivate"; + + /** The Constant MSO_REST_API_OPERATIONAL_ENVIRONMENT_CREATE */ + public static final String MSO_REST_API_OPERATIONAL_ENVIRONMENT_CREATE = "mso.restapi.operationalEnvironment.create"; + + /** The Constant MSO_REST_API_CLOUD_RESOURCES_REQUEST_STATUS */ + public static final String MSO_REST_API_CLOUD_RESOURCES_REQUEST_STATUS = "mso.restapi.operationalEnvironment.cloudResourcesRequests.status"; + + /** The logger. */ + public EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(MsoProperties.class); + + /** The Constant dateFormat. */ + final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/MsoResponseWrapper.java b/vid-app-common/src/main/java/org/onap/vid/mso/MsoResponseWrapper.java new file mode 100644 index 000000000..b890114b5 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/mso/MsoResponseWrapper.java @@ -0,0 +1,129 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.mso; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.apache.commons.lang.builder.ToStringBuilder; + +import javax.ws.rs.core.Response; + +/** + * This wrapper encapsulates the MSO response in the format expected by the pages. + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "status", + "entity" +}) + +public class MsoResponseWrapper implements MsoResponseWrapperInterface { + + + public MsoResponseWrapper() { + } + + public MsoResponseWrapper(Response response) { + setEntity(response.readEntity(String.class)); + setStatus(response.getStatus()); + } + + + /** The status. */ + @JsonProperty("status") + private int status; + + /** The entity. */ + @JsonProperty("entity") + private String entity; + + /** + * Gets the entity. + * + * @return the entity + */ + @Override + @JsonProperty("entity") + public String getEntity() { + return entity; + } + + /** + * Gets the status. + * + * @return the status + */ + @Override + @JsonProperty("status") + public int getStatus() { + return status; + } + + /** + * Sets the status. + * + * @param v the new status + */ + @JsonProperty("status") + public void setStatus(int v) { + this.status = v; + } + + /** + * Sets the entity. + * + * @param v the new entity + */ + @JsonProperty("entity") + public void setEntity(String v) { + this.entity = v; + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return ToStringBuilder.reflectionToString(this); + } + + /** + * Gets the response. + * + * @return the response + */ + @org.codehaus.jackson.annotate.JsonIgnore + @com.fasterxml.jackson.annotation.JsonIgnore + public String getResponse () { + + StringBuilder b = new StringBuilder ("{ \"status\": "); + b.append(getStatus()).append(", \"entity\": " ); + if (this.getEntity() == null || this.getEntity().isEmpty()) { + b.append("\"\""); + } else { + b.append(this.getEntity()); + } + b.append("}"); + return (b.toString()); + } + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/MsoResponseWrapper2.java b/vid-app-common/src/main/java/org/onap/vid/mso/MsoResponseWrapper2.java new file mode 100644 index 000000000..5a73a048a --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/mso/MsoResponseWrapper2.java @@ -0,0 +1,60 @@ +package org.onap.vid.mso; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; + +@JsonPropertyOrder({ + "status", + "entity" +}) + +/* +This is a brother of MsoResponseWrapper. I (Ittay) think it's better. +It is generic, immutable, and has some knowledge about RestObject. +The serialized "entity" field may be either String or nested object. + */ +public class MsoResponseWrapper2 implements MsoResponseWrapperInterface { + + final static ObjectMapper objectMapper = new ObjectMapper(); + + private final int status; + private final T entity; + private final String raw; + + public MsoResponseWrapper2(RestObject msoResponse) { + this.status = msoResponse.getStatusCode(); + this.entity = msoResponse.get(); + this.raw = msoResponse.getRaw(); + } + + public MsoResponseWrapper2( + @JsonProperty(value = "status", required = true) int status, + @JsonProperty(value = "entity", required = true) T entity) { + this.status = status; + this.entity = entity; + this.raw = null; + } + + public int getStatus() { + return status; + } + + @Override + @org.codehaus.jackson.annotate.JsonIgnore + @com.fasterxml.jackson.annotation.JsonIgnore + public String getResponse() { + try { + return objectMapper.writeValueAsString(this); + } catch (JsonProcessingException e) { + return getEntity() != null ? getEntity().toString() : null; + } + } + + @JsonProperty + public Object getEntity() { + return entity != null ? entity : raw; + } + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/MsoResponseWrapperInterface.java b/vid-app-common/src/main/java/org/onap/vid/mso/MsoResponseWrapperInterface.java new file mode 100644 index 000000000..ad251bdeb --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/mso/MsoResponseWrapperInterface.java @@ -0,0 +1,15 @@ +package org.onap.vid.mso; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public interface MsoResponseWrapperInterface { + @JsonProperty("entity") + Object getEntity(); + + @JsonProperty("status") + int getStatus(); + + @org.codehaus.jackson.annotate.JsonIgnore + @com.fasterxml.jackson.annotation.JsonIgnore + String getResponse(); +} diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/MsoUtil.java b/vid-app-common/src/main/java/org/onap/vid/mso/MsoUtil.java new file mode 100644 index 000000000..eae705aba --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/mso/MsoUtil.java @@ -0,0 +1,126 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.mso; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.glassfish.jersey.client.ClientResponse; +import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; + +import java.text.DateFormat; +import java.text.SimpleDateFormat; + +import static org.onap.vid.utils.Logging.getMethodName; + +/** + * The Class MsoUtil. + */ +public class MsoUtil { + + /** The logger. */ + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(MsoUtil.class); + + /** The Constant dateFormat. */ + final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); + + /** + * Wrap response. + * + * @param body the body + * @param statusCode the status code + * @return the mso response wrapper + */ + public static MsoResponseWrapper wrapResponse ( String body, int statusCode ) { + + MsoResponseWrapper w = new MsoResponseWrapper(); + w.setStatus (statusCode); + w.setEntity(body); + + return w; + } + + /** + * Wrap response. + * + * @param cres the cres + * @return the mso response wrapper + */ + public static MsoResponseWrapper wrapResponse (ClientResponse cres) { + String resp_str = ""; + if ( cres != null ) { + resp_str = cres.readEntity(String.class); + } + int statuscode = cres.getStatus(); + MsoResponseWrapper w = MsoUtil.wrapResponse ( resp_str, statuscode ); + return (w); + } + + /** + * Wrap response. + * + * @param rs the rs + * @return the mso response wrapper + */ + public static MsoResponseWrapper wrapResponse (RestObject rs) { + String resp_str = null; + int status = 0; + if ( rs != null ) { + resp_str = rs.get() != null ? rs.get() : rs.getRaw(); + status = rs.getStatusCode(); + } + MsoResponseWrapper w = MsoUtil.wrapResponse ( resp_str, status ); + return (w); + } + + /** + * Convert pojo to string. + * + * @param the generic type + * @param t the t + * @return the string + * @throws JsonProcessingException the json processing exception + */ + public static String convertPojoToString ( T t ) { + + String methodName = "convertPojoToString"; + ObjectMapper mapper = new ObjectMapper(); + String r_json_str = ""; + if ( t != null ) { + try { + r_json_str = mapper.writeValueAsString(t); + } + catch ( com.fasterxml.jackson.core.JsonProcessingException j ) { + logger.debug(EELFLoggerDelegate.debugLogger,getMethodName() + " Unable to parse object of type " + t.getClass().getName() + " as json", j); + } + } + return (r_json_str); + } + + /** + * The main method. + * + * @param args the arguments + */ + public static void main(String[] args) { + // TODO Auto-generated method stub + + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/RestMsoImplementation.java b/vid-app-common/src/main/java/org/onap/vid/mso/RestMsoImplementation.java new file mode 100644 index 000000000..8cee23b49 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/mso/RestMsoImplementation.java @@ -0,0 +1,380 @@ +package org.onap.vid.mso; + +import com.att.eelf.configuration.EELFLogger; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.apache.commons.codec.binary.Base64; +import org.eclipse.jetty.util.security.Password; +import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.vid.client.HttpBasicClient; +import org.onap.vid.client.HttpsBasicClient; +import org.onap.vid.mso.rest.RequestDetails; +import org.onap.vid.mso.rest.RestInterface; +import org.onap.vid.utils.Logging; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpMethod; + +import javax.servlet.http.HttpServletRequest; +import javax.ws.rs.client.Client; +import javax.ws.rs.client.Entity; +import javax.ws.rs.client.Invocation; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.MultivaluedHashMap; +import javax.ws.rs.core.Response; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.Collections; +import java.util.Date; + +import static org.onap.vid.utils.Logging.*; + +/** + * Created by pickjonathan on 26/06/2017. + */ +public class RestMsoImplementation implements RestInterface { + + /** + * The logger. + */ + EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(RestMsoImplementation.class); + final private EELFLogger outgoingRequestsLogger = Logging.getRequestsLogger("mso"); + + /** + * The Constant dateFormat. + */ + final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); + + /** The client. */ + private static Client client = null; + + /** The common headers. */ + //private MultivaluedHashMap commonHeaders; + /** + * Instantiates a new mso rest interface. + */ + + @SuppressWarnings("Duplicates") + @Override + public MultivaluedHashMap initMsoClient() + { + final String methodname = "initRestClient()"; + + final String username = SystemProperties.getProperty(MsoProperties.MSO_USER_NAME); + final String password = SystemProperties.getProperty(MsoProperties.MSO_PASSWORD); + final String mso_url = SystemProperties.getProperty(MsoProperties.MSO_SERVER_URL); + final String decrypted_password = Password.deobfuscate(password); + + String authString = username + ":" + decrypted_password; + + byte[] authEncBytes = Base64.encodeBase64(authString.getBytes()); + String authStringEnc = new String(authEncBytes); + + MultivaluedHashMap commonHeaders = new MultivaluedHashMap(); + commonHeaders.put("Authorization", Collections.singletonList(("Basic " + authStringEnc))); + commonHeaders.put(requestIdHeaderKey, Collections.singletonList(getHttpServletRequest().getHeader(requestIdHeaderKey))); + //Pass calling application identifier to SO + commonHeaders.put("X-FromAppId", Collections.singletonList(SystemProperties.getProperty(SystemProperties.APP_DISPLAY_NAME))); + + boolean use_ssl = true; + if ( (mso_url != null) && ( !(mso_url.isEmpty()) ) ) { + if ( mso_url.startsWith("https")) { + use_ssl = true; + } + else { + use_ssl = false; + } + } + if (client == null) { + + try { + if ( use_ssl ) { + //logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + methodname + " getting HttpsBasicClient with username=" + username + // + " password=" + password); + client = HttpsBasicClient.getClient(); + } + else { + //logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + methodname + " getting HttpsBasicClient with username=" + username + // + " password=" + password); + client = HttpBasicClient.getClient(); + } + } catch (Exception e) { + logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + methodname + " Unable to get the SSL client"); + } + } + + return commonHeaders; + } + + public void Get (T t, String sourceId, String path, RestObject restObject ) throws Exception { + String methodName = "Get"; + + logger.debug(EELFLoggerDelegate.debugLogger, methodName + " start"); + + String url=""; + restObject.set(t); + + url = SystemProperties.getProperty(MsoProperties.MSO_SERVER_URL) + path; + + MultivaluedHashMap commonHeaders = initMsoClient(); + Logging.logRequest(outgoingRequestsLogger, HttpMethod.GET, url); + final Response cres = client.target(url) + .request() + .accept("application/json") + .headers(commonHeaders) + .get(); + Logging.logResponse(outgoingRequestsLogger, HttpMethod.GET, url, cres); + int status = cres.getStatus(); + restObject.setStatusCode (status); + + if (status == 200 || status == 202) { + t = (T) cres.readEntity(t.getClass()); + restObject.set(t); + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + methodName + " REST api was successfull!"); + + } else { + throw new Exception(methodName + " with status="+ status + ", url= " + url ); + } + + logger.debug(EELFLoggerDelegate.debugLogger,methodName + " received status=" + status ); + + return; + } + + public RestObject GetForObject(String sourceID, String path, Class clazz) throws Exception { + final String methodName = getMethodName(); + logger.debug(EELFLoggerDelegate.debugLogger, "start {}->{}({}, {}, {})", getMethodCallerName(), methodName, sourceID, path, clazz); + + String url = SystemProperties.getProperty(MsoProperties.MSO_SERVER_URL) + path; + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " sending request to url= " + url); + + MultivaluedHashMap commonHeaders = initMsoClient(); + Logging.logRequest(outgoingRequestsLogger, HttpMethod.GET, url); + final Response cres = client.target(url) + .request() + .accept("application/json") + .headers(commonHeaders) + .get(); + Logging.logResponse(outgoingRequestsLogger, HttpMethod.GET, url, cres); + final RestObject restObject = cresToRestObject(cres, clazz); + int status = cres.getStatus(); + + if (status == 200 || status == 202) { + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + methodName + " REST api was successfull!"); + } else { + logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " with status="+status+", url="+url); + } + + logger.debug(EELFLoggerDelegate.debugLogger,methodName + " received status=" + status ); + + return restObject; + } + + @Override + public void Delete(T t, RequestDetails r, String sourceID, String path, RestObject restObject) { + + String methodName = "Delete"; + String url=""; + Response cres = null; + + logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " start"); + + try { + MultivaluedHashMap commonHeaders = initMsoClient(); + + url = SystemProperties.getProperty(MsoProperties.MSO_SERVER_URL) + path; + Logging.logRequest(outgoingRequestsLogger, HttpMethod.DELETE, url, r); + cres = client.target(url) + .request() + .accept("application/json") + .headers(commonHeaders) + //.entity(r) + .build("DELETE", Entity.entity(r, MediaType.APPLICATION_JSON)).invoke(); + Logging.logResponse(outgoingRequestsLogger, HttpMethod.DELETE, url, cres); + int status = cres.getStatus(); + restObject.setStatusCode (status); + + if (status == 404) { // resource not found + String msg = "Resource does not exist...: " + cres.getStatus(); + logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + msg); + } else if (status == 200 || status == 204){ + logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + "Resource " + url + " deleted"); + } else if (status == 202) { + String msg = "Delete in progress: " + status; + logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + msg); + } + else { + String msg = "Deleting Resource failed: " + status; + logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + msg); + } + + try { + t = (T) cres.readEntity(t.getClass()); + restObject.set(t); + } + catch ( Exception e ) { + logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " No response entity, this is probably ok, e=" + + e.getMessage()); + } + + } + catch (Exception e) + { + logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " with url="+url+ ", Exception: " + e.toString()); + throw e; + + } + } + + public RestObject PostForObject(Object requestDetails, String sourceID, String path, Class clazz) throws RuntimeException { + logger.debug(EELFLoggerDelegate.debugLogger, "start {}->{}({}, {}, {}, {})", getMethodCallerName(), getMethodName(), requestDetails, sourceID, path, clazz); + RestObject restObject = new RestObject<>(); + Post(clazz, requestDetails, sourceID, path, restObject); + return restObject; + } + + @Override + public void Post(T t, Object r, String sourceID, String path, RestObject restObject) throws RuntimeException { + logger.debug(EELFLoggerDelegate.debugLogger, "start {}->{}({}, {}, {}, {})", getMethodCallerName(), getMethodName(), t.getClass(), r, sourceID, path); + Post(t.getClass(), r, sourceID, path, restObject); + } + + public Invocation.Builder prepareClient(String path, String methodName) { + MultivaluedHashMap commonHeaders = initMsoClient(); + + String url = SystemProperties.getProperty(MsoProperties.MSO_SERVER_URL) + path; + logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " sending request to url= " + url); + // Change the content length + return client.target(url) + .request() + .accept("application/json") + .headers(commonHeaders); + } + + + + public void Post(Class tClass, Object requestDetails, String sourceID, String path, RestObject restObject) throws RuntimeException { + String methodName = "Post"; + String url=""; + + try { + + MultivaluedHashMap commonHeaders = initMsoClient(); + + url = SystemProperties.getProperty(MsoProperties.MSO_SERVER_URL) + path; + Logging.logRequest(outgoingRequestsLogger, HttpMethod.POST, url, requestDetails); + // Change the content length + final Response cres = client.target(url) + .request() + .accept("application/json") + .headers(commonHeaders) + .post(Entity.entity(requestDetails, MediaType.APPLICATION_JSON)); + Logging.logResponse(outgoingRequestsLogger, HttpMethod.POST, url, cres); + + final RestObject cresToRestObject = cresToRestObject(cres, tClass); + restObject.set(cresToRestObject.get()); + restObject.setStatusCode(cresToRestObject.getStatusCode()); + restObject.setRaw(cresToRestObject.getRaw()); + + int status = cres.getStatus(); + restObject.setStatusCode (status); + + if ( status >= 200 && status <= 299 ) { + logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + methodName + " REST api POST was successful!"); + logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " REST api POST was successful!"); + + } else { + logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " with status="+status+", url="+url); + } + + } catch (Exception e) + { + logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " with url="+url+ ", Exception: " + e.toString()); + throw e; + + } + + logger.debug(EELFLoggerDelegate.debugLogger, "end {}() => ({}){}", getMethodName(), tClass, restObject); + } + + private RestObject cresToRestObject(Response cres, Class tClass) { + RestObject restObject = new RestObject<>(); + + String rawEntity = null; + try { + cres.bufferEntity(); + rawEntity = cres.readEntity(String.class); + T t = (T) new ObjectMapper().readValue(rawEntity, tClass); + restObject.set(t); + } + catch ( Exception e ) { + try { + restObject.setRaw(rawEntity); + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + getMethodCallerName() + " Error reading response entity as " + tClass + ": , e=" + + e.getMessage() + ", Entity=" + rawEntity); + } catch (Exception e2) { + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + getMethodCallerName() + " No response entity, this is probably ok, e=" + + e.getMessage()); + } + } + + int status = cres.getStatus(); + restObject.setStatusCode (status); + + return restObject; + + } + + @Override + public void Put(T t, org.onap.vid.changeManagement.RequestDetailsWrapper r, String sourceID, String path, RestObject restObject) throws Exception { + + String methodName = "Put"; + String url=""; + + logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " start"); + +// logRequest (r); + try { + + MultivaluedHashMap commonHeaders = initMsoClient(); + + url = SystemProperties.getProperty(MsoProperties.MSO_SERVER_URL) + path; + Logging.logRequest(outgoingRequestsLogger, HttpMethod.PUT, url, r); + // Change the content length + final Response cres = client.target(url) + .request() + .accept("application/json") + .headers(commonHeaders) + //.header("content-length", 201) + //.header("X-FromAppId", sourceID) + .put(Entity.entity(r, MediaType.APPLICATION_JSON)); + + Logging.logResponse(outgoingRequestsLogger, HttpMethod.PUT, url, cres); + + try { + t = (T) cres.readEntity(t.getClass()); + restObject.set(t); + } + catch ( Exception e ) { + logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " No response entity, this is probably ok, e=" + + e.getMessage()); + } + + int status = cres.getStatus(); + restObject.setStatusCode (status); + + if ( status >= 200 && status <= 299 ) { + logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + methodName + " REST api POST was successful!"); + logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " REST api POST was successful!"); + + } else { + logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " with status="+status+", url="+url); + } + + } catch (Exception e) + { + logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " with url="+url+ ", Exception: " + e.toString()); + throw e; + + } + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/RestObject.java b/vid-app-common/src/main/java/org/onap/vid/mso/RestObject.java new file mode 100644 index 000000000..4e2bea050 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/mso/RestObject.java @@ -0,0 +1,131 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.mso; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.google.common.base.MoreObjects; +import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; + +import javax.ws.rs.core.Response; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.Date; + +import static org.onap.vid.utils.Logging.getMethodCallerName; + +/** + * The Class RestObject. + * + * @param the generic type + */ +public class RestObject { + + final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); + + final static ObjectMapper objectMapper = new ObjectMapper(); + + /** + * Generic version of the RestObject class. + * + */ + // T stands for "Type" + private T t; + + // The string source of t, if available + private String rawT; + + /** The status code. */ + private int statusCode= 0; + + public RestObject() { + } + + public RestObject(Response cres, Class tClass, EELFLoggerDelegate logger) { + + String rawEntity = null; + try { + cres.bufferEntity(); + rawEntity = cres.readEntity(String.class); + T t = (T) objectMapper.readValue(rawEntity, tClass); + this.set(t); + } + catch ( Exception e ) { + try { + this.setRaw(rawEntity); + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + getMethodCallerName() + " Error reading response entity as " + tClass + ": , e=" + + e.getMessage() + ", Entity=" + rawEntity); + } catch (Exception e2) { + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + getMethodCallerName() + " No response entity, this is probably ok, e=" + + e.getMessage()); + } + } + + int status = cres.getStatus(); + this.setStatusCode (status); + } + + + /** + * Sets the. + * + * @param t the t + */ + public void set(T t) { this.t = t; } + + /** + * Gets the. + * + * @return the t + */ + public T get() { return t; } + + /** + * Sets the status code. + * + * @param v the new status code + */ + public void setStatusCode(int v) { this.statusCode = v; } + + /** + * Gets the status code. + * + * @return the status code + */ + public int getStatusCode() { return this.statusCode; } + + public String getRaw() { + return rawT; + } + + public void setRaw(String rawT) { + this.rawT = rawT; + } + + @Override + public String toString() { + return MoreObjects.toStringHelper(this) + .add("t", t) + .add("rawT", rawT) + .add("statusCode", statusCode) + .toString(); + } +} + diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/model/OperationalEnvironmentActivateInfo.java b/vid-app-common/src/main/java/org/onap/vid/mso/model/OperationalEnvironmentActivateInfo.java new file mode 100644 index 000000000..bca643a6d --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/mso/model/OperationalEnvironmentActivateInfo.java @@ -0,0 +1,33 @@ +package org.onap.vid.mso.model; + +import com.google.common.base.MoreObjects; +import org.onap.vid.controller.OperationalEnvironmentController; + +public class OperationalEnvironmentActivateInfo extends OperationalEnvironmentController.OperationalEnvironmentActivateBody { + private final String userId; + private final String operationalEnvironmentId; + + public OperationalEnvironmentActivateInfo(OperationalEnvironmentController.OperationalEnvironmentActivateBody o, String userId, String operationalEnvironmentId) { + super(o.getRelatedInstanceId(), o.getRelatedInstanceName(), o.getWorkloadContext(), o.getManifest()); + + this.userId = userId; + this.operationalEnvironmentId = operationalEnvironmentId; + } + + public String getUserId() { + return userId; + } + + public String getOperationalEnvironmentId() { + return operationalEnvironmentId; + } + + @Override + public String toString() { + return MoreObjects.toStringHelper(this) + .add("operationalEnvironmentId", operationalEnvironmentId) + .add("userId", userId) + .add("super", super.toString()) + .toString(); + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/model/OperationalEnvironmentDeactivateInfo.java b/vid-app-common/src/main/java/org/onap/vid/mso/model/OperationalEnvironmentDeactivateInfo.java new file mode 100644 index 000000000..1a756eda8 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/mso/model/OperationalEnvironmentDeactivateInfo.java @@ -0,0 +1,29 @@ +package org.onap.vid.mso.model; + +import com.google.common.base.MoreObjects; + +public class OperationalEnvironmentDeactivateInfo { + private final String userId; + private final String operationalEnvironmentId; + + public OperationalEnvironmentDeactivateInfo(String userId, String operationalEnvironmentId) { + this.userId = userId; + this.operationalEnvironmentId = operationalEnvironmentId; + } + + public String getUserId() { + return userId; + } + + public String getOperationalEnvironmentId() { + return operationalEnvironmentId; + } + + @Override + public String toString() { + return MoreObjects.toStringHelper(this) + .add("operationalEnvironmentId", operationalEnvironmentId) + .add("userId", userId) + .toString(); + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/rest/AsyncRequestStatus.java b/vid-app-common/src/main/java/org/onap/vid/mso/rest/AsyncRequestStatus.java new file mode 100644 index 000000000..f47e16fe0 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/mso/rest/AsyncRequestStatus.java @@ -0,0 +1,123 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.mso.rest; + +//import java.util.HashMap; +//import java.util.Map; +//import javax.annotation.Generated; + +import org.onap.vid.domain.mso.InstanceIds; +import org.onap.vid.domain.mso.RequestStatus; +//import com.fasterxml.jackson.annotation.JsonAnyGetter; +//import com.fasterxml.jackson.annotation.JsonAnySetter; +//import com.fasterxml.jackson.annotation.JsonCreator; +//import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +//import com.fasterxml.jackson.annotation.JsonPropertyOrder; +//import com.fasterxml.jackson.annotation.JsonValue; +import org.apache.commons.lang.builder.EqualsBuilder; +import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang.builder.ToStringBuilder; + + +/** + * request structure. + */ +@JsonInclude(JsonInclude.Include.NON_NULL) + +public class AsyncRequestStatus extends org.onap.vid.domain.mso.AsyncRequestStatus { + + + /** The instance ids. */ + private InstanceIds instanceIds; + + /** The request status. */ + private RequestStatus requestStatus; + + /* (non-Javadoc) + * @see org.openecomp.vid.domain.mso.AsyncRequestStatus#getInstanceIds() + */ + public InstanceIds getInstanceIds() { + return instanceIds; + } + + /** + * Sets the instance ids. + * + * @param instanceIds the new instance ids + */ + public void setInstanceIds(InstanceIds instanceIds) { + this.instanceIds = instanceIds; + } + + + /** + * (Required). + * + * @return The requestStatus + */ + @JsonProperty("requestStatus") + public RequestStatus getRequestStatus() { + return requestStatus; + } + + /** + * (Required). + * + * @param requestStatus The requestStatus + */ + @JsonProperty("requestStatus") + public void setRequestStatus(RequestStatus requestStatus) { + this.requestStatus = requestStatus; + } + + /* (non-Javadoc) + * @see org.openecomp.vid.domain.mso.AsyncRequestStatus#toString() + */ + @Override + public String toString() { + return ToStringBuilder.reflectionToString(this); + } + + /* (non-Javadoc) + * @see org.openecomp.vid.domain.mso.AsyncRequestStatus#hashCode() + */ + @Override + public int hashCode() { + return new HashCodeBuilder().append(getCorrelator()).append(getFinishTime()).append(instanceIds).append(getRequestId()).append(getRequestScope()).append(getRequestStatus()).append(getRequestType()).append(getStartTime()).append(getAdditionalProperties()).toHashCode(); + } + + /* (non-Javadoc) + * @see org.openecomp.vid.domain.mso.AsyncRequestStatus#equals(java.lang.Object) + */ + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof AsyncRequestStatus) == false) { + return false; + } + AsyncRequestStatus rhs = ((AsyncRequestStatus) other); + return new EqualsBuilder().append(getCorrelator(), rhs.getCorrelator()).append(getFinishTime(), rhs.getFinishTime()).append(instanceIds, rhs.instanceIds).append(getRequestId(), rhs.getRequestId()).append(getRequestScope(), rhs.getRequestScope()).append(getRequestStatus(), rhs.getRequestStatus()).append(getRequestType(), rhs.getRequestType()).append(getStartTime(), rhs.getStartTime()).append(getAdditionalProperties(), rhs.getAdditionalProperties()).isEquals(); + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/rest/MsoRestClientNew.java b/vid-app-common/src/main/java/org/onap/vid/mso/rest/MsoRestClientNew.java new file mode 100644 index 000000000..9bb54035d --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/mso/rest/MsoRestClientNew.java @@ -0,0 +1,435 @@ +package org.onap.vid.mso.rest; + +import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.vid.changeManagement.MsoRequestDetails; +import org.onap.vid.changeManagement.RequestDetailsWrapper; +import org.onap.vid.model.RequestReferencesContainer; +import org.onap.vid.mso.*; + +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.Date; + + +/** + * Created by pickjonathan on 21/06/2017. + */ +public class MsoRestClientNew extends RestMsoImplementation implements MsoInterface { + + /** + * The Constant dateFormat. + */ + final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); + private final String ORIGINAL_REQUEST_ID = "originalRequestId"; + /** + * The logger. + */ + EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(MsoRestClientNew.class); + + @Override + public MsoResponseWrapper createSvcInstance(RequestDetails requestDetails, String endpoint) throws Exception { + String methodName = "createSvcInstance "; + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + return createInstance(requestDetails, endpoint); + } + + @Override + public MsoResponseWrapper createVnf(RequestDetails requestDetails, String endpoint) throws Exception { + + String methodName = "createVnf"; + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + return createInstance(requestDetails, endpoint); + } + + @Override + public MsoResponseWrapper createNwInstance(RequestDetails requestDetails, String endpoint) throws Exception { + + String methodName = "createNwInstance"; + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + return createInstance(requestDetails, endpoint); + } + + @Override + public MsoResponseWrapper createVolumeGroupInstance(RequestDetails requestDetails, String endpoint) throws Exception { + String methodName = "createVolumeGroupInstance"; + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + return createInstance(requestDetails, endpoint); + } + + @Override + public MsoResponseWrapper createVfModuleInstance(RequestDetails requestDetails, String endpoint) throws Exception { + String methodName = "createVfModuleInstance"; + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + return createInstance(requestDetails, endpoint); + } + + @Override + public MsoResponseWrapper createConfigurationInstance(RequestDetails requestDetails, String endpoint) throws Exception { + String methodName = "createConfigurationInstance"; + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + return createInstance(requestDetails, endpoint); + } + + @Override + public MsoResponseWrapper deleteSvcInstance(RequestDetails requestDetails, String endpoint) throws Exception { + String methodName = "deleteSvcInstance"; + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + return deleteInstance(requestDetails, endpoint); + } + + @Override + public MsoResponseWrapper deleteVnf(RequestDetails requestDetails, String endpoint) throws Exception { + String methodName = "deleteVnf"; + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + return deleteInstance(requestDetails, endpoint); + } + + @Override + public MsoResponseWrapper deleteVfModule(RequestDetails requestDetails, String endpoint) throws Exception { + String methodName = "deleteVfModule"; + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + return deleteInstance(requestDetails, endpoint); + } + + @Override + public MsoResponseWrapper deleteVolumeGroupInstance(RequestDetails requestDetails, String endpoint) throws Exception { + String methodName = "deleteVolumeGroupInstance"; + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + return deleteInstance(requestDetails, endpoint); + } + + @Override + public MsoResponseWrapper deleteNwInstance(RequestDetails requestDetails, String endpoint) throws Exception { + String methodName = "deleteNwInstance"; + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + return deleteInstance(requestDetails, endpoint); + } + + @Override + public void getOrchestrationRequest(String t, String sourceId, String endpoint, RestObject restObject) throws Exception { + Get(t, sourceId, endpoint, restObject); + } + + public void getManualTasks(String t, String sourceId, String endpoint, RestObject restObject) throws Exception { + Get(t, sourceId, endpoint, restObject); + } + + + public MsoResponseWrapper createInstance(RequestDetails request, String path) throws Exception { + String methodName = "createInstance"; + logger.debug(dateFormat.format(new Date()) + "<== " + methodName + " start"); + + try { + RestObject restObjStr = new RestObject(); + + String str = new String(); + + restObjStr.set(str); + + Post(str, request, "", path, restObjStr); + MsoResponseWrapper w = MsoUtil.wrapResponse(restObjStr); + + return w; + } catch (Exception e) { + logger.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); + throw e; + } + } + + + /** + * Delete instance. + * + * @param request the request + * @param path the path + * @return the mso response wrapper + * @throws Exception the exception + */ + public MsoResponseWrapper deleteInstance(RequestDetails request, String path) throws Exception { + String methodName = "deleteInstance"; + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + try { + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " calling Delete, path =[" + path + "]"); + + RestObject restObjStr = new RestObject(); + String str = new String(); + restObjStr.set(str); + Delete(str, request, "", path, restObjStr); + MsoResponseWrapper w = MsoUtil.wrapResponse(restObjStr); + + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " w=" + w.getResponse()); + return w; + + } catch (Exception e) { + logger.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); + throw e; + } + + } + + public MsoResponseWrapper getOrchestrationRequestsForDashboard(String t, String sourceId, String endpoint, RestObject restObject) throws Exception { + String methodName = "getOrchestrationRequestsForDashboard"; + logger.debug(dateFormat.format(new Date()) + "<== " + methodName + " start"); + + try { + getOrchestrationRequest(t, sourceId, endpoint, restObject); + MsoResponseWrapper w = MsoUtil.wrapResponse(restObject); + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " w=" + w.getResponse()); + + return w; + + } catch (Exception e) { + logger.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); + throw e; + } + } + + public MsoResponseWrapper getManualTasksByRequestId(String t, String sourceId, String endpoint, RestObject restObject) throws Exception { + String methodName = "getManualTasksByRequestId"; + logger.debug(dateFormat.format(new Date()) + "<== " + methodName + " start"); + + try { + getManualTasks(t, sourceId, endpoint, restObject); + MsoResponseWrapper w = MsoUtil.wrapResponse(restObject); + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " w=" + w.getResponse()); + + return MsoUtil.wrapResponse(restObject); + + } catch (Exception e) { + logger.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); + throw e; + } + } + + + @Override + public MsoResponseWrapper completeManualTask(RequestDetails requestDetails, String t, String sourceId, String endpoint, RestObject restObject) throws Exception { + String methodName = "completeManualTask"; + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " calling Complete "); + try { + + Post(t, requestDetails, sourceId, endpoint, restObject); + MsoResponseWrapper w = MsoUtil.wrapResponse(restObject); + + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " w=" + w.getResponse()); + return w; + + } catch (Exception e) { + logger.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); + throw e; + } + } + + @Override + public MsoResponseWrapper replaceVnf(org.onap.vid.changeManagement.RequestDetails requestDetails, String endpoint) throws Exception { + String methodName = "replaceVnf"; + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + return replaceInstance(requestDetails, endpoint); + } + + @Override + public MsoResponseWrapper deleteConfiguration(RequestDetails requestDetails, String pmc_endpoint) + throws Exception { + String methodName = "deleteConfiguration"; + logger.debug(EELFLoggerDelegate.debugLogger, + dateFormat.format(new Date()) + "<== " + methodName + " start"); + + return deleteInstance(requestDetails, pmc_endpoint); + } + + @Override + public MsoResponseWrapper setConfigurationActiveStatus(RequestDetails request, String path) throws Exception { + String methodName = "setConfigurationActiveStatus"; + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + try { + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " calling change configuration active status, path =[" + path + "]"); + + RestObject restObjStr = new RestObject(); + String str = new String(); + restObjStr.set(str); + Post(str, request, "", path, restObjStr); + MsoResponseWrapper msoResponseWrapperObject = MsoUtil.wrapResponse(restObjStr); + + return msoResponseWrapperObject; + } catch (Exception e) { + logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); + throw e; + } + } + + @Override + public MsoResponseWrapper setPortOnConfigurationStatus(RequestDetails request, String path) throws Exception { + String methodName = "setPortOnConfigurationStatus"; + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + try { + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " calling change port configuration status, path =[" + path + "]"); + + RestObject restObjStr = new RestObject(); + String str = new String(); + restObjStr.set(str); + Post(str, request, "", path, restObjStr); + MsoResponseWrapper msoResponseWrapperObject = MsoUtil.wrapResponse(restObjStr); + + return msoResponseWrapperObject; + } catch (Exception e) { + logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); + throw e; + } + } + + @Override + public MsoResponseWrapperInterface changeManagementUpdate(RequestDetailsWrapper requestDetails, String endpoint) throws Exception { + RestObject msoResponse = PostForObject(requestDetails, "", endpoint, RequestReferencesContainer.class); + return new MsoResponseWrapper2<>(msoResponse); + } + + public MsoResponseWrapper replaceInstance(org.onap.vid.changeManagement.RequestDetails request, String path) throws Exception { + String methodName = "replaceInstance"; + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + try { + + + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " calling Replace VNF, path =[" + path + "]"); + RestObject restObjStr = new RestObject(); + String str = new String(); + restObjStr.set(str); + RequestDetailsWrapper requestDetailsWrapper = new RequestDetailsWrapper(); + requestDetailsWrapper.requestDetails = new MsoRequestDetails(request); + + Post(str, requestDetailsWrapper, "", path, restObjStr); + MsoResponseWrapper msoResponseWrapperObject = MsoUtil.wrapResponse(restObjStr); + int status = msoResponseWrapperObject.getStatus(); + if (status == 202) { + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + + ",post succeeded, msoResponseWrapperObject response:" + msoResponseWrapperObject.getResponse()); + } else { + logger.error(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + + ": post failed, msoResponseWrapperObject status" + status + ", response:" + msoResponseWrapperObject.getResponse()); + + // TODO + } + return msoResponseWrapperObject; + + } catch (Exception e) { + logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); + throw e; + } + + } + + @Override + public MsoResponseWrapper updateVnf(org.onap.vid.changeManagement.RequestDetails requestDetails, String endpoint) throws Exception { + String methodName = "updateVnf"; + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + RequestDetailsWrapper wrapper = new RequestDetailsWrapper(); + wrapper.requestDetails = new MsoRequestDetails(requestDetails); + return updateInstance(requestDetails, endpoint); + } + + public MsoResponseWrapper updateInstance(org.onap.vid.changeManagement.RequestDetails request, String path) throws Exception { + String methodName = "updateInstance"; + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + try { + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " calling Delete, path =[" + path + "]"); + RestObject restObjStr = new RestObject(); + String str = new String(); + restObjStr.set(str); + RequestDetailsWrapper requestDetailsWrapper = new RequestDetailsWrapper(); + requestDetailsWrapper.requestDetails = new MsoRequestDetails(request); + Put(str, requestDetailsWrapper, "", path, restObjStr); + MsoResponseWrapper w = MsoUtil.wrapResponse(restObjStr); + + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " w=" + w.getResponse()); + return w; + + } catch (Exception e) { + logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); + throw e; + } + + } + + public void setServiceInstanceStatus(RequestDetails requestDetails, String t, String sourceId, String endpoint, RestObject restObject) throws Exception { + String methodName = "activateServiceInstance"; + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start "); + try { + + Post(t, requestDetails, sourceId, endpoint, restObject); + MsoResponseWrapper w = MsoUtil.wrapResponse(restObject); + + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " w =" + w.getResponse()); + + } catch (Exception e) { + logger.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); + throw e; + } + } + + @Override + public MsoResponseWrapper removeRelationshipFromServiceInstance(RequestDetails requestDetails, String endpoint) throws Exception { + String methodName = "removeRelationshipFromServiceInstance"; + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + try { + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " calling Remove relationship from service instance, path =[" + endpoint + "]"); + + RestObject restObjStr = new RestObject(); + String str = ""; + restObjStr.set(str); + Post(str, requestDetails, "", endpoint, restObjStr); + + return MsoUtil.wrapResponse(restObjStr); + } catch (Exception e) { + logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); + throw e; + } + } + + @Override + public MsoResponseWrapper addRelationshipToServiceInstance(RequestDetails requestDetails, String addRelationshipsPath) throws Exception { + String methodName = "addRelationshipToServiceInstance"; + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); + + try { + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " calling Add relationship to service instance, path =[" + addRelationshipsPath + "]"); + + RestObject restObjStr = new RestObject<>(); + restObjStr.set(""); + Post("", requestDetails, "", addRelationshipsPath, restObjStr); + + return MsoUtil.wrapResponse(restObjStr); + } catch (Exception e) { + logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); + throw e; + } + } + +} \ No newline at end of file diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/rest/OperationalEnvironment/OperationEnvironmentRequestDetails.java b/vid-app-common/src/main/java/org/onap/vid/mso/rest/OperationalEnvironment/OperationEnvironmentRequestDetails.java new file mode 100644 index 000000000..2f6d233c2 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/mso/rest/OperationalEnvironment/OperationEnvironmentRequestDetails.java @@ -0,0 +1,120 @@ +package org.onap.vid.mso.rest.OperationalEnvironment; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +import java.util.List; + +public class OperationEnvironmentRequestDetails { + private final RequestInfo requestInfo; + private final List relatedInstanceList; + private final RequestParameters requestParameters; + + public OperationEnvironmentRequestDetails(@JsonProperty(value = "requestInfo", required = true) RequestInfo requestInfo, + @JsonProperty(value = "relatedInstanceList", required = true) List relatedInstanceList, + @JsonProperty(value = "requestParameters", required = true) RequestParameters requestParameters) { + this.requestInfo = requestInfo; + this.relatedInstanceList = relatedInstanceList; + this.requestParameters = requestParameters; + } + + public RequestInfo getRequestInfo() { + return requestInfo; + } + + public List getRelatedInstanceList() { + return relatedInstanceList; + } + + public RequestParameters getRequestParameters() { + return requestParameters; + } + + public static class RequestInfo { + private final String resourceType; + private final String instanceName; + private final String source; + private final String requestorId; + + public RequestInfo(@JsonProperty(value = "resourceType", required = true) String resourceType, + @JsonProperty(value = "instanceName", required = true) String instanceName, + @JsonProperty(value = "source", required = true) String source, + @JsonProperty(value = "requestorId", required = true) String requestorId) { + this.resourceType = resourceType; + this.instanceName = instanceName; + this.source = source; + this.requestorId = requestorId; + } + + public String getResourceType() { + return resourceType; + } + + public String getInstanceName() { + return instanceName; + } + + public String getSource() { + return source; + } + + public String getRequestorId() { + return requestorId; + } + } + + public static class RequestParameters { + private final String operationalEnvironmentType; + private final String tenantContext; + private final String workloadContext; + + public RequestParameters(@JsonProperty(value = "operationalEnvironmentType", required = true) String operationalEnvironmentType, + @JsonProperty(value = "tenantContext", required = true) String tenantContext, + @JsonProperty(value = "workloadContext", required = true) String workloadContext) { + this.operationalEnvironmentType = operationalEnvironmentType; + this.tenantContext = tenantContext; + this.workloadContext = workloadContext; + } + public String getOperationalEnvironmentType() { + return operationalEnvironmentType; + } + + public String getTenantContext() { + return tenantContext; + } + + public String getWorkloadContext() { + return workloadContext; + } + } + + @JsonTypeName("relatedInstance") + @JsonTypeInfo(include = JsonTypeInfo.As.WRAPPER_OBJECT, use = JsonTypeInfo.Id.NAME) + public static class RelatedInstance { + private final String resourceType; + private final String instanceId; + private final String instanceName; + + public String getResourceType() { + return resourceType; + } + + public String getInstanceId() { + return instanceId; + } + + public String getInstanceName() { + return instanceName; + } + + public RelatedInstance(@JsonProperty(value = "instanceName", required = true) String resourceType, + @JsonProperty(value = "instanceId", required = true) String instanceId, + @JsonProperty(value = "instanceName", required = true) String instanceName) { + this.resourceType = resourceType; + this.instanceId = instanceId; + this.instanceName = instanceName; + } + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/rest/RelatedInstance.java b/vid-app-common/src/main/java/org/onap/vid/mso/rest/RelatedInstance.java new file mode 100644 index 000000000..b7f120330 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/mso/rest/RelatedInstance.java @@ -0,0 +1,125 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.mso.rest; + +import java.util.HashMap; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.apache.commons.lang.builder.EqualsBuilder; +import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang.builder.ToStringBuilder; + + +/** + * modelInfo and optional instanceId and instanceName for a model related to the modelInfo being operated on. + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("org.jsonschema2pojo") +@JsonPropertyOrder({ + "instanceName", + "instanceId", + "modelInfo" +}) +public class RelatedInstance extends org.onap.vid.domain.mso.RelatedInstance{ + + + /** The model info. */ + @JsonProperty("modelInfo") + private org.onap.vid.domain.mso.ModelInfo modelInfo; + + /** The additional properties. */ + @JsonIgnore + private Map additionalProperties = new HashMap(); + + /** + * (Required). + * + * @return The modelInfo + */ + @JsonProperty("modelInfo") + public org.onap.vid.domain.mso.ModelInfo getModelInfo() { + return modelInfo; + } + + /** + * (Required). + * + * @param modelInfo The modelInfo + */ + @JsonProperty("modelInfo") + public void setModelInfo(org.onap.vid.domain.mso.ModelInfo modelInfo) { + this.modelInfo = modelInfo; + } + + /* (non-Javadoc) + * @see org.openecomp.vid.domain.mso.RelatedInstance#toString() + */ + @Override + public String toString() { + return ToStringBuilder.reflectionToString(this); + } + + /* (non-Javadoc) + * @see org.openecomp.vid.domain.mso.RelatedInstance#getAdditionalProperties() + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + /* (non-Javadoc) + * @see org.openecomp.vid.domain.mso.RelatedInstance#setAdditionalProperty(java.lang.String, java.lang.Object) + */ + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + /* (non-Javadoc) + * @see org.openecomp.vid.domain.mso.RelatedInstance#hashCode() + */ + @Override + public int hashCode() { + return new HashCodeBuilder().append(getInstanceName()).append(getInstanceId()).append(modelInfo).append(additionalProperties).toHashCode(); + } + + /* (non-Javadoc) + * @see org.openecomp.vid.domain.mso.RelatedInstance#equals(java.lang.Object) + */ + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof RelatedInstance) == false) { + return false; + } + RelatedInstance rhs = ((RelatedInstance) other); + return new EqualsBuilder().append(getInstanceName(), rhs.getInstanceName()).append(getInstanceId(), rhs.getInstanceId()).append(modelInfo, rhs.getModelInfo()).append(additionalProperties, rhs.additionalProperties).isEquals(); + } + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/rest/RelatedModel.java b/vid-app-common/src/main/java/org/onap/vid/mso/rest/RelatedModel.java new file mode 100644 index 000000000..39722e172 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/mso/rest/RelatedModel.java @@ -0,0 +1,125 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.mso.rest; + +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.apache.commons.lang.builder.EqualsBuilder; +import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang.builder.ToStringBuilder; + + +/** + * modelInfo and optional instance id for a model related to the modelInfo being operated on. + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "instanceId", + "modelInfo" +}) +public class RelatedModel extends org.onap.vid.domain.mso.RelatedModel { + + /** (Required). */ + @JsonProperty("modelInfo") + private org.onap.vid.domain.mso.ModelInfo modelInfo; + +// /** The related model object instance list. */ +// @JsonProperty("instanceId") +// private org.openecomp.vid.domain.mso.InstanceIds instanceId; + + /** The additional properties. */ + @JsonIgnore + private Map additionalProperties = new HashMap(); + + /** + * (Required). + * + * @return The modelInfo + */ + @JsonProperty("modelInfo") + public org.onap.vid.domain.mso.ModelInfo getModelInfo() { + return modelInfo; + } + + /** + * (Required). + * + * @param modelInfo The modelInfo + */ + @JsonProperty("modelInfo") + public void setModelInfo(org.onap.vid.domain.mso.ModelInfo modelInfo) { + this.modelInfo = modelInfo; + } + + /* (non-Javadoc) + * @see org.openecomp.vid.domain.mso.RelatedModel#toString() + */ + @Override + public String toString() { + return ToStringBuilder.reflectionToString(this); + } + + /* (non-Javadoc) + * @see org.openecomp.vid.domain.mso.RelatedModel#getAdditionalProperties() + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + /* (non-Javadoc) + * @see org.openecomp.vid.domain.mso.RelatedModel#setAdditionalProperty(java.lang.String, java.lang.Object) + */ + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + /* (non-Javadoc) + * @see org.openecomp.vid.domain.mso.RelatedModel#hashCode() + */ + @Override + public int hashCode() { + return new HashCodeBuilder().append(getInstanceId()).append(modelInfo).append(additionalProperties).toHashCode(); + } + + /* (non-Javadoc) + * @see org.openecomp.vid.domain.mso.RelatedModel#equals(java.lang.Object) + */ + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof RelatedModel) == false) { + return false; + } + RelatedModel rhs = ((RelatedModel) other); + return new EqualsBuilder().append(getInstanceId(), rhs.getInstanceId()).append(modelInfo, rhs.modelInfo).append(additionalProperties, rhs.additionalProperties).isEquals(); + } + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/rest/Request.java b/vid-app-common/src/main/java/org/onap/vid/mso/rest/Request.java new file mode 100644 index 000000000..b1a84ab29 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/mso/rest/Request.java @@ -0,0 +1,146 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.mso.rest; + +//import java.util.HashMap; +//import java.util.Map; +//import javax.annotation.Generated; + +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.onap.vid.domain.mso.InstanceIds; +import org.onap.vid.domain.mso.RequestStatus; +//import com.fasterxml.jackson.annotation.JsonAnyGetter; +//import com.fasterxml.jackson.annotation.JsonAnySetter; +//import com.fasterxml.jackson.annotation.JsonCreator; +//import com.fasterxml.jackson.annotation.JsonIgnore; +//import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +//import com.fasterxml.jackson.annotation.JsonPropertyOrder; +//import com.fasterxml.jackson.annotation.JsonValue; +import org.apache.commons.lang.builder.EqualsBuilder; +//import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang.builder.ToStringBuilder; + + +/** + * request structure. + */ +public class Request extends org.onap.vid.domain.mso.Request { + + + /** The instance ids. */ + private InstanceIds instanceIds; + + /** The request details. */ + private RequestDetails requestDetails; + + /** The request status. */ + private RequestStatus requestStatus; + + + /* (non-Javadoc) + * @see org.openecomp.vid.domain.mso.Request#getInstanceIds() + */ + @JsonProperty("instanceIds") + public InstanceIds getInstanceIds() { + return instanceIds; + } + + /** + * Sets the instance ids. + * + * @param instanceIds The instanceIds + */ + @JsonProperty("instanceIds") + public void setInstanceIds(InstanceIds instanceIds) { + this.instanceIds = instanceIds; + } + + /** + * (Required). + * + * @return The requestDetails + */ + @JsonProperty("requestDetails") + public RequestDetails getRequestDetails() { + return requestDetails; + } + + /** + * (Required). + * + * @param requestDetails The requestDetails + */ + @JsonProperty("requestDetails") + public void setRequestDetails(RequestDetails requestDetails) { + this.requestDetails = requestDetails; + } + + + /** + * Gets the request status. + * + * @return The requestStatus + */ + @JsonProperty("requestStatus") + public RequestStatus getRequestStatus() { + return requestStatus; + } + + /** + * Sets the request status. + * + * @param requestStatus The requestStatus + */ + @JsonProperty("requestStatus") + public void setRequestStatus(RequestStatus requestStatus) { + this.requestStatus = requestStatus; + } + + + /* (non-Javadoc) + * @see org.openecomp.vid.domain.mso.Request#toString() + */ + @Override + public String toString() { + return ToStringBuilder.reflectionToString(this); + } + + /* (non-Javadoc) + * @see org.openecomp.vid.domain.mso.Request#equals(java.lang.Object) + */ + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof Request) == false) { + return false; + } + Request rhs = ((Request) other); + return new EqualsBuilder().append(getFinishTime(), rhs.getFinishTime()).append(getInstanceIds(), rhs.getInstanceIds()).append(getRequestDetails(), rhs.getRequestDetails()).append(getRequestId(), rhs.getRequestId()).append(getRequestScope(), rhs.getRequestScope()).append(getRequestStatus(), rhs.getRequestStatus()).append(getRequestType(), rhs.getRequestType()).append(getStartTime(), rhs.getStartTime()).append(getAdditionalProperties(), rhs.getAdditionalProperties()).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(getFinishTime()).append(getInstanceIds()).append(getRequestDetails()).append(getRequestId()).append(getRequestScope()).append(getRequestStatus()).append(getRequestType()).append(getStartTime()).append(getAdditionalProperties()).toHashCode(); + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/rest/RequestDetails.java b/vid-app-common/src/main/java/org/onap/vid/mso/rest/RequestDetails.java new file mode 100644 index 000000000..1e059896f --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/mso/rest/RequestDetails.java @@ -0,0 +1,235 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.mso.rest; + +import java.util.HashMap; +import java.util.Map; +import java.util.List; + +import org.onap.vid.domain.mso.*; +import org.onap.vid.domain.mso.SubscriberInfo; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.apache.commons.lang.builder.EqualsBuilder; +import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang.builder.ToStringBuilder; + + +/** + * aggregates the context, configuraiton and detailed parameters associated with the request into a single structure. + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "cloudConfiguration", + "modelInfo", + "relatedModelList", + "requestInfo", + "subscriberInfo", + "requestParameters" +}) +public class RequestDetails{ + + /** The cloud configuration. */ + @JsonProperty("cloudConfiguration") + private CloudConfiguration cloudConfiguration; + + /** The model info. */ + @JsonProperty("modelInfo") + private ModelInfo modelInfo; + + /** The related model list. */ + @JsonProperty("relatedModelList") + private List relatedInstanceList; + + /** The request info. */ + @JsonProperty("requestInfo") + private RequestInfo requestInfo; + + /** The subscriber info. */ + @JsonProperty("subscriberInfo") + private SubscriberInfo subscriberInfo; + + /** The request parameters. */ + @JsonProperty("requestParameters") + private RequestParameters requestParameters; + + /** The additional properties. */ + @JsonIgnore + private Map additionalProperties = new HashMap(); + + /** + * Gets the cloud configuration. + * + * @return The cloudConfiguration + */ + @JsonProperty("cloudConfiguration") + public CloudConfiguration getCloudConfiguration() { + return cloudConfiguration; + } + + /** + * Sets the cloud configuration. + * + * @param cloudConfiguration The cloudConfiguration + */ + @JsonProperty("cloudConfiguration") + public void setCloudConfiguration(CloudConfiguration cloudConfiguration) { + this.cloudConfiguration = cloudConfiguration; + } + + /** + * Gets the model info. + * + * @return The modelInfo + */ + @JsonProperty("modelInfo") + public ModelInfo getModelInfo() { + return modelInfo; + } + + /** + * Sets the model info. + * + * @param modelInfo The modelInfo + */ + @JsonProperty("modelInfo") + public void setModelInfo(ModelInfo modelInfo) { + this.modelInfo = modelInfo; + } + /** + * Gets the related instance list. + * + * @return The relatedInstanceList + */ + @JsonProperty("relatedInstanceList") + public List getRelatedInstanceList() { + return relatedInstanceList; + } + + /** + * Sets the related model list. + * + * @param relatedInstanceList The relatedInstanceList + */ + @JsonProperty("relatedInstanceList") + public void setRelatedInstanceList( List relatedInstanceList) { + this.relatedInstanceList = relatedInstanceList; + } + + /** + * Gets the request info. + * + * @return The requestInfo + */ + @JsonProperty("requestInfo") + public RequestInfo getRequestInfo() { + return requestInfo; + } + + /** + * Sets the request info. + * + * @param requestInfo The requestInfo + */ + @JsonProperty("requestInfo") + public void setRequestInfo(RequestInfo requestInfo) { + this.requestInfo = requestInfo; + } + + /** + * Gets the subscriber info. + * + * @return The subscriberInfo + */ + @JsonProperty("subscriberInfo") + public SubscriberInfo getSubscriberInfo() { + return subscriberInfo; + } + + /** + * Sets the subscriber info. + * + * @param subscriberInfo The subscriberInfo + */ + @JsonProperty("subscriberInfo") + public void setSubscriberInfo(SubscriberInfo subscriberInfo) { + this.subscriberInfo = subscriberInfo; + } + + /* (non-Javadoc) + * @see org.openecomp.vid.domain.mso.RequestDetails#toString() + */ + @Override + public String toString() { + return ToStringBuilder.reflectionToString(this); + } + + /* (non-Javadoc) + * @see org.openecomp.vid.domain.mso.RequestDetails#getAdditionalProperties() + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + /* (non-Javadoc) + * @see org.openecomp.vid.domain.mso.RequestDetails#setAdditionalProperty(java.lang.String, java.lang.Object) + */ + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + /* (non-Javadoc) + * @see org.openecomp.vid.domain.mso.RequestDetails#hashCode() + */ + @Override + public int hashCode() { + return new HashCodeBuilder().append(cloudConfiguration).append(modelInfo).append(relatedInstanceList).append(requestInfo).append(getRequestParameters()).append(subscriberInfo).append(additionalProperties).toHashCode(); + } + + /* (non-Javadoc) + * @see org.openecomp.vid.domain.mso.RequestDetails#equals(java.lang.Object) + */ + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof RequestDetails) == false) { + return false; + } + RequestDetails rhs = ((RequestDetails) other); + return new EqualsBuilder().append(cloudConfiguration, rhs.cloudConfiguration).append(modelInfo, rhs.modelInfo).append(relatedInstanceList, rhs.relatedInstanceList).append(requestInfo, rhs.requestInfo).append(getRequestParameters(), rhs.getRequestParameters()).append(subscriberInfo, rhs.subscriberInfo).append(additionalProperties, rhs.additionalProperties).isEquals(); + } + + public RequestParameters getRequestParameters() { + return requestParameters; + } + + public void setRequestParameters(RequestParameters requestParameters) { + this.requestParameters = requestParameters; + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/rest/RequestList.java b/vid-app-common/src/main/java/org/onap/vid/mso/rest/RequestList.java new file mode 100644 index 000000000..8f8272c07 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/mso/rest/RequestList.java @@ -0,0 +1,137 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.mso.rest; + +import java.util.HashMap; +import java.util.Map; + +import javax.annotation.Generated; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +//import com.fasterxml.jackson.annotation.JsonInclude; +//import com.fasterxml.jackson.annotation.JsonProperty; +//import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.apache.commons.lang.builder.EqualsBuilder; +import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang.builder.ToStringBuilder; +import java.util.List; + +/** + * List of relatedModel structures that are related to a modelInfo being operated on. + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("org.jsonschema2pojo") +@JsonPropertyOrder({ + "finishTime", + "instanceIds", + "requestDetails", + "requestId", + "requestScope", + "requestStatus", + "requestType", + "startTime" +}) + +public class RequestList { + + /** The request list. */ + private List requestList; + + /** The additional properties. */ + @JsonIgnore + private Map additionalProperties = new HashMap(); + + /** + * (Required). + * + * @return The RelatedModel List + */ + public List getRequestList() { + return requestList; + } + + /** + * Sets the request list. + * + * @param l the new request list + */ + public void setRequestList(List l) { + this.requestList = l; + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return ToStringBuilder.reflectionToString(this); + } + + /** + * Gets the additional properties. + * + * @return the additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + /** + * Sets the additional property. + * + * @param name the name + * @param value the value + */ + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + /* (non-Javadoc) + * @see java.lang.Object#hashCode() + */ + @Override + public int hashCode() { + return new HashCodeBuilder().append(getRequestList()).append(additionalProperties).toHashCode(); + } + + /* (non-Javadoc) + * @see java.lang.Object#equals(java.lang.Object) + */ + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof RequestList) == false) { + return false; + } + RequestList rhs = ((RequestList) other); + return new EqualsBuilder().append(getRequestList(), rhs.getRequestList()).append(additionalProperties, rhs.additionalProperties).isEquals(); + } + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/rest/RequestWrapper.java b/vid-app-common/src/main/java/org/onap/vid/mso/rest/RequestWrapper.java new file mode 100644 index 000000000..c93d0e563 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/mso/rest/RequestWrapper.java @@ -0,0 +1,35 @@ +package org.onap.vid.mso.rest; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * request wrapper structure. + */ +public class RequestWrapper { + + + /** The request. */ + private Request request; + + + /** + * Gets the request. + * + * @return The requestDetails + */ + @JsonProperty("request") + public Request getRequest() { + return request; + } + + /** + * Sets the request. + * + * @param request The request + */ + @JsonProperty + public void setRequest(Request request) { + this.request = request; + } + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/rest/Response.java b/vid-app-common/src/main/java/org/onap/vid/mso/rest/Response.java new file mode 100644 index 000000000..ee074f38d --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/mso/rest/Response.java @@ -0,0 +1,54 @@ +package org.onap.vid.mso.rest; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class Response { + + /** The status. */ + private int status; + + /** The entity. */ + private RequestList entity; + + /** + * Gets the status. + * + * @return The status + */ + @JsonProperty("status") + public int getStatus() { + return status; + } + + /** + * Sets the status. + * + * @param status The status + */ + @JsonProperty("status") + public void setStatus(int status) { + this.status = status; + } + + /** + * Gets the entity. + * + * @return The entity + */ + @JsonProperty("entity") + public RequestList getEntity() { + return entity; + } + + /** + * Sets the entity. + * + * @param entity The entity + */ + @JsonProperty("entity") + public void setEntity(RequestList entity) { + this.entity = entity; + } + + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/rest/RestInterface.java b/vid-app-common/src/main/java/org/onap/vid/mso/rest/RestInterface.java new file mode 100644 index 000000000..9fc95fcec --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/mso/rest/RestInterface.java @@ -0,0 +1,68 @@ +package org.onap.vid.mso.rest; + +import org.onap.vid.mso.RestObject; + +import javax.ws.rs.core.MultivaluedHashMap; + +/** + * Created by pickjonathan on 26/06/2017. + */ +public interface RestInterface { + + /** + * Inits the rest client. + */ + MultivaluedHashMap initMsoClient(); + + /** + * Gets the. + * + * @param the generic type + * @param t the t + * @param sourceId the source id + * @param path the path + * @param restObject the rest object + * @throws Exception the exception + */ + void Get (T t, String sourceId, String path, RestObject restObject ) throws Exception; + + /** + * Delete. + * + * @param the generic type + * @param t the t + * @param r the r + * @param sourceID the source ID + * @param path the path + * @param restObject the rest object + * @throws Exception the exception + */ + void Delete(T t, RequestDetails r, String sourceID, String path, RestObject restObject) throws Exception; + + /** + * Post. + * + * @param the generic type + * @param t the t + * @param r the r + * @param sourceID the source ID + * @param path the path + * @param restObject the rest object + * @throws Exception the exception + */ + void Post(T t, Object r, String sourceID, String path, RestObject restObject) throws Exception; + + /** + * Put. + * + * @param the generic type + * @param t the t + * @param r the r + * @param sourceID the source ID + * @param path the path + * @param restObject the rest object + * @throws Exception the exception + */ + void Put(T t, org.onap.vid.changeManagement.RequestDetailsWrapper r, String sourceID, String path, RestObject restObject) throws Exception; + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/rest/Task.java b/vid-app-common/src/main/java/org/onap/vid/mso/rest/Task.java new file mode 100644 index 000000000..79aaaea51 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/mso/rest/Task.java @@ -0,0 +1,119 @@ +package org.onap.vid.mso.rest; + +import java.util.List; + +public class Task { + + private String taskId; + private String type; + private String nfRole; + private String subscriptionServiceType; + private String originalRequestId; + private String originalRequestorId; + private String errorSource; + private String errorCode; + private String errorMessage; + private String buildingBlockName; + private String buildingBlockStep; + private List validResponses; + + + public String getTaskId() { + return taskId; + } + + public void setTaskId(String taskId) { + this.taskId = taskId; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getNfRole() { + return nfRole; + } + + public void setNfRole(String nfRole) { + this.nfRole = nfRole; + } + + public String getSubscriptionServiceType() { + return subscriptionServiceType; + } + + public void setSubscriptionServiceType(String subscriptionServiceType) { + this.subscriptionServiceType = subscriptionServiceType; + } + + public String getOriginalRequestId() { + return originalRequestId; + } + + public void setOriginalRequestId(String originalRequestId) { + this.originalRequestId = originalRequestId; + } + + public String getOriginalRequestorId() { + return originalRequestorId; + } + + public void setOriginalRequestorId(String originalRequestorId) { + this.originalRequestorId = originalRequestorId; + } + + public String getErrorSource() { + return errorSource; + } + + public void setErrorSource(String errorSource) { + this.errorSource = errorSource; + } + + public String getErrorCode() { + return errorCode; + } + + public void setErrorCode(String errorCode) { + this.errorCode = errorCode; + } + + public String getErrorMessage() { + return errorMessage; + } + + public void setErrorMessage(String errorMessage) { + this.errorMessage = errorMessage; + } + + public String getBuildingBlockName() { + return buildingBlockName; + } + + public void setBuildingBlockName(String buildingBlockName) { + this.buildingBlockName = buildingBlockName; + } + + public String getBuildingBlockStep() { + return buildingBlockStep; + } + + public void setBuildingBlockStep(String buildingBlockStep) { + this.buildingBlockStep = buildingBlockStep; + } + + public List getValidResponses() { + return validResponses; + } + + public void setValidResponses(List validResponses) { + this.validResponses = validResponses; + } + + + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/rest/TaskList.java b/vid-app-common/src/main/java/org/onap/vid/mso/rest/TaskList.java new file mode 100644 index 000000000..bbff333af --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/mso/rest/TaskList.java @@ -0,0 +1,16 @@ +package org.onap.vid.mso.rest; + +import java.util.List; + +public class TaskList { + + public List getTaskList() { + return taskList; + } + + public void setTaskList(List taskList) { + this.taskList = taskList; + } + + private List taskList; +} diff --git a/vid-app-common/src/main/java/org/onap/vid/policy/PolicyProperties.java b/vid-app-common/src/main/java/org/onap/vid/policy/PolicyProperties.java new file mode 100644 index 000000000..2afb2d4a7 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/policy/PolicyProperties.java @@ -0,0 +1,26 @@ +package org.onap.vid.policy; + +import org.openecomp.portalsdk.core.util.SystemProperties; + + +public class PolicyProperties extends SystemProperties { + + public static final String POLICY_CLIENTAUTH_VAL = "policy.ClientAuth"; + + public static final String POLICY_CLIENT_MECHID_VAL = "policy.client.mechId"; + + public static final String POLICY_CLIENT_PASSWORD_VAL = "policy.client.password"; + + public static final String POLICY_USERNAME_VAL = "policy.username"; + + public static final String POLICY_PASSWORD_VAL = "policy.password"; + + public static final String POLICY_AUTHORIZATION_VAL = "policy.Authorization"; + + public static final String POLICY_SERVER_URL_VAL = "policy.server.url"; + + public static final String POLICY_ENVIRONMENT_VAL = "policy.environment"; + + public static final String POLICY_GET_CONFIG_VAL = "policy.get.config"; + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/policy/PolicyResponseWrapper.java b/vid-app-common/src/main/java/org/onap/vid/policy/PolicyResponseWrapper.java new file mode 100644 index 000000000..d5a4d124c --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/policy/PolicyResponseWrapper.java @@ -0,0 +1,56 @@ +package org.onap.vid.policy; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import org.apache.commons.lang.builder.ToStringBuilder; + +/** + * This wrapper encapsulates the Policy response + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "status", + "entity" +}) + +public class PolicyResponseWrapper { + + @JsonProperty("status") + private int status; + + @JsonProperty("entity") + private String entity; + + @JsonProperty("entity") + public String getEntity() { + return entity; + } + + @JsonProperty("status") + public int getStatus() { + return status; + } + + @JsonProperty("status") + public void setStatus(int v) { + this.status = v; + } + + @JsonProperty("entity") + public void setEntity(String v) { + this.entity = v; + } + + @Override + public String toString() { + return ToStringBuilder.reflectionToString(this); + } + + public String getResponse () { + + StringBuilder b = new StringBuilder ("{ \"status\": "); + b.append(getStatus()).append(", \"entity\": " ).append(this.getEntity()).append("}"); + return (b.toString()); + } +} \ No newline at end of file diff --git a/vid-app-common/src/main/java/org/onap/vid/policy/PolicyRestInt.java b/vid-app-common/src/main/java/org/onap/vid/policy/PolicyRestInt.java new file mode 100644 index 000000000..b58fe28ff --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/policy/PolicyRestInt.java @@ -0,0 +1,66 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.policy; + +import com.fasterxml.jackson.databind.ObjectMapper; +import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.vid.policy.rest.RequestDetails; + +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.Date; + +public class PolicyRestInt { + + /** The logger. */ + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(PolicyRestInt.class); + + /** The Constant dateFormat. */ + final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); + + /** The request date format. */ + public DateFormat requestDateFormat = new SimpleDateFormat("EEE, dd MMM YYYY HH:mm:ss z"); + + public PolicyRestInt() { + requestDateFormat.setTimeZone(java.util.TimeZone.getTimeZone("GMT")); + } + + /** + * Log request. + * + * @param r the r + */ + public void logRequest ( RequestDetails r ) { + String methodName = "logRequest"; + ObjectMapper mapper = new ObjectMapper(); + String r_json_str = ""; + if ( r != null ) { + r_json_str = r.toString(); + try { + r_json_str = mapper.writeValueAsString(r); + } + catch ( com.fasterxml.jackson.core.JsonProcessingException j ) { + logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " Unable to parse request as json"); + } + } + logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " Request=(" + r_json_str + ")"); + } +} \ No newline at end of file diff --git a/vid-app-common/src/main/java/org/onap/vid/policy/PolicyRestInterface.java b/vid-app-common/src/main/java/org/onap/vid/policy/PolicyRestInterface.java new file mode 100644 index 000000000..875586d99 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/policy/PolicyRestInterface.java @@ -0,0 +1,233 @@ +package org.onap.vid.policy; + +import org.apache.commons.codec.binary.Base64; +import org.eclipse.jetty.util.security.Password; +import org.json.simple.JSONObject; +import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.vid.client.HttpBasicClient; +import org.onap.vid.policy.rest.RequestDetails; + +import javax.ws.rs.client.Client; +import javax.ws.rs.client.Entity; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.MultivaluedHashMap; +import javax.ws.rs.core.Response; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.Collections; +import java.util.Date; + +public class PolicyRestInterface extends PolicyRestInt implements PolicyRestInterfaceIfc { + + /** The logger. */ + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(PolicyRestInterface.class); + + /** The Constant dateFormat. */ + final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); + + /** The client. */ + private static Client client = null; + + /** The common headers. */ + private MultivaluedHashMap commonHeaders; + + public PolicyRestInterface() { + super(); + } + + public void initRestClient() + { + final String methodname = "initRestClient()"; + + //final String clientAuth = SystemProperties.getProperty(PolicyProperties.POLICY_CLIENTAUTH_VAL); + //final String authorization = SystemProperties.getProperty(PolicyProperties.POLICY_AUTHORIZATION_VAL); + final String mechId = SystemProperties.getProperty(PolicyProperties.POLICY_CLIENT_MECHID_VAL); + final String clientPassword = SystemProperties.getProperty(PolicyProperties.POLICY_CLIENT_PASSWORD_VAL); + final String username = SystemProperties.getProperty(PolicyProperties.POLICY_USERNAME_VAL); + final String password = SystemProperties.getProperty(PolicyProperties.POLICY_PASSWORD_VAL); + final String environment = SystemProperties.getProperty(PolicyProperties.POLICY_ENVIRONMENT_VAL); + + final String decrypted_client_password = Password.deobfuscate(clientPassword); + String mechAuthString = mechId + ":" + decrypted_client_password; + byte[] mechAuthEncBytes = Base64.encodeBase64(mechAuthString.getBytes()); + String clientAuth = new String(mechAuthEncBytes); + + final String decrypted_password = Password.deobfuscate(password); + String authString = username + ":" + decrypted_password; + byte[] authEncBytes = Base64.encodeBase64(authString.getBytes()); + String authorization = new String(authEncBytes); + + commonHeaders = new MultivaluedHashMap (); + commonHeaders.put("ClientAuth", Collections.singletonList((Object) ("Basic " + clientAuth))); + commonHeaders.put("Authorization", Collections.singletonList((Object) ("Basic " + authorization))); + commonHeaders.put("Environment", Collections.singletonList((Object) (environment))); + + if (client == null) { + + try { + client = HttpBasicClient.getClient(); + } catch (Exception e) { + System.out.println( methodname + " Unable to get the SSL client"); + } + } + } + + @SuppressWarnings("unchecked") + public void Get (T t, String sourceId, String path, RestObject restObject ) throws Exception { + String methodName = "Get"; + + logger.debug(EELFLoggerDelegate.debugLogger, methodName + " start"); + + String url=""; + restObject.set(t); + + url = SystemProperties.getProperty(PolicyProperties.POLICY_SERVER_URL_VAL) + path; + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " sending request to url= " + url); + + initRestClient(); + + final Response cres = client.target(url) + .request() + .accept("application/json") + .headers(commonHeaders) + .get(); + + int status = cres.getStatus(); + restObject.setStatusCode (status); + + if (status == 200) { + t = (T) cres.readEntity(t.getClass()); + restObject.set(t); + logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + methodName + " REST api was successfull!"); + + } else { + throw new Exception(methodName + " with status="+ status + ", url= " + url ); + } + + logger.debug(EELFLoggerDelegate.debugLogger,methodName + " received status=" + status ); + + return; + } + + @SuppressWarnings("unchecked") + public void Delete(T t, RequestDetails r, String sourceID, String path, RestObject restObject) { + + String methodName = "Delete"; + String url=""; + Response cres = null; + + logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " start"); + logRequest (r); + + try { + initRestClient(); + + url = SystemProperties.getProperty(PolicyProperties.POLICY_SERVER_URL_VAL) + path; + logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + " methodName sending request to: " + url); + + cres = client.target(url) + .request() + .accept("application/json") + .headers(commonHeaders) + //.entity(r) + .build("DELETE", Entity.entity(r, MediaType.APPLICATION_JSON)).invoke(); + // .method("DELETE", Entity.entity(r, MediaType.APPLICATION_JSON)); + //.delete(Entity.entity(r, MediaType.APPLICATION_JSON)); + + int status = cres.getStatus(); + restObject.setStatusCode (status); + + if (status == 404) { // resource not found + String msg = "Resource does not exist...: " + cres.getStatus(); + logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + msg); + } else if (status == 200 || status == 204){ + logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + "Resource " + url + " deleted"); + } else if (status == 202) { + String msg = "Delete in progress: " + status; + logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + msg); + } + else { + String msg = "Deleting Resource failed: " + status; + logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + msg); + } + + try { + t = (T) cres.readEntity(t.getClass()); + restObject.set(t); + } + catch ( Exception e ) { + logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " No response entity, this is probably ok, e=" + + e.getMessage()); + } + + } + catch (Exception e) + { + logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " with url="+url+ ", Exception: " + e.toString()); + throw e; + + } + } + + @SuppressWarnings("unchecked") + public void Post(T t, JSONObject requestDetails, String uuid, String path, RestObject restObject) throws Exception { + + String methodName = "Post"; + String url=""; + + System.out.println( "POST policy rest interface"); + + // logRequest (requestDetails); + try { + + initRestClient(); + + url = SystemProperties.getProperty(PolicyProperties.POLICY_SERVER_URL_VAL) + path; + System.out.println( "<== " + methodName + " sending request to url= " + url); + // Change the content length + final Response cres = client.target(url) + .request() + .accept("application/json") + .headers(commonHeaders) + //.header("content-length", 201) + //.header("X-FromAppId", sourceID) + .post(Entity.entity(requestDetails, MediaType.APPLICATION_JSON)); + + try { + t = (T) cres.readEntity(t.getClass()); + restObject.set(t); + } + catch ( Exception e ) { + + System.out.println("<== " + methodName + " No response entity, this is probably ok, e=" + e.getMessage()); + } + + int status = cres.getStatus(); + restObject.setStatusCode (status); + + if ( status >= 200 && status <= 299 ) { + System.out.println( "<== " + methodName + " REST api POST was successful!"); + + } else { + System.out.println( "<== " + methodName + " with status="+status+", url="+url); + } + + } catch (Exception e) + { + System.out.println( "<== " + methodName + " with url="+url+ ", Exception: " + e.toString()); + throw e; + + } + } + + public T getInstance(Class clazz) throws IllegalAccessException, InstantiationException + { + return clazz.newInstance(); + } + + @Override + public void logRequest(RequestDetails r) { + // TODO Auto-generated method stub + } +} \ No newline at end of file diff --git a/vid-app-common/src/main/java/org/onap/vid/policy/PolicyRestInterfaceFactory.java b/vid-app-common/src/main/java/org/onap/vid/policy/PolicyRestInterfaceFactory.java new file mode 100644 index 000000000..40cb854bf --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/policy/PolicyRestInterfaceFactory.java @@ -0,0 +1,14 @@ + +package org.onap.vid.policy; + +public class PolicyRestInterfaceFactory { + + + public static PolicyRestInterfaceIfc getInstance () { + PolicyRestInterfaceIfc obj = null; + + obj = new PolicyRestInterface(); + + return ( obj ); + } +} \ No newline at end of file diff --git a/vid-app-common/src/main/java/org/onap/vid/policy/PolicyRestInterfaceIfc.java b/vid-app-common/src/main/java/org/onap/vid/policy/PolicyRestInterfaceIfc.java new file mode 100644 index 000000000..59b0ad3dc --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/policy/PolicyRestInterfaceIfc.java @@ -0,0 +1,58 @@ + +package org.onap.vid.policy; + +import org.json.simple.JSONObject; +import org.onap.vid.policy.rest.RequestDetails; + +public interface PolicyRestInterfaceIfc { + /** + * Inits the rest client. + */ + public void initRestClient(); + + /** + * Gets the. + * + * @param the generic type + * @param t the t + * @param sourceId the source id + * @param path the path + * @param restObject the rest object + * @throws Exception the exception + */ + public void Get (T t, String sourceId, String path, RestObject restObject ) throws Exception; + + /** + * Delete. + * + * @param the generic type + * @param t the t + * @param r the r + * @param sourceID the source ID + * @param path the path + * @param restObject the rest object + * @throws Exception the exception + */ + public void Delete(T t, RequestDetails r, String sourceID, String path, RestObject restObject) throws Exception; + + /** + * Post. + * + * @param the generic type + * @param t the t + * @param r the r + * @param sourceID the source ID + * @param path the path + * @param restObject the rest object + * @throws Exception the exception + */ + public void Post(T t, JSONObject r, String sourceID, String path, RestObject restObject) throws Exception; + + /*** + * Log request. + * + * @param r the r + */ + public void logRequest ( RequestDetails r ); + +} \ No newline at end of file diff --git a/vid-app-common/src/main/java/org/onap/vid/policy/PolicyUtil.java b/vid-app-common/src/main/java/org/onap/vid/policy/PolicyUtil.java new file mode 100644 index 000000000..608352845 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/policy/PolicyUtil.java @@ -0,0 +1,71 @@ +package org.onap.vid.policy; + +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.Date; + +import org.glassfish.jersey.client.ClientResponse; +import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.vid.policy.PolicyResponseWrapper; +import org.onap.vid.policy.PolicyUtil; +import org.onap.vid.policy.RestObject; + +import com.fasterxml.jackson.databind.ObjectMapper; + +public class PolicyUtil { + + private static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(PolicyUtil.class); + + final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); + + public static PolicyResponseWrapper wrapResponse ( String body, int statusCode ) { + + PolicyResponseWrapper w = new PolicyResponseWrapper(); + w.setStatus (statusCode); + w.setEntity(body); + + return w; + } + + public static PolicyResponseWrapper wrapResponse (ClientResponse cres) { + String resp_str = ""; + if ( cres != null ) { + resp_str = cres.readEntity(String.class); + } + int statuscode = cres.getStatus(); + PolicyResponseWrapper w = PolicyUtil.wrapResponse ( resp_str, statuscode ); + return (w); + } + + public static PolicyResponseWrapper wrapResponse (RestObject rs) { + String resp_str = ""; + int status = 0; + if ( rs != null ) { + resp_str = rs.get(); + status = rs.getStatusCode(); + } + PolicyResponseWrapper w = PolicyUtil.wrapResponse ( resp_str, status ); + return (w); + } + + public static String convertPojoToString ( T t ) throws com.fasterxml.jackson.core.JsonProcessingException { + + String methodName = "convertPojoToString"; + ObjectMapper mapper = new ObjectMapper(); + String r_json_str = ""; + if ( t != null ) { + try { + r_json_str = mapper.writeValueAsString(t); + } + catch ( com.fasterxml.jackson.core.JsonProcessingException j ) { + logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " Unable to parse object as json"); + } + } + return (r_json_str); + } + + + public static void main(String[] args) { + // TODO Auto-generated method stub + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/policy/RestObject.java b/vid-app-common/src/main/java/org/onap/vid/policy/RestObject.java new file mode 100644 index 000000000..81b354eb0 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/policy/RestObject.java @@ -0,0 +1,68 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.policy; + +/** + * The Class RestObject. + * + * @param the generic type + */ +public class RestObject { + + /** + * Generic version of the RestObject class. + * + */ + // T stands for "Type" + private T t; + + /** The status code. */ + private int statusCode= 0; + + /** + * Sets the. + * + * @param t the t + */ + public void set(T t) { this.t = t; } + + /** + * Gets the. + * + * @return the t + */ + public T get() { return t; } + + /** + * Sets the status code. + * + * @param v the new status code + */ + public void setStatusCode(int v) { this.statusCode = v; } + + /** + * Gets the status code. + * + * @return the status code + */ + public int getStatusCode() { return this.statusCode; } + +} \ No newline at end of file diff --git a/vid-app-common/src/main/java/org/onap/vid/policy/rest/RequestDetails.java b/vid-app-common/src/main/java/org/onap/vid/policy/rest/RequestDetails.java new file mode 100644 index 000000000..81e2f2d8b --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/policy/rest/RequestDetails.java @@ -0,0 +1,107 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.policy.rest; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +/* + [ + { + "policyConfigMessage": "Config Retrieved! ", + "policyConfigStatus": "CONFIG_RETRIEVED", + "type": "JSON", + "config": "{\"service\":\"TimeLimitAndVerticalTopology\",\"policyName\":\"SNIRO_CM_1707.Demo_TimeLimitAndVerticalTopology_zone_localTime\",\"description\":\"dev instance\",\"templateVersion\":\"1702.03\",\"version\":\"1707\",\"priority\":\"4\",\"riskType\":\"test\",\"riskLevel\":\"3\",\"guard\":\"False\",\"content\":{\"serviceType\":\"networkOnDemand\",\"identity\":\"vnf_upgrade_policy\",\"policyScope\":{\"serviceType\":[\"networkOnDemand\"],\"aicZone\":[\" \"],\"entityType\":[\"vnf\"]},\"timeSchedule\":{\"allowedPeriodicTime\":[{\"day\":\"weekday\",\"timeRange\":[{\"start_time\":\"04:00:00\",\"end_time\":\"13:00:00\"}]}]},\"nodeType\":[\"vnf\"],\"type\":\"timeLimitAndVerticalTopology\",\"conflictScope\":\"vnf_zone\"}}", + "policyName": "SNIRO_CM_1707.Config_MS_Demo_TimeLimitAndVerticalTopology_zone_localTime.1.xml", + "policyVersion": "1", + "matchingConditions": { + "ECOMPName": "SNIRO-Placement", + "ConfigName": "", + "service": "TimeLimitAndVerticalTopology", + "uuid": "", + "Location": "" + }, + "responseAttributes": {}, + "property": null + }, + { + "policyConfigMessage": "Config Retrieved! ", + "policyConfigStatus": "CONFIG_RETRIEVED", + "type": "JSON", + "config": "{\"service\":\"TimeLimitAndVerticalTopology\",\"policyName\":\"SNIRO_CM_1707.Demo_TimeLimitAndVerticalTopology_pserver_localTime\",\"description\":\"dev instance\",\"templateVersion\":\"1702.03\",\"version\":\"1707\",\"priority\":\"4\",\"riskType\":\"test\",\"riskLevel\":\"3\",\"guard\":\"False\",\"content\":{\"serviceType\":\"networkOnDemand\",\"identity\":\"vnf_upgrade_policy\",\"policyScope\":{\"serviceType\":[\"networkOnDemand\"],\"aicZone\":[\" \"],\"entityType\":[\"vnf\"]},\"timeSchedule\":{\"allowedPeriodicTime\":[{\"day\":\"weekday\",\"timeRange\":[{\"start_time\":\"04:00:00\",\"end_time\":\"13:00:00\"}]}]},\"nodeType\":[\"vnf\"],\"type\":\"timeLimitAndVerticalTopology\",\"conflictScope\":\"vnf_pserver\"}}", + "policyName": "SNIRO_CM_1707.Config_MS_Demo_TimeLimitAndVerticalTopology_pserver_localTime.1.xml", + "policyVersion": "1", + "matchingConditions": { + "ECOMPName": "SNIRO-Placement", + "ConfigName": "", + "service": "TimeLimitAndVerticalTopology", + "uuid": "", + "Location": "" + }, + "responseAttributes": {}, + "property": null + }, + { + "policyConfigMessage": "Config Retrieved! ", + "policyConfigStatus": "CONFIG_RETRIEVED", + "type": "JSON", + "config": "{\"service\":\"TimeLimitAndVerticalTopology\",\"policyName\":\"SNIRO_CM_1707.Demo_TimeLimitAndVerticalTopology_vnf_localTime\",\"description\":\"dev instance\",\"templateVersion\":\"1702.03\",\"version\":\"1707\",\"priority\":\"4\",\"riskType\":\"test\",\"riskLevel\":\"3\",\"guard\":\"False\",\"content\":{\"serviceType\":\"networkOnDemand\",\"identity\":\"vnf_upgrade_policy\",\"policyScope\":{\"serviceType\":[\"networkOnDemand\"],\"aicZone\":[\" \"],\"entityType\":[\"vnf\"]},\"timeSchedule\":{\"allowedPeriodicTime\":[{\"day\":\"weekday\",\"timeRange\":[{\"start_time\":\"04:00:00\",\"end_time\":\"13:00:00\"}]}]},\"nodeType\":[\"vnf\"],\"type\":\"timeLimitAndVerticalTopology\",\"conflictScope\":\"vnf\"}}", + "policyName": "SNIRO_CM_1707.Config_MS_Demo_TimeLimitAndVerticalTopology_vnf_localTime.1.xml", + "policyVersion": "1", + "matchingConditions": { + "ECOMPName": "SNIRO-Placement", + "ConfigName": "", + "service": "TimeLimitAndVerticalTopology", + "uuid": "", + "Location": "" + }, + "responseAttributes": {}, + "property": null + } + ] +*/ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "policyConfigMessage", + "policyConfigStatus", + "type", + "config", + "policyName", + "policyVersion", + "matchingConditions" +}) +public class RequestDetails { + + @JsonProperty("policyName") + private String policyName; + + @JsonProperty("policyName") + public String getPolicyName() { + return policyName; + } + + @JsonProperty("policyName") + public void setPolicyName(String policyName) { + this.policyName = policyName; + } + +} \ No newline at end of file diff --git a/vid-app-common/src/main/java/org/onap/vid/properties/AsdcClientConfiguration.java b/vid-app-common/src/main/java/org/onap/vid/properties/AsdcClientConfiguration.java new file mode 100644 index 000000000..c767967f1 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/properties/AsdcClientConfiguration.java @@ -0,0 +1,124 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.properties; + +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.PropertySource; +import org.springframework.context.annotation.PropertySources; +import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; + +/** + * The Class AsdcClientConfiguration. + */ +@Configuration + +@PropertySources({ + @PropertySource(value="asdc.properties", ignoreResourceNotFound = true), + @PropertySource(value="${container.classpath:}/WEB-INF/conf/asdc.properties", ignoreResourceNotFound = true) +}) +public class AsdcClientConfiguration { + + @Bean + public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() { + return new PropertySourcesPlaceholderConfigurer(); + } + + @Value("${asdc.client.type}") + private AsdcClientType asdcClientType; + + /** The asdc client host. */ + @Value("${asdc.client.rest.host}") + private String asdcClientHost; + + /** The asdc client port. */ + @Value("${asdc.client.rest.port}") + private int asdcClientPort; + + /** The asdc client auth. */ + @Value("${asdc.client.rest.auth}") + public String asdcClientAuth; + + /** The asdc client protocol. */ + @Value("${asdc.client.rest.protocol}") + public String asdcClientProtocol; + + /** + * Gets the asdc client type. + * + * @return the asdc client type + */ + public AsdcClientType getAsdcClientType() { + return asdcClientType; + } + + /** + * Gets the asdc client host. + * + * @return the asdc client host + */ + public String getAsdcClientHost() { + return asdcClientHost; + } + + /** + * Gets the asdc client port. + * + * @return the asdc client port + */ + public int getAsdcClientPort() { + return asdcClientPort; + } + + /** + * Gets the asdc client auth. + * + * @return the asdc client auth + */ + public String getAsdcClientAuth() { + return asdcClientAuth; + } + + /** + * Gets the asdc client protocol. + * + * @return the asdc client protocol + */ + public String getAsdcClientProtocol() { + return asdcClientProtocol; + } + + /** + * The Enum AsdcClientType. + */ + public enum AsdcClientType { + + /** The in memory. */ + IN_MEMORY, + + /** The rest. */ + REST, + + /** The local. */ + LOCAL + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/properties/MsoClientConfiguration.java b/vid-app-common/src/main/java/org/onap/vid/properties/MsoClientConfiguration.java new file mode 100644 index 000000000..ca58a954d --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/properties/MsoClientConfiguration.java @@ -0,0 +1,9 @@ +package org.onap.vid.properties; + +/** + * Created by pickjonathan on 20/06/2017. + */ +public class MsoClientConfiguration { + + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/properties/VidProperties.java b/vid-app-common/src/main/java/org/onap/vid/properties/VidProperties.java new file mode 100644 index 000000000..9108ae16c --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/properties/VidProperties.java @@ -0,0 +1,93 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.properties; + +import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.vid.model.ModelConstants; + +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.Date; +/** + * The Class VidProperties. + */ +public class VidProperties extends SystemProperties { + + //VID General Properties + + /** The Constant VID_TRUSTSTORE_FILENAME. */ + public static final String VID_TRUSTSTORE_FILENAME = "vid.truststore.filename"; + + /** The Constant VID_TRUSTSTORE_PASSWD_X. */ + public static final String VID_TRUSTSTORE_PASSWD_X = "vid.truststore.passwd.x"; + + /** The Constant FILESEPARATOR. */ + public static final String FILESEPARATOR = (System.getProperty("file.separator") == null) ? "/" : System.getProperty("file.separator"); + + /** The Constant LOG. */ + private static final EELFLoggerDelegate LOG = EELFLoggerDelegate.getLogger(VidProperties.class); + + /** The Constant dateFormat. */ + final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); + /** + * Gets the asdc model namespace prefix property + * + * @return the property value or a default value + */ + public static String getAsdcModelNamespace() { + String methodName = "getAsdcModelNamespace "; + String asdcModelNamespace = ModelConstants.DEFAULT_ASDC_MODEL_NAMESPACE; + try { + asdcModelNamespace = SystemProperties.getProperty(ModelConstants.ASDC_MODEL_NAMESPACE); + if ( asdcModelNamespace == null || asdcModelNamespace.isEmpty()) { + asdcModelNamespace = ModelConstants.DEFAULT_ASDC_MODEL_NAMESPACE; + } + } + catch ( Exception e ) { + LOG.error (EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + methodName + "unable to find the value, using the default " + + ModelConstants.DEFAULT_ASDC_MODEL_NAMESPACE); + asdcModelNamespace = ModelConstants.DEFAULT_ASDC_MODEL_NAMESPACE; + } + return (asdcModelNamespace); + } + /** + * Gets the specified property value. If the property is not defined, returns a default value. + * + * @return the property value or a default value + */ + public static String getPropertyWithDefault ( String propName, String defaultValue ) { + String methodName = "getPropertyWithDefault "; + String propValue = defaultValue; + try { + propValue = SystemProperties.getProperty(propName); + if ( propValue == null || propValue.isEmpty()) { + propValue = defaultValue; + } + } + catch ( Exception e ) { + LOG.error (EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + methodName + "unable to find the value, using the default " + + defaultValue); + propValue = defaultValue; + } + return (propValue); + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/roles/EcompRole.java b/vid-app-common/src/main/java/org/onap/vid/roles/EcompRole.java new file mode 100644 index 000000000..63492cd97 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/roles/EcompRole.java @@ -0,0 +1,5 @@ +package org.onap.vid.roles; + +public enum EcompRole { + READ; +} diff --git a/vid-app-common/src/main/java/org/onap/vid/roles/Role.java b/vid-app-common/src/main/java/org/onap/vid/roles/Role.java new file mode 100644 index 000000000..902da5bcd --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/roles/Role.java @@ -0,0 +1,48 @@ +package org.onap.vid.roles; + +/** + * Created by Oren on 7/1/17. + */ + +public class Role { + + private EcompRole ecompRole; + + private String subscribeName; + + private String serviceType; + + private String tenant; + + public Role(EcompRole ecompRole, String subscribeName, String serviceType, String tenant) { + this.ecompRole = ecompRole; + this.subscribeName = subscribeName; + this.serviceType = serviceType; + this.tenant = tenant; + } + + public EcompRole getEcompRole() { + return ecompRole; + } + + + public String getSubscribeName() { + return subscribeName; + } + + public void setSubscribeName(String subscribeName) { + this.subscribeName = subscribeName; + } + + public String getServiceType() { + return serviceType; + } + + + public String getTenant() { + return tenant; + } + + + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/roles/RoleProvider.java b/vid-app-common/src/main/java/org/onap/vid/roles/RoleProvider.java new file mode 100644 index 000000000..63cc2bbb0 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/roles/RoleProvider.java @@ -0,0 +1,138 @@ +package org.onap.vid.roles; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.openecomp.portalsdk.core.web.support.UserUtils; +import org.onap.vid.aai.AaiResponse; +import org.onap.vid.aai.exceptions.RoleParsingException; +import org.onap.vid.model.ModelConstants; +import org.onap.vid.model.Subscriber; +import org.onap.vid.model.SubscriberList; +import org.onap.vid.services.AaiService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import javax.annotation.PostConstruct; +import javax.servlet.http.HttpServletRequest; +import java.util.*; + +//import org.codehaus.jackson.map.ObjectMapper; + +/** + * Created by Oren on 7/1/17. + */ + +@Component +public class RoleProvider { + + private static final EELFLoggerDelegate LOG = EELFLoggerDelegate.getLogger(RoleProvider.class); + final String readPermissionString = "read"; + SubscriberList subscribers; + ObjectMapper om = new ObjectMapper(); + @Autowired + private AaiService aaiService; + + public static List extractRoleFromSession(HttpServletRequest request) { + + return new ArrayList(); + + } + + @PostConstruct + public void init() { + LOG.debug(EELFLoggerDelegate.debugLogger, "Role provider => init method started"); + AaiResponse subscribersResponse = aaiService.getFullSubscriberList(); + subscribers = subscribersResponse.getT(); + LOG.debug(EELFLoggerDelegate.debugLogger, "Role provider => init method finished"); + } + + public List getUserRoles(HttpServletRequest request) throws JsonProcessingException { + String logPrefix = "Role Provider (" + UserUtils.getUserId(request) + ") ==>"; + + LOG.debug(EELFLoggerDelegate.debugLogger, logPrefix + "Entering to get user role for user " + UserUtils.getUserId(request)); + + List roleList = new ArrayList<>(); + HashMap roles = UserUtils.getRoles(request); + for (Object role : roles.keySet()) { + org.openecomp.portalsdk.core.domain.Role sdkRol = (org.openecomp.portalsdk.core.domain.Role) roles.get(role); + + LOG.debug(EELFLoggerDelegate.debugLogger, logPrefix + "Role " + sdkRol.getName() + " is being proccessed"); + try { + if (sdkRol.getName().contains(readPermissionString)) { + LOG.debug(EELFLoggerDelegate.debugLogger, logPrefix + " Role " + sdkRol.getName() + " contain " + readPermissionString); + + continue; + } + String[] roleParts = splitRole((sdkRol.getName()), logPrefix); + roleList.add(createRoleFromStringArr(roleParts, logPrefix)); + String msg = String.format(logPrefix + " User %s got permissions %s", UserUtils.getUserId(request), Arrays.toString(roleParts)); + LOG.debug(EELFLoggerDelegate.debugLogger, msg); + } catch (RoleParsingException e) { + LOG.error(logPrefix + " Failed to parse permission"); + + } + } + + return roleList; + } + + public String[] splitRole(String roleAsString, String logPrefix) { + LOG.debug(EELFLoggerDelegate.debugLogger, logPrefix + "Spliting role = " + roleAsString + "With delimeter = " + ModelConstants.ROLE_DELIMITER); + return roleAsString.split(ModelConstants.ROLE_DELIMITER); + } + + public boolean userPermissionIsReadOnly(List roles) { + + return (!(roles.size() > 0)); + } + + public boolean userPermissionIsReadLogs(List roles){ + for(Role role: roles){ + if(role.getServiceType().equals("LOGS")){ + if(role.getTenant().equals("PERMITTED")){ + return true; + } + } + } + return false; + } + + private String replaceSubscriberNameToGlobalCustomerID(String subscriberName, String logPrefix) throws JsonProcessingException { + if (subscribers == null) { + LOG.debug(EELFLoggerDelegate.debugLogger, "replaceSubscriberNameToGlobalCustomerID calling init method"); + init(); + } + LOG.debug(EELFLoggerDelegate.debugLogger, logPrefix + "subscribers list size is " + subscribers.customer.size() + " with the values " + om.writeValueAsString(subscribers.customer)); + LOG.debug(EELFLoggerDelegate.debugLogger, logPrefix + "subscribers list size is " + subscribers.customer.size() + " with the values " + om.writeValueAsString(subscribers.customer)); + + + Optional s = subscribers.customer.stream().filter(x -> x.subscriberName.equals(subscriberName)).findFirst(); + //Fixing bug of logging "optional get" before isPresent + String replacement = s.isPresent() ? s.get().globalCustomerId : ""; + LOG.debug(EELFLoggerDelegate.debugLogger, logPrefix + "Subscribername " + subscriberName + " changed to " + replacement); + return replacement; + } + + public Role createRoleFromStringArr(String[] roleParts, String rolePrefix) throws JsonProcessingException, RoleParsingException { + String globalCustomerID = replaceSubscriberNameToGlobalCustomerID(roleParts[0], rolePrefix); + try { + if (roleParts.length > 2) { + return new Role(EcompRole.READ, globalCustomerID, roleParts[1], roleParts[2]); + } else { + return new Role(EcompRole.READ, globalCustomerID, roleParts[1], null); + } + } catch (ArrayIndexOutOfBoundsException e) { + if (roleParts.length > 0) + LOG.debug(EELFLoggerDelegate.debugLogger, "Could not parse role ", roleParts[0]); + else { + LOG.debug(EELFLoggerDelegate.debugLogger, "Got empty role, Could not parse it "); + + } + throw new RoleParsingException(); + } + + } + +} + diff --git a/vid-app-common/src/main/java/org/onap/vid/roles/RoleValidator.java b/vid-app-common/src/main/java/org/onap/vid/roles/RoleValidator.java new file mode 100644 index 000000000..f4f17facb --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/roles/RoleValidator.java @@ -0,0 +1,57 @@ +package org.onap.vid.roles; + +import org.onap.vid.mso.rest.RequestDetails; + +import java.util.List; +import java.util.Map; + +/** + * Created by Oren on 7/12/17. + */ +public class RoleValidator { + + private List userRoles; + + public RoleValidator(List roles) { + this.userRoles = roles; + } + + public boolean isSubscriberPermitted(String subscriberName) { + for (Role role : userRoles) { + if (role.getSubscribeName().equals(subscriberName)) + return true; + } + return false; + } + + public boolean isServicePermitted(String subscriberName, String serviceType) { + for (Role role : userRoles) { + if (role.getSubscribeName().equals(subscriberName) && role.getServiceType().equals(serviceType)) + return true; + } + return false; + } + + public boolean isMsoRequestValid(RequestDetails mso_request) { + try { + String globalSubscriberIdRequested = (String) ((Map) ((Map) mso_request.getAdditionalProperties().get("requestDetails")).get("subscriberInfo")).get("globalSubscriberId"); + String serviceType = (String) ((Map) ((Map) mso_request.getAdditionalProperties().get("requestDetails")).get("requestParameters")).get("subscriptionServiceType"); + return isServicePermitted(globalSubscriberIdRequested, serviceType); + } catch (Exception e) { + //Until we'll get the exact information regarding the tenants and the global customer id, we'll return true on unknown requests to mso + return true; + } +// return false; + } + + public boolean isTenantPermitted(String globalCustomerId, String serviceType, String tenantName) { + for (Role role : userRoles) { + if (role.getSubscribeName().equals(globalCustomerId) + && role.getServiceType().equals(serviceType) + && (role.getTenant() == null || role.getTenant().equalsIgnoreCase(tenantName))) { + return true; + } + } + return false; + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/scheduler/RestObject.java b/vid-app-common/src/main/java/org/onap/vid/scheduler/RestObject.java new file mode 100644 index 000000000..4accb55da --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/scheduler/RestObject.java @@ -0,0 +1,44 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.scheduler; + + +public class RestObject { + + private T t; + + private int statusCode= 0; + + public String uuid; + + public void set(T t) { this.t = t; } + + public T get() { return t; } + + public void setStatusCode(int v) { this.statusCode = v; } + + public int getStatusCode() { return this.statusCode; } + + public void setUUID(String uuid) { this.uuid = uuid; } + + public String getUUID() { return this.uuid; } +} + diff --git a/vid-app-common/src/main/java/org/onap/vid/scheduler/RestObjects/RestObject.java b/vid-app-common/src/main/java/org/onap/vid/scheduler/RestObjects/RestObject.java new file mode 100644 index 000000000..ff1ffb4c5 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/scheduler/RestObjects/RestObject.java @@ -0,0 +1,39 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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.vid.scheduler.RestObjects; + + +public class RestObject { + + private T t; + + private int statusCode= 0; + + public void set(T t) { this.t = t; } + + public T get() { return t; } + + public void setStatusCode(int v) { this.statusCode = v; } + + public int getStatusCode() { return this.statusCode; } + +} + diff --git a/vid-app-common/src/main/java/org/onap/vid/scheduler/SchedulerProperties.java b/vid-app-common/src/main/java/org/onap/vid/scheduler/SchedulerProperties.java new file mode 100644 index 000000000..bb5f6ebb4 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/scheduler/SchedulerProperties.java @@ -0,0 +1,19 @@ +package org.onap.vid.scheduler; + +import org.openecomp.portalsdk.core.util.SystemProperties; + + +public class SchedulerProperties extends SystemProperties { + + public static final String SCHEDULER_USER_NAME_VAL = "scheduler.user.name"; + + public static final String SCHEDULER_PASSWORD_VAL = "scheduler.password"; + + public static final String SCHEDULER_SERVER_URL_VAL = "scheduler.server.url"; + + public static final String SCHEDULER_GET_SCHEDULES = "scheduler.get.schedules"; + + public static final String SCHEDULER_DELETE_SCHEDULE = "scheduler.delete.schedule"; + + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/scheduler/SchedulerRestInterface.java b/vid-app-common/src/main/java/org/onap/vid/scheduler/SchedulerRestInterface.java new file mode 100644 index 000000000..2077e7a40 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/scheduler/SchedulerRestInterface.java @@ -0,0 +1,214 @@ +package org.onap.vid.scheduler; + +import java.util.Collections; +import javax.ws.rs.client.Client; +import javax.ws.rs.client.Entity; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.MultivaluedHashMap; +import javax.ws.rs.core.Response; + +import org.apache.commons.codec.binary.Base64; +import org.eclipse.jetty.util.security.Password; +import org.json.simple.JSONObject; +import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.vid.client.HttpBasicClient; +import org.onap.vid.client.HttpsBasicClient; +import org.onap.vid.scheduler.SchedulerProperties; +import org.onap.vid.scheduler.RestObjects.RestObject; +import org.springframework.stereotype.Service; + +import static org.onap.vid.utils.Logging.getHttpServletRequest; +import static org.onap.vid.utils.Logging.requestIdHeaderKey; + +@Service +public class SchedulerRestInterface implements SchedulerRestInterfaceIfc { + + private static Client client = null; + + private MultivaluedHashMap commonHeaders; + + /** The logger. */ + static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(SchedulerRestInterface.class); + + public SchedulerRestInterface() { + super(); + } + + public void initRestClient() + { + System.out.println( "\t <== Starting to initialize rest client "); + + final String username; + final String password; + + /*Setting user name based on properties*/ + String retrievedUsername = SystemProperties.getProperty(SchedulerProperties.SCHEDULER_USER_NAME_VAL); + if(retrievedUsername.isEmpty()) { + username = ""; + } else { + username = retrievedUsername; + } + + /*Setting password based on properties*/ + String retrievedPassword = SystemProperties.getProperty(SchedulerProperties.SCHEDULER_PASSWORD_VAL); + if(retrievedPassword.isEmpty()) { + password = ""; + } else { + if (retrievedPassword.contains("OBF:")) { + password = Password.deobfuscate(retrievedPassword); + } else { + password = retrievedPassword; + } + } + + String authString = username + ":" + password; + + byte[] authEncBytes = Base64.encodeBase64(authString.getBytes()); + String authStringEnc = new String(authEncBytes); + + commonHeaders = new MultivaluedHashMap (); + commonHeaders.put("Authorization", Collections.singletonList((Object) ("Basic " + authStringEnc))); + + try { + if ( !username.isEmpty() ) { + + client = HttpsBasicClient.getClient(); + } + else { + + client = HttpBasicClient.getClient(); + } + } catch (Exception e) { + System.out.println( " <== Unable to initialize rest client "); + } + + System.out.println( "\t<== Client Initialized \n"); + } + + @SuppressWarnings("unchecked") + public void Get (T t, String sourceId, String path, org.onap.vid.scheduler.RestObject restObject ) throws Exception { + + String methodName = "Get"; + String url = SystemProperties.getProperty(SchedulerProperties.SCHEDULER_SERVER_URL_VAL) + path; + + + System.out.println( "<== URL FOR GET : " + url + "\n"); + + initRestClient(); + + final Response cres = client.target(url) + .request() + .accept("application/json") + .headers(commonHeaders) + .header(requestIdHeaderKey, getHttpServletRequest().getHeader(requestIdHeaderKey)) + .get(); + + int status = cres.getStatus(); + restObject.setStatusCode (status); + + if (status == 200) { + t = (T) cres.readEntity(t.getClass()); + restObject.set(t); + + } else { + throw new Exception(methodName + " with status="+ status + ", url= " + url ); + } + + return; + } + + @SuppressWarnings("unchecked") + public void Post(T t, JSONObject requestDetails, String path, RestObject restObject) throws Exception { + + String methodName = "Post"; + String url = SystemProperties.getProperty(SchedulerProperties.SCHEDULER_SERVER_URL_VAL) + path; + + System.out.println( "<== URL FOR POST : " + url + "\n"); + + try { + + initRestClient(); + + // Change the content length + final Response cres = client.target(url) + .request() + .accept("application/json") + .headers(commonHeaders) + .header(requestIdHeaderKey, getHttpServletRequest().getHeader(requestIdHeaderKey)) + .post(Entity.entity(requestDetails, MediaType.APPLICATION_JSON)); + + try { + t = (T) cres.readEntity(t.getClass()); + restObject.set(t); + } + catch ( Exception e ) { + + System.out.println("<== " + methodName + " : No response entity, this is probably ok, e=" + e.getMessage()); + } + + int status = cres.getStatus(); + restObject.setStatusCode (status); + + if ( status >= 200 && status <= 299 ) { + + System.out.println( "<== " + methodName + " : REST api POST was successful!" + "\n"); + + } else { + System.out.println( "<== " + methodName + " : FAILED with http status : "+status+", url = " + url + "\n"); + } + + } catch (Exception e) + { + System.out.println( "<== " + methodName + " : with url="+url+ ", Exception: " + e.toString() + "\n"); + throw e; + } + } + + @Override + public void logRequest(JSONObject requestDetails) {} + + @SuppressWarnings("unchecked") + public void Delete(T t, String sourceID, String path, org.onap.vid.scheduler.RestObject restObject) { + + String url=""; + Response cres = null; + + try { + initRestClient(); + + url = SystemProperties.getProperty(SchedulerProperties.SCHEDULER_SERVER_URL_VAL) + path; + + cres = client.target(url) + .request() + .accept("application/json") + .headers(commonHeaders) + .header(requestIdHeaderKey, getHttpServletRequest().getHeader(requestIdHeaderKey)) + //.entity(r) + .delete(); + // .method("DELETE", Entity.entity(r, MediaType.APPLICATION_JSON)); + //.delete(Entity.entity(r, MediaType.APPLICATION_JSON)); + + int status = cres.getStatus(); + restObject.setStatusCode (status); + + try { + t = (T) cres.readEntity(t.getClass()); + restObject.set(t); + } + catch ( Exception e ) { + } + + } + catch (Exception e) + { + throw e; + } + } + + public T getInstance(Class clazz) throws IllegalAccessException, InstantiationException + { + return clazz.newInstance(); + } + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/scheduler/SchedulerRestInterfaceFactory.java b/vid-app-common/src/main/java/org/onap/vid/scheduler/SchedulerRestInterfaceFactory.java new file mode 100644 index 000000000..1c3bea9f5 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/scheduler/SchedulerRestInterfaceFactory.java @@ -0,0 +1,15 @@ + +package org.onap.vid.scheduler; + +public class SchedulerRestInterfaceFactory { + + + public static SchedulerRestInterfaceIfc getInstance () { + SchedulerRestInterfaceIfc obj = null; + + obj = new SchedulerRestInterface(); + + return ( obj ); + } + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/scheduler/SchedulerRestInterfaceIfc.java b/vid-app-common/src/main/java/org/onap/vid/scheduler/SchedulerRestInterfaceIfc.java new file mode 100644 index 000000000..7be8480ff --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/scheduler/SchedulerRestInterfaceIfc.java @@ -0,0 +1,23 @@ + +package org.onap.vid.scheduler; + +import org.json.simple.JSONObject; +import org.onap.vid.scheduler.RestObjects.RestObject; +import org.springframework.stereotype.Service; + +@Service +public interface SchedulerRestInterfaceIfc { + + public void initRestClient(); + + public void Get (T t, String sourceId, String path, org.onap.vid.scheduler.RestObject restObject ) throws Exception; + + public void Delete(T t, String sourceID, String path, org.onap.vid.scheduler.RestObject restObject) + throws Exception; + + public void Post(T t, JSONObject r, String path, RestObject restObject) throws Exception; + + public void logRequest(JSONObject requestDetails); +} + + diff --git a/vid-app-common/src/main/java/org/onap/vid/services/AaiService.java b/vid-app-common/src/main/java/org/onap/vid/services/AaiService.java new file mode 100644 index 000000000..4e86281c6 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/services/AaiService.java @@ -0,0 +1,63 @@ +package org.onap.vid.services; + +import org.codehaus.jackson.JsonParseException; +import org.codehaus.jackson.map.JsonMappingException; +import org.onap.vid.aai.AaiResponse; +import org.onap.vid.aai.SubscriberFilteredResults; +import org.onap.vid.aai.model.AaiGetPnfs.Pnf; +import org.onap.vid.aai.model.AaiGetOperationalEnvironments.OperationalEnvironmentList; +import org.onap.vid.aai.model.AaiGetOperationalEnvironments.OperationalEnvironmentList; +import org.onap.vid.aai.model.AaiGetTenatns.GetTenantsResponse; +import org.onap.vid.asdc.beans.Service; +import org.onap.vid.model.ServiceInstanceSearchResult; +import org.onap.vid.model.SubscriberList; +import org.onap.vid.roles.RoleValidator; + +import javax.ws.rs.core.Response; + +import java.io.IOException; +import java.util.Collection; +import java.util.ArrayList; +import java.util.List; + +/** + * Created by Oren on 7/4/17. + */ +public interface AaiService { + + + SubscriberFilteredResults getFullSubscriberList(RoleValidator roleValidator); + + AaiResponse getSubscriberData(String subscriberId, RoleValidator roleValidator); + + AaiResponse getServiceInstanceSearchResults(String subscriberId, String instanceIdentifier, RoleValidator roleProvider, List owningEntities, List projects); + + AaiResponse getFullSubscriberList(); + + AaiResponse getServices(RoleValidator roleValidator); + + AaiResponse getAaiZones(); + + AaiResponse getOperationalEnvironments(String operationalEnvironmentType, String operationalEnvironmentStatus); + + AaiResponse getAicZoneForPnf(String globalCustomerId , String serviceType , String serviceId); + + Response getVNFData(String globalSubscriberId, String serviceType); + + AaiResponse getTenants(String globalCustomerId, String serviceType, RoleValidator roleValidator); + + AaiResponse getVNFData(String globalSubscriberId, String serviceType, String serviceInstanceId); + + AaiResponse getNodeTemplateInstances(String globalCustomerId, String serviceType, String modelVersionId, String modelInvariantId, String cloudRegion); + + Response getVersionByInvariantId(List modelInvariantId); + + Collection getServicesByDistributionStatus(); + + AaiResponse getSpecificPnf(String pnfId); + + List getServiceInstanceAssociatedPnfs(String globalCustomerId, String serviceType, String serviceInstanceId); + + AaiResponse getPNFData(String globalCustomerId, String serviceType, String modelVersionId, String modelInvariantId, String cloudRegion, String equipVendor, String equipModel); + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/services/AaiServiceImpl.java b/vid-app-common/src/main/java/org/onap/vid/services/AaiServiceImpl.java new file mode 100644 index 000000000..ffb43803c --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/services/AaiServiceImpl.java @@ -0,0 +1,435 @@ +package org.onap.vid.services; + +import org.apache.http.HttpStatus; +import org.onap.vid.aai.model.AaiGetAicZone.AicZones; +import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.vid.aai.*; +import org.onap.vid.aai.ServiceInstance; +import org.onap.vid.aai.ServiceSubscription; +import org.onap.vid.aai.Services; +import org.onap.vid.aai.model.AaiGetOperationalEnvironments.OperationalEnvironmentList; +import org.onap.vid.aai.model.AaiGetPnfs.Pnf; +import org.onap.vid.aai.model.AaiGetServicesRequestModel.GetServicesAAIRespone; +import org.onap.vid.aai.model.AaiGetTenatns.GetTenantsResponse; +import org.onap.vid.aai.model.*; +import org.onap.vid.asdc.beans.Service; +import org.onap.vid.model.ServiceInstanceSearchResult; +import org.onap.vid.model.SubscriberList; +import org.onap.vid.roles.RoleValidator; +import org.onap.vid.utils.Intersection; +import org.springframework.beans.factory.annotation.Autowired; + +import javax.ws.rs.core.Response; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.stream.Collectors; + +/** + * Created by Oren on 7/4/17. + */ +public class AaiServiceImpl implements AaiService { + private String serviceInstanceId = "service-instance.service-instance-id"; + private String serviceType = "service-subscription.service-type"; + private String customerId = "customer.global-customer-id"; + private String serviceInstanceName = "service-instance.service-instance-name"; + private int indexOfSubscriberName = 6; + + @Autowired + private AaiClientInterface aaiClient; + + EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(AaiServiceImpl.class); + + private List convertModelToService(Model model) { + List services = new ArrayList<>(); + String category = ""; + + if(validateModel(model)){ + if(model.getModelType() != null) + category = model.getModelType(); + + for (ModelVer modelVer: model.getModelVers().getModelVer()) { + Service service = new Service(); + if (modelVer.getModelVersionId() != null) + service.setUuid(modelVer.getModelVersionId()); + if(model.getModelInvariantId() != null) + service.setInvariantUUID(model.getModelInvariantId()); + if(modelVer.getModelVersion() != null) + service.setVersion(modelVer.getModelVersion()); + if(modelVer.getModelName() != null) + service.setName(modelVer.getModelName()); + if(modelVer.getDistributionStatus() != null) + service.setDistributionStatus(Service.DistributionStatus.valueOf(modelVer.getDistributionStatus())); + service.setCategory(category); + + services.add(service); + } + } else { + return null; + } + + return services; + } + + private boolean validateModel(Model model){ + if(model != null){ + if(model.getModelVers() != null && model.getModelVers().getModelVer() != null && model.getModelVers().getModelVer().get(0).getModelVersionId() != null){ + return true; + } + } + return false; + } + + private List getServicesByOwningEntityId(List owningEntities, RoleValidator roleValidator) { + AaiResponse owningEntityResponse = aaiClient.getServicesByOwningEntityId(owningEntities); + List serviceInstanceSearchResultList = new ArrayList<>(); + if (owningEntityResponse.getT() != null) { + for (OwningEntity owningEntity : owningEntityResponse.getT().getOwningEntity()) { + if (owningEntity.getRelationshipList() != null) { + serviceInstanceSearchResultList = convertRelationshipToSearchResult(owningEntity, serviceInstanceSearchResultList, roleValidator); + } + } + } + return serviceInstanceSearchResultList; + } + + private List getServicesByProjectNames(List projectNames, RoleValidator roleValidator) { + AaiResponse projectByIdResponse = aaiClient.getServicesByProjectNames(projectNames); + List serviceInstanceSearchResultList = new ArrayList<>(); + if (projectByIdResponse.getT() != null) { + for (Project project : projectByIdResponse.getT().getProject()) { + if (project.getRelationshipList() != null) + serviceInstanceSearchResultList = convertRelationshipToSearchResult(project, serviceInstanceSearchResultList, roleValidator); + } + } + return serviceInstanceSearchResultList; + } + + private List convertRelationshipToSearchResult(AaiRelationResponse owningEntityResponse, List serviceInstanceSearchResultList, RoleValidator roleValidator) { + if (owningEntityResponse.getRelationshipList().getRelationship() != null) { + List relationshipList = owningEntityResponse.getRelationshipList().getRelationship(); + for (Relationship relationship : relationshipList) { + ServiceInstanceSearchResult serviceInstanceSearchResult = new ServiceInstanceSearchResult(); + extractRelationshipData(relationship, serviceInstanceSearchResult, roleValidator); + extractRelatedToProperty(relationship, serviceInstanceSearchResult); + serviceInstanceSearchResultList.add(serviceInstanceSearchResult); + } + } + return serviceInstanceSearchResultList; + } + + private void extractRelationshipData(Relationship relationship, ServiceInstanceSearchResult serviceInstanceSearchResult, RoleValidator roleValidator) { + List relationshipDataList = relationship.getRelationDataList(); + if (relationshipDataList != null) { + setSubscriberName(relationship, serviceInstanceSearchResult); + for (RelationshipData relationshipData : relationshipDataList) { + String key = relationshipData.getRelationshipKey(); + if (key.equals(serviceInstanceId)) { + serviceInstanceSearchResult.setServiceInstanceId(relationshipData.getRelationshipValue()); + } else if (key.equals(serviceType)) { + serviceInstanceSearchResult.setServiceType(relationshipData.getRelationshipValue()); + } else if (key.equals(customerId)) { + serviceInstanceSearchResult.setGlobalCustomerId(relationshipData.getRelationshipValue()); + } + } + + boolean isPermitted = roleValidator.isServicePermitted(serviceInstanceSearchResult.getSubscriberName(), serviceInstanceSearchResult.getServiceType()); + serviceInstanceSearchResult.setIsPermitted(isPermitted); + } + } + + private void setSubscriberName(Relationship relationship, ServiceInstanceSearchResult serviceInstanceSearchResult) { + String relatedLink = relationship.getRelatedLink(); + String[] subsciber = relatedLink.split("/"); + serviceInstanceSearchResult.setSubscriberName(subsciber[indexOfSubscriberName]); + } + + private void extractRelatedToProperty(Relationship relationship, ServiceInstanceSearchResult serviceInstanceSearchResult) { + List relatedToPropertyList = relationship.getRelatedToPropertyList(); + if (relatedToPropertyList != null) { + for (RelatedToProperty relatedToProperty : relatedToPropertyList) { + if (relatedToProperty.getPropertyKey().equals(serviceInstanceName)) { + serviceInstanceSearchResult.setServiceInstanceName(relatedToProperty.getPropertyValue()); + } + } + } + } + + @Override + public SubscriberFilteredResults getFullSubscriberList(RoleValidator roleValidator) { + AaiResponse subscriberResponse = aaiClient.getAllSubscribers(); + SubscriberFilteredResults subscriberFilteredResults = + new SubscriberFilteredResults(roleValidator, subscriberResponse.getT(), + subscriberResponse.getErrorMessage(), + subscriberResponse.getHttpCode()); + + return subscriberFilteredResults; + } + + @Override + public AaiResponse getOperationalEnvironments(String operationalEnvironmentType, String operationalEnvironmentStatus) { + AaiResponse subscriberResponse = aaiClient.getOperationalEnvironments(operationalEnvironmentType, operationalEnvironmentStatus); + return subscriberResponse; + } + + @Override + public AaiResponse getFullSubscriberList() { + AaiResponse subscriberResponse = aaiClient.getAllSubscribers(); + return subscriberResponse; + } + + @Override + public AaiResponse getSubscriberData(String subscriberId, RoleValidator roleValidator) { + AaiResponse subscriberResponse = aaiClient.getSubscriberData(subscriberId); + String subscriberGlobalId = subscriberResponse.getT().globalCustomerId; + for (ServiceSubscription serviceSubscription : subscriberResponse.getT().serviceSubscriptions.serviceSubscription) { + String serviceType = serviceSubscription.serviceType; + serviceSubscription.isPermitted = roleValidator.isServicePermitted(subscriberGlobalId, serviceType); + } + return subscriberResponse; + + } + + @Override + public AaiResponse getServiceInstanceSearchResults(String subscriberId, String instanceIdentifier, RoleValidator roleValidator, List owningEntities, List projects) { + List> resultList = new ArrayList<>(); + ServiceInstancesSearchResults serviceInstancesSearchResults = new ServiceInstancesSearchResults(); + + if (subscriberId != null || instanceIdentifier != null) { + resultList.add(getServicesBySubscriber(subscriberId, instanceIdentifier, roleValidator)); + } + if (owningEntities != null) { + resultList.add(getServicesByOwningEntityId(owningEntities, roleValidator)); + } + if (projects != null) { + resultList.add(getServicesByProjectNames(projects, roleValidator)); + } + if (resultList.size() > 0) { + Intersection intersection = new Intersection<>(); + serviceInstancesSearchResults.serviceInstances = intersection.intersectMultipileArray(resultList); + } + + return new AaiResponse<>(serviceInstancesSearchResults, null, HttpStatus.SC_OK); + } + + + private List getServicesBySubscriber(String subscriberId, String instanceIdentifier, RoleValidator roleValidator) { + AaiResponse subscriberResponse = aaiClient.getSubscriberData(subscriberId); + String subscriberGlobalId = subscriberResponse.getT().globalCustomerId; + String subscriberName = subscriberResponse.getT().subscriberName; + ServiceSubscriptions serviceSubscriptions = subscriberResponse.getT().serviceSubscriptions; + + return getSearchResultsForSubscriptions(serviceSubscriptions, subscriberId, instanceIdentifier, roleValidator, subscriberGlobalId, subscriberName); + + } + + + private ArrayList getSearchResultsForSubscriptions(ServiceSubscriptions serviceSubscriptions, String subscriberId, String instanceIdentifier, RoleValidator roleValidator, String subscriberGlobalId, String subscriberName) { + ArrayList results = new ArrayList<>(); + + if (serviceSubscriptions != null) { + for (ServiceSubscription serviceSubscription : serviceSubscriptions.serviceSubscription) { + String serviceType = serviceSubscription.serviceType; + serviceSubscription.isPermitted = roleValidator.isServicePermitted(subscriberGlobalId, serviceType); + ArrayList resultsForSubscription = getSearchResultsForSingleSubscription(serviceSubscription, subscriberId, instanceIdentifier, subscriberName, serviceType); + results.addAll(resultsForSubscription); + } + } + + return results; + } + + private ArrayList getSearchResultsForSingleSubscription(ServiceSubscription serviceSubscription, String subscriberId, String instanceIdentifier, String subscriberName, String serviceType) { + ArrayList results = new ArrayList<>(); + + if (serviceSubscription.serviceInstances != null) { + for (ServiceInstance serviceInstance : serviceSubscription.serviceInstances.serviceInstance) { + ServiceInstanceSearchResult serviceInstanceSearchResult = + new ServiceInstanceSearchResult(serviceInstance.serviceInstanceId, subscriberId, serviceType, serviceInstance.serviceInstanceName, + subscriberName, serviceInstance.modelInvariantId, serviceInstance.modelVersionId, serviceSubscription.isPermitted); + + if (instanceIdentifier == null) { + results.add(serviceInstanceSearchResult); + } else if (serviceInstanceMatchesIdentifier(instanceIdentifier, serviceInstance)) { + results.add(serviceInstanceSearchResult); + } + } + } + + return results; + } + + private boolean serviceInstanceMatchesIdentifier(String instanceIdentifier, ServiceInstance serviceInstance) { + return instanceIdentifier.equals(serviceInstance.serviceInstanceId) || instanceIdentifier.equals(serviceInstance.serviceInstanceName); + } + + @Override + public Response getVersionByInvariantId(List modelInvariantId) { + try { + return aaiClient.getVersionByInvariantId(modelInvariantId); + } catch (Exception e) { + e.printStackTrace(); + } + return null; + } + + @Override + public AaiResponse getSpecificPnf(String pnfId) { + return aaiClient.getSpecificPnf(pnfId); + } + + @Override + public AaiResponse getPNFData(String globalCustomerId, String serviceType, String modelVersionId, String modelInvariantId, String cloudRegion, String equipVendor, String equipModel) { + return aaiClient.getPNFData(globalCustomerId, serviceType, modelVersionId, modelInvariantId, cloudRegion, equipVendor, equipModel); + } + + + + @Override + public AaiResponse getServices(RoleValidator roleValidator) { + AaiResponse subscriberResponse = aaiClient.getServices(); + if (subscriberResponse.getT() != null) + for (org.onap.vid.aai.model.AaiGetServicesRequestModel.Service service : subscriberResponse.getT().service) { + service.isPermitted = true; + } + return subscriberResponse; + } + + @Override + public AaiResponse getTenants(String globalCustomerId, String serviceType, RoleValidator roleValidator) { + AaiResponse aaiGetTenantsResponse = aaiClient.getTenants(globalCustomerId, serviceType); + GetTenantsResponse[] tenants = aaiGetTenantsResponse.getT(); + if (tenants != null) { + for (int i = 0; i < tenants.length; i++) { + tenants[i].isPermitted = roleValidator.isTenantPermitted(globalCustomerId, serviceType, tenants[i].tenantName); + } + } + return aaiGetTenantsResponse; + + + } + + @Override + public AaiResponse getVNFData(String globalSubscriberId, String serviceType, String serviceInstanceId) { + return aaiClient.getVNFData(globalSubscriberId, serviceType, serviceInstanceId); + } + + @Override + public Response getVNFData(String globalSubscriberId, String serviceType) { + return aaiClient.getVNFData(globalSubscriberId, serviceType); + } + + @Override + public AaiResponse getAaiZones() { + AaiResponse response = aaiClient.getAllAicZones(); + return response; + } + + @Override + public AaiResponse getAicZoneForPnf(String globalCustomerId, String serviceType, String serviceId) { + String aicZone = ""; + + AaiResponse serviceInstanceResp = aaiClient.getServiceInstance(globalCustomerId, serviceType, serviceId); + if (serviceInstanceResp.getT() != null) { + List aicZoneList = getRelationshipDataByType(serviceInstanceResp.getT().getRelationshipList(), "zone", "zone.zone-id"); + if (aicZoneList.size() > 0) { + aicZone = aicZoneList.get(0); + } else { + logger.warn("aic zone not found for service instance " + serviceId); + } + } else { + if (serviceInstanceResp.getErrorMessage() != null) { + logger.error("get service instance " + serviceId + " return error", serviceInstanceResp.getErrorMessage()); + return new AaiResponse(aicZone , serviceInstanceResp.getErrorMessage() ,serviceInstanceResp.getHttpCode()); + } else { + logger.warn("get service instance " + serviceId + " return empty body"); + return new AaiResponse(aicZone , "get service instance " + serviceId + " return empty body" ,serviceInstanceResp.getHttpCode()); + } + } + + return new AaiResponse(aicZone , null ,HttpStatus.SC_OK); + } + + @Override + public AaiResponse getNodeTemplateInstances(String globalCustomerId, String serviceType, String modelVersionId, String modelInvariantId, String cloudRegion) { + return aaiClient.getNodeTemplateInstances(globalCustomerId, serviceType, modelVersionId, modelInvariantId, cloudRegion); + } + + @Override + public Collection getServicesByDistributionStatus() { + AaiResponse serviceModelsByDistributionStatusResponse = aaiClient.getServiceModelsByDistributionStatus(); + Collection services = new ArrayList<>(); + if (serviceModelsByDistributionStatusResponse.getT() != null) { + List results = serviceModelsByDistributionStatusResponse.getT().getResults(); + for (Result result : results) { + if(result.getModel() != null) { + List service = convertModelToService(result.getModel()); + if (service != null) { + services.addAll(service); + } + } + } + } + return services; + } + + @Override + public List getServiceInstanceAssociatedPnfs(String globalCustomerId, String serviceType, String serviceInstanceId) { + List pnfs = new ArrayList<>(); + + AaiResponse serviceInstanceResp = aaiClient.getServiceInstance(globalCustomerId, serviceType, serviceInstanceId); + if (serviceInstanceResp.getT() != null) { + List logicalLinks = getRelationshipDataByType(serviceInstanceResp.getT().getRelationshipList(), "logical-link", "logical-link.link-name"); + for (String logicalLink : logicalLinks) { + String link = ""; + try { + link = URLEncoder.encode(logicalLink, "UTF-8"); + AaiResponse logicalLinkResp = aaiClient.getLogicalLink(link); + if (logicalLinkResp.getT() != null) { + //lag-interface is the key for pnf - approved by Bracha + List linkPnfs = getRelationshipDataByType(logicalLinkResp.getT().getRelationshipList(), "lag-interface", "pnf.pnf-name"); + if (linkPnfs.size() > 0) { + pnfs.addAll(linkPnfs); + } else { + logger.warn("no pnf found for logical link " + logicalLink); + } + } else { + if (logicalLinkResp.getErrorMessage() != null) { + logger.error("get logical link " + logicalLink + " return error", logicalLinkResp.getErrorMessage()); + } else { + logger.warn("get logical link " + logicalLink + " return empty body"); + } + } + } catch (UnsupportedEncodingException e) { + logger.error("Failed to encode logical link: " + logicalLink, e.getMessage()); + } + } + } else { + if (serviceInstanceResp.getErrorMessage() != null) { + logger.error("get service instance " + serviceInstanceId + " return error", serviceInstanceResp.getErrorMessage()); + } else { + logger.warn("get service instance " + serviceInstanceId + " return empty body"); + } + } + + return pnfs.stream().distinct().collect(Collectors.toList()); + } + + private List getRelationshipDataByType(RelationshipList relationshipList, String relationshipType, String relationshipDataKey) { + List relationshipValues = new ArrayList<>(); + for (Relationship relationship : relationshipList.getRelationship()) { + if (relationship.getRelatedTo().equals(relationshipType)) { + relationshipValues.addAll( relationship.getRelationDataList().stream() + .filter(rel -> rel.getRelationshipKey().equals(relationshipDataKey)) + .map(RelationshipData::getRelationshipValue) + .collect(Collectors.toList()) + ); + } + } + + + return relationshipValues; + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/services/CategoryParameterService.java b/vid-app-common/src/main/java/org/onap/vid/services/CategoryParameterService.java new file mode 100644 index 000000000..a140007b0 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/services/CategoryParameterService.java @@ -0,0 +1,18 @@ +package org.onap.vid.services; + +import java.io.IOException; + +import org.onap.vid.category.AddCategoryOptionResponse; +import org.onap.vid.category.CategoryParameterOptionRep; +import org.onap.vid.category.CategoryParametersResponse; +import org.onap.vid.category.AddCategoryOptionsRequest; +import org.onap.vid.model.CategoryParameterOption; +import org.onap.vid.model.CategoryParameter.Family; + +public interface CategoryParameterService { + + CategoryParametersResponse getCategoryParameters(Family familyName) throws IOException; + AddCategoryOptionResponse createCategoryParameterOptions(String categoryName, AddCategoryOptionsRequest option) throws IOException; + AddCategoryOptionResponse updateCategoryParameterOption(String categoryName, CategoryParameterOptionRep option); + void deleteCategoryOption(String categoryName, CategoryParameterOption option) throws IOException; +} diff --git a/vid-app-common/src/main/java/org/onap/vid/services/CategoryParameterServiceImpl.java b/vid-app-common/src/main/java/org/onap/vid/services/CategoryParameterServiceImpl.java new file mode 100644 index 000000000..02d3521dc --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/services/CategoryParameterServiceImpl.java @@ -0,0 +1,144 @@ +package org.onap.vid.services; + +import java.io.IOException; +import java.util.*; +import java.util.stream.Collectors; + +import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.openecomp.portalsdk.core.service.DataAccessService; +import org.onap.vid.category.AddCategoryOptionResponse; +import org.onap.vid.category.CategoryParameterOptionRep; +import org.onap.vid.model.CategoryParameter; +import org.onap.vid.model.CategoryParameterOption; +import org.onap.vid.category.AddCategoryOptionsRequest; +import org.onap.vid.category.CategoryParametersResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.onap.vid.model.CategoryParameter.Family; + +import javax.ws.rs.ForbiddenException; + + +@Service +public class CategoryParameterServiceImpl implements CategoryParameterService { + + @Autowired + private DataAccessService dataAccessService; + + private static final EELFLoggerDelegate LOG = EELFLoggerDelegate.getLogger(CategoryParameterServiceImpl.class); + + public static class UnfoundedCategoryException extends RuntimeException { + + public UnfoundedCategoryException(String message) { + super(message); + } + } + + public static class UnfoundedCategoryOptionException extends RuntimeException { + + public UnfoundedCategoryOptionException(String message) { + super(message); + } + } + + public static class AlreadyExistOptionNameException extends RuntimeException { + + public AlreadyExistOptionNameException(String message) { + super(message); + } + } + + @Override + public CategoryParametersResponse getCategoryParameters(Family familyName) throws IOException { + List categoryParameters = dataAccessService.getList(CategoryParameter.class, String.format(" where family = '%s' ",familyName), null, null); + return convertToCategoryParametersResponse(categoryParameters); + } + + private CategoryParametersResponse convertToCategoryParametersResponse(List categoryParameters) { + Comparator comparator = Comparator.comparing(CategoryParameterOptionRep::getName, String.CASE_INSENSITIVE_ORDER); + Map> categoryParametersMap = categoryParameters.stream().collect(Collectors.toMap( + CategoryParameter::getName, + x -> x.getOptions().stream().map(opt -> new CategoryParameterOptionRep(opt.getAppId(), opt.getName())).sorted(comparator).collect(Collectors.toList()))); + return new CategoryParametersResponse(categoryParametersMap); + } + + @Override + public AddCategoryOptionResponse createCategoryParameterOptions(String categoryName, AddCategoryOptionsRequest optionsRequest) throws IOException, UnfoundedCategoryException { + + AddCategoryOptionResponse response = new AddCategoryOptionResponse(new ArrayList<>()); + CategoryParameter categoryParameter = getCategoryParameter(categoryName); + Set categoryOptions = categoryParameter.getOptions().stream().map(CategoryParameterOption::getName).collect(Collectors.toSet()); + for (String optionName : optionsRequest.options) { + if (categoryOptions.contains(optionName)) { + response.getErrors().add(String.format("Option %s already exist for category %s", optionName, categoryName)); + continue; + } + String appId = categoryParameter.isIdSupported() ? UUID.randomUUID().toString() : optionName; + CategoryParameterOption categoryParameterOption = new CategoryParameterOption(appId, optionName, categoryParameter); + dataAccessService.saveDomainObject(categoryParameterOption, null); + } + + return response; + } + + private CategoryParameter getCategoryParameter( String categoryName) { + List categoryParameters = dataAccessService.getList(CategoryParameter.class, String.format(" where name = '%s' ", categoryName), null, null); + if (categoryParameters.size() != 1) { + String msg = "There is no category parameter with name " + categoryName; + LOG.debug(msg); + throw new UnfoundedCategoryException(msg); + } + + + return categoryParameters.get(0); + } + + @Override + public AddCategoryOptionResponse updateCategoryParameterOption(String categoryName, CategoryParameterOptionRep option) { + AddCategoryOptionResponse response = new AddCategoryOptionResponse(new ArrayList<>()); + CategoryParameter categoryParameter = getCategoryParameter(categoryName); + if (!categoryParameter.isIdSupported()) { + String msg = "Updating option name for category: " + categoryName + ", is not allowed"; + LOG.debug(msg); + throw new ForbiddenException(msg); + } + Optional categoryParameterOptionOptional = categoryParameter.getOptions().stream().filter(x->x.getAppId().equals(option.getId())).findFirst(); + if (!categoryParameterOptionOptional.isPresent()) { + String msg = "There is no option with id "+option.getId() + " for category " + categoryName; + LOG.debug(msg); + throw new UnfoundedCategoryOptionException(msg); + } + CategoryParameterOption categoryParameterOption = categoryParameterOptionOptional.get(); + Optional alreadyExistOptionWithName = categoryParameter.getOptions().stream().filter(x->x.getName().equals(option.getName())).findFirst(); + if (alreadyExistOptionWithName.isPresent() && !alreadyExistOptionWithName.get().getAppId().equals(categoryParameterOption.getAppId())) { + String msg = "Option with name "+option.getName() + " already exist for category " + categoryName; + LOG.debug(msg); + throw new AlreadyExistOptionNameException(msg); + } + + categoryParameterOption.setName(option.getName()); + dataAccessService.saveDomainObject(categoryParameterOption, null); + + return response; + } + + @Override + public void deleteCategoryOption(String categoryName, CategoryParameterOption option) throws IOException { + List categoryParameters = dataAccessService.getList(CategoryParameter.class, String.format(" where name = '%s'", categoryName), null, null); + if (categoryParameters.size() != 1) { + String msg = "There is no category parameter with name " + categoryName; + LOG.debug(msg); + throw new UnfoundedCategoryException(msg); + } + CategoryParameter categoryParameter = categoryParameters.get(0); + Set categoryOptions = categoryParameter.getOptions(); + for (CategoryParameterOption categoryOption: categoryOptions) { + if(categoryOption.getName().equals(option.getName())) + { + dataAccessService.deleteDomainObject(categoryOption, null); + } + } + } + +} + diff --git a/vid-app-common/src/main/java/org/onap/vid/services/ChangeManagementService.java b/vid-app-common/src/main/java/org/onap/vid/services/ChangeManagementService.java new file mode 100644 index 000000000..bf0833182 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/services/ChangeManagementService.java @@ -0,0 +1,32 @@ +package org.onap.vid.services; + +import fj.data.Either; +import org.apache.commons.lang3.tuple.Pair; +import org.json.JSONObject; +import org.onap.vid.changeManagement.*; +import org.json.simple.JSONArray; +import org.onap.vid.mso.rest.Request; +import org.springframework.http.ResponseEntity; +import org.springframework.web.multipart.MultipartFile; + +import java.util.Collection; +import java.util.List; + +public interface ChangeManagementService { + Collection getMSOChangeManagements() throws Exception; + ResponseEntity doChangeManagement(ChangeManagementRequest request, String vnfName) throws Exception; + JSONArray getSchedulerChangeManagements(); + + /** + * Deleting a scheduled flow. + * @param scheduleId - the ID of the schedule. + * @return - a pair, left - String representation of the response, right - response code. + */ + Pair deleteSchedule(String scheduleId); + VnfWorkflowRelationResponse addVnfWorkflowRelation(VnfWorkflowRelationRequest vnfWorkflowRelationRequest); + List getWorkflowsForVnf(GetVnfWorkflowRelationRequest getVnfWorkflowRelationRequest); + VnfWorkflowRelationResponse deleteVnfWorkflowRelation(VnfWorkflowRelationRequest vnfWorkflowRelationRequest); + VnfWorkflowRelationAllResponse getAllVnfWorkflowRelations(); + String uploadConfigUpdateFile(MultipartFile file) throws Exception; + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/services/ChangeManagementServiceImpl.java b/vid-app-common/src/main/java/org/onap/vid/services/ChangeManagementServiceImpl.java new file mode 100644 index 000000000..078f44945 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/services/ChangeManagementServiceImpl.java @@ -0,0 +1,303 @@ +package org.onap.vid.services; + +import org.apache.commons.lang3.tuple.ImmutablePair; +import org.apache.commons.lang3.tuple.Pair; +import org.hibernate.NonUniqueObjectException; +import org.json.JSONObject; +import org.json.simple.JSONArray; +import org.json.simple.parser.JSONParser; +import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.openecomp.portalsdk.core.service.DataAccessService; +import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.vid.changeManagement.*; +import org.onap.vid.exceptions.NotFoundException; +import org.onap.vid.model.VNFDao; +import org.onap.vid.model.VidWorkflow; +import org.onap.vid.mso.MsoBusinessLogic; +import org.onap.vid.mso.MsoResponseWrapperInterface; +import org.onap.vid.mso.rest.Request; +import org.onap.vid.scheduler.SchedulerProperties; +import org.onap.vid.scheduler.SchedulerRestInterfaceFactory; +import org.onap.vid.scheduler.SchedulerRestInterfaceIfc; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Service; +import org.springframework.util.StringUtils; +import org.springframework.web.multipart.MultipartFile; + +import javax.ws.rs.BadRequestException; +import java.util.*; +import java.util.stream.Collectors; + + +@Service +public class ChangeManagementServiceImpl implements ChangeManagementService { + + private final static String primaryKey = "payload"; + private final static Set requiredKeys = new HashSet<>(Arrays.asList("request-parameters", "configuration-parameters")); + private final DataAccessService dataAccessService; + private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ChangeManagementServiceImpl.class); + private MsoBusinessLogic msoBusinessLogic; + @Autowired + private CsvService csvService; + + @Autowired + public ChangeManagementServiceImpl(DataAccessService dataAccessService, MsoBusinessLogic msoBusinessLogic) { + this.dataAccessService = dataAccessService; + this.msoBusinessLogic = msoBusinessLogic; + } + + @Override + public Collection getMSOChangeManagements() throws Exception { + Collection result = null; + return msoBusinessLogic.getOrchestrationRequestsForDashboard(); + } + + private RequestDetails findRequestByVnfName(List requests, String vnfName) { + + if (requests == null) + return null; + + for (RequestDetails requestDetails : requests) { + if (requestDetails.getVnfName().equals(vnfName)) { + return requestDetails; + } + } + + return null; + } + + @Override + public ResponseEntity doChangeManagement(ChangeManagementRequest request, String vnfName) throws Exception { + if (request == null) + return null; + ResponseEntity response; + RequestDetails currentRequestDetails = findRequestByVnfName(request.getRequestDetails(), vnfName); + MsoResponseWrapperInterface msoResponseWrapperObject = null; + if (currentRequestDetails != null) { + + String serviceInstanceId = extractServiceInstanceId(currentRequestDetails, request.getRequestType()); + String vnfInstanceId = extractVnfInstanceId(currentRequestDetails, request.getRequestType()); + String requestType = request.getRequestType(); + try { + switch (requestType.toLowerCase()) { + case ChangeManagementRequest.UPDATE: { + msoResponseWrapperObject = msoBusinessLogic.updateVnf(currentRequestDetails, serviceInstanceId, vnfInstanceId); + break; + } + case ChangeManagementRequest.REPLACE: { + msoResponseWrapperObject = msoBusinessLogic.replaceVnf(currentRequestDetails, serviceInstanceId, vnfInstanceId); + break; + } + case ChangeManagementRequest.VNF_IN_PLACE_SOFTWARE_UPDATE: { + msoResponseWrapperObject = msoBusinessLogic.updateVnfSoftware(currentRequestDetails, serviceInstanceId, vnfInstanceId); + break; + } + case ChangeManagementRequest.CONFIG_UPDATE: { + msoResponseWrapperObject = msoBusinessLogic.updateVnfConfig(currentRequestDetails, serviceInstanceId, vnfInstanceId); + break; + } + } + response = new ResponseEntity(msoResponseWrapperObject.getResponse(), HttpStatus.OK); + return response; + } catch (Exception e) { + logger.error("Failure during doChangeManagement with request " + request.toString(), e); + throw e; + } + + } + + // AH:TODO: return ChangeManagementResponse + return null; + } + + private String extractVnfInstanceId(RequestDetails currentRequestDetails, String requestType) { + if (currentRequestDetails.getVnfInstanceId() == null) { + logger.error("Failed to extract vnfInstanceId"); + throw new BadRequestException("No vnfInstanceId in request " + requestType); + } + return currentRequestDetails.getVnfInstanceId(); + } + + private String extractServiceInstanceId(RequestDetails currentRequestDetails, String requestType) { + try { + String serviceInstanceId = currentRequestDetails.getRelatedInstList().get(0).getRelatedInstance().getInstanceId(); + serviceInstanceId.toString(); //throw exception in case that serviceInstanceId is null... + return serviceInstanceId; + } catch (Exception e) { + logger.error("Failed to extract serviceInstanceId"); + throw new BadRequestException("No instanceId in request " + requestType); + } + } + + @Override + public JSONArray getSchedulerChangeManagements() { + JSONArray result = null; + try { + String path = SystemProperties.getProperty(SchedulerProperties.SCHEDULER_GET_SCHEDULES); + org.onap.vid.scheduler.RestObject restObject = new org.onap.vid.scheduler.RestObject<>(); + SchedulerRestInterfaceIfc restClient = SchedulerRestInterfaceFactory.getInstance(); + + String str = new String(); + restObject.set(str); + restClient.Get(str, "", path, restObject); + String restCallResult = restObject.get(); + JSONParser parser = new JSONParser(); + Object parserResult = parser.parse(restCallResult); + result = (JSONArray) parserResult; + } catch (Exception e) { + e.printStackTrace(); + } + + return result; + } + + @Override + public Pair deleteSchedule(String scheduleId) { + try { + String path = String.format(SystemProperties.getProperty(SchedulerProperties.SCHEDULER_DELETE_SCHEDULE), scheduleId); + org.onap.vid.scheduler.RestObject restObject = new org.onap.vid.scheduler.RestObject<>(); + SchedulerRestInterfaceIfc restClient = SchedulerRestInterfaceFactory.getInstance(); + String str = new String(); + restObject.set(str); + restClient.Delete(str, "", path, restObject); + String restCallResult = restObject.get(); + return new ImmutablePair<>(restCallResult, restObject.getStatusCode()); + } catch (Exception e) { + logger.error(e.getMessage(), e); + return new ImmutablePair<>(e.getMessage(), HttpStatus.INTERNAL_SERVER_ERROR.value()); + } + } + + @Override + public VnfWorkflowRelationResponse addVnfWorkflowRelation(VnfWorkflowRelationRequest vnfWorkflowRelationRequest) { + VnfWorkflowRelationResponse vnfWorkflowRelationResponse = new VnfWorkflowRelationResponse(); + for (WorkflowsDetail workflowsDetail : vnfWorkflowRelationRequest.getWorkflowsDetails()) { + if (StringUtils.isEmpty(workflowsDetail.getVnfDetails().getUUID()) || + StringUtils.isEmpty(workflowsDetail.getVnfDetails().getInvariantUUID())) { + vnfWorkflowRelationResponse.getErrors().add("Using empty UUID or invariantUUID is not allowed. Relation details: " + workflowsDetail.toString()); + continue; + } + @SuppressWarnings("unchecked") List vnfList = dataAccessService.getList(VNFDao.class, getVnfQueryString(workflowsDetail.getVnfDetails().getUUID(), workflowsDetail.getVnfDetails().getInvariantUUID()), null, null); + if (vnfList.size() == 0) { + vnfList.add(saveNewVnf(workflowsDetail)); + } + @SuppressWarnings("unchecked") List workflowList = dataAccessService.getList(VidWorkflow.class, String.format(" where wokflowName = '%s'", workflowsDetail.getWorkflowName()), null, null); + if (workflowList.size() == 0) { + vnfWorkflowRelationResponse.getErrors().add("Not Found instance of workflow " + workflowsDetail.getWorkflowName() + " for vnf with UUID " + workflowsDetail.getVnfDetails().getUUID() + " and with invariantUUID " + workflowsDetail.getVnfDetails().getInvariantUUID()); + continue; + } + vnfList.get(0).getWorkflows().add(workflowList.get(0)); + try { + dataAccessService.saveDomainObject(vnfList.get(0), null); + } catch (NonUniqueObjectException e) { + //In case the relation already exists, we continue running on the list + } + } + return vnfWorkflowRelationResponse; + } + + @Override + public VnfWorkflowRelationResponse deleteVnfWorkflowRelation(VnfWorkflowRelationRequest vnfWorkflowRelationRequest) { + VnfWorkflowRelationResponse vnfWorkflowRelationResponse = new VnfWorkflowRelationResponse(); + for (WorkflowsDetail workflowsDetail : vnfWorkflowRelationRequest.getWorkflowsDetails()) { + @SuppressWarnings("unchecked") List vnfList = dataAccessService.getList(VNFDao.class, getVnfQueryString(workflowsDetail.getVnfDetails().getUUID(), workflowsDetail.getVnfDetails().getInvariantUUID()), null, null); + if (vnfList.size() != 1) { + vnfWorkflowRelationResponse.getErrors().add("Found " + vnfList.size() + " instances of vnf with UUID " + workflowsDetail.getVnfDetails().getUUID() + " and vnfInvariantUUID " + workflowsDetail.getVnfDetails().getInvariantUUID()); + continue; + } + VidWorkflow vidWorkflow = getWorkflowOfVnf(vnfList.get(0), workflowsDetail.getWorkflowName()); + if (vidWorkflow == null) { + vnfWorkflowRelationResponse.getErrors().add("Not Found instance of workflow " + workflowsDetail.getWorkflowName() + " for vnf with UUID " + workflowsDetail.getVnfDetails().getUUID() + " and with invariantUUID " + workflowsDetail.getVnfDetails().getInvariantUUID()); + continue; + } + vnfList.get(0).getWorkflows().remove(vidWorkflow); + dataAccessService.saveDomainObject(vnfList.get(0), null); + } + return vnfWorkflowRelationResponse; + + } + + @Override + public List getWorkflowsForVnf(GetVnfWorkflowRelationRequest getVnfWorkflowRelationRequest) { + List vnfDaoList = new ArrayList<>(); + List> workflowsList = new ArrayList<>(); + getVnfDaoList(vnfDaoList, getVnfWorkflowRelationRequest); + getWorkflowsList(workflowsList, vnfDaoList); + return intersectWorkflows(workflowsList); + } + + private void getVnfDaoList(List vnfDaoList, GetVnfWorkflowRelationRequest getVnfWorkflowRelationRequest) { + for (VnfDetails vnfDetails : getVnfWorkflowRelationRequest.getVnfDetails()) { + @SuppressWarnings("unchecked") List vnfList = dataAccessService.getList(VNFDao.class, getVnfQueryString(vnfDetails.getUUID(), vnfDetails.getInvariantUUID()), null, null); + if (vnfList.size() != 1) { + throw new NotFoundException("Found" + vnfList.size() + " instances of vnf with UUID" + vnfDetails.getUUID() + " and vnfInvariantUUID" + vnfDetails.getInvariantUUID()); + } + vnfDaoList.add(vnfList.get(0)); + } + } + + private void getWorkflowsList(List> workflowsList, List vnfDaoList) { + for (VNFDao vnfDao : vnfDaoList) { + Set tempWorkflows = vnfDao.getWorkflows().stream().map(VidWorkflow::getWokflowName).collect(Collectors.toSet()); + workflowsList.add(tempWorkflows); + } + } + + private List intersectWorkflows(List> workflowsList) { + Set workflows = workflowsList.get(0); + for (Set workflow : workflowsList) { + workflows.retainAll(workflow); + } + return new ArrayList<>(workflows); + } + + private String getVnfQueryString(String UUID, String invariantUUID) { + return " where vnfInvariantUUID = '" + invariantUUID + "' and vnfUUID = '" + UUID + "'"; + } + + private VidWorkflow getWorkflowOfVnf(VNFDao vnfDao, String workflowName) { + VidWorkflow vidWorkflowRes = null; + for (VidWorkflow vidWorkflow : vnfDao.getWorkflows()) { + if (vidWorkflow.getWokflowName().equals(workflowName)) { + vidWorkflowRes = vidWorkflow; + } + } + return vidWorkflowRes; + } + + private VNFDao saveNewVnf(WorkflowsDetail workflowsDetail) { + VNFDao vnfDao = new VNFDao(); + vnfDao.setVnfUUID(workflowsDetail.getVnfDetails().getUUID()); + vnfDao.setVnfInvariantUUID(workflowsDetail.getVnfDetails().getInvariantUUID()); + dataAccessService.saveDomainObject(vnfDao, null); + return vnfDao; + } + + @Override + public VnfWorkflowRelationAllResponse getAllVnfWorkflowRelations() { + @SuppressWarnings("unchecked") List vnfList = dataAccessService.getList(VNFDao.class, null); + return new VnfWorkflowRelationAllResponse( + vnfList.stream() + .map(VnfDetailsWithWorkflows::new) + .collect(Collectors.toList())); + } + + @Override + public String uploadConfigUpdateFile(MultipartFile file) + throws Exception { + JSONObject json = csvService.convertCsvToJson(csvService.readCsv(file)); + if (!validateJsonOutput(json)) + throw new BadRequestException("Invalid csv file"); + json = json.getJSONObject(primaryKey); + json = new JSONObject().put(primaryKey, json.toString()); + return json.toString(); + } + + private boolean validateJsonOutput(org.json.JSONObject json) { + if (!json.has(primaryKey) || !json.getJSONObject(primaryKey).keySet().containsAll(requiredKeys)) + return false; + return true; + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/services/CsvService.java b/vid-app-common/src/main/java/org/onap/vid/services/CsvService.java new file mode 100644 index 000000000..248068fba --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/services/CsvService.java @@ -0,0 +1,15 @@ +package org.onap.vid.services; + +import org.json.JSONObject; +import org.springframework.web.multipart.MultipartFile; + +import java.io.FileNotFoundException; +import java.io.IOException; +import java.util.List; + +public interface CsvService { + List readCsv(String filePath) throws IOException; + JSONObject convertCsvToJson (List myEntries) throws InstantiationException, IllegalAccessException; + List readCsv(MultipartFile file) throws IOException; + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/services/CsvServiceImpl.java b/vid-app-common/src/main/java/org/onap/vid/services/CsvServiceImpl.java new file mode 100644 index 000000000..8152dae04 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/services/CsvServiceImpl.java @@ -0,0 +1,250 @@ +//package org.onap.vid.services; +// +////import com.opencsv.CSVReader; +//import org.json.JSONArray; +//import org.json.JSONObject; +//import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +//import org.springframework.stereotype.Service; +//import org.springframework.web.multipart.MultipartFile; +// +//import javax.ws.rs.BadRequestException; +//import java.io.FileNotFoundException; +//import java.io.FileReader; +//import java.io.IOException; +//import java.io.InputStreamReader; +//import java.util.ArrayList; +//import java.util.Arrays; +//import java.util.List; +// +//import static org.onap.vid.utils.Logging.getMethodName; +// +//@Service +//public class CsvServiceImpl implements CsvService{ +// +// +// /** The logger. */ +// static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(CsvServiceImpl.class); +// +// private static final String arrayRegex = "\\[(.*?)\\]"; +// +// +// /** +// * In UTF-8 the first line starts with "\uFEFF" so need to remove it +// * @param line is first line contains BOM +// * @return line after change +// */ +// private String [] removeBOMFromCsv(String [] line){ +// if (line.length>0) +// line[0] = line[0].replaceFirst("\uFEFF","").replaceFirst("",""); +// return line; +// } +// +// /** +// * read a csv file and puts its content in list of string arrays (without the empty lines) +// * @param filePath - the path of file to read +// * @return the content of file +// * @throws IOException +// */ +// /*@Override +// public List readCsv(String filePath) throws IOException { +// CSVReader reader = new CSVReader(new FileReader(filePath)); +// return readCsv(reader); +// } +// +// @Override +// public List readCsv(MultipartFile file) throws IOException { +// CSVReader reader = new CSVReader(new InputStreamReader(file.getInputStream())); +// return readCsv(reader); +// } +// +// private List addLineWithoutSpaces(List myEntries, String [] line){ +// line = Arrays.stream(line).filter(x -> !"".equals(x)).toArray(String[]::new); +// if(line.length > 0) +// myEntries.add(line); +// return myEntries; +// } +// +// +// private List readCsv(CSVReader reader) throws IOException { +// try { +// List myEntries = new ArrayList<>() ; +// String [] line; +// Boolean firstLine = true; +// while ((line = reader.readNext())!= null) { +// if (firstLine) { +// line = removeBOMFromCsv(line); +// firstLine = false; +// } +// myEntries = addLineWithoutSpaces(myEntries, line); +// } +// return myEntries; +// } +// catch (Exception e){ +// logger.error("error during reading CSV file. exception:" + e.getMessage()); +// throw e; +// } +// +// }*/ +// +// /** +// * main function that call to the recursive function with initial parameters +// * @param myEntries - the matrix with file content +// * @return the json +// * @throws IOException +// * @throws InstantiationException +// * @throws IllegalAccessException +// */ +// @Override +// public JSONObject convertCsvToJson (List myEntries) throws InstantiationException, IllegalAccessException { +// try { +// return buildJSON(myEntries, 0, 0, myEntries.size(), JSONObject.class); +// } +// catch (Exception e){ +// logger.error("error during parsing CSV file. exception:" + e.getMessage()); +// throw e; +// } +// +// } +// +// /** +// * it goes over the matrix column while the values are the same and returns the index of changed value +// * @param myEntries the matrix +// * @param i row index refer to the whole matrix +// * @param j column index +// * @param numLines the length of the current inner matrix +// * @param startLine row index of inner matrix +// * @return the index of changed line +// */ +// private int findIndexOfChangedLine(List myEntries, final int i, final int j, final int numLines, final int startLine) { +// int k; +// for(k = 0; k + i - startLine < numLines && myEntries.get(i)[j].equals(myEntries.get(k + i)[j]) ; k++); +// return k; +// } +// +// /** +// * check in array if its first element or if the key already exist in the previous item +// * @param jsonArray - the array to search in +// * @param key - the key to check +// * @return if exists or first element return true, otherwise- false +// */ +// private Boolean keyExistsOrFirstElement( JSONArray jsonArray,String key){ +// Boolean exists = false; +// Boolean first = false; +// JSONObject lastItem = lastItemInArray(jsonArray); +// if (lastItem == null) { +// first = true; +// } +// else { +// if (lastItem.has(key)) { +// exists = true; +// } +// } +// return exists||first; +// } +// +// /** +// * return last json in json array +// * @param jsonArray +// * @return last item or null if the array is empty +// */ +// private JSONObject lastItemInArray(JSONArray jsonArray){ +// JSONObject lastItem = null; +// if(jsonArray.length()>0) { +// lastItem = (JSONObject) jsonArray.get(jsonArray.length() - 1); +// } +// return lastItem; +// } +// +// /** +// * append current json to the main json +// * @param json - the main json to append to it +// * @param key - key to append +// * @param values - value(s) to append +// * @param can be JSONObject or JSONArray +// * @param string or jsonObject or jsonArray +// * @return json after put +// * @throws IllegalAccessException +// * @throws InstantiationException +// */ +// private T putJson(T json, String key, E values) throws IllegalAccessException, InstantiationException { +// if (json instanceof JSONArray){ +// JSONArray currentJson= ((JSONArray)json); +// if (values == null) //array of strings (for last item) +// { +// currentJson.put(key); +// } +// else { +// if (keyExistsOrFirstElement(currentJson, key)) { +// currentJson.put(new JSONObject().put(key, values)); +// } else { +// JSONObject lastItem = lastItemInArray(currentJson); +// lastItem.put(key, values); +// } +// } +// } +// if (json instanceof JSONObject){ +// if (values == null) +// throw new BadRequestException("Invalid csv file"); +// ((JSONObject)json).put(key,values); +// } +// return json; +// } +// +// +// /** +// * recursive function to build JSON. Each time it counts the same values in left and send the smaller matrix +// * (until the changed value) to the next time. +// * +// * @param myEntries - the whole matrix +// * @param i- row index of the whole matrix +// * @param j - column index +// * @param numLines - number of lines of inner matrix (num of same values in the left column) +// * @param clazz JSONArray or JSONObject +// * @param JSONArray or JSONObject +// * @return the json object +// * @throws IllegalAccessException +// * @throws InstantiationException +// */ +// private T buildJSON(List myEntries, int i, final int j, final int numLines, Class clazz) throws IllegalAccessException, InstantiationException { +// logger.debug(EELFLoggerDelegate.debugLogger, "start {}({}, {}, {})", getMethodName(), i, j, numLines); +// T json = clazz.newInstance(); +// int startLine = i; +// while(i < numLines + startLine){ +// String[] currentRow = myEntries.get(i); +// int length = currentRow.length; +// int currentDuplicateRows = findIndexOfChangedLine(myEntries,i,j,numLines, startLine); +// String key = currentRow[j]; +// if (j == length-1) { +// json = putJson(json,currentRow[j],null); +// +// } +// else +// { +// if (key.matches(arrayRegex)){ +// JSONArray arrayObjects = buildJSON(myEntries, i, j + 1, currentDuplicateRows, JSONArray.class); +// json = putJson(json,key.replaceAll("\\[","").replaceAll("]",""),arrayObjects); +// } +// else { +// if (j < length - 2) { +// json = putJson(json, currentRow[j], buildJSON(myEntries, i, j + 1, currentDuplicateRows, JSONObject.class)); +// } +// else +// { +// if (j == length - 2)//last object +// { +// if(currentDuplicateRows > 1) { +// throw new BadRequestException("Invalid csv file"); +// } +// json = putJson(json, currentRow[j], currentRow[j + 1]); +// } +// } +// } +// } +// i += currentDuplicateRows; +// } +// logger.debug(EELFLoggerDelegate.debugLogger, "end {} json = {}", getMethodName(), json); +// return json; +// } +// +//} +// diff --git a/vid-app-common/src/main/java/org/onap/vid/services/RoleGenaratorServiceImpl.java b/vid-app-common/src/main/java/org/onap/vid/services/RoleGenaratorServiceImpl.java new file mode 100644 index 000000000..ea2cea57b --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/services/RoleGenaratorServiceImpl.java @@ -0,0 +1,164 @@ +package org.onap.vid.services; + +import jline.internal.Log; +import org.junit.Test; +import org.onap.vid.aai.*; +import org.onap.vid.model.ModelConstants; +import org.onap.vid.model.Subscriber; +import org.onap.vid.model.SubscriberList; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.HashMap; + +@Service +public class RoleGenaratorServiceImpl implements RoleGeneratorService { + + @Autowired + AaiClientInterface client; + + public static final String dbName = "vid_portal"; + public static final String tblName = "fn_role"; + public static final String tempDelimiter ="***"; + public static final String oldDelimiter = "_"; + + @Override + public String generateRoleScript(Boolean firstRun) { + String query = "USE " + dbName + ";\r\n" + + "SET SQL_SAFE_UPDATES = 0;\r\n"; + try { + AaiResponse subscribers = client.getAllSubscribers(); + if (firstRun) { + query += replaceRolesToTempDelimiter("subscriber",buildSubscribersValuesForMappingsTable(subscribers.getT())); + } + query += addAvailableRolesCombination(firstRun, subscribers); + + } + catch (Exception e) { + Log.error("There was an error in updating roles "+e.getMessage()); + } + return query; + } + + private String addAvailableRolesCombination(Boolean firstRun, AaiResponse subscribers) { + String query, availableRoles=""; + HashMap servicesNames = new HashMap(); + for (Subscriber subscriber: subscribers.getT().customer) { + AaiResponse subscriberResponse = client.getSubscriberData(subscriber.globalCustomerId); + for(ServiceSubscription service: subscriberResponse.getT().serviceSubscriptions.serviceSubscription) { + servicesNames.put(service.serviceType,""); + String roleName = "'" + subscriber.subscriberName + ModelConstants.ROLE_DELIMITER + service.serviceType + "'"; + availableRoles += "("+roleName+"),"; + + + } + } + availableRoles = availableRoles.substring(0,availableRoles.length()-1); + query = createTemporaryTableAvailableRoles(availableRoles); + if (firstRun){ + query += replaceRolesToTempDelimiter("service",buildServicesValuesForMappingsTable(servicesNames)); + query += replaceToNewDelimiter(); + query += deleteWrongRecords(); + + } + query += insertAvailableRolesToFnRole(); + query += dropTemporaryTable("available_roles"); + return query; + } + + private String buildSubscribersValuesForMappingsTable(SubscriberList subscribers){ + String query=""; + for (Subscriber subscriber : subscribers.customer) { + String subscriberName = subscriber.subscriberName.contains(oldDelimiter) ? subscriber.subscriberName.replace(oldDelimiter, tempDelimiter) : subscriber.subscriberName; + query = query + "('" + subscriber.globalCustomerId + "','" + subscriberName + "') ,"; + } + if(query.length() > 0) + query = query.substring(0, query.length()-1) + ";\r\n"; + return query; + } + + private String buildServicesValuesForMappingsTable(HashMap servicesNames){ + final String[] query = {""}; + servicesNames.forEach((k,v)->{ + if (k.contains(oldDelimiter)) { + query[0] += "('" + k + "' ,'" + k.replace(oldDelimiter, tempDelimiter) +"'),"; + } + }); + if(query[0].length() > 0) + query[0] = query[0].substring(0, query[0].length()-1) + ";\r\n"; + return query[0]; + } + + private String replaceRolesToTempDelimiter(String entityName, String valuesForMappingsTable ) { + + AaiResponse services = client.getServices(); + String query = ""; + if (valuesForMappingsTable.length() > 0) { + query = "CREATE TEMPORARY TABLE IF NOT EXISTS " + entityName + "Mappings(mapKey VARCHAR(255),mapValue VARCHAR(255));\r\n" + + "INSERT INTO " + entityName + "Mappings VALUES "; + query += valuesForMappingsTable; + query += "UPDATE " + tblName + "\r\n" + + "INNER JOIN " + entityName + "Mappings ON role_name LIKE concat('%',mapKey, '%')\r\n" + + "SET ROLE_NAME = REPLACE(ROLE_NAME, mapKey, mapValue) ; \r\n" + + dropTemporaryTable(entityName + "Mappings"); + } + return query; + } + + private String replaceToNewDelimiter(){ + String query = "UPDATE " + tblName + "\r\n" + + "SET ROLE_NAME = REPLACE(ROLE_NAME, '" + oldDelimiter + "', '" + ModelConstants.ROLE_DELIMITER + "');\r\n" ; + query += "UPDATE fn_role\r\n" + + "SET ROLE_NAME = REPLACE(ROLE_NAME, '" + tempDelimiter + "', '" + oldDelimiter + "');\r\n" ; + return query; + } + + private String insertAvailableRolesToFnRole(){ + String query="INSERT INTO fn_role (ROLE_NAME, ACTIVE_YN, PRIORITY)\r\n" + + "SELECT RNAME, 'Y', 5\r\n" + + "FROM available_roles\r\n" + + "WHERE NOT EXISTS (SELECT ROLE_NAME\r\n" + + "FROM fn_role \r\n" + + "where RNAME = ROLE_NAME);\r\n"; + return query; + } + + + + private String createTemporaryTableAvailableRoles(String availableRoles) { + String query = "CREATE TEMPORARY TABLE IF NOT EXISTS available_roles(rname VARCHAR(255));\r\n"; + query += "INSERT INTO available_roles VALUES "+availableRoles+";\r\n"; + return query; + } + + private String deleteWrongRecords(){ + String query ="CREATE TEMPORARY TABLE IF NOT EXISTS wrong_roles(roleID INT);\r\n" + + "INSERT INTO wrong_roles (roleID)\r\n" + + "SELECT ROLE_ID FROM fn_role LEFT JOIN available_roles ON role_name LIKE concat(rname, '%')\r\n" + + "WHERE available_roles.rname IS NULL AND ROLE_ID NOT IN (1,16);\r\n"; + query += deleteCascade(); + query += dropTemporaryTable("wrong_roles"); + return query; + } + + private String deleteCascade() { + String query = deleteFromTableByRoles("fn_role_composite", "PARENT_ROLE_ID"); + query = query.substring(0, query.length()-1); + query += " OR wrong_roles.ROLEID = fn_role_composite.CHILD_ROLE_ID;\r\n"; + query += deleteFromTableByRoles("fn_role_function", "ROLE_ID")+ "\r\n"; + query += deleteFromTableByRoles("fn_user_role", "ROLE_ID")+ "\r\n"; + query += deleteFromTableByRoles("fn_role", "ROLE_ID")+ "\r\n"; + return query; + } + + private String deleteFromTableByRoles(String table, String column) { + String query = "DELETE FROM " + table + "\r\n"; + query += "using " + table + " inner join wrong_roles\r\n" + + "where wrong_roles.ROLEID = " + table + "." + column + ";"; + return query; + } + + private String dropTemporaryTable(String table) { + return "DROP TEMPORARY TABLE IF EXISTS " + table + ";\r\n"; + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/services/RoleGeneratorService.java b/vid-app-common/src/main/java/org/onap/vid/services/RoleGeneratorService.java new file mode 100644 index 000000000..2bc96a5b2 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/services/RoleGeneratorService.java @@ -0,0 +1,5 @@ +package org.onap.vid.services; + +public interface RoleGeneratorService { + String generateRoleScript(Boolean firstRun); +} diff --git a/vid-app-common/src/main/java/org/onap/vid/services/VidService.java b/vid-app-common/src/main/java/org/onap/vid/services/VidService.java new file mode 100644 index 000000000..328fad019 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/services/VidService.java @@ -0,0 +1,17 @@ +package org.onap.vid.services; + +import org.onap.vid.asdc.AsdcCatalogException; +import org.onap.vid.asdc.beans.Service; +import org.onap.vid.model.ServiceModel; + +import java.util.Collection; +import java.util.Map; + +public interface VidService { + + Collection getServices(Map requestParams) + throws AsdcCatalogException; + + ServiceModel getService(String uuid) throws AsdcCatalogException; + +} \ No newline at end of file diff --git a/vid-app-common/src/main/java/org/onap/vid/services/VidServiceImpl.java b/vid-app-common/src/main/java/org/onap/vid/services/VidServiceImpl.java new file mode 100644 index 000000000..81966439e --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/services/VidServiceImpl.java @@ -0,0 +1,79 @@ +package org.onap.vid.services; + +import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.openecomp.sdc.tosca.parser.exceptions.SdcToscaParserException; +import org.onap.vid.asdc.AsdcCatalogException; +import org.onap.vid.asdc.AsdcClient; +import org.onap.vid.asdc.beans.Service; +import org.onap.vid.asdc.parser.ToscaParser; +import org.onap.vid.asdc.parser.ToscaParserImpl; +import org.onap.vid.asdc.parser.ToscaParserImpl2; +import org.onap.vid.model.ServiceModel; +import org.springframework.beans.factory.annotation.Autowired; + +import java.nio.file.Path; +import java.util.Collection; +import java.util.Map; +import java.util.UUID; + +/** + * The Class VidController. + */ + +public class VidServiceImpl implements VidService { + /** + * The Constant LOG. + */ + private static final EELFLoggerDelegate LOG = EELFLoggerDelegate.getLogger(VidServiceImpl.class); + /** + * The Constant dateFormat. + */ + protected final AsdcClient asdcClient; + @Autowired + private ToscaParserImpl2 toscaParser; + + public VidServiceImpl(AsdcClient asdcClient) { + this.asdcClient = asdcClient; + } + + /* + * (non-Javadoc) + * + * @see org.openecomp.vid.controller.VidService#getServices(java.util.Map) + */ + @Override + public Collection getServices(Map requestParams) + throws AsdcCatalogException { + return asdcClient.getServices(requestParams); + } + + /* + * (non-Javadoc) + * + * @see org.openecomp.vid.controller.VidService#getService(java.lang.String) + */ + @Override + public ServiceModel getService(String uuid) throws AsdcCatalogException { + final Path serviceCsar = asdcClient.getServiceToscaModel(UUID.fromString(uuid)); + ToscaParser tosca = new ToscaParserImpl(); + serviceCsar.toFile().getAbsolutePath(); + ServiceModel serviceModel = null; + try { + final Service asdcServiceMetadata = asdcClient.getService(UUID.fromString(uuid)); + return getServiceModel(uuid, serviceCsar, tosca, asdcServiceMetadata); + } catch (Exception e) { + LOG.error("Failed to download and proccess service from ASDC", e); + } + return serviceModel; + } + + private ServiceModel getServiceModel(String uuid, Path serviceCsar, ToscaParser tosca, Service asdcServiceMetadata) throws Exception { + try { + return toscaParser.makeServiceModel(serviceCsar, asdcServiceMetadata); + } catch (SdcToscaParserException e) { + return tosca.makeServiceModel(uuid, serviceCsar, asdcServiceMetadata); + } + } + + +} \ No newline at end of file diff --git a/vid-app-common/src/main/java/org/onap/vid/services/WorkflowService.java b/vid-app-common/src/main/java/org/onap/vid/services/WorkflowService.java new file mode 100644 index 000000000..ea139080f --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/services/WorkflowService.java @@ -0,0 +1,9 @@ +package org.onap.vid.services; + +import org.onap.vid.model.Workflow; +import java.util.Collection; + +public interface WorkflowService { + Collection getWorkflowsForVNFs(Collection vnfNames); + Collection getAllWorkflows(); +} diff --git a/vid-app-common/src/main/java/org/onap/vid/services/WorkflowServiceImpl.java b/vid-app-common/src/main/java/org/onap/vid/services/WorkflowServiceImpl.java new file mode 100644 index 000000000..037c49c17 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/services/WorkflowServiceImpl.java @@ -0,0 +1,40 @@ +package org.onap.vid.services; + +import org.onap.vid.model.Workflow; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.stream.Collectors; + +@Service +public class WorkflowServiceImpl implements WorkflowService { + //TODO: Add the list of workflows hard coded or from DB. + private ArrayList workflows = new ArrayList<>(Arrays.asList( + new Workflow(0, "Upgrade", new ArrayList<>(Arrays.asList("VNF1", "VNF2", "VNF3", "VNF4"))), + new Workflow(1, "Clean", new ArrayList<>(Arrays.asList("VNF1", "VNF2", "VNF3"))), + new Workflow(2, "Reinstall", new ArrayList<>(Arrays.asList("VNF1", "VNF2", "VNF4"))), + new Workflow(3, "Dump", new ArrayList<>(Arrays.asList("VNF1", "VNF3", "VNF4"))), + new Workflow(4, "Flush", new ArrayList<>(Arrays.asList("VNF2", "VNF3", "VNF4"))) + )); + + @Override + public Collection getWorkflowsForVNFs(Collection vnfNames) { + Collection result = workflows.stream() + .filter(workflow -> workflow.getVnfNames().containsAll(vnfNames)) + .map(workflow -> workflow.getWorkflowName()) + .distinct() + .collect(Collectors.toList()); + + return result; + } + + @Override + public Collection getAllWorkflows() { + return workflows.stream() + .map(workflow -> workflow.getWorkflowName()) + .distinct() + .collect(Collectors.toList()); + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/utils/Intersection.java b/vid-app-common/src/main/java/org/onap/vid/utils/Intersection.java new file mode 100644 index 000000000..6e0d1fc25 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/utils/Intersection.java @@ -0,0 +1,31 @@ +package org.onap.vid.utils; + +import java.util.List; +import java.util.stream.Collectors; + +/** + * Created by moriya1 on 10/10/2017. + */ +public class Intersection { + public List intersectMultipileArray(List> lists) { + if (lists.size() == 1) { + return lists.get(0); + } else { + List intersectResult = intersectTwoArrays(lists.get(0),lists.get(1)); + + lists.remove(0); + lists.remove(0); + lists.add(0,intersectResult); + return intersectMultipileArray(lists); + } + + } + + public List intersectTwoArrays(List list1, List list2) { + + List intersect = list1.stream() + .filter(list2::contains) + .collect(Collectors.toList()); + return intersect; + } +} diff --git a/vid-app-common/src/main/java/org/onap/vid/utils/Logging.java b/vid-app-common/src/main/java/org/onap/vid/utils/Logging.java new file mode 100644 index 000000000..16dde5682 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/utils/Logging.java @@ -0,0 +1,105 @@ +package org.onap.vid.utils; + +import com.att.eelf.configuration.EELFLogger; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.openecomp.portalsdk.core.util.SystemProperties; +import org.springframework.http.HttpMethod; +import org.springframework.web.context.request.RequestContextHolder; +import org.springframework.web.context.request.ServletRequestAttributes; + +import javax.servlet.http.HttpServletRequest; +import javax.ws.rs.ProcessingException; +import javax.ws.rs.core.Response; +import java.util.Arrays; +import java.util.Optional; + +import static org.onap.vid.utils.Streams.not; + +public class Logging { + + private Logging() { + } + + public static final String HTTP_REQUESTS_OUTGOING = "http.requests.outgoing."; + + public static final String requestIdHeaderKey = SystemProperties.ECOMP_REQUEST_ID; + + private static ObjectMapper objectMapper = new ObjectMapper(); + + public static String getMethodName() { + return getMethodName(0); + } + + public static String getMethodCallerName() { + return getMethodName(1); + } + + private static String getMethodName(int depth) { + final StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace(); + String thisClassName = stackTrace[1].getClassName(); + final Optional caller = + Arrays.stream(stackTrace) + .skip(1) + .filter(not(frame -> frame.getClassName().equals(thisClassName))) + .skip(depth) + .map(StackTraceElement::getMethodName) + .findFirst(); + return caller.orElse(""); + } + + public static EELFLogger getRequestsLogger(String serverName) { + return EELFLoggerDelegate.getLogger(HTTP_REQUESTS_OUTGOING +serverName); + } + + public static void logRequest(final EELFLogger logger, final HttpMethod method, final String url, final Object body) { + if (!logger.isDebugEnabled()) { + return; + } + + if (body == null) { + logRequest(logger, method, url); + return; + } + + try { + String bodyAsJson = objectMapper.writeValueAsString(body); + logger.debug("Sending {} {} Body: {}", method.name(), url, bodyAsJson); + } catch (JsonProcessingException e) { + logRequest(logger, method, url); + logger.debug("Failed to parse object in logRequest. {}", body); + } + } + + public static void logRequest(final EELFLogger logger, final HttpMethod method, final String url) { + logger.debug("Sending {} {}", method.name(), url); + } + + public static void logResponse(final EELFLogger logger, final HttpMethod method, final String url, final Response response, final Class entityClass) { + if (!logger.isDebugEnabled()) { + return; + } + if (response == null) { + logger.debug("Received {} {} response: null", method.name(), url); + return; + } + try { + response.bufferEntity(); + logger.debug("Received {} {} Status: {} . Body: {}", method.name(), url, response.getStatus(), response.readEntity(entityClass)); + } + catch (ProcessingException | IllegalStateException e) { + logger.debug("Received {} {} Status: {} . Failed to read response as {}", method.name(), url, response.getStatus(), entityClass.getName()); + } + } + + public static void logResponse(final EELFLogger logger, final HttpMethod method, final String url, final Response response) { + logResponse(logger, method, url, response, String.class); + } + + public static HttpServletRequest getHttpServletRequest(){ + return ((ServletRequestAttributes) RequestContextHolder.currentRequestAttributes()).getRequest(); + } + + +} diff --git a/vid-app-common/src/main/java/org/onap/vid/utils/Streams.java b/vid-app-common/src/main/java/org/onap/vid/utils/Streams.java new file mode 100644 index 000000000..7f81b225a --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/utils/Streams.java @@ -0,0 +1,47 @@ +package org.onap.vid.utils; + +import java.util.Iterator; +import java.util.Spliterator; +import java.util.Spliterators; +import java.util.function.Consumer; +import java.util.function.Predicate; +import java.util.stream.Stream; +import java.util.stream.StreamSupport; + +public class Streams { + public static Predicate not(Predicate predicate) { + return predicate.negate(); + } + + public static Stream fromIterator(final Iterator iterator) { + Iterable iterable = () -> iterator; + return StreamSupport.stream(iterable.spliterator(), false); + } + + + // https://stackoverflow.com/questions/20746429/limit-a-stream-by-a-predicate + private static Spliterator takeWhile( + Spliterator splitr, Predicate predicate) { + return new Spliterators.AbstractSpliterator(splitr.estimateSize(), 0) { + boolean stillGoing = true; + @Override public boolean tryAdvance(Consumer consumer) { + if (stillGoing) { + boolean hadNext = splitr.tryAdvance(elem -> { + if (predicate.test(elem)) { + consumer.accept(elem); + } else { + stillGoing = false; + } + }); + return hadNext && stillGoing; + } + return false; + } + }; + } + + public static Stream takeWhile(Stream stream, Predicate predicate) { + return StreamSupport.stream(takeWhile(stream.spliterator(), predicate), false); + } + +} diff --git a/vid-app-common/src/main/java/org/openecomp/aai/util/AAIProperties.java b/vid-app-common/src/main/java/org/openecomp/aai/util/AAIProperties.java deleted file mode 100755 index 9716ba827..000000000 --- a/vid-app-common/src/main/java/org/openecomp/aai/util/AAIProperties.java +++ /dev/null @@ -1,68 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.aai.util; - - -import org.openecomp.portalsdk.core.util.SystemProperties; - -/** - * The Class AAIProperties. - */ -public class AAIProperties extends SystemProperties { - - /** The Constant AAI_SERVER_URL_BASE. */ - //VID Specific - public static final String AAI_SERVER_URL_BASE = "aai.server.url.base"; - - /** The Constant AAI_SERVER_URL. */ - public static final String AAI_SERVER_URL = "aai.server.url"; - - /** The Constant AAI_OLDSERVER_URL_BASE. */ - public static final String AAI_OLDSERVER_URL_BASE = "aai.oldserver.url.base"; - - /** The Constant AAI_OLDSERVER_URL. */ - public static final String AAI_OLDSERVER_URL = "aai.oldserver.url"; - - /** The Constant AAI_TRUSTSTORE_FILENAME. */ - public static final String AAI_TRUSTSTORE_FILENAME = "aai.truststore.filename"; - - /** The Constant AAI_TRUSTSTORE_PASSWD_X. */ - public static final String AAI_TRUSTSTORE_PASSWD_X = "aai.truststore.passwd.x"; - - /** The Constant AAI_KEYSTORE_FILENAME. */ - public static final String AAI_KEYSTORE_FILENAME = "aai.keystore.filename"; - - /** The Constant AAI_KEYSTORE_PASSWD_X. */ - public static final String AAI_KEYSTORE_PASSWD_X = "aai.keystore.passwd.x"; - - /** The Constant AAI_VID_USERNAME. */ - public static final String AAI_VID_USERNAME = "aai.vid.username"; - - /** The Constant AAI_VID_PASSWD_X. */ - public static final String AAI_VID_PASSWD_X = "aai.vid.passwd.x"; - - /** The Constant FILESEPARTOR. */ - public static final String FILESEPARTOR = (System.getProperty("file.separator") == null) ? "/" : System.getProperty("file.separator"); - - /** The Constant AAI_USE_CLIENT_CERT */ - public static final String AAI_USE_CLIENT_CERT = "aai.use.client.cert"; - -} diff --git a/vid-app-common/src/main/java/org/openecomp/aai/util/AAIRestInterface.java b/vid-app-common/src/main/java/org/openecomp/aai/util/AAIRestInterface.java deleted file mode 100755 index d9bb5c1f4..000000000 --- a/vid-app-common/src/main/java/org/openecomp/aai/util/AAIRestInterface.java +++ /dev/null @@ -1,356 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ -package org.openecomp.aai.util; - - -import java.io.UnsupportedEncodingException; -import java.net.MalformedURLException; -import java.net.URI; -import java.net.URISyntaxException; -import java.net.URL; -import java.net.URLEncoder; -import java.security.KeyManagementException; -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.Base64; -import java.util.Date; -import java.util.UUID; - -import javax.ws.rs.client.Client; -import javax.ws.rs.client.Entity; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; - -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.util.SystemProperties; -import org.eclipse.jetty.util.security.Password; -import org.openecomp.aai.util.AAIProperties; -import org.openecomp.aai.util.HttpsAuthClient; -/** - * The Class AAIRestInterface. - */ -public class AAIRestInterface { - - /** The logger. */ - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(AAIRestInterface.class); - - /** The Constant dateFormat. */ - final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); - - /** The client. */ - private static Client client = null; - - /** The rest srvr base URL. */ - private String restSrvrBaseURL; - - /** The certificate path. */ - public String certificatePath = ""; - - /** - * Instantiates a new AAI rest interface. - * - * @param certPath the cert path - */ - public AAIRestInterface(String certPath) - { - certificatePath = certPath; - } - - /** - * Encode URL. - * - * @param nodeKey the node key - * @return the string - * @throws UnsupportedEncodingException the unsupported encoding exception - */ - public String encodeURL (String nodeKey) throws UnsupportedEncodingException { - return URLEncoder.encode(nodeKey, "UTF-8").replaceAll("\\+", "%20"); - } - - /** - * Inits the rest client. - */ - private void initRestClient() - { - String methodName = "initRestClient"; - - if (client == null) { - try { - client = HttpsAuthClient.getClient(certificatePath); - } - catch (KeyManagementException e){ - logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== KeyManagementException in " + methodName + e.toString()); - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== KeyManagementException in " + methodName + e.toString()); - } catch (Exception e) { - logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== Exception in REST call to DB in initRestClient" + e.toString()); - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== Exception in REST call to DB : " + e.toString()); - } - } - } - - /** - * Sets the rest srvr base URL. - * - * @param baseURL the base URL - */ - public void SetRestSrvrBaseURL(String baseURL) - { - if (baseURL == null) - { - logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== REST Server base URL cannot be null."); - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== REST Server base URL cannot be null."); - } - - restSrvrBaseURL = baseURL; - } - - /** - * Gets the rest srvr base URL. - * - * @return the rest srvr base URL - */ - public String getRestSrvrBaseURL() - { - return restSrvrBaseURL; - } - - - /** - * Rest get. - * - * @param fromAppId the from app id - * @param transId the trans id - * @param requestUri the request uri - * @param xml the xml - * @return the string - * @throws UnsupportedEncodingException - */ - public Response RestGet(String fromAppId, String transId, String requestUri, boolean xml) throws UnsupportedEncodingException { - String methodName = "RestGet"; - - String responseType = "application/json"; - if (xml) - responseType = "application/xml"; - - initRestClient(); - - String clientCert = SystemProperties.getProperty(AAIProperties.AAI_USE_CLIENT_CERT); - - boolean useClientCert = false; - if (clientCert != null && - SystemProperties.getProperty(AAIProperties.AAI_USE_CLIENT_CERT).equalsIgnoreCase("true")) { - useClientCert = true; - } - String url = ""; - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - - url = SystemProperties.getProperty(AAIProperties.AAI_SERVER_URL) + requestUri; - - try { - // what is the point of this, just to check syntax?? - URL urlObj= new URL(url); - URI uri = new URI(urlObj.getProtocol(), urlObj.getUserInfo(), urlObj.getHost(), urlObj.getPort(), urlObj.getPath(), urlObj.getQuery(), urlObj.getRef()); - url = uri.toASCIIString(); - } catch (URISyntaxException | MalformedURLException e) { - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " bad URL"); - return null; - } - logger.debug(dateFormat.format(new Date()) + "<== " + url + " for the get REST API"); - - final Response cres; - if (useClientCert == true) { - cres = client.target(url) - .request() - .accept(responseType) - .header("X-TransactionId", transId) - .header("X-FromAppId", fromAppId) - .header("Content-Type", "application/json") - .get(); - } else { - - String vidUsername = SystemProperties.getProperty(AAIProperties.AAI_VID_USERNAME); - String vidPassword = Password.deobfuscate(SystemProperties.getProperty(AAIProperties.AAI_VID_PASSWD_X)); - String encodeThis = vidUsername + ":" + vidPassword; - - cres = client.target(url) - .request() - .accept(responseType) - .header("X-TransactionId", transId) - .header("X-FromAppId", fromAppId) - .header("Content-Type", "application/json") - .header("Authorization", "Basic " + Base64.getEncoder().encodeToString(encodeThis.getBytes("utf-8"))) - .get(); - } -// String r = cres.readEntity(String.class); - if (cres.getStatus() == 200) { - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " REST api GET was successful!"); - logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + methodName + " REST api GET was successful!"); - } else { - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName +" with status="+cres.getStatus()+", url="+url); - } - return cres; -// logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName +" resp=" + r ); -// return r; - } - - - /** - * Delete. - * - * @param sourceID the source ID - * @param transId the trans id - * @param path the path - * @return true, if successful - */ - public boolean Delete(String sourceID, String transId, String path) { - String methodName = "Delete"; - String url=""; - transId += ":" + UUID.randomUUID().toString(); - logger.debug(dateFormat.format(new Date()) + "<== " + methodName + " start"); - - initRestClient(); - String request = "{}"; - url = SystemProperties.getProperty(AAIProperties.AAI_SERVER_URL) + path; - final Response cres = client.target(url) - .request() - .accept("application/json") - .header("X-TransactionId", transId) - .header("X-FromAppId", sourceID) - //.entity(request) - .delete(); - - if (cres.getStatus() == 404) { // resource not found - String msg = "Resource does not exist...: " + cres.getStatus() - + ":" + cres.readEntity(String.class); - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + msg); - return false; - } else if (cres.getStatus() == 200 || cres.getStatus() == 204){ - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "Resource " + url + " deleted"); - return true; - } else { - String msg = "Deleting Resource failed: " + cres.getStatus() - + ":" + cres.readEntity(String.class); - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + msg); - } - - return false; - } - - - /** - * Rest put. - * - * @param fromAppId the from app id - * @param transId the trans id - * @param path the path - * @param payload the payload - * @param xml the xml - * @return the string - */ - public Response RestPut(String fromAppId, String transId, String path, String payload, boolean xml) { - String methodName = "RestPost"; - String url=""; - transId = UUID.randomUUID().toString(); - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - - try { - - String responseType = "application/json"; - if (xml) - responseType = "application/xml"; - - initRestClient(); - - url = SystemProperties.getProperty(AAIProperties.AAI_SERVER_URL) + path; - - final Response cres = client.target(url) - .request() - .accept(responseType) - .header("X-TransactionId", transId) - .header("X-FromAppId", fromAppId) - .put(Entity.entity(payload, MediaType.APPLICATION_JSON)); - - if (cres.getStatus() == 200 && cres.getStatus() <= 299) { - logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + methodName + " REST api POST was successful!"); - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " REST api POST was successful!"); - } else { - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName +" with status="+cres.getStatus()+", url="+url); - } - return cres; - } catch (Exception e) { - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " with url="+url+ ", Exception: " + e.toString()); - } - return null; - } - - - - /** - * Rest post. - * - * @param fromAppId the from app id - * @param transId the trans id - * @param path the path - * @param payload the payload - * @param xml the xml - * @return the string - */ - public Response RestPost(String fromAppId, String transId, String path, String payload, boolean xml) { - String methodName = "RestPost"; - String url=""; - transId = UUID.randomUUID().toString(); - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - - try { - - String responseType = "application/json"; - if (xml) - responseType = "application/xml"; - - initRestClient(); - - url = SystemProperties.getProperty(AAIProperties.AAI_SERVER_URL_BASE) + path; - - String vidUsername = SystemProperties.getProperty(AAIProperties.AAI_VID_USERNAME); - String vidPassword = Password.deobfuscate(SystemProperties.getProperty(AAIProperties.AAI_VID_PASSWD_X)); - String encodeThis = vidUsername + ":" + vidPassword; - - final Response cres = client.target(url) - .request() - .accept(responseType) - .header("X-TransactionId", transId) - .header("X-FromAppId", fromAppId) - .header("Authorization", "Basic " + Base64.getEncoder().encodeToString(encodeThis.getBytes("utf-8"))) - .post(Entity.entity(payload, MediaType.APPLICATION_JSON)); - - if (cres.getStatus() == 200 && cres.getStatus() <= 299) { - logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + methodName + " REST api POST was successful!"); - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " REST api POST was successful!"); - } else { - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName +" with status="+cres.getStatus()+", url="+url); - } - return cres; - } catch (Exception e) { - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " with url="+url+ ", Exception: " + e.toString()); - } - return null; - } - -} diff --git a/vid-app-common/src/main/java/org/openecomp/aai/util/CustomJacksonJaxBJsonProvider.java b/vid-app-common/src/main/java/org/openecomp/aai/util/CustomJacksonJaxBJsonProvider.java deleted file mode 100755 index 1ed079219..000000000 --- a/vid-app-common/src/main/java/org/openecomp/aai/util/CustomJacksonJaxBJsonProvider.java +++ /dev/null @@ -1,73 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.aai.util; - - -import javax.ws.rs.ext.Provider; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.SerializationFeature; -import com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider; -import com.fasterxml.jackson.module.jaxb.JaxbAnnotationModule; - -/** - * The Class CustomJacksonJaxBJsonProvider. - */ -@Provider -public class CustomJacksonJaxBJsonProvider extends JacksonJaxbJsonProvider { - - /** The common mapper. */ - private static ObjectMapper commonMapper = null; - - /** - * Instantiates a new custom jackson jax B json provider. - */ - public CustomJacksonJaxBJsonProvider() { - if (commonMapper == null) { - ObjectMapper mapper = new ObjectMapper(); - - mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); - - mapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false); - mapper.configure(SerializationFeature.INDENT_OUTPUT, false); - mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, false); - - mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); - mapper.configure(DeserializationFeature.UNWRAP_ROOT_VALUE, false); - - mapper.registerModule(new JaxbAnnotationModule()); - - commonMapper = mapper; - } - super.setMapper(commonMapper); - } - - /** - * Gets the mapper. - * - * @return the mapper - */ - public ObjectMapper getMapper() { - return commonMapper; - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/aai/util/HttpsAuthClient.java b/vid-app-common/src/main/java/org/openecomp/aai/util/HttpsAuthClient.java deleted file mode 100755 index 3323b3fb4..000000000 --- a/vid-app-common/src/main/java/org/openecomp/aai/util/HttpsAuthClient.java +++ /dev/null @@ -1,140 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.aai.util; - - -import java.io.FileInputStream; -import java.security.KeyManagementException; -import java.security.KeyStore; - -import javax.net.ssl.HostnameVerifier; -import javax.net.ssl.HttpsURLConnection; -import javax.net.ssl.KeyManagerFactory; -import javax.net.ssl.SSLContext; -import javax.net.ssl.SSLSession; -import javax.ws.rs.client.Client; -import javax.ws.rs.client.ClientBuilder; - -import org.eclipse.jetty.util.security.Password; -import org.glassfish.jersey.client.ClientConfig; -import org.glassfish.jersey.client.HttpUrlConnectorProvider; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.util.SystemProperties; -/** - * The Class HttpsAuthClient. - */ -public class HttpsAuthClient{ - /** The logger. */ - static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(HttpsAuthClient.class); - - /** - * Gets the client. - * - * @param certFilePath the cert file path - * @return the client - * @throws KeyManagementException the key management exception - */ - public static Client getClient(String certFilePath) throws KeyManagementException { - - ClientConfig config = new ClientConfig(); - //config.getFeatures().put(JSONConfiguration.FEATURE_POJO_MAPPING, Boolean.TRUE); - //config.getClasses().add(org.openecomp.aai.util.CustomJacksonJaxBJsonProvider.class); - - try { - - config.property(HttpUrlConnectorProvider.SET_METHOD_WORKAROUND, Boolean.TRUE ); - - config.connectorProvider(new HttpUrlConnectorProvider().useSetMethodWorkaround()); - String truststore_path = certFilePath + AAIProperties.FILESEPARTOR + SystemProperties.getProperty(AAIProperties.AAI_TRUSTSTORE_FILENAME); - String truststore_password = SystemProperties.getProperty(AAIProperties.AAI_TRUSTSTORE_PASSWD_X); - String decrypted_truststore_password = Password.deobfuscate(truststore_password); - - boolean useClientCert = false; - - String keystore_path = certFilePath + AAIProperties.FILESEPARTOR + SystemProperties.getProperty(AAIProperties.AAI_KEYSTORE_FILENAME); - String keystore_password = SystemProperties.getProperty(AAIProperties.AAI_KEYSTORE_PASSWD_X); - String decrypted_keystore_password = Password.deobfuscate(keystore_password); - - String clientCert = SystemProperties.getProperty(AAIProperties.AAI_USE_CLIENT_CERT); - - if (clientCert != null && - SystemProperties.getProperty(AAIProperties.AAI_USE_CLIENT_CERT).equalsIgnoreCase("true")) { - useClientCert = true; - } - - System.setProperty("javax.net.ssl.trustStore", truststore_path); - System.setProperty("javax.net.ssl.trustStorePassword", decrypted_truststore_password); - HttpsURLConnection.setDefaultHostnameVerifier( new HostnameVerifier(){ - public boolean verify(String string,SSLSession ssls) { - return true; - } - }); - - final SSLContext ctx = SSLContext.getInstance("TLS"); - - KeyManagerFactory kmf = null; - if (useClientCert) { - - try { - kmf = KeyManagerFactory.getInstance("SunX509"); - FileInputStream fin = new FileInputStream(keystore_path); - KeyStore ks = KeyStore.getInstance("PKCS12"); - char[] pwd = decrypted_keystore_password.toCharArray(); - ks.load(fin, pwd); - kmf.init(ks, pwd); - } catch (Exception e) { - //System.out.println("Error setting up kmf: exiting"); - logger.debug(EELFLoggerDelegate.debugLogger, "Error setting up kmf: exiting"); - e.printStackTrace(); - return null; - } - ctx.init(kmf.getKeyManagers(), null, null); - - return ClientBuilder.newBuilder() - .sslContext(ctx) - .hostnameVerifier(new HostnameVerifier() { - @Override - public boolean verify( String s, SSLSession sslSession ) { - return true; - } - }).withConfig(config) - .build() - .register(org.openecomp.aai.util.CustomJacksonJaxBJsonProvider.class); - } else { - return ClientBuilder.newBuilder() - .hostnameVerifier(new HostnameVerifier() { - @Override - public boolean verify( String s, SSLSession sslSession ) { - return true; - } - }).withConfig(config) - .build() - .register(org.openecomp.aai.util.CustomJacksonJaxBJsonProvider.class); - } - } catch (Exception e) { - logger.debug(EELFLoggerDelegate.debugLogger, "Error setting up config: exiting"); - //System.out.println("Error setting up config: exiting"); - e.printStackTrace(); - System.exit(1); - return null; - } - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/aai/util/HttpsComponentsClient.java b/vid-app-common/src/main/java/org/openecomp/aai/util/HttpsComponentsClient.java deleted file mode 100755 index a041c6520..000000000 --- a/vid-app-common/src/main/java/org/openecomp/aai/util/HttpsComponentsClient.java +++ /dev/null @@ -1,99 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.aai.util; - -import java.io.FileInputStream; -import java.security.KeyManagementException; -import java.security.KeyStore; - -import javax.net.ssl.SSLContext; - -import org.apache.http.conn.ssl.SSLContextBuilder; -import org.apache.http.impl.client.CloseableHttpClient; -import org.apache.http.conn.ssl.SSLConnectionSocketFactory; -import org.apache.http.impl.client.HttpClients; -import org.eclipse.jetty.util.security.Password; -import org.openecomp.portalsdk.core.util.SystemProperties; - - -/** - * The Class HttpsComponentsClient. - */ -public class HttpsComponentsClient{ - - /** - * Gets the client. - * - * @param certFilePath the cert file path - * @return the client - * @throws KeyManagementException the key management exception - */ - public static CloseableHttpClient getClient(String certFilePath) throws Exception { - CloseableHttpClient httpclient = null; - try { - - String truststore_path = certFilePath + AAIProperties.FILESEPARTOR + SystemProperties.getProperty(AAIProperties.AAI_TRUSTSTORE_FILENAME); - String truststore_password = SystemProperties.getProperty(AAIProperties.AAI_TRUSTSTORE_PASSWD_X); - String decrypted_truststore_password = Password.deobfuscate(truststore_password); - String keystore_path = certFilePath + AAIProperties.FILESEPARTOR + SystemProperties.getProperty(AAIProperties.AAI_KEYSTORE_FILENAME); - String keystore_password = SystemProperties.getProperty(AAIProperties.AAI_KEYSTORE_PASSWD_X); - String decrypted_keystore_password = Password.deobfuscate(keystore_password); - - SSLContextBuilder sslContextB = new SSLContextBuilder(); - - KeyStore ks = KeyStore.getInstance("PKCS12"); - FileInputStream fin = new FileInputStream(keystore_path); - char[] pwd = decrypted_keystore_password.toCharArray(); - ks.load(fin, pwd); - - sslContextB.loadKeyMaterial(ks, pwd); - - KeyStore ts = KeyStore.getInstance("JKS"); - FileInputStream fin1 = new FileInputStream(truststore_path); - char[] pwd1 = decrypted_truststore_password.toCharArray(); - ts.load(fin1, pwd1); - - sslContextB.loadTrustMaterial(ts); - sslContextB.loadKeyMaterial(ks, pwd); - sslContextB.useTLS(); - - SSLContext sslcontext = sslContextB.build(); - - SSLConnectionSocketFactory sslFactory = new SSLConnectionSocketFactory( - sslcontext, - new String[] { "TLSv1.1", "TLSv1.2" }, - null, - SSLConnectionSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER ); - - httpclient = HttpClients.custom() - .setSSLSocketFactory(sslFactory) - .build(); - - - } catch (Exception e) { - throw e; - } - return httpclient; - } - - - -} diff --git a/vid-app-common/src/main/java/org/openecomp/aai/util/JettyObfuscationConversionCommandLineUtil.java b/vid-app-common/src/main/java/org/openecomp/aai/util/JettyObfuscationConversionCommandLineUtil.java deleted file mode 100755 index e31b0c1c7..000000000 --- a/vid-app-common/src/main/java/org/openecomp/aai/util/JettyObfuscationConversionCommandLineUtil.java +++ /dev/null @@ -1,78 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.aai.util; - - -import org.apache.commons.cli.BasicParser; -import org.apache.commons.cli.CommandLine; -import org.apache.commons.cli.CommandLineParser; -import org.apache.commons.cli.Options; -import org.apache.commons.cli.ParseException; -import org.eclipse.jetty.util.security.Password; - - -public class JettyObfuscationConversionCommandLineUtil { - /** - * The main method. - * - * @param args the arguments - */ - public static void main(String[] args){ - Options options = new Options(); - options.addOption("e", true, "obfuscate the given string"); - options.addOption("d", true, "deobfuscate the given string"); - - CommandLineParser parser = new BasicParser(); - - try { - CommandLine cmd = parser.parse(options, args); - String toProcess = null; - - if (cmd.hasOption("e")){ - toProcess = cmd.getOptionValue("e"); - String encoded = Password.obfuscate(toProcess); - System.out.println(encoded); - } else if (cmd.hasOption("d")) { - toProcess = cmd.getOptionValue("d"); - String decoded_str = Password.deobfuscate(toProcess); - System.out.println(decoded_str); - } else { - usage(); - } - } catch (ParseException e) { - System.out.println("failed to parse input"); - System.out.println(e.toString()); - usage(); - } catch (Exception e) { - System.out.println("exception:" + e.toString()); - } - } - - /** - * Usage. - */ - private static void usage(){ - System.out.println("usage:");; - System.out.println("-e [string] to obfuscate"); - System.out.println("-d [string] to deobfuscate"); - System.out.println("-h help"); - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/RelatedTo.java b/vid-app-common/src/main/java/org/openecomp/vid/RelatedTo.java deleted file mode 100644 index 48ca49705..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/RelatedTo.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.openecomp.vid; - -import com.fasterxml.jackson.annotation.*; -import org.codehaus.jackson.annotate.JsonProperty; - -import java.util.HashMap; -import java.util.Map; - -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "id", - "node-type", - "url" -}) -public class RelatedTo { - - @JsonProperty("id") - public String id; - @JsonProperty("node-type") - public String nodeType; - @JsonProperty("url") - public String url; - @JsonIgnore - private Map additionalProperties = new HashMap(); - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/aai/AaiClient.java b/vid-app-common/src/main/java/org/openecomp/vid/aai/AaiClient.java deleted file mode 100644 index 0f07f2066..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/aai/AaiClient.java +++ /dev/null @@ -1,352 +0,0 @@ -package org.openecomp.vid.aai; - -import org.apache.http.HttpStatus; -import org.codehaus.jackson.map.ObjectMapper; -import org.ecomp.aai.model.AaiAICZones.AicZones; -import org.json.simple.JSONArray; -import org.json.simple.JSONObject; -import org.json.simple.parser.JSONParser; -import org.openecomp.aai.util.AAIRestInterface; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.vid.aai.model.ServiceRelationships; -import org.openecomp.vid.aai.model.AaiGetServicesRequestModel.GetServicesAAIRespone; -import org.openecomp.vid.aai.model.AaiGetTenatns.GetTenantsResponse; -import org.openecomp.vid.model.SubscriberList; -import org.springframework.beans.factory.annotation.Autowired; - -import javax.servlet.ServletContext; -import javax.ws.rs.BadRequestException; -import javax.ws.rs.WebApplicationException; -import javax.ws.rs.core.Response; -import java.io.File; -import java.io.IOException; -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.Iterator; -import java.util.List; -import java.util.UUID; - - -/** - * Created by Oren on 7/4/17. - */ -public class AaiClient implements AaiClientInterface { - - /** - * The Constant dateFormat. - */ - final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); - protected String fromAppId = "VidAaiController"; - @Autowired - ServletContext servletContext; - /** - * The logger - */ - - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(AaiClient.class); - - - public AaiClient() { - // certiPath = getCertificatesFile().getAbsolutePath(); - // depth = "0"; - } - - public AaiClient(ServletContext context) { - servletContext = context; - } - - - private static String checkForNull(String local) { - if (local != null) - return local; - else - return ""; - - } - - @Override - public AaiResponse getAllSubscribers() { - String certiPath = getCertificatesFile().getAbsolutePath(); - String depth = "0"; - Response resp = doAaiGet(certiPath, "business/customers?subscriber-type=INFRA&depth=" + depth, false); - return proccessAaiResponse(resp, SubscriberList.class, null); - } - - - @Override - public AaiResponse getAllAicZones() { - String certiPath = getCertificatesFile().getAbsolutePath(); - Response resp = doAaiGet(certiPath, "network/zones", false); - AaiResponse aaiAicZones = proccessAaiResponse(resp, AicZones.class, null); - return aaiAicZones; - } - - - @Override - public AaiResponse getAicZoneForPnf(String globalCustomerId , String serviceType , String serviceId) { - String certiPath = getCertificatesFile().getAbsolutePath(); - String aicZonePath = "business/customers/customer/" + globalCustomerId + "/service-subscriptions/service-subscription/" + serviceType + "/service-instances/service-instance/" + serviceId; - Response resp = doAaiGet(certiPath , aicZonePath , false); - AaiResponse aaiResponse = proccessAaiResponse(resp , ServiceRelationships.class , null); - ServiceRelationships serviceRelationships = (ServiceRelationships)aaiResponse.getT(); - String aicZone = serviceRelationships.getRelationshipList().getRelationship().get(0).getRelatedToPropertyList().get(0).getPropertyValue(); - AaiResponse aaiAicZonaForPnfResponse = new AaiResponse(aicZone , null ,HttpStatus.SC_OK); - return aaiAicZonaForPnfResponse; - } - - - @Override - public AaiResponse getVNFData() { - String certiPath = getCertificatesFile().getAbsolutePath(); - String payload = "{\"start\": [\"/business/customers/customer/e433710f-9217-458d-a79d-1c7aff376d89/service-subscriptions/service-subscription/VIRTUAL%20USP/service-instances/service-instance/3f93c7cb-2fd0-4557-9514-e189b7b04f9d\"], \"query\": \"query/vnf-topology-fromServiceInstance\"}"; - Response resp = doAaiPut(certiPath, "query?format=simple", payload, false); - return proccessAaiResponse(resp, AaiGetVnfResponse.class, null); - - } - - @Override - public Response getVNFData(String globalSubscriberId, String serviceType) { - String certiPath = getCertificatesFile().getAbsolutePath(); - String payload = "{\"start\": [\"business/customers/customer/" + globalSubscriberId + "/service-subscriptions/service-subscription/"+ serviceType +"/service-instances\"]," + - "\"query\": \"query/vnf-topology-fromServiceInstance\"}"; - return doAaiPut(certiPath, "query?format=simple", payload, false); - - } - - @Override - public AaiResponse getVNFData(String globalSubscriberId, String serviceType, String serviceInstanceId) { - String certiPath = getCertificatesFile().getAbsolutePath(); - String payload = "{\"start\": [\"/business/customers/customer/" + globalSubscriberId + "/service-subscriptions/service-subscription/" + serviceType + "/service-instances/service-instance/" + serviceInstanceId + "\"], \"query\": \"query/vnf-topology-fromServiceInstance\"}"; - Response resp = doAaiPut(certiPath, "query?format=simple", payload, false); - return proccessAaiResponse(resp, AaiGetVnfResponse.class, null); - } - - @Override - public Response getVersionByInvariantId(List modelInvariantId) { - File certiPath = getCertificatesFile(); - StringBuilder sb = new StringBuilder(); - for (String id : modelInvariantId){ - sb.append("&model-invariant-id="); - sb.append(id); - - } - Response resp = doAaiGet(certiPath.getAbsolutePath(), "service-design-and-creation/models?depth=2"+ sb.toString(), false); - return resp; - } - - @Override - public AaiResponse getSubscriberData(String subscriberId) { - File certiPath = getCertificatesFile(); - String depth = "2"; - AaiResponse subscriberDataResponse; - Response resp = doAaiGet(certiPath.getAbsolutePath(), "business/customers/customer/" + subscriberId + "?depth=" + depth, false); - subscriberDataResponse = proccessAaiResponse(resp, Services.class, null); - return subscriberDataResponse; - } - - @Override - public AaiResponse getServices() { - File certiPath = getCertificatesFile(); - Response resp = doAaiGet(certiPath.getAbsolutePath(), "service-design-and-creation/services", false); - AaiResponse getServicesResponse = proccessAaiResponse(resp, GetServicesAAIRespone.class, null); - - return getServicesResponse; - } - - @Override - public AaiResponse getTenants(String globalCustomerId, String serviceType) { - File certiPath = getCertificatesFile(); - String url = "business/customers/customer/" + globalCustomerId + "/service-subscriptions/service-subscription/" + serviceType; - - Response resp = doAaiGet(certiPath.getAbsolutePath(), url, false); - String responseAsString = parseForTenantsByServiceSubscription(resp.readEntity(String.class)); - - AaiResponse getTenantsResponse = proccessAaiResponse(resp, GetTenantsResponse[].class, responseAsString); - return getTenantsResponse; - } - - private AaiResponse proccessAaiResponse(Response resp, Class classType, String responseBody) { - AaiResponse subscriberDataResponse; - if (resp == null) { - subscriberDataResponse = new AaiResponse<>(null, null, HttpStatus.SC_INTERNAL_SERVER_ERROR); - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "Invalid response from AAI"); - } else { - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "getSubscribers() resp=" + resp.getStatusInfo().toString()); - if (resp.getStatus() != HttpStatus.SC_OK) { - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "Invalid response from AAI"); - subscriberDataResponse = new AaiResponse<>(null, resp.readEntity(String.class), resp.getStatus()); - } else { - String finalResponse; - try { - if (responseBody != null) { - finalResponse = responseBody; - } else { - finalResponse = resp.readEntity(String.class); - } - - subscriberDataResponse = new AaiResponse<>((new ObjectMapper().readValue(finalResponse, classType)), null, HttpStatus.SC_OK); - - } catch (IOException e) { - subscriberDataResponse = new AaiResponse<>(null, null, HttpStatus.SC_INTERNAL_SERVER_ERROR); - } - - } - } - return subscriberDataResponse; - } - - private File getCertificatesFile() { - if (servletContext != null) - return new File(servletContext.getRealPath("/WEB-INF/cert/")); - return null; - } - - @SuppressWarnings("all") - protected Response doAaiGet(String certiPath, String uri, boolean xml) { - String methodName = "doAaiGet"; - String transId = UUID.randomUUID().toString(); - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - - Response resp = null; - try { - - AAIRestInterface restContrller = new AAIRestInterface(certiPath); - resp = restContrller.RestGet(fromAppId, transId, uri, xml); - - } catch (WebApplicationException e) { - final String message = ((BadRequestException) e).getResponse().readEntity(String.class); - logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + message); - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + message); - } catch (Exception e) { - logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); - } - - return resp; - } - - private String parseForTenantsByServiceSubscription(String resp) { - String tenantList = ""; - - try { - JSONParser jsonParser = new JSONParser(); - - JSONObject jsonObject = (JSONObject) jsonParser.parse(resp); - - return parseServiceSubscriptionObjectForTenants(jsonObject); - } catch (Exception ex) { - - } - - return tenantList; - } - - protected Response doAaiPut(String certiPath, String uri, String payload, boolean xml) { - String methodName = "doAaiPut"; - String transId = UUID.randomUUID().toString(); - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - - Response resp = null; - try { - - AAIRestInterface restContrller = new AAIRestInterface(certiPath); - resp = restContrller.RestPut(fromAppId, transId, uri, payload, xml); - - } catch (Exception e) { - logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); - } - - return resp; - } - - - public static String parseServiceSubscriptionObjectForTenants(JSONObject jsonObject) { - - JSONArray tenantArray = new JSONArray(); - boolean bconvert = false; - - try { - JSONObject relationShipListsObj = (JSONObject) jsonObject.get("relationship-list"); - if (relationShipListsObj != null) { - JSONArray rShipArray = (JSONArray) relationShipListsObj.get("relationship"); - if (rShipArray != null) { - Iterator i1 = rShipArray.iterator(); - - while (i1.hasNext()) { - - JSONObject inner1Obj = (JSONObject) i1.next(); - - if (inner1Obj == null) - continue; - - String relatedTo = checkForNull((String) inner1Obj.get("related-to")); - if (relatedTo.equalsIgnoreCase("tenant")) { - JSONObject tenantNewObj = new JSONObject(); - - String relatedLink = checkForNull((String) inner1Obj.get("related-link")); - tenantNewObj.put("link", relatedLink); - - JSONArray rDataArray = (JSONArray) inner1Obj.get("relationship-data"); - if (rDataArray != null) { - Iterator i2 = rDataArray.iterator(); - - while (i2.hasNext()) { - JSONObject inner2Obj = (JSONObject) i2.next(); - - if (inner2Obj == null) - continue; - - String rShipKey = checkForNull((String) inner2Obj.get("relationship-key")); - String rShipVal = checkForNull((String) inner2Obj.get("relationship-value")); - if (rShipKey.equalsIgnoreCase("cloud-region.cloud-owner")) { - tenantNewObj.put("cloudOwner", rShipVal); - } else if (rShipKey.equalsIgnoreCase("cloud-region.cloud-region-id")) { - tenantNewObj.put("cloudRegionID", rShipVal); - } - - if (rShipKey.equalsIgnoreCase("tenant.tenant-id")) { - tenantNewObj.put("tenantID", rShipVal); - } - } - } - - JSONArray relatedTPropArray = (JSONArray) inner1Obj.get("related-to-property"); - if (relatedTPropArray != null) { - Iterator i3 = relatedTPropArray.iterator(); - - while (i3.hasNext()) { - JSONObject inner3Obj = (JSONObject) i3.next(); - - if (inner3Obj == null) - continue; - - String propKey = checkForNull((String) inner3Obj.get("property-key")); - String propVal = checkForNull((String) inner3Obj.get("property-value")); - if (propKey.equalsIgnoreCase("tenant.tenant-name")) { - tenantNewObj.put("tenantName", propVal); - } - } - } - bconvert = true; - tenantArray.add(tenantNewObj); - } - } - - } - } - } catch (NullPointerException ex) { - - - } - - if (bconvert) - return tenantArray.toJSONString(); - else - return ""; - - } - - -} \ No newline at end of file diff --git a/vid-app-common/src/main/java/org/openecomp/vid/aai/AaiClientInterface.java b/vid-app-common/src/main/java/org/openecomp/vid/aai/AaiClientInterface.java deleted file mode 100644 index f1b1ba2df..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/aai/AaiClientInterface.java +++ /dev/null @@ -1,33 +0,0 @@ -package org.openecomp.vid.aai; - -import org.openecomp.vid.aai.model.AaiGetTenatns.GetTenantsResponse; -import org.openecomp.vid.model.SubscriberList; - -import javax.ws.rs.core.Response; -import java.util.List; - -/** - * Created by Oren on 7/4/17. - */ -public interface AaiClientInterface { - - AaiResponse getAllSubscribers(); - - AaiResponse getSubscriberData(String subscriberId); - - AaiResponse getServices(); - - AaiResponse getTenants(String globalCustomerId, String serviceType); - - AaiResponse getAllAicZones(); - - AaiResponse getAicZoneForPnf(String globalCustomerId , String serviceType , String serviceId); - - AaiResponse getVNFData(); - - Response getVNFData(String globalSubscriberId, String serviceType); - - AaiResponse getVNFData(String globalSubscriberId, String serviceType, String serviceInstanceId); - - Response getVersionByInvariantId(List modelInvariantId); -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/aai/AaiGetVnfResponse.java b/vid-app-common/src/main/java/org/openecomp/vid/aai/AaiGetVnfResponse.java deleted file mode 100644 index 7c9d44b12..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/aai/AaiGetVnfResponse.java +++ /dev/null @@ -1,28 +0,0 @@ -package org.openecomp.vid.aai; - -import com.fasterxml.jackson.annotation.*; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "results" -}) -public class AaiGetVnfResponse { - @JsonProperty("results") - public List results = null; - @JsonIgnore - private Map additionalProperties = new HashMap(); - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/aai/AaiResponse.java b/vid-app-common/src/main/java/org/openecomp/vid/aai/AaiResponse.java deleted file mode 100644 index 337d1371d..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/aai/AaiResponse.java +++ /dev/null @@ -1,21 +0,0 @@ -package org.openecomp.vid.aai; - -import org.openecomp.vid.model.ProxyResponse; - -/** - * Created by Oren on 7/10/17. - */ -public class AaiResponse extends ProxyResponse{ - - T t; - - public AaiResponse(T t, String errorMessage, int aaiHttpCode) { - this.t = t; - this.errorMessage = errorMessage; - this.httpCode = aaiHttpCode; - } - - public T getT() { - return t; - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/aai/ServiceInstance.java b/vid-app-common/src/main/java/org/openecomp/vid/aai/ServiceInstance.java deleted file mode 100644 index 45f7947ef..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/aai/ServiceInstance.java +++ /dev/null @@ -1,33 +0,0 @@ -package org.openecomp.vid.aai; - -import org.codehaus.jackson.annotate.JsonIgnoreProperties; -import org.codehaus.jackson.annotate.JsonProperty; - -@JsonIgnoreProperties(ignoreUnknown = true) -public class ServiceInstance { - - @JsonProperty("service-instance-id") - public String serviceInstanceId; - - @JsonProperty("service-instance-name") - public String serviceInstanceName; - - @JsonProperty("persona-model-id") - public String personaModelId; - - @JsonProperty("persona-model-version") - public String personaModelVersion; - - @JsonProperty("resource-version") - public String resourceVersion; - - @JsonProperty("orchestration-status") - public String orchestrationStatus; - - @JsonProperty("model-invariant-id") - public String modelInvariantId; - - @JsonProperty("model-version-id") - public String modelVersionId; - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/aai/ServiceInstances.java b/vid-app-common/src/main/java/org/openecomp/vid/aai/ServiceInstances.java deleted file mode 100644 index 063317e43..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/aai/ServiceInstances.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.openecomp.vid.aai; - -import org.codehaus.jackson.annotate.JsonIgnoreProperties; -import org.codehaus.jackson.annotate.JsonProperty; - -import java.util.List; - -@JsonIgnoreProperties(ignoreUnknown = true) -public class ServiceInstances { - - @JsonProperty("service-instance") - public List serviceInstance; - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/aai/ServiceProperties.java b/vid-app-common/src/main/java/org/openecomp/vid/aai/ServiceProperties.java deleted file mode 100644 index 113f113d3..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/aai/ServiceProperties.java +++ /dev/null @@ -1,90 +0,0 @@ -package org.openecomp.vid.aai; - -import com.fasterxml.jackson.annotation.*; -import org.codehaus.jackson.annotate.JsonProperty; - -import java.util.HashMap; -import java.util.Map; - -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "service-instance-id", - "service-instance-name", - "model-invariant-id", - "model-version-id", - "resource-version", - "orchestration-status", - "global-customer-id", - "subscriber-name", - "subscriber-type", - "vnf-id", - "vnf-name", - "vnf-type", - "service-id", - "prov-status", - "in-maint", - "is-closed-loop-disabled", - "model-customization-id", - "nf-type", - "nf-function", - "nf-role", - "nf-naming-code" -}) -public class ServiceProperties { - - @JsonProperty("service-instance-id") - public String serviceInstanceId; - @JsonProperty("service-instance-name") - public String serviceInstanceName; - @JsonProperty("model-invariant-id") - public String modelInvariantId; - @JsonProperty("model-version-id") - public String modelVersionId; - @JsonProperty("resource-version") - public String resourceVersion; - @JsonProperty("orchestration-status") - public String orchestrationStatus; - @JsonProperty("global-customer-id") - public String globalCustomerId; - @JsonProperty("subscriber-name") - public String subscriberName; - @JsonProperty("subscriber-type") - public String subscriberType; - @JsonProperty("vnf-id") - public String vnfId; - @JsonProperty("vnf-name") - public String vnfName; - @JsonProperty("vnf-type") - public String vnfType; - @JsonProperty("service-id") - public String serviceId; - @JsonProperty("prov-status") - public String provStatus; - @JsonProperty("in-maint") - public Boolean inMaint; - @JsonProperty("is-closed-loop-disabled") - public Boolean isClosedLoopDisabled; - @JsonProperty("model-customization-id") - public String modelCustomizationId; - @JsonProperty("nf-type") - public String nfType; - @JsonProperty("nf-function") - public String nfFunction; - @JsonProperty("nf-role") - public String nfRole; - @JsonProperty("nf-naming-code") - public String nfNamingCode; - @JsonIgnore - private Map additionalProperties = new HashMap(); - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/aai/ServiceSubscription.java b/vid-app-common/src/main/java/org/openecomp/vid/aai/ServiceSubscription.java deleted file mode 100644 index 6a178d970..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/aai/ServiceSubscription.java +++ /dev/null @@ -1,20 +0,0 @@ -package org.openecomp.vid.aai; - -import org.codehaus.jackson.annotate.JsonIgnoreProperties; -import org.codehaus.jackson.annotate.JsonProperty; - -@JsonIgnoreProperties(ignoreUnknown = true) -public class ServiceSubscription { - - @JsonProperty("service-type") - public String serviceType; - - @JsonProperty("resource-version") - public String resourceVersion; - - @JsonProperty("service-instances") - public ServiceInstances serviceInstances; - - @JsonProperty("is-permitted") - public boolean isPermitted =false; -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/aai/ServiceSubscriptions.java b/vid-app-common/src/main/java/org/openecomp/vid/aai/ServiceSubscriptions.java deleted file mode 100644 index eaadba2cc..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/aai/ServiceSubscriptions.java +++ /dev/null @@ -1,17 +0,0 @@ -package org.openecomp.vid.aai; - -import org.codehaus.jackson.annotate.JsonIgnoreProperties; -import org.codehaus.jackson.annotate.JsonProperty; - -import java.util.List; - -/** - * Created by Oren on 7/9/17. - */ -@JsonIgnoreProperties(ignoreUnknown = true) - -public class ServiceSubscriptions { - - @JsonProperty("service-subscription") - public List serviceSubscription; -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/aai/Services.java b/vid-app-common/src/main/java/org/openecomp/vid/aai/Services.java deleted file mode 100644 index e8148a92c..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/aai/Services.java +++ /dev/null @@ -1,24 +0,0 @@ -package org.openecomp.vid.aai; - -import org.codehaus.jackson.annotate.JsonIgnoreProperties; -import org.codehaus.jackson.annotate.JsonProperty; - -@JsonIgnoreProperties(ignoreUnknown = true) -public class Services { - @JsonProperty("global-customer-id") - public String globalCustomerId; - - @JsonProperty("subscriber-name") - public String subscriberName; - - @JsonProperty("subscriber-type") - public String subscriberType; - - @JsonProperty("resource-version") - public String resourceVersion; - - @JsonProperty("service-subscriptions") - public ServiceSubscriptions serviceSubscriptions; - - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/aai/SubscriberAaiResponse.java b/vid-app-common/src/main/java/org/openecomp/vid/aai/SubscriberAaiResponse.java deleted file mode 100644 index 53304e933..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/aai/SubscriberAaiResponse.java +++ /dev/null @@ -1,24 +0,0 @@ -package org.openecomp.vid.aai; - -import org.openecomp.vid.model.ProxyResponse; -import org.openecomp.vid.model.SubscriberList; - -/** - * Created by Oren on 7/5/17. - */ -public class SubscriberAaiResponse extends ProxyResponse { - - - private SubscriberList subscriberList; - - public SubscriberAaiResponse(SubscriberList subscriberList, String errorMessage, int aaiHttpCode) { - this.subscriberList = subscriberList; - this.errorMessage = errorMessage; - this.httpCode = aaiHttpCode; - } - - - public SubscriberList getSubscriberList() { - return subscriberList; - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/aai/SubscriberData.java b/vid-app-common/src/main/java/org/openecomp/vid/aai/SubscriberData.java deleted file mode 100644 index efaa47885..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/aai/SubscriberData.java +++ /dev/null @@ -1,7 +0,0 @@ -package org.openecomp.vid.aai; - -/** - * Created by Oren on 7/10/17. - */ -public class SubscriberData { -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/aai/SubscriberFilteredResults.java b/vid-app-common/src/main/java/org/openecomp/vid/aai/SubscriberFilteredResults.java deleted file mode 100644 index c2afee334..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/aai/SubscriberFilteredResults.java +++ /dev/null @@ -1,29 +0,0 @@ -package org.openecomp.vid.aai; - -import org.openecomp.vid.model.ProxyResponse; -import org.openecomp.vid.model.SubscriberList; -import org.openecomp.vid.roles.RoleValidator; - -/** - * Created by Oren on 7/5/17. - */ - -public class SubscriberFilteredResults extends ProxyResponse { - - private SubscriberListWithFilterData subscriberList; - - public SubscriberFilteredResults(RoleValidator roleValidator,SubscriberList subscribers, String errorMessage, int aaiHttpCode) { - this.subscriberList = new SubscriberListWithFilterData(subscribers,roleValidator); - this.errorMessage = errorMessage; - this.httpCode = aaiHttpCode; - } - - - public SubscriberListWithFilterData getSubscriberList() { - return subscriberList; - } - - public void setSubscriberList(SubscriberListWithFilterData subscriberList) { - this.subscriberList = subscriberList; - } -} \ No newline at end of file diff --git a/vid-app-common/src/main/java/org/openecomp/vid/aai/SubscriberListWithFilterData.java b/vid-app-common/src/main/java/org/openecomp/vid/aai/SubscriberListWithFilterData.java deleted file mode 100644 index 75f505f25..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/aai/SubscriberListWithFilterData.java +++ /dev/null @@ -1,31 +0,0 @@ -package org.openecomp.vid.aai; - -import org.openecomp.vid.model.Subscriber; -import org.openecomp.vid.model.SubscriberList; -import org.openecomp.vid.roles.RoleValidator; - -import java.util.ArrayList; -import java.util.List; - -/** - * Created by Oren on 7/5/17. - */ -public class SubscriberListWithFilterData { - - public SubscriberListWithFilterData(SubscriberList subscriberList, RoleValidator roleValidator){ - List subscribers = subscriberList.customer; - List subscribersWithFilter = new ArrayList<>(); - for (Subscriber subscriber :subscribers){ - SubscriberWithFilter subscriberWithFilter = new SubscriberWithFilter(); - subscriberWithFilter.setIsPermitted(roleValidator.isSubscriberPermitted(subscriber.globalCustomerId)); - subscriberWithFilter.subscriberType = subscriber.subscriberType; - subscriberWithFilter.resourceVersion = subscriber.resourceVersion; - subscriberWithFilter.subscriberName = subscriber.subscriberName; - subscriberWithFilter.globalCustomerId = subscriber.globalCustomerId; - subscribersWithFilter.add(subscriberWithFilter); - } - this.customer = subscribersWithFilter; - } - - public List customer; -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/aai/SubscriberWithFilter.java b/vid-app-common/src/main/java/org/openecomp/vid/aai/SubscriberWithFilter.java deleted file mode 100644 index abd9c0f32..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/aai/SubscriberWithFilter.java +++ /dev/null @@ -1,21 +0,0 @@ -package org.openecomp.vid.aai; - -import org.codehaus.jackson.annotate.JsonProperty; -import org.openecomp.vid.model.Subscriber; - -/** - * Created by Oren on 7/5/17. - */ -public class SubscriberWithFilter extends Subscriber{ - - @JsonProperty("is-permitted") - private boolean isPermitted; - - public boolean getIsPermitted() { - return isPermitted; - } - - public void setIsPermitted(boolean isPermitted) { - this.isPermitted = isPermitted; - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/aai/VnfResult.java b/vid-app-common/src/main/java/org/openecomp/vid/aai/VnfResult.java deleted file mode 100644 index b8294e519..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/aai/VnfResult.java +++ /dev/null @@ -1,44 +0,0 @@ -package org.openecomp.vid.aai; - -import com.fasterxml.jackson.annotation.*; -import org.codehaus.jackson.annotate.JsonProperty; -import org.openecomp.vid.RelatedTo; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - - -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "id", - "node-type", - "url", - "properties", - "related-to" -}) -public class VnfResult { - - @JsonProperty("id") - public String id; - @JsonProperty("node-type") - public String nodeType; - @JsonProperty("url") - public String url; - @JsonProperty("properties") - public ServiceProperties properties; - @JsonProperty("related-to") - public List relatedTo = null; - @JsonIgnore - private Map additionalProperties = new HashMap(); - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/aai/exceptions/InvalidAAIResponseException.java b/vid-app-common/src/main/java/org/openecomp/vid/aai/exceptions/InvalidAAIResponseException.java deleted file mode 100644 index f84c09afa..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/aai/exceptions/InvalidAAIResponseException.java +++ /dev/null @@ -1,7 +0,0 @@ -package org.openecomp.vid.aai.exceptions; - -/** - * Created by Oren on 7/4/17. - */ -public class InvalidAAIResponseException extends Exception { -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/aai/model/AaiGetServicesRequestModel/GetServicesAAIRespone.java b/vid-app-common/src/main/java/org/openecomp/vid/aai/model/AaiGetServicesRequestModel/GetServicesAAIRespone.java deleted file mode 100644 index 27c38ce8a..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/aai/model/AaiGetServicesRequestModel/GetServicesAAIRespone.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.openecomp.vid.aai.model.AaiGetServicesRequestModel; - -import org.codehaus.jackson.annotate.JsonIgnoreProperties; -import org.codehaus.jackson.annotate.JsonProperty; - -import java.util.List; -@JsonIgnoreProperties(ignoreUnknown = true) -public class GetServicesAAIRespone { - - public List service; -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/aai/model/AaiGetServicesRequestModel/Service.java b/vid-app-common/src/main/java/org/openecomp/vid/aai/model/AaiGetServicesRequestModel/Service.java deleted file mode 100644 index 977e57e67..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/aai/model/AaiGetServicesRequestModel/Service.java +++ /dev/null @@ -1,21 +0,0 @@ -package org.openecomp.vid.aai.model.AaiGetServicesRequestModel; - -import org.codehaus.jackson.annotate.JsonIgnoreProperties; -import org.codehaus.jackson.annotate.JsonProperty; - -/** - * Created by Oren on 7/17/17. - */ - -@JsonIgnoreProperties(ignoreUnknown = true) -public class Service { - @JsonProperty("service-id") - public String serviceId; - @JsonProperty("service-description") - public String serviceDescription; - @JsonProperty("resource-version") - public String resourceVersion; - @JsonProperty("is-permitted") - public boolean isPermitted; - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/aai/model/AaiGetTenatns/GetTenantsResponse.java b/vid-app-common/src/main/java/org/openecomp/vid/aai/model/AaiGetTenatns/GetTenantsResponse.java deleted file mode 100644 index 5e88bf37e..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/aai/model/AaiGetTenatns/GetTenantsResponse.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.openecomp.vid.aai.model.AaiGetTenatns; - -import org.codehaus.jackson.annotate.JsonIgnoreProperties; -import org.codehaus.jackson.annotate.JsonProperty; - -/** - * Created by Oren on 7/18/17. - */ -@JsonIgnoreProperties(ignoreUnknown = true) -public class GetTenantsResponse { - - @JsonProperty("cloudRegionID") - public String cloudRegionId; - - @JsonProperty("tenantName") - public String tenantName; - - @JsonProperty("tenantID") - public String tenantID; - - @JsonProperty("is-permitted") - public boolean isPermitted; - - - -} \ No newline at end of file diff --git a/vid-app-common/src/main/java/org/openecomp/vid/aai/model/RelatedToProperty.java b/vid-app-common/src/main/java/org/openecomp/vid/aai/model/RelatedToProperty.java deleted file mode 100644 index c9f28ed69..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/aai/model/RelatedToProperty.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.openecomp.vid.aai.model; - -import org.codehaus.jackson.annotate.JsonProperty; - -public class RelatedToProperty { - - public String getPropertyKey() { - return propertyKey; - } - - - public void setPropertyKey(String propertyKey) { - this.propertyKey = propertyKey; - } - - - public String getPropertyValue() { - return propertyValue; - } - - - public void setPropertyValue(String propertyValue) { - this.propertyValue = propertyValue; - } - - - @JsonProperty("property-key") - public String propertyKey; - - - @JsonProperty("property-value") - public String propertyValue; - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/aai/model/Relationship.java b/vid-app-common/src/main/java/org/openecomp/vid/aai/model/Relationship.java deleted file mode 100644 index 796094192..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/aai/model/Relationship.java +++ /dev/null @@ -1,55 +0,0 @@ -package org.openecomp.vid.aai.model; - -import java.util.List; - -import org.codehaus.jackson.annotate.JsonProperty; - -public class Relationship { - - @JsonProperty("related-to") - public String relatedTo; - - @JsonProperty("related-link") - public String relatedLink; - - @JsonProperty("relationship-data") - public List relationshipData; - - @JsonProperty("related-to-property") - public List relatedToProperty; - - - public String getRelatedTo() { - return relatedTo; - } - - public void setRelatedTo(String relatedTo) { - this.relatedTo = relatedTo; - } - - public String getRelatedLink() { - return relatedLink; - } - - public void setRelatedLink(String relatedLink) { - this.relatedLink = relatedLink; - } - - public List getRelationDataList() { - return relationshipData; - } - - public void setRelationDataList(List relationDataList) { - this.relationshipData = relationDataList; - } - - public List getRelatedToPropertyList() { - return relatedToProperty; - } - - public void setRelatedToPropertyList(List relatedToPropertyList) { - this.relatedToProperty = relatedToPropertyList; - } - - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/aai/model/RelationshipData.java b/vid-app-common/src/main/java/org/openecomp/vid/aai/model/RelationshipData.java deleted file mode 100644 index 21af2f5d6..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/aai/model/RelationshipData.java +++ /dev/null @@ -1,29 +0,0 @@ -package org.openecomp.vid.aai.model; - -import org.codehaus.jackson.annotate.JsonProperty; - -public class RelationshipData { - - public String getRelationshipKey() { - return relationshipKey; - } - - public void setRelationshipKey(String relationshipKey) { - this.relationshipKey = relationshipKey; - } - - public String getRelationshipValue() { - return relationshipValue; - } - - public void setRelationshipValue(String relationshipValue) { - this.relationshipValue = relationshipValue; - } - - @JsonProperty("relationship-key") - public String relationshipKey; - - @JsonProperty("relationship-value") - public String relationshipValue; - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/aai/model/RelationshipList.java b/vid-app-common/src/main/java/org/openecomp/vid/aai/model/RelationshipList.java deleted file mode 100644 index cdb7af46b..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/aai/model/RelationshipList.java +++ /dev/null @@ -1,24 +0,0 @@ -package org.openecomp.vid.aai.model; - -import java.util.List; - -import org.codehaus.jackson.annotate.JsonProperty; - -public class RelationshipList { - - - public List getRelationship() { - return relationship; - } - - public void setRelationship(List relationship) { - this.relationship = relationship; - } - - @JsonProperty("relationship") - public List relationship; - - - - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/aai/model/ServiceInstance.java b/vid-app-common/src/main/java/org/openecomp/vid/aai/model/ServiceInstance.java deleted file mode 100644 index 9fe4c06bc..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/aai/model/ServiceInstance.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.openecomp.vid.aai.model; - -import org.codehaus.jackson.annotate.JsonProperty; - -public class ServiceInstance { - - @JsonProperty("service-instance-id") - public String serviceInstanceId; - - @JsonProperty("service-instance-name") - public String serviceInstanceName; - - @JsonProperty("persona-model-id") - public String personaModelId; - - @JsonProperty("persona-model-version") - public String personaModelVersion; - - @JsonProperty("resource-version") - public String resourceVersion; - - @JsonProperty("orchestration-status") - public String orchestrationStatus; - - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/aai/model/ServiceInstances.java b/vid-app-common/src/main/java/org/openecomp/vid/aai/model/ServiceInstances.java deleted file mode 100644 index 163ed0458..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/aai/model/ServiceInstances.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.openecomp.vid.aai.model; - -import java.util.List; - -import org.codehaus.jackson.annotate.JsonProperty; - -public class ServiceInstances { - - @JsonProperty("service-instance") - public List serviceInstance; - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/aai/model/ServiceRelationships.java b/vid-app-common/src/main/java/org/openecomp/vid/aai/model/ServiceRelationships.java deleted file mode 100644 index 9bedd8545..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/aai/model/ServiceRelationships.java +++ /dev/null @@ -1,90 +0,0 @@ -package org.openecomp.vid.aai.model; - -import org.codehaus.jackson.annotate.JsonProperty; - -public class ServiceRelationships { - - @JsonProperty("service-instance-id") - public String serviceInstanceId; - - @JsonProperty("service-instance-name") - public String serviceInstanceName; - - @JsonProperty("model-invariant-id") - public String modelInvariantId; - - @JsonProperty("model-version-id") - public String modelVersionId; - - @JsonProperty("resource-version") - public String resourceVersion; - - @JsonProperty("orchestration-status") - public String orchestrationStatus; - - @JsonProperty("relationship-list") - public RelationshipList relationshipList; - - - public String getServiceInstanceId() { - return serviceInstanceId; - } - - public void setServiceInstanceId(String serviceInstanceId) { - this.serviceInstanceId = serviceInstanceId; - } - - public String getServiceInstanceName() { - return serviceInstanceName; - } - - public void setServiceInstanceName(String serviceInstanceName) { - this.serviceInstanceName = serviceInstanceName; - } - - public String getModelInvariantId() { - return modelInvariantId; - } - - public void setModelInvariantId(String modelInvariantId) { - this.modelInvariantId = modelInvariantId; - } - - public String getModelVersionId() { - return modelVersionId; - } - - public void setModelVersionId(String modelVersionId) { - this.modelVersionId = modelVersionId; - } - - public String getResourceVersion() { - return resourceVersion; - } - - public void setResourceVersion(String resourceVersion) { - this.resourceVersion = resourceVersion; - } - - public String getOrchestrationStatus() { - return orchestrationStatus; - } - - public void setOrchestrationStatus(String orchestrationStatus) { - this.orchestrationStatus = orchestrationStatus; - } - - public RelationshipList getRelationshipList() { - return relationshipList; - } - - public void setRelationshipList(RelationshipList relationshipList) { - this.relationshipList = relationshipList; - } - - - - - - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/aai/model/ServiceSubscription.java b/vid-app-common/src/main/java/org/openecomp/vid/aai/model/ServiceSubscription.java deleted file mode 100644 index 02ddfd178..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/aai/model/ServiceSubscription.java +++ /dev/null @@ -1,17 +0,0 @@ -package org.openecomp.vid.aai.model; - -import org.codehaus.jackson.annotate.JsonProperty; - -public class ServiceSubscription { - - @JsonProperty("service-type") - public String serviceType; - - @JsonProperty("resource-version") - public String resourceVersion; - - @JsonProperty("service-instances") - public ServiceInstances serviceInstances; - - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/aai/model/Services.java b/vid-app-common/src/main/java/org/openecomp/vid/aai/model/Services.java deleted file mode 100644 index 6e7b89070..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/aai/model/Services.java +++ /dev/null @@ -1,24 +0,0 @@ -package org.openecomp.vid.aai.model; - -import java.util.List; - -import org.codehaus.jackson.annotate.JsonProperty; - -public class Services { - @JsonProperty("global-customer-id") - public String globalCustomerId; - - @JsonProperty("subscriber-name") - public String subscriberName; - - @JsonProperty("subscriber-type") - public String subscriberType; - - @JsonProperty("resource-version") - public String resourceVersion; - - @JsonProperty("service-subscriptions") - public List serviceSubscriptions; - - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/asdc/AsdcCatalogException.java b/vid-app-common/src/main/java/org/openecomp/vid/asdc/AsdcCatalogException.java deleted file mode 100755 index c80787205..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/asdc/AsdcCatalogException.java +++ /dev/null @@ -1,58 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.asdc; - -/** - * The Class AsdcCatalogException. - */ -public class AsdcCatalogException extends Exception { - - /** The Constant serialVersionUID. */ - private static final long serialVersionUID = 1L; - - /** - * Instantiates a new sdc catalog exception. - * - * @param msg the msg - */ - public AsdcCatalogException(String msg) { - super(msg); - } - - /** - * Instantiates a new sdc catalog exception. - * - * @param cause the cause - */ - public AsdcCatalogException(Throwable cause) { - super(cause); - } - - /** - * Instantiates a new sdc catalog exception. - * - * @param msg the msg - * @param t the t - */ - public AsdcCatalogException(String msg, Throwable t) { - super(msg, t); - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/asdc/AsdcClient.java b/vid-app-common/src/main/java/org/openecomp/vid/asdc/AsdcClient.java deleted file mode 100755 index 314ea037d..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/asdc/AsdcClient.java +++ /dev/null @@ -1,129 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.asdc; - -import java.io.IOException; -import java.nio.file.Path; -import java.util.Collection; -import java.util.Map; -import java.util.UUID; - -import org.openecomp.vid.asdc.beans.Artifact; -import org.openecomp.vid.asdc.beans.Resource; -import org.openecomp.vid.asdc.beans.Service; - -/** - * The Interface AsdcClient. - */ -public interface AsdcClient { - - /** - * Gets the resource. - * - * @param uuid the uuid - * @return the resource - * @throws AsdcCatalogException the sdc catalog exception - */ - public Resource getResource(UUID uuid) throws AsdcCatalogException; - - /** - * Gets the resources. - * - * @return the resources - * @throws AsdcCatalogException the sdc catalog exception - */ - public Collection getResources() throws AsdcCatalogException; - - /** - * Gets the resources. - * - * @param filter the filter - * @return the resources - * @throws AsdcCatalogException the sdc catalog exception - */ - public Collection getResources(Map filter) throws AsdcCatalogException; - - /** - * Gets the resource artifact. - * - * @param resourceUuid the resource uuid - * @param artifactUuid the artifact uuid - * @return the resource artifact - * @throws AsdcCatalogException the sdc catalog exception - */ - public Artifact getResourceArtifact(UUID resourceUuid, UUID artifactUuid) throws AsdcCatalogException; - - /** - * Gets the resource tosca model. - * - * @param uuid the uuid - * @return the resource tosca model - * @throws AsdcCatalogException the sdc catalog exception - */ - public Path getResourceToscaModel(UUID uuid) throws AsdcCatalogException; - - /** - * Gets the service. - * - * @param uuid the uuid - * @return the service - * @throws AsdcCatalogException the sdc catalog exception - */ - public Service getService(UUID uuid) throws AsdcCatalogException; - - /** - * Gets the services. - * - * @return the services - * @throws AsdcCatalogException the sdc catalog exception - */ - public Collection getServices() throws AsdcCatalogException; - - /** - * Gets the services. - * - * @param filter the filter - * @return the services - * @throws AsdcCatalogException the asdc catalog exception - */ - public Collection getServices(Map filter) throws AsdcCatalogException; - - /** - * Gets the service artifact. - * - * @param serviceUuid the service uuid - * @param artifactUuid the artifact uuid - * @return the service artifact - * @throws AsdcCatalogException the asdc catalog exception - */ - public Artifact getServiceArtifact(UUID serviceUuid, UUID artifactUuid) throws AsdcCatalogException; - - /** - * Gets the service tosca model. - * - * @param uuid the uuid - * @return the service tosca model - * @throws AsdcCatalogException the asdc catalog exception - */ - public Path getServiceToscaModel(UUID uuid) throws AsdcCatalogException; - - //TODO: Collect TOSCA information from CSAR -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/Artifact.java b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/Artifact.java deleted file mode 100755 index 4974d44a8..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/Artifact.java +++ /dev/null @@ -1,314 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.asdc.beans; - -import java.util.UUID; - -/** - * The Class Artifact. - */ -public class Artifact { - -/* - * SDC has widened this to a String type for 1610. - public enum Type { - HEAT, - HEAT_ENV, - HEAT_VOL, - HEAT_NET, - HEAT_NESTED, - HEAT_ARTIFACT, - YANG_XML, - VNF_CATALOG, - VF_LICENSE, - VENDOR_LICENSE, - ASSET_INVENTORY_PROFILE, - ASSET_QUERY_SPEC, - APPC_CONFIG, - VF_MODULES_METADATA, - DCAE_TOSCA, - DCAE_JSON, - DCAE_EMF, - DCAE_DOC, - DCAE_BLUEPRINT, - DCAE_EVENT, - DCAE_INVENTORY_TOSCA, - DCAE_INVENTORY_JSON, - DCAE_INVENTORY_EMF, - DCAE_INVENTORY_DOC, - DCAE_INVENTORY_BLUEPRINT, - DCAE_INVENTORY_EVENT, - OTHER, - AAI_SERVICE_MODEL //HEY! READ ME! YES, YOU! I AM A TEMPORARY FIX, PLEASE REMOVE ME BECAUSE I AM A FRAUD. I DON'T BELONG HERE. - //Warm Regards, - // *The* Artifact.Type.AAI_SERVICE_MODEL Constant - } - */ - - /** The artifact name. */ - private String artifactName; - - /** The artifact label. */ - private String artifactLabel; - - /** The artifact group type. */ - private String artifactGroupType; - - /** The artifact type. */ - private String artifactType; - - /** The artifact URL. */ - private String artifactURL; - - /** The artifact description. */ - private String artifactDescription; - - /** The artifact timeout. */ - private int artifactTimeout; - - /** The artifact checksum. */ - private String artifactChecksum; - - /** The artifact UUID. */ - private String artifactUUID; - - /** The artifact version. */ - private String artifactVersion; - - /** The generated from UUID. */ - private String generatedFromUUID; - - /** - * Gets the artifact name. - * - * @return the artifact name - */ - public String getArtifactName() { - return artifactName; - } - - /** - * Gets the artifact type. - * - * @return the artifact type - */ - public String getArtifactType() { - return artifactType; - } - /** - * Gets the artifact group type. - * - * @return the artifact group type - */ - public String getArtifactGroupType() { - return artifactGroupType; - } - - /** - * Gets the artifact label. - * - * @return the artifact label - */ - public String getArtifactLabel() { - return artifactLabel; - } - /** - * Gets the artifact URL. - * - * @return the artifact URL - */ - public String getArtifactURL() { - return artifactURL; - } - - /** - * Gets the artifact description. - * - * @return the artifact description - */ - public String getArtifactDescription() { - return artifactDescription; - } - - /** - * Gets the artifact timeout. - * - * @return the artifact timeout - */ - public int getArtifactTimeout() { - return artifactTimeout; - } - - /** - * Gets the artifact checksum. - * - * @return the artifact checksum - */ - public String getArtifactChecksum() { - return artifactChecksum; - } - - /** - * Gets the artifact UUID. - * - * @return the artifact UUID - */ - public String getArtifactUUID() { - return artifactUUID; - } - - /** - * Gets the artifact version. - * - * @return the artifact version - */ - public String getArtifactVersion() { - return artifactVersion; - } - - /** - * Gets the generated from UUID. - * - * @return the generated from UUID - */ - public String getGeneratedFromUUID() { - return generatedFromUUID; - } - - /** - * Sets the artifact name. - * - * @param artifactName the new artifact name - */ - public void setArtifactName(String artifactName) { - this.artifactName = artifactName; - } - - /** - * Sets the artifact type. - * - * @param artifactType the new artifact type - */ - public void setArtifactType(String artifactType) { - this.artifactType = artifactType; - } - /** - * Sets the artifact group type. - * - * @param artifactGroupType the new artifact group type - */ - public void setArtifactGroupType(String artifactGroupType) { - this.artifactGroupType = artifactGroupType; - } - /** - * Sets the artifact label. - * - * @param artifactGroupType the new artifact label - */ - public void setArtifactLabel(String artifactLabel) { - this.artifactLabel = artifactLabel; - } - /** - * Sets the artifact URL. - * - * @param artifactURL the new artifact URL - */ - public void setArtifactURL(String artifactURL) { - this.artifactURL = artifactURL; - } - - /** - * Sets the artifact description. - * - * @param artifactDescription the new artifact description - */ - public void setArtifactDescription(String artifactDescription) { - this.artifactDescription = artifactDescription; - } - - /** - * Sets the artifact timeout. - * - * @param artifactTimeout the new artifact timeout - */ - public void setArtifactTimeout(int artifactTimeout) { - this.artifactTimeout = artifactTimeout; - } - - /** - * Sets the artifact checksum. - * - * @param artifactChecksum the new artifact checksum - */ - public void setArtifactChecksum(String artifactChecksum) { - this.artifactChecksum = artifactChecksum; - } - - /** - * Sets the artifact UUID. - * - * @param artifactUUID the new artifact UUID - */ - public void setArtifactUUID(String artifactUUID) { - this.artifactUUID = artifactUUID; - } - - /** - * Sets the artifact version. - * - * @param artifactVersion the new artifact version - */ - public void setArtifactVersion(String artifactVersion) { - this.artifactVersion = artifactVersion; - } - - /** - * Sets the generated from UUID. - * - * @param generatedFromUUID the new generated from UUID - */ - public void setGeneratedFromUUID(String generatedFromUUID) { - this.generatedFromUUID = generatedFromUUID; - } - - /* (non-Javadoc) - * @see java.lang.Object#hashCode() - */ - @Override - public int hashCode() { - final UUID uuid = UUID.fromString(getArtifactUUID()); - - return uuid.hashCode(); - } - - /* (non-Javadoc) - * @see java.lang.Object#equals(java.lang.Object) - */ - @Override - public boolean equals(Object o) { - if (o == this) return true; - if (!(o instanceof Artifact)) return false; - - final Artifact artifact = (Artifact) o; - - return (artifact.getArtifactUUID().equals(getArtifactUUID())); - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/Resource.java b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/Resource.java deleted file mode 100755 index 000aae1a9..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/Resource.java +++ /dev/null @@ -1,429 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.asdc.beans; - -import java.util.Collection; -import java.util.UUID; - -/** - * The Class Resource. - */ -public class Resource { - - /** - * The Enum Type. - */ - public enum Type { - - /** The vf. */ - VF, - - /** The vfc. */ - VFC, - - /** The cp. */ - CP, - - /** The vl. */ - VL, - - /** The vfcmt. */ - VFCMT - } - - /** - * The Enum LifecycleState. - */ - public enum LifecycleState { - - /** The not certified checkout. */ - NOT_CERTIFIED_CHECKOUT, - - /** The not certified checkin. */ - NOT_CERTIFIED_CHECKIN, - - /** The ready for certification. */ - READY_FOR_CERTIFICATION, - - /** The certification in progress. */ - CERTIFICATION_IN_PROGRESS, - - /** The certified. */ - CERTIFIED - } - - /** The uuid. */ - private String uuid; - - /** The invariant UUID. */ - private String invariantUUID; - - /** The name. */ - private String name; - - /** The description. */ - private String description; - - /** The version. */ - private String version; - - /** The tosca model URL. */ - private String toscaModelURL; - - /** The category. */ - private String category; - - /** The sub category. */ - private String subCategory; - - /** The resource type. */ - private Resource.Type resourceType; - - /** The lifecycle state. */ - private Resource.LifecycleState lifecycleState; - - /** The last updater user ID. */ - private String lastUpdaterUserId; - - /** The last updater full name. */ - private String lastUpdaterFullName; - - /** The tosca model. */ - private String toscaModel; - - /** The tosca resource name. */ - private String toscaResourceName; - - /** The artifacts. */ - private Collection artifacts; - - /** The resources. */ - private Collection resources; - - /** - * Gets the uuid. - * - * @return the uuid - */ - public String getUuid() { - return uuid; - } - - /** - * Gets the invariant UUID. - * - * @return the invariant UUID - */ - public String getInvariantUUID() { - return invariantUUID; - } - - /** - * Gets the name. - * - * @return the name - */ - public String getName() { - return name; - } - - /** - * Gets the description. - * - * @return the description - */ - public String getDescription() { - return description; - } - - /** - * Gets the version. - * - * @return the version - */ - public String getVersion() { - return version; - } - - /** - * Gets the tosca model URL. - * - * @return the tosca model URL - */ - public String getToscaModelURL() { - return toscaModelURL; - } - - /** - * Gets the category. - * - * @return the category - */ - public String getCategory() { - return category; - } - - /** - * Gets the sub category. - * - * @return the sub category - */ - public String getSubCategory() { - return subCategory; - } - - /** - * Gets the resource type. - * - * @return the resource type - */ - public Resource.Type getResourceType() { - return resourceType; - } - - /** - * Gets the lifecycle state. - * - * @return the lifecycle state - */ - public Resource.LifecycleState getLifecycleState() { - return lifecycleState; - } - - /** - * Gets the last updater user ID. - * - * @return the last updater user ID - */ - public String getLastUpdaterUserId() { - return lastUpdaterUserId; - } - - /** - * Gets the last updater full name. - * - * @return the last updater full name - */ - public String getLastUpdaterFullName() { - return lastUpdaterFullName; - } - - /** - * Gets the tosca model. - * - * @return the tosca model - */ - public String getToscaModel() { - return toscaModel; - } - - /** - * Gets the tosca resource name. - * - * @return the tosca resource name - */ - public String getToscaResourceName() { - return toscaResourceName; - } - - /** - * Gets the artifacts. - * - * @return the artifacts - */ - public Collection getArtifacts() { - return artifacts; - } - - /** - * Gets the resources. - * - * @return the resources - */ - public Collection getResources() { - return resources; - } - - /** - * Sets the uuid. - * - * @param uuid the new uuid - */ - public void setUuid(String uuid) { - this.uuid = uuid; - } - - /** - * Sets the invariant UUID. - * - * @param invariantUUID the new invariant UUID - */ - public void setInvariantUUID(String invariantUUID) { - this.invariantUUID = invariantUUID; - } - - /** - * Sets the name. - * - * @param name the new name - */ - public void setName(String name) { - this.name = name; - } - /** - * Sets the description. - * - * @param name the new description - */ - public void setDescription(String description) { - this.description = description; - } - /** - * Sets the version. - * - * @param version the new version - */ - public void setVersion(String version) { - this.version = version; - } - - /** - * Sets the tosca model URL. - * - * @param toscaModelURL the new tosca model URL - */ - public void setToscaModelURL(String toscaModelURL) { - this.toscaModelURL = toscaModelURL; - } - - /** - * Sets the category. - * - * @param category the new category - */ - public void setCategory(String category) { - this.category = category; - } - - /** - * Sets the sub category. - * - * @param subCategory the new sub category - */ - public void setSubCategory(String subCategory) { - this.subCategory = subCategory; - } - - /** - * Sets the resource type. - * - * @param resourceType the new resource type - */ - public void setResourceType(Resource.Type resourceType) { - this.resourceType = resourceType; - } - - /** - * Sets the lifecycle state. - * - * @param lifecycleState the new lifecycle state - */ - public void setLifecycleState(Resource.LifecycleState lifecycleState) { - this.lifecycleState = lifecycleState; - } - - /** - * Sets the last updater user ID. - * - * @param lastUpdaterUserId the new last updater user ID - */ - public void setLastUpdaterUserId(String lastUpdaterUserId) { - this.lastUpdaterUserId = lastUpdaterUserId; - } - - /** - * Sets the last updater full name. - * - * @param lastUpdaterFullName the new last updater full name - */ - public void setLastUpdaterFullName(String lastUpdaterFullName) { - this.lastUpdaterFullName = lastUpdaterFullName; - } - - /** - * Sets the tosca model. - * - * @param toscaModel the new tosca model - */ - public void setToscaModel(String toscaModel) { - this.toscaModel = toscaModel; - } - - /** - * Sets the tosca resource name. - * - * @param toscaResourceName the new tosca resource name - */ - public void setToscaResourceName(String toscaResourceName) { - this.toscaResourceName = toscaResourceName; - } - - /** - * Sets the artifacts. - * - * @param artifacts the new artifacts - */ - public void setArtifacts(Collection artifacts) { - this.artifacts = artifacts; - } - - /** - * Sets the resources. - * - * @param resources the new resources - */ - public void setResources(Collection resources) { - this.resources = resources; - } - - /* (non-Javadoc) - * @see java.lang.Object#hashCode() - */ - @Override - public int hashCode() { - final UUID uuid = UUID.fromString(getUuid()); - - return uuid.hashCode(); - } - - /* (non-Javadoc) - * @see java.lang.Object#equals(java.lang.Object) - */ - @Override - public boolean equals(Object o) { - if (o == this) return true; - if (!(o instanceof Resource)) return false; - - final Resource resource = (Resource) o; - - return (resource.getUuid().equals(getUuid())); - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/SecureService.java b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/SecureService.java deleted file mode 100644 index 1372472f5..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/SecureService.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.openecomp.vid.asdc.beans; - -/** - * Created by Oren on 6/27/17. - */ -public class SecureService extends Service{ - - public boolean isPermmited = true; -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/SecureServices.java b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/SecureServices.java deleted file mode 100644 index 0fcd79223..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/SecureServices.java +++ /dev/null @@ -1,31 +0,0 @@ -package org.openecomp.vid.asdc.beans; - -import java.util.Collection; -import java.util.List; - -/** - * Created by Oren on 6/27/17. - */ -public class SecureServices { - - private Collection services; - //Disable roles until AAF integration finishes - private boolean isReadOnly = false; - - public void setServices(Collection services) { - this.services = services; - } - - public Collection getServices() { - - return services; - } - public boolean isReadOnly() { - return isReadOnly; - } - - public void setReadOnly(boolean readOnly) { - isReadOnly = readOnly; - } - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/Service.java b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/Service.java deleted file mode 100755 index 2a83cbe3a..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/Service.java +++ /dev/null @@ -1,351 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.asdc.beans; - -import java.util.Collection; -import java.util.UUID; -/** - * The Class Service. - */ -public class Service { - - /** - * The Enum DistributionStatus. - */ - public enum DistributionStatus { - - /** The distribution not approved. */ - DISTRIBUTION_NOT_APPROVED, - - /** The distribution approved. */ - DISTRIBUTION_APPROVED, - - /** The distributed. */ - DISTRIBUTED, - - /** The distribution rejected. */ - DISTRIBUTION_REJECTED - } - - /** - * The Enum LifecycleState. - */ - public enum LifecycleState { - - /** The not certified checkout. */ - NOT_CERTIFIED_CHECKOUT, - - /** The not certified checkin. */ - NOT_CERTIFIED_CHECKIN, - - /** The ready for certification. */ - READY_FOR_CERTIFICATION, - - /** The certification in progress. */ - CERTIFICATION_IN_PROGRESS, - - /** The certified. */ - CERTIFIED - } - - /** The uuid. */ - private String uuid; - - /** The invariant UUID. */ - private String invariantUUID; - - /** The name. */ - private String name; - - /** The version. */ - private String version; - - /** The tosca model URL. */ - private String toscaModelURL; - - /** The category. */ - private String category; - - /** The lifecycle state. */ - private Service.LifecycleState lifecycleState; - - /** The last updater user uid. */ - private String lastUpdaterUserId; - - /** The last updater full name. */ - private String lastUpdaterFullName; - - /** The distribution status. */ - private Service.DistributionStatus distributionStatus; - - /** The artifacts. */ - private Collection artifacts; - - /** The resources. */ - private Collection resources; - - /** - * Gets the uuid. - * - * @return the uuid - */ - public String getUuid() { - return uuid; - } - - /** - * Gets the invariant UUID. - * - * @return the invariant UUID - */ - public String getInvariantUUID() { - return invariantUUID; - } - - /** - * Gets the name. - * - * @return the name - */ - public String getName() { - return name; - } - - /** - * Gets the version. - * - * @return the version - */ - public String getVersion() { - return version; - } - - /** - * Gets the tosca model URL. - * - * @return the tosca model URL - */ - public String getToscaModelURL() { - return toscaModelURL; - } - - /** - * Gets the category. - * - * @return the category - */ - public String getCategory() { - return category; - } - - /** - * Gets the lifecycle state. - * - * @return the lifecycle state - */ - public Service.LifecycleState getLifecycleState() { - return lifecycleState; - } - - /** - * Gets the last updater user uid. - * - * @return the last updater user uid - */ - public String getLastUpdaterUserId() { - return lastUpdaterUserId; - } - - /** - * Gets the last updater full name. - * - * @return the last updater full name - */ - public String getLastUpdaterFullName() { - return lastUpdaterFullName; - } - - /** - * Gets the distribution status. - * - * @return the distribution status - */ - public Service.DistributionStatus getDistributionStatus() { - return distributionStatus; - } - - /** - * Gets the artifacts. - * - * @return the artifacts - */ - public Collection getArtifacts() { - return artifacts; - } - - /** - * Gets the resources. - * - * @return the resources - */ - public Collection getResources() { - return resources; - } - - /** - * Sets the uuid. - * - * @param uuid the new uuid - */ - public void setUuid(String uuid) { - this.uuid = uuid; - } - - /** - * Sets the invariant UUID. - * - * @param invariantUUID the new invariant UUID - */ - public void setInvariantUUID(String invariantUUID) { - this.invariantUUID = invariantUUID; - } - - /** - * Sets the name. - * - * @param name the new name - */ - public void setName(String name) { - this.name = name; - } - - /** - * Sets the version. - * - * @param version the new version - */ - public void setVersion(String version) { - this.version = version; - } - - /** - * Sets the tosca model URL. - * - * @param toscaModelURL the new tosca model URL - */ - public void setToscaModelURL(String toscaModelURL) { - this.toscaModelURL = toscaModelURL; - } - - /** - * Sets the category. - * - * @param category the new category - */ - public void setCategory(String category) { - this.category = category; - } - - /** - * Sets the lifecycle state. - * - * @param lifecycleState the new lifecycle state - */ - public void setLifecycleState(Service.LifecycleState lifecycleState) { - this.lifecycleState = lifecycleState; - } - - /** - * Sets the last updater user uid. - * - * @param lastUpdaterUserId the new last updater user uid - */ - public void set(String lastUpdaterUserId) { - this.lastUpdaterUserId = lastUpdaterUserId; - } - - /** - * Sets the last updater full name. - * - * @param lastUpdaterFullName the new last updater full name - */ - public void setLastUpdaterFullName(String lastUpdaterFullName) { - this.lastUpdaterFullName = lastUpdaterFullName; - } - - /** - * Sets the distribution status. - * - * @param distributionStatus the new distribution status - */ - public void setDistributionStatus(Service.DistributionStatus distributionStatus) { - this.distributionStatus = distributionStatus; - } - - /** - * Sets the artifacts. - * - * @param artifacts the new artifacts - */ - public void setArtifacts(Collection artifacts) { - this.artifacts = artifacts; - } - - /** - * Sets the resources. - * - * @param resources the new resources - */ - public void setResources(Collection resources) { - this.resources = resources; - } - - /* (non-Javadoc) - * @see java.lang.Object#toString() - */ - @Override - public String toString() { - return uuid; - } - - /* (non-Javadoc) - * @see java.lang.Object#hashCode() - */ - @Override - public int hashCode() { - final UUID uuid = UUID.fromString(getUuid()); - - return uuid.hashCode(); - } - - /* (non-Javadoc) - * @see java.lang.Object#equals(java.lang.Object) - */ - @Override - public boolean equals(Object o) { - if (o == this) return true; - if (!(o instanceof Service)) return false; - - final Service service = (Service) o; - - return (service.getUuid().equals(getUuid())); - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/SubResource.java b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/SubResource.java deleted file mode 100755 index cd3ec7fee..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/SubResource.java +++ /dev/null @@ -1,175 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.asdc.beans; - -import java.util.Collection; -/** - * The Class SubResource. - */ -public class SubResource { - - /** The resource instance name. */ - private String resourceInstanceName; - - /** The resource name. */ - private String resourceName; - - /** The resource invariant UUID. */ - private String resourceInvariantUUID; - - /** The resource version. */ - private String resourceVersion; - - /** The resource type. */ - private String resourceType; - - /** The resource UUID. */ - private String resourceUUID; - - /** The artifacts. */ - private Collection artifacts; - - /** - * Gets the resource instance name. - * - * @return the resource instance name - */ - public String getResourceInstanceName() { - return resourceInstanceName; - } - - /** - * Gets the resource name. - * - * @return the resource name - */ - public String getResourceName() { - return resourceName; - } - - /** - * Gets the resource invariant UUID. - * - * @return the resource invariant UUID - */ - public String getResourceInvariantUUID() { - return resourceInvariantUUID; - } - - /** - * Gets the resource version. - * - * @return the resource version - */ - public String getResourceVersion() { - return resourceVersion; - } - - /** - * Gets the resoucre type. - * - * @return the resoucre type - */ - public String getResoucreType() { - return resourceType; - } - - /** - * Gets the resource UUID. - * - * @return the resource UUID - */ - public String getResourceUUID() { - return resourceUUID; - } - - /** - * Gets the artifacts. - * - * @return the artifacts - */ - public Collection getArtifacts() { - return artifacts; - } - - /** - * Sets the resource instance name. - * - * @param resourceInstanceName the new resource instance name - */ - public void setResourceInstanceName(String resourceInstanceName) { - this.resourceInstanceName = resourceInstanceName; - } - - /** - * Sets the resource name. - * - * @param resourceName the new resource name - */ - public void setResourceName(String resourceName) { - this.resourceName = resourceName; - } - - /** - * Sets the resource invariant UUID. - * - * @param resourceInvariantUUID the new resource invariant UUID - */ - public void setResourceInvariantUUID(String resourceInvariantUUID) { - this.resourceInvariantUUID = resourceInvariantUUID; - } - - /** - * Sets the resource version. - * - * @param resourceVersion the new resource version - */ - public void setResourceVersion(String resourceVersion) { - this.resourceVersion = resourceVersion; - } - - /** - * Sets the resoucre type. - * - * @param resourceType the new resoucre type - */ - public void setResoucreType(String resourceType) { - this.resourceType = resourceType; - } - - /** - * Sets the resource UUID. - * - * @param resourceUUID the new resource UUID - */ - public void setResourceUUID(String resourceUUID) { - this.resourceUUID = resourceUUID; - } - - /** - * Sets the artifacts. - * - * @param artifacts the new artifacts - */ - public void setArtifacts(Collection artifacts) { - this.artifacts = artifacts; - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Capability.java b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Capability.java deleted file mode 100755 index 0d3f17ae4..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Capability.java +++ /dev/null @@ -1,140 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.asdc.beans.tosca; - -import java.util.Collection; -import java.util.Map; - -/** - * The Class Capability. - */ -public class Capability { - - /** The type. */ - private String type; //FIXME: Make an enumeration? - - /** The description. */ - private String description; - - /** The occurrences. */ - private Collection occurrences; //FIXME: Make an enumeration? - - /** The properties. */ - private Map properties; - - /** The valid source types. */ - private Collection valid_source_types; //FIXME: Make an enumeration? - - /** - * Instantiates a new capability. - */ - public Capability() {} - - /** - * Gets the type. - * - * @return the type - */ - public String getType() { - return type; - } - - /** - * Gets the description. - * - * @return the description - */ - public String getDescription() { - return description; - } - - /** - * Gets the occurrences. - * - * @return the occurrences - */ - public Collection getOccurrences() { - return occurrences; - } - - /** - * Gets the properties. - * - * @return the properties - */ - public Map getProperties() { - return properties; - } - - /** - * Gets the valid source types. - * - * @return the valid source types - */ - public Collection getValid_source_types() { - return valid_source_types; - } - - /** - * Sets the type. - * - * @param type the new type - */ - public void setType(String type) { - this.type = type; - } - - /** - * Sets the description. - * - * @param description the new description - */ - public void setDescription(String description) { - this.description = description; - } - - /** - * Sets the occurrences. - * - * @param occurrences the new occurrences - */ - public void setOccurrences(Collection occurrences) { - this.occurrences = occurrences; - } - - /** - * Sets the properties. - * - * @param properties the properties - */ - public void setProperties(Map properties) { - this.properties = properties; - } - - /** - * Sets the valid source types. - * - * @param valid_source_types the new valid source types - */ - public void setValid_source_types(Collection valid_source_types) { - this.valid_source_types = valid_source_types; - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Constraint.java b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Constraint.java deleted file mode 100755 index a91f38312..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Constraint.java +++ /dev/null @@ -1,199 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ -package org.openecomp.vid.asdc.beans.tosca; -import java.util.List; -import java.util.ArrayList; - -/** - * The Class Constraint. - */ - -public class Constraint { - private List valid_values; - private Object equal; - private Object greater_than; - private Object greater_or_equal; - private Object less_than; - private Object less_or_equal; - private List in_range; - private Object length; - private Object min_length; - private Object max_length; - - /** - * Instantiates a new Constraint. - */ - public Constraint() { - valid_values = new ArrayList(); - in_range = new ArrayList(); - } - - /** - * Gets the valid_values. - * - * @return the valid_values - */ - public List getvalid_values() { - return valid_values; - } - /** - * Gets equal. - * - * @return equal - */ - public Object getEqual() { - return equal; - } - /** - * Gets greater_than. - * - * @return greater_than - */ - public Object getGreater_than() { - return greater_than; - } - /** - * Gets greater_or_equal. - * - * @return greater_or_equal - */ - public Object getGreater_or_equal() { - return greater_or_equal; - } - /** - * Gets less_than. - * - * @return less_than - */ - public Object getLess_than() { - return less_than; - } - /** - * Gets less_or_equal. - * - * @return less_or_equal - */ - public Object getLess_or_equal() { - return less_or_equal; - } - /** - * Gets in_range. - * - * @return in_range - */ - public List getIn_range() { - return in_range; - } - /** - * Gets length. - * - * @return length - */ - public Object getLength() { - return length; - } - /** - * Gets min_length. - * - * @return min_length - */ - public Object getMin_length() { - return min_length; - } - /** - * Gets max_length. - * - * @return max_length - */ - public Object getMax_length() { - return max_length; - } - /** - * Sets the valid_values. - * - * @param op the new valid_values - */ - public void setvalid_values(List vlist) { - this.valid_values = vlist; - } - /** - * Sets equal. - * - * @param e the new equal - */ - public void setEqual(Object e) { - this.equal = e; - } - /** - * Sets greater_than. - * - * @param e the new greater_than - */ - public void setGreater_than(Object e) { - this.greater_than = e; - } - /** - * Sets less_than. - * - * @param e the new less_than - */ - public void setLess_than(Object e) { - this.less_than = e; - } - /** - * Sets in_range. - * - * @param e the new in_range - */ - public void setIn_range(List e) { - this.in_range = e; - } - /** - * Sets length. - * - * @param e the length - */ - public void setLength(Object e) { - this.length = e; - } - /** - * Sets min_length. - * - * @param e the min_length - */ - public void setMin_length(Object e) { - this.min_length = e; - } - /** - * Sets max_length. - * - * @param e the max_length - */ - public void setMax_length(Object e) { - this.max_length = e; - } - /* (non-Javadoc) - * @see java.lang.Object#toString() - */ - @Override - public String toString() { - return "valid_values=" + valid_values; - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Group.java b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Group.java deleted file mode 100755 index 4d31faab1..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Group.java +++ /dev/null @@ -1,135 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.asdc.beans.tosca; - -import java.util.Collection; -import java.util.Map; - -/** - * The Class Group. - */ -public class Group { - - /** The type. */ - private String type; - - /** The members. */ - private Collection members; - - /** The metadata. */ - private ToscaMetadata metadata; - - /** The vf module type. */ - private String vf_module_type; - - /** The properties. */ - private Map properties; - - /** - * Gets the metadata. - * - * @return the metadata - */ - public ToscaMetadata getMetadata() { - return metadata; - } - - /** - * Sets the metadata. - * - * @param metadata the new metadata - */ - public void setMetadata(ToscaMetadata metadata) { - this.metadata = metadata; - } - - /** - * Gets the members. - * - * @return the members - */ - public Collection getMembers() { - return members; - } - - /** - * Sets the members. - * - * @param members the new members - */ - public void setMembers(Collection members) { - this.members = members; - } - - /** - * Gets the type. - * - * @return the type - */ - public String getType() { - return type; - } - - /** - * Sets the type. - * - * @param type the new type - */ - public void setType(String type) { - this.type = type; - } - - /** - * Gets the vf module type. - * - * @return the vf module type - */ - public String getvf_module_type() { - return vf_module_type; - } - - /** - * Sets the vf module type. - * - * @param vf_module_type the new vf module type - */ - public void setvf_module_type(String vf_module_type) { - this.vf_module_type = vf_module_type; - } - - /** - * Gets the properties. - * - * @return the properties - */ - public Map getProperties() { - return properties; - } - - /** - * Sets the properties. - * - * @param properties the properties - */ - public void setProperties(Map properties) { - this.properties = properties; - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Import.java b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Import.java deleted file mode 100755 index d64a58066..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Import.java +++ /dev/null @@ -1,48 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.asdc.beans.tosca; - -/** - * The Class Import. - */ -public class Import { - - /** The file. */ - private String file; - - /** - * Gets the file. - * - * @return the file - */ - public String getFile() { - return file; - } - - /** - * Sets the file. - * - * @param file the new file - */ - public void setFile(String file) { - this.file = file; - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Input.java b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Input.java deleted file mode 100755 index e5eec0121..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Input.java +++ /dev/null @@ -1,168 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.asdc.beans.tosca; - -import org.openecomp.sdc.toscaparser.api.elements.constraints.*; - -import java.util.List; -import java.util.ArrayList; - -// TODO: Auto-generated Javadoc -/** - * The Class Input. - */ -public class Input { - - /** The type. */ - private String type; - - /** The description. */ - private String description; - - /** The default. */ - private Object _default; - - /** The entry schema. */ - private Input entry_schema; - - /** The constraints */ - private List constraints; - - /** The required field. If not set, the default is true */ - private boolean required = true; - - /** - * Instantiates a new input. - */ - public Input() { - constraints = new ArrayList(); - } - - /** - * Gets the type. - * - * @return the type - */ - public String getType() { - return type; - } - - /** - * Sets the type. - * - * @param type the new type - */ - public void setType(String type) { - this.type = type; - } - /** - * Gets the required field. - * - * @return the required field - */ - public boolean getRequired() { - return required; - } - /** - * Sets the required value. - * - * @param required the new required value - */ - public void setRequired(boolean required) { - this.required = required; - } - /** - * Gets the description. - * - * @return the description - */ - public String getDescription() { - return description; - } - - /** - * Sets the description. - * - * @param description the new description - */ - public void setDescription(String description) { - this.description = description; - } - - /** - * Gets the default. - * - * @return the default - */ - public Object getDefault() { - return _default; - } - - /** - * Sets the default. - * - * @param _default the new default - */ - public void setDefault(Object _default) { - this._default = _default; - } - - /** - * Gets the entry schema. - * - * @return the entry schema - */ - public Input getentry_schema() { - return entry_schema; - } - /** - * Sets the entry schema. - * - * @param the entry schema - */ - public void setentry_schema(Input s) { - this.entry_schema = s; - } - /** - * Sets the constraints. - * - * @param c the new constraints - */ - public void setConstraints(List c) { - this.constraints = c; - } - /** - * Gets the constraints - * - * @return the constraints - */ - public List getConstraints() { - return constraints; - } - - /* (non-Javadoc) - * @see java.lang.Object#toString() - */ - @Override - public String toString() { - return "type=" + type + ",description=" + description + ",default=" + _default; - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/NodeTemplate.java b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/NodeTemplate.java deleted file mode 100755 index 97740b3f5..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/NodeTemplate.java +++ /dev/null @@ -1,117 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.asdc.beans.tosca; - -import java.util.Map; -import java.util.HashMap; - -/** - * The Class NodeTemplate. - */ -public class NodeTemplate { - - /** The type. */ - private String type; - - /** The metadata. */ - private ToscaMetadata metadata; - - /** The properties. */ - private Map properties; //HEAT? - - /** The requirements. */ - private Object requirements; - - public NodeTemplate () { - properties = new HashMap(); - } - /** - * Gets the type. - * - * @return the type - */ - public String getType() { - return type; - } - - /** - * Sets the type. - * - * @param type the new type - */ - public void setType(String type) { - this.type = type; - } - - /** - * Gets the metadata. - * - * @return the metadata - */ - public ToscaMetadata getMetadata() { - return metadata; - } - - /** - * Sets the metadata. - * - * @param metadata the new metadata - */ - public void setMetadata(ToscaMetadata metadata) { - this.metadata = metadata; - } - - /** - * Gets the properties. - * - * @return the properties - */ - public Map getProperties() { - return properties; - } - - /** - * Sets the properties. - * - * @param properties the properties - */ - public void setProperties(Map properties) { - this.properties = properties; - } - - /** - * Gets the requirements. - * - * @return the requirements - */ - public Object getRequirements() { - return requirements; - } - - /** - * Sets the requirements. - * - * @param requirements the new requirements - */ - public void setRequirements(Object requirements) { - this.requirements = requirements; - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Property.java b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Property.java deleted file mode 100755 index 16b921e2a..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Property.java +++ /dev/null @@ -1,157 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.asdc.beans.tosca; - -/** - * The Class Property. - */ -public class Property { - - /** The type. */ - private String type; - - /** The description. */ - private String description; - - /** The entry schema. */ - private Schema entry_schema; - - /** The default. */ - private String _default; - - /** The required. */ - private boolean required; - - /** - * Instantiates a new property. - */ - private Property() {} - - /** - * Gets the type. - * - * @return the type - */ - public String getType() { - return type; - } - - /** - * Gets the description. - * - * @return the description - */ - public String getDescription() { - return description; - } - - /** - * Gets the entry schema. - * - * @return the entry schema - */ - public Schema getEntry_schema() { - return entry_schema; - } - - /** - * Gets the default. - * - * @return the default - */ - public String get_default() { - return _default; - } - - /** - * Sets the type. - * - * @param type the new type - */ - public void setType(String type) { - this.type = type; - } - - /** - * Sets the description. - * - * @param description the new description - */ - public void setDescription(String description) { - this.description = description; - } - - /** - * Sets the entry schema. - * - * @param entry_schema the new entry schema - */ - public void setEntry_schema(Schema entry_schema) { - this.entry_schema = entry_schema; - } - - /** - * Sets the default. - * - * @param _default the new default - */ - public void set_default(String _default) { - this._default = _default; - } - - /** - * Gets the default. - * - * @return the default - */ - public String getDefault() { - return _default; - } - - /** - * Checks if is required. - * - * @return true, if is required - */ - public boolean isRequired() { - return required; - } - - /** - * Sets the default. - * - * @param _default the new default - */ - public void setDefault(String _default) { - this._default = _default; - } - - /** - * Sets the required. - * - * @param required the new required - */ - public void setRequired(boolean required) { - this.required = required; - } - - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Requirement.java b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Requirement.java deleted file mode 100755 index acb250997..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Requirement.java +++ /dev/null @@ -1,120 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.asdc.beans.tosca; - -import java.util.Collection; - -/** - * The Class Requirement. - */ -public class Requirement { - - /** The occurrences. */ - private Collection occurrences; - - /** The capability. */ - private String capability; - - /** The node. */ - private String node; - - /** The relationship. */ - private String relationship; - - /** - * Instantiates a new requirement. - */ - private Requirement() {} - - /** - * Gets the occurrences. - * - * @return the occurrences - */ - public Collection getOccurrences() { - return occurrences; - } - - /** - * Gets the capability. - * - * @return the capability - */ - public String getCapability() { - return capability; - } - - /** - * Gets the node. - * - * @return the node - */ - public String getNode() { - return node; - } - - /** - * Gets the relationship. - * - * @return the relationship - */ - public String getRelationship() { - return relationship; - } - - /** - * Sets the occurrences. - * - * @param occurrences the new occurrences - */ - public void setOccurrences(Collection occurrences) { - this.occurrences = occurrences; - } - - /** - * Sets the capability. - * - * @param capability the new capability - */ - public void setCapability(String capability) { - this.capability = capability; - } - - /** - * Sets the node. - * - * @param node the new node - */ - public void setNode(String node) { - this.node = node; - } - - /** - * Sets the relationship. - * - * @param relationship the new relationship - */ - public void setRelationship(String relationship) { - this.relationship = relationship; - } - - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Schema.java b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Schema.java deleted file mode 100755 index f77c1b4b5..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/Schema.java +++ /dev/null @@ -1,53 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.asdc.beans.tosca; - -/** - * The Class Schema. - */ -public class Schema { - - /** The type. */ - public String type; - - /** - * Instantiates a new schema. - */ - public Schema() {} - - /** - * Gets the type. - * - * @return the type - */ - public String getType() { - return type; - } - - /** - * Sets the type. - * - * @param type the new type - */ - public void setType(String type) { - this.type = type; - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/SubstitutionMappings.java b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/SubstitutionMappings.java deleted file mode 100755 index f59f24674..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/SubstitutionMappings.java +++ /dev/null @@ -1,101 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.asdc.beans.tosca; - -import java.util.HashMap; -import java.util.Map; - -/** - * The Class SubstitutionMappings. - */ -public class SubstitutionMappings { - - /** The node type. */ - private String node_type; - - /** The capabilities. */ - private Map capabilities; - - /** The requirements. */ - private Map requirements; - - /** - * Instantiates a new substitution mappings. - */ - public SubstitutionMappings() { - capabilities = new HashMap (); - requirements = new HashMap (); - } - - /** - * Gets the node type. - * - * @return the node type - */ - public String getnode_type() { - return node_type; - } - - /** - * Sets the node type. - * - * @param node_type the new node type - */ - public void setnode_type(String node_type) { - this.node_type = node_type; - } - - /** - * Gets the capabilities. - * - * @return the capabilities - */ - public Map getCapabilities() { - return capabilities; - } - - /** - * Sets the capabilities. - * - * @param capabilities the capabilities - */ - public void setCapabilities(Map capabilities) { - this.capabilities = capabilities; - } - - /** - * Gets the requirements. - * - * @return the requirements - */ - public Map getRequirements() { - return requirements; - } - - /** - * Sets the requirements. - * - * @param requirements the requirements - */ - public void setRequirements(Map requirements) { - this.requirements = requirements; - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/TopologyTemplate.java b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/TopologyTemplate.java deleted file mode 100755 index 25b2c2c38..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/TopologyTemplate.java +++ /dev/null @@ -1,124 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.asdc.beans.tosca; - -import java.util.HashMap; -import java.util.Map; - -/** - * The Class TopologyTemplate. - */ -public class TopologyTemplate { - - /** The substitution mappings. */ - private SubstitutionMappings substitution_mappings; - - /** The inputs. */ - private Map inputs; - - /** The node templates. */ - private Map node_templates; - - /** The groups. */ - private Map groups; - - /** - * Instantiates a new topology template. - */ - public TopologyTemplate() { - substitution_mappings = new SubstitutionMappings(); - inputs = new HashMap (); - node_templates = new HashMap (); - groups = new HashMap (); - } - - /** - * Gets the substitution mappings. - * - * @return the substitution mappings - */ - public SubstitutionMappings getsubstitution_mappings() { - return this.substitution_mappings; - } - - /** - * Sets the substitution mappings. - * - * @param substitution_mappings the new substitution mappings - */ - public void setsubstitution_mappings(SubstitutionMappings substitution_mappings) { - this.substitution_mappings = substitution_mappings; - } - - /** - * Gets the inputs. - * - * @return the inputs - */ - public Map getInputs() { - return inputs; - } - - /** - * Sets the inputs. - * - * @param inputs the inputs - */ - public void setInputs(Map inputs) { - this.inputs = inputs; - } - - /** - * Gets the node templates. - * - * @return the node templates - */ - public Map getnode_templates() { - return node_templates; - } - - /** - * Setnode templates. - * - * @param node_templates the node templates - */ - public void setnode_templates(Map node_templates) { - this.node_templates = node_templates; - } - - /** - * Gets the groups. - * - * @return the groups - */ - public Map getGroups() { - return groups; - } - - /** - * Sets the groups. - * - * @param groups the groups - */ - public void setGroups(Map groups) { - this.groups = groups; - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/ToscaCsar.java b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/ToscaCsar.java deleted file mode 100755 index 9e9e1d00b..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/ToscaCsar.java +++ /dev/null @@ -1,101 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.asdc.beans.tosca; - -import java.util.Collection; -import java.util.LinkedList; - -/** - * The Class ToscaCsar. - */ -public class ToscaCsar { - - /** The parent. */ - private final ToscaModel parent; - - /** The children. */ - private final Collection children; - - /** - * The Class Builder. - */ - public static class Builder { - - /** The parent. */ - private final ToscaModel parent; - - /** The children. */ - private Collection children = new LinkedList (); - - /** - * Instantiates a new builder. - * - * @param parent the parent - */ - public Builder(ToscaModel parent) { - this.parent = parent; - } - - /** - * Adds the vnf. - * - * @param child the child - * @return the builder - */ - public Builder addVnf(ToscaModel child) { - children.add(child); - return this; - } - - /** - * Builds the. - * - * @return the tosca csar - */ - public ToscaCsar build() { - return new ToscaCsar(this); - } - } - - /** - * Instantiates a new tosca csar. - * - * @param builder the builder - */ - public ToscaCsar(Builder builder) { - this.parent = builder.parent; - this.children = builder.children; - } - - /** - * Gets the parent. - * - * @return the parent - */ - public ToscaModel getParent() { return parent; } - - /** - * Gets the children. - * - * @return the children - */ - public Collection getChildren() { return children; } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/ToscaMeta.java b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/ToscaMeta.java deleted file mode 100755 index a5295c476..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/ToscaMeta.java +++ /dev/null @@ -1,124 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.asdc.beans.tosca; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.util.HashMap; -import java.util.Map; - -import org.openecomp.vid.asdc.AsdcCatalogException; - -/** - * The Class ToscaMeta. - */ -public class ToscaMeta { - - /** The metadata. */ - private final Map metadata; - - /** - * Instantiates a new tosca meta. - * - * @param builder the builder - * @throws IOException Signals that an I/O exception has occurred. - * @throws AsdcCatalogException the asdc catalog exception - */ - private ToscaMeta(Builder builder) throws IOException, AsdcCatalogException { - metadata = new HashMap (); - - read(builder.inputStream); - } - - /** - * The Class Builder. - */ - public static class Builder { - - /** The input stream. */ - private final InputStream inputStream; - - /** - * Instantiates a new builder. - * - * @param inputStream the input stream - */ - public Builder(InputStream inputStream) { - this.inputStream = inputStream; - } - - /** - * Builds the. - * - * @return the tosca meta - * @throws IOException Signals that an I/O exception has occurred. - * @throws AsdcCatalogException the asdc catalog exception - */ - public ToscaMeta build() throws IOException, AsdcCatalogException { - return new ToscaMeta(this); - } - } - - /** - * Gets the. - * - * @param property the property - * @return the string - */ - public String get(String property) { - return metadata.get(property); - } - - /** - * Read. - * - * @param inputStream the input stream - * @throws IOException Signals that an I/O exception has occurred. - * @throws AsdcCatalogException the asdc catalog exception - */ - private void read(InputStream inputStream) throws IOException, AsdcCatalogException { - - final BufferedReader br = new BufferedReader(new InputStreamReader(inputStream)); - - String line; - - try { - while ((line = br.readLine()) != null) { - if ( line.length() > 0 ) { - final String[] entry = line.split(":"); - - if (entry.length != 2) throw new AsdcCatalogException("TOSCA.meta file cannot be parsed (more than 1 colon found on a single line"); - if (!entry[1].startsWith(" ")) throw new AsdcCatalogException("TOSCA.meta file cannot be parsed (: not immediately followed by ' ')"); - - metadata.put(entry[0], entry[1].substring(1)); - } - } - } catch (IOException e) { - metadata.clear(); - throw e; - } catch (AsdcCatalogException e) { - metadata.clear(); - throw e; - } - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/ToscaMetadata.java b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/ToscaMetadata.java deleted file mode 100755 index d42c1f150..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/ToscaMetadata.java +++ /dev/null @@ -1,461 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.asdc.beans.tosca; - -/** - * The Class ToscaMetadata. - */ -public class ToscaMetadata { - - /** The template name. */ - private String template_name; - - /** The invariant UUID. */ - private String invariantUUID; - - /** The customization UUID. */ - private String customizationUUID; - - /** The uuid. */ - private String uuid; - - /** The version. */ - private String version; - - /** The name. */ - private String name; - - /** The description. */ - private String description; - - /** The category. */ - private String category; - - /** The subcategory. */ - private String subcategory; - - /** The type. */ - private String type; - - /** The resource vendor. */ - private String resourceVendor; - - /** The resource vendor release. */ - private String resourceVendorRelease; - - /** The service ecomp naming. */ - private String serviceEcompNaming; - - /** The ecomp generated naming - duplicate for serviceEcompNaming */ - private boolean ecompGeneratedNaming; - - /** The naming policy */ - private String namingPolicy; - - /** The service homing. */ - private boolean serviceHoming; - - /** The vf module model name. */ - //ToscaMetadata for VF Modules - private String vfModuleModelName; - - /** The vf module model invariant UUID. */ - private String vfModuleModelInvariantUUID; - - /** The vf module model customization UUID. */ - private String vfModuleModelCustomizationUUID; - - /** The vf module model UUID. */ - private String vfModuleModelUUID; - - /** The vf module model version. */ - private String vfModuleModelVersion; - - /** - * Instantiates a new tosca metadata. - */ - public ToscaMetadata() {} - - /** - * Gets the type. - * - * @return the type - */ - public String getType() { - return type; - } - - /** - * Gets the invariant UUID. - * - * @return the invariant UUID - */ - public String getInvariantUUID() { - return invariantUUID; - } - /** - * Gets the customization UUID. - * - * @return the customization UUID - */ - public String getCustomizationUUID() { - return customizationUUID; - } - /** - * Gets the uuid. - * - * @return the uuid - */ - public String getUUID() { - return uuid; - } - - /** - * Gets the version. - * - * @return the version - */ - public String getVersion() { - return version; - } - - /** - * Gets the name. - * - * @return the name - */ - public String getName() { - return name; - } - - /** - * Gets the description. - * - * @return the description - */ - public String getDescription() { - return description; - } - - /** - * Gets the category. - * - * @return the category - */ - public String getCategory() { - return category; - } - - /** - * Gets the subcategory. - * - * @return the subcategory - */ - public String getSubcategory() { - return subcategory; - } - - /** - * Gets the resource vendor. - * - * @return the resource vendor - */ - public String getResourceVendor() { - return resourceVendor; - } - - /** - * Gets the resource vendor release. - * - * @return the resource vendor release - */ - public String getResourceVendorRelease() { - return resourceVendorRelease; - } - - /** - * Returns the value of service ecomp naming. - * - * @return serviceEcompNaming - */ - public String getServiceEcompNaming() { - return serviceEcompNaming; - } - /** - * Returns the value of the naming policy. - * - * @return namingPolicy - */ - public String getNamingPolicy() { - return namingPolicy; - } - /** - * Checks if is service homing. - * - * @return true, if is service homing - */ - public boolean isServiceHoming() { - return serviceHoming; - } - /** - * Checks if is ecomp generated naming. - * - * @return true, if ecomp generated naming is true - */ - public boolean isEcompGeneratedNaming() { - return ecompGeneratedNaming; - } - /** - * Sets the type. - * - * @param type the new type - */ - public void setType(String type) { - this.type = type; - } - - /** - * Sets the invariant UUID. - * - * @param invariantUUID the new invariant UUID - */ - public void setInvariantUUID(String invariantUUID) { - this.invariantUUID = invariantUUID; - } - /** - * Sets the naming policy. - * - * @param namingPolicy the new naming policy - */ - public void setNamingPolicy(String namingPolicy) { - this.namingPolicy = namingPolicy; - } - /** - * Sets the uuid. - * - * @param uuid the new uuid - */ - public void setUUID(String uuid) { - this.uuid = uuid; - } - /** - * Sets the customization uuid. - * - * @param u the new customization uuid - */ - public void setCustomizationUUID(String u) { - this.customizationUUID = u; - } - /** - * Sets the version. - * - * @param version the new version - */ - public void setVersion(String version) { - this.version = version; - } - - /** - * Sets the name. - * - * @param name the new name - */ - public void setName(String name) { - this.name = name; - } - - /** - * Sets the description. - * - * @param description the new description - */ - public void setDescription(String description) { - this.description = description; - } - - /** - * Sets the category. - * - * @param category the new category - */ - public void setCategory(String category) { - this.category = category; - } - - /** - * Sets the service ecomp naming. - * - * @param serviceEcompNaming the new service ecomp naming - */ - public void setServiceEcompNaming(String serviceEcompNaming) { - this.serviceEcompNaming = serviceEcompNaming; - } - - /** - * Sets the service homing. - * - * @param serviceHoming the new service homing - */ - public void setServiceHoming(boolean serviceHoming) { - this.serviceHoming = serviceHoming; - } - /** - * Sets the ecomp generated naming. - * - * @param ecompGeneratedNaming the new ecomp generated naming - */ - public void setEcompGeneratedNaming(boolean ecompGeneratedNaming) { - this.ecompGeneratedNaming = ecompGeneratedNaming; - } - /** - * Gets the template name. - * - * @return the template name - */ - public String gettemplate_name() { - return template_name; - } - - /** - * Sets the template name. - * - * @param template_name the new template name - */ - public void settemplate_name(String template_name) { - this.template_name = template_name; - } - - /** - * Sets the subcategory. - * - * @param subcategory the new subcategory - */ - public void setSubcategory(String subcategory) { - this.subcategory = subcategory; - } - - /** - * Sets the resource vendor. - * - * @param resourceVendor the new resource vendor - */ - public void setResourceVendor(String resourceVendor) { - this.resourceVendor = resourceVendor; - } - - /** - * Sets the resource vendor release. - * - * @param resourceVendorRelease the new resource vendor release - */ - public void setResourceVendorRelease(String resourceVendorRelease) { - this.resourceVendorRelease = resourceVendorRelease; - } - - /** - * Gets the vf module model name. - * - * @return the vf module model name - */ - public String getVfModuleModelName() { - return vfModuleModelName; - } - - /** - * Sets the vf module model name. - * - * @param vfModuleModelName the new vf module model name - */ - public void setVfModuleModelName(String vfModuleModelName) { - this.vfModuleModelName = vfModuleModelName; - } - - /** - * Gets the vf module model invariant UUID. - * - * @return the vf module model invariant UUID - */ - public String getVfModuleModelInvariantUUID() { - return vfModuleModelInvariantUUID; - } - - /** - * Sets the vf module model invariant UUID. - * - * @param vfModuleModelInvariantUUID the new vf module model invariant UUID - */ - public void setVfModuleModelInvariantUUID(String vfModuleModelInvariantUUID) { - this.vfModuleModelInvariantUUID = vfModuleModelInvariantUUID; - } - - /** - * Gets the vf module model UUID. - * - * @return the vf module model UUID - */ - public String getVfModuleModelUUID() { - return vfModuleModelUUID; - } - - /** - * Sets the vf module model UUID. - * - * @param vfModuleModelUUID the new vf module model UUID - */ - public void setVfModuleModelUUID(String vfModuleModelUUID) { - this.vfModuleModelUUID = vfModuleModelUUID; - } - - /** - * Gets the vf module model version. - * - * @return the vf module model version - */ - public String getVfModuleModelVersion() { - return vfModuleModelVersion; - } - - /** - * Sets the vf module model version. - * - * @param vfModuleModelVersion the new vf module model version - */ - public void setVfModuleModelVersion(String vfModuleModelVersion) { - this.vfModuleModelVersion = vfModuleModelVersion; - } - /** - * Sets the vf module customization uuid. - * - * @param u the new vf module model customization uuid - */ - public void setVfModuleModelCustomizationUUID(String u) { - this.vfModuleModelCustomizationUUID = u; - } - /** - * Gets the vf module model customization uuid. - * - * @return the vf module model customization uuid - */ - public String getVfModuleModelCustomizationUUID() { - - return vfModuleModelCustomizationUUID; - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/ToscaModel.java b/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/ToscaModel.java deleted file mode 100755 index 77fbe9135..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/asdc/beans/tosca/ToscaModel.java +++ /dev/null @@ -1,166 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.asdc.beans.tosca; - -import java.util.Collection; -import java.util.LinkedList; -import java.util.Map; - -/** - * The Class ToscaModel. - */ -public class ToscaModel { - - /** The tosca definitions version. */ - private String tosca_definitions_version; - - /** The description. */ - private String description; - - /** The metadata. */ - private ToscaMetadata metadata; - - /** The topology template. */ - private TopologyTemplate topology_template; - - /** The imports. */ - private Collection>> imports; - - /** The node types. */ - private Map node_types; - - /** - * Instantiates a new tosca model. - */ - public ToscaModel() { - metadata = new ToscaMetadata(); - topology_template = new TopologyTemplate(); - imports = new LinkedList>> (); - } - - /** - * Gets the metadata. - * - * @return the metadata - */ - public ToscaMetadata getMetadata() { - return metadata; - } - - /** - * Sets the metadata. - * - * @param metadata the new metadata - */ - public void setMetadata(ToscaMetadata metadata) { - this.metadata = metadata; - } - - /** - * Gets the tosca definitions version. - * - * @return the tosca definitions version - */ - public String gettosca_definitions_version() { - return tosca_definitions_version; - } - - /** - * Sets the tosca definitions version. - * - * @param tosca_definitions_version the new tosca definitions version - */ - public void settosca_definitions_version(String tosca_definitions_version) { - this.tosca_definitions_version = tosca_definitions_version; - } - - /** - * Gets the topology template. - * - * @return the topology template - */ - public TopologyTemplate gettopology_template() { - return topology_template; - } - - /** - * Sets the topology template. - * - * @param topology_template the new topology template - */ - public void settopology_template(TopologyTemplate topology_template) { - this.topology_template = topology_template; - } - - /** - * Gets the description. - * - * @return the description - */ - public String getDescription() { - return description; - } - - /** - * Sets the description. - * - * @param description the new description - */ - public void setDescription(String description) { - this.description = description; - } - - /** - * Gets the imports. - * - * @return the imports - */ - public Collection>> getImports() { - return imports; - } - - /** - * Sets the imports. - * - * @param imports the imports - */ - public void setImports(Collection>> imports) { - this.imports = imports; - } - - /** - * Gets the node types. - * - * @return the node types - */ - public Map getnode_types() { - return node_types; - } - - /** - * Setnode types. - * - * @param node_types the node types - */ - public void setnode_types(Map node_types) { - this.node_types = node_types; - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/asdc/local/LocalAsdcClient.java b/vid-app-common/src/main/java/org/openecomp/vid/asdc/local/LocalAsdcClient.java deleted file mode 100644 index 696e18904..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/asdc/local/LocalAsdcClient.java +++ /dev/null @@ -1,393 +0,0 @@ -package org.openecomp.vid.asdc.local; - -import org.codehaus.jackson.JsonParseException; -import org.codehaus.jackson.map.JsonMappingException; -import org.codehaus.jackson.map.ObjectMapper; -import org.json.JSONArray; -import org.json.JSONObject; -import org.openecomp.vid.asdc.AsdcCatalogException; -import org.openecomp.vid.asdc.AsdcClient; -import org.openecomp.vid.asdc.beans.Artifact; -import org.openecomp.vid.asdc.beans.Resource; -import org.openecomp.vid.asdc.beans.Service; -import org.openecomp.vid.asdc.beans.tosca.ToscaCsar; -import org.openecomp.vid.asdc.beans.tosca.ToscaMeta; -import org.openecomp.vid.asdc.beans.tosca.ToscaModel; -import org.yaml.snakeyaml.Yaml; - -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.nio.file.StandardCopyOption; -import java.util.*; -import java.util.zip.ZipFile; - -/** - * The Class LocalAsdcClient. - */ -public class LocalAsdcClient implements AsdcClient { - - - /** - * The catalog. - */ - private final JSONObject catalog; - - /** - * The mapper. - */ - private final ObjectMapper mapper; - - /** - * The Class Builder. - */ - public static class Builder { - - /** - * The catalog. - */ - private JSONObject catalog = new JSONObject() - .put("resources", new JSONObject()) - .put("services", new JSONObject()); - - /** - * The mapper. - */ - private ObjectMapper mapper = new ObjectMapper(); - - /** - * Instantiates a new builder. - */ - public Builder() { - } - - /** - * Catalog. - * - * @param catalog the catalog - * @return the builder - */ - public org.openecomp.vid.asdc.local.LocalAsdcClient.Builder catalog(JSONObject catalog) { - this.catalog = catalog; - return this; - } - - /** - * Mapper. - * - * @param mapper the mapper - * @return the builder - */ - public org.openecomp.vid.asdc.local.LocalAsdcClient.Builder mapper(ObjectMapper mapper) { - this.mapper = mapper; - return this; - } - - /** - * Builds the. - * - * @return the in local sdc client - */ - public org.openecomp.vid.asdc.local.LocalAsdcClient build() { - return new org.openecomp.vid.asdc.local.LocalAsdcClient(this); - } - } - - /** - * Instantiates a new in local sdc client. - * - * @param builder the builder - */ - private LocalAsdcClient(org.openecomp.vid.asdc.local.LocalAsdcClient.Builder builder) { - catalog = builder.catalog; - mapper = builder.mapper; - } - - /** - * Gets the catalog. - * - * @return the catalog - */ - private JSONObject getCatalog() { - return catalog; - } - - /** - * Gets the mapper. - * - * @return the mapper - */ - private ObjectMapper getMapper() { - return mapper; - } - - /** - * Convert. - * - * @param the generic type - * @param json the json - * @param clazz the clazz - * @return the t - * @throws AsdcCatalogException the sdc catalog exception - */ - private T convert(JSONObject json, Class clazz) throws AsdcCatalogException { - try { - return getMapper().readValue(json.toString(), clazz); - } catch (JsonParseException e) { - throw new AsdcCatalogException("Failed to parse SDC response (bad data)", e); - } catch (JsonMappingException e) { - throw new AsdcCatalogException("Failed to map SDC response to internal VID data structure(s)", e); - } catch (IOException e) { - throw new AsdcCatalogException("Failed to get a response from SDC", e); - } - } - - /* (non-Javadoc) - * @see org.openecomp.vid.asdc.AsdcClient#getResource(java.util.UUID) - */ - public Resource getResource(UUID uuid) throws AsdcCatalogException { - final JSONObject resource = getCatalog().getJSONObject("resources") - .getJSONObject(uuid.toString()); - return convert(resource, Resource.class); - } - - /* (non-Javadoc) - * @see org.openecomp.vid.asdc.AsdcClient#getResources() - */ - public Collection getResources() throws AsdcCatalogException { - final Collection resources = new LinkedList(); - - for (String key : getCatalog().getJSONObject("resources").keySet()) { - final JSONObject json = getCatalog().getJSONObject("resources").getJSONObject(key); - final Resource resource = convert(json, Resource.class); - resources.add(resource); - } - - return resources; - } - - /* (non-Javadoc) - * @see org.openecomp.vid.asdc.AsdcClient#getResources(java.util.Map) - */ - public Collection getResources(Map filter) throws AsdcCatalogException { - final Collection resources = new LinkedList(); - - for (String key : getCatalog().getJSONObject("resources").keySet()) { - final JSONObject json = getCatalog().getJSONObject("resources").getJSONObject(key); - - boolean filterMatch = true; - - for (Map.Entry entry : filter.entrySet()) { - for (int i = 0; i < entry.getValue().length; i++) { - if (!json.getString(entry.getKey()).equals(entry.getValue()[i])) { - filterMatch = false; - break; - } - } - } - - if (filterMatch) resources.add(convert(json, Resource.class)); - } - - return resources; - } - - /* (non-Javadoc) - * @see org.openecomp.vid.asdc.AsdcClient#getService(java.util.UUID) - */ - public Service getService(UUID uuid) throws AsdcCatalogException { - - JSONObject serviceJsonObject = null; - final JSONArray categoryJsonArray = getCatalog().getJSONArray("services"); - - for (int i = 0; i < categoryJsonArray.length() ; i++) { - JSONObject jsonServiceObject = categoryJsonArray.getJSONObject(i); - if (jsonServiceObject.get("uuid").equals(uuid.toString())) { - serviceJsonObject = jsonServiceObject; - break; - } - } - - if (serviceJsonObject != null) - return convert(serviceJsonObject, Service.class); - else return null; - } - - /* (non-Javadoc) - * @see org.openecomp.vid.asdc.AsdcClient#getServices() - */ - public Collection getServices() throws AsdcCatalogException { - final Collection services = new LinkedList(); - - JSONArray servicesArr = getCatalog().getJSONArray("services"); - - for (Object objService : servicesArr) { - JSONObject jsonServiceItem = (JSONObject) objService; - final Service service = convert(jsonServiceItem, Service.class); - services.add(service); - } - - return services; - } - - /* (non-Javadoc) - * @see org.openecompt.vid.asdc.AsdcClient#getServices(java.util.Map) - */ - public Collection getServices(Map filter) throws AsdcCatalogException { - final Collection services = new LinkedList(); - - JSONArray catalogServices = catalog.getJSONArray("services"); - - for (int i = 0; i < catalogServices.length(); i++) { - - JSONObject serviceJson = catalogServices.getJSONObject(i); - - boolean filterMatch = true; - - for (Map.Entry entry : filter.entrySet()) { - for (int j = 0; j < entry.getValue().length; j++) { - if (!serviceJson.getString(entry.getKey()).equals(entry.getValue()[j])) { - filterMatch = false; - break; - } - } - } - if (filterMatch) services.add(convert(serviceJson, Service.class)); - } - return services; - } - - /* (non-Javadoc) - * @see org.openecomp.vid.asdc.AsdcClient#getResourceArtifact(java.util.UUID, java.util.UUID) - */ - public Artifact getResourceArtifact(UUID resourceUuid, UUID artifactUuid) throws AsdcCatalogException { - final JSONArray artifacts = getCatalog().getJSONObject("resources") - .getJSONObject(resourceUuid.toString()) - .getJSONArray("artifacts"); - - for (int i = 0; i < artifacts.length(); i++) { - final JSONObject artifact = artifacts.getJSONObject(i); - - if (artifact.getString("artifactUUID").equals(artifactUuid.toString())) { - return convert(artifact, Artifact.class); - } - } - - return null; - } - - /* (non-Javadoc) - * @see org.openecomp.vid.asdc.AsdcClient#getServiceArtifact(java.util.UUID, java.util.UUID) - */ - public Artifact getServiceArtifact(UUID serviceUuid, UUID artifactUuid) throws AsdcCatalogException { - final JSONArray artifacts = getCatalog().getJSONObject("services") - .getJSONObject(serviceUuid.toString()) - .getJSONArray("artifacts"); - - for (int i = 0; i < artifacts.length(); i++) { - final JSONObject artifact = artifacts.getJSONObject(i); - - if (artifact.getString("artifactUUID").equals(artifactUuid.toString())) { - return convert(artifact, Artifact.class); - } - } - - return null; - } - - /* (non-Javadoc) - * @see org.openecomp.vid.asdc.AsdcClient#getResourceToscaModel(java.util.UUID) - */ - public Path getResourceToscaModel(UUID resourceUuid) throws AsdcCatalogException { - final String toscaModelURL = getCatalog().getJSONObject("resources") - .getJSONObject(resourceUuid.toString()) - .getString("toscaModelURL"); - - - final InputStream toscaModelStream = getClass().getClassLoader().getResourceAsStream(toscaModelURL); - - if (toscaModelStream == null) return null; - - return null;//getToscaModel(toscaModelStream); - } - - /* (non-Javadoc) - * @see org.openecomp.vid.asdc.AsdcClient#getServiceToscaModel(java.util.UUID) - */ - public Path getServiceToscaModel(UUID serviceUuid) throws AsdcCatalogException { - - String toscaModelURL = null; - - final JSONArray categoryJsonArray = getCatalog().getJSONArray("services"); - - for (int i = 0; i < categoryJsonArray.length() ; i++) { - - JSONObject jsonServiceObject = categoryJsonArray.getJSONObject(i); - if (jsonServiceObject.get("uuid").equals(serviceUuid.toString())) { - toscaModelURL = jsonServiceObject.getString("toscaModelURL"); - break; - } - } - - if (toscaModelURL==null){ - return null; - } - - final InputStream toscaModelStream = getClass().getClassLoader().getResourceAsStream(toscaModelURL); - - ClassLoader classLoader = getClass().getClassLoader(); - File file = new File(classLoader.getResource(toscaModelURL).getFile()); - Path path = Paths.get(file.getPath()); - - if (toscaModelStream == null) return null; - - return path; - } - - /** - * Gets the tosca model. - * - * @param csarInputStream the csar input stream - * @return the tosca model - * @throws AsdcCatalogException the asdc catalog exception - */ - private ToscaCsar getToscaModel(InputStream csarInputStream) throws AsdcCatalogException { - final Path csarFile; - - try { - csarFile = Files.createTempFile("csar", ".zip"); - Files.copy(csarInputStream, csarFile, StandardCopyOption.REPLACE_EXISTING); - } catch (IOException e) { - throw new AsdcCatalogException("Caught IOException while creating CSAR", e); - } - - try (final ZipFile csar = new ZipFile(csarFile.toFile())) { - - final InputStream toscaMetaStream = csar.getInputStream(csar.getEntry("TOSCA-Metadata/TOSCA.meta")); - final ToscaMeta toscaMeta = new ToscaMeta.Builder(toscaMetaStream).build(); - final String entryDefinitions = toscaMeta.get("Entry-Definitions"); - final InputStream toscaParentEntryYamlStream = csar.getInputStream(csar.getEntry(entryDefinitions)); - - final Yaml yaml = new Yaml(); - final ToscaModel parentModel = yaml.loadAs(toscaParentEntryYamlStream, ToscaModel.class); - - final ToscaCsar.Builder csarBuilder = new ToscaCsar.Builder(parentModel); - - for (Map> imports : parentModel.getImports()) { - for (Map.Entry> entry : imports.entrySet()) { - final InputStream toscaChildEntryYamlStream = csar.getInputStream(csar.getEntry("Definitions/" + entry.getValue().get("file"))); - final ToscaModel childModel = yaml.loadAs(toscaChildEntryYamlStream, ToscaModel.class); - csarBuilder.addVnf(childModel); - } - } - - return csarBuilder.build(); - } catch (IOException e) { - throw new AsdcCatalogException("Caught IOException while processing CSAR", e); - } - } - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/asdc/memory/InMemoryAsdcClient.java b/vid-app-common/src/main/java/org/openecomp/vid/asdc/memory/InMemoryAsdcClient.java deleted file mode 100755 index 2b783d45a..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/asdc/memory/InMemoryAsdcClient.java +++ /dev/null @@ -1,372 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.asdc.memory; - -import java.io.IOException; -import java.io.InputStream; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.StandardCopyOption; -import java.util.Collection; -import java.util.LinkedList; -import java.util.Map; -import java.util.Map.Entry; -import java.util.UUID; -import java.util.zip.ZipFile; - -import org.codehaus.jackson.JsonParseException; -import org.codehaus.jackson.map.JsonMappingException; -import org.codehaus.jackson.map.ObjectMapper; -import org.json.JSONArray; -import org.json.JSONObject; -import org.yaml.snakeyaml.Yaml; - -import org.openecomp.vid.asdc.AsdcCatalogException; -import org.openecomp.vid.asdc.AsdcClient; -import org.openecomp.vid.asdc.beans.Artifact; -import org.openecomp.vid.asdc.beans.Resource; -import org.openecomp.vid.asdc.beans.Service; -import org.openecomp.vid.asdc.beans.tosca.ToscaCsar; -import org.openecomp.vid.asdc.beans.tosca.ToscaMeta; -import org.openecomp.vid.asdc.beans.tosca.ToscaModel; - -/** - * The Class InMemoryAsdcClient. - */ -public class InMemoryAsdcClient implements AsdcClient { - - /** The catalog. */ - private final JSONObject catalog; - - /** The mapper. */ - private final ObjectMapper mapper; - - /** - * The Class Builder. - */ - public static class Builder { - - /** The catalog. */ - private JSONObject catalog = new JSONObject() - .put("resources", new JSONObject()) - .put("services", new JSONObject()); - - /** The mapper. */ - private ObjectMapper mapper = new ObjectMapper(); - - /** - * Instantiates a new builder. - */ - public Builder() {} - - /** - * Catalog. - * - * @param catalog the catalog - * @return the builder - */ - public Builder catalog(JSONObject catalog) { - this.catalog = catalog; - return this; - } - - /** - * Mapper. - * - * @param mapper the mapper - * @return the builder - */ - public Builder mapper(ObjectMapper mapper) { - this.mapper = mapper; - return this; - } - - /** - * Builds the. - * - * @return the in memory sdc client - */ - public InMemoryAsdcClient build() { - return new InMemoryAsdcClient(this); - } - } - - /** - * Instantiates a new in memory sdc client. - * - * @param builder the builder - */ - InMemoryAsdcClient(Builder builder) { - catalog = builder.catalog; - mapper = builder.mapper; - } - - /** - * Gets the catalog. - * - * @return the catalog - */ - private JSONObject getCatalog() { - return catalog; - } - - /** - * Gets the mapper. - * - * @return the mapper - */ - private ObjectMapper getMapper() { - return mapper; - } - - /** - * Convert. - * - * @param the generic type - * @param json the json - * @param clazz the clazz - * @return the t - * @throws AsdcCatalogException the sdc catalog exception - */ - private T convert(JSONObject json, Class clazz) throws AsdcCatalogException { - try { - return getMapper().readValue(json.toString(), clazz); - } catch (JsonParseException e) { - throw new AsdcCatalogException("Failed to parse SDC response (bad data)", e); - } catch (JsonMappingException e) { - throw new AsdcCatalogException("Failed to map SDC response to internal VID data structure(s)", e); - } catch (IOException e) { - throw new AsdcCatalogException("Failed to get a response from SDC", e); - } - } - - /* (non-Javadoc) - * @see org.openecomp.vid.asdc.AsdcClient#getResource(java.util.UUID) - */ - public Resource getResource(UUID uuid) throws AsdcCatalogException { - final JSONObject resource = getCatalog().getJSONObject("resources") - .getJSONObject(uuid.toString()); - return convert(resource, Resource.class); - } - - /* (non-Javadoc) - */ - public Collection getResources() throws AsdcCatalogException { - final Collection resources = new LinkedList (); - - for (String key : getCatalog().getJSONObject("resources").keySet()) { - final JSONObject json = getCatalog().getJSONObject("resources").getJSONObject(key); - final Resource resource = convert(json, Resource.class); - resources.add(resource); - } - - return resources; - } - - /* (non-Javadoc) - * @see org.openecomp.vid.asdc.AsdcClient#getResources(java.util.Map) - */ - public Collection getResources(Map filter) throws AsdcCatalogException { - final Collection resources = new LinkedList (); - - for (String key : getCatalog().getJSONObject("resources").keySet()) { - final JSONObject json = getCatalog().getJSONObject("resources").getJSONObject(key); - - boolean filterMatch = true; - - for (Entry entry : filter.entrySet()) { - for (int i = 0; i < entry.getValue().length; i++) { - if (!json.getString(entry.getKey()).equals(entry.getValue()[i])) { - filterMatch = false; - break; - } - } - } - - if (filterMatch) resources.add(convert(json, Resource.class)); - } - - return resources; - } - - /* (non-Javadoc) - * @see org.openecomp.vid.asdc.AsdcClient#getService(java.util.UUID) - */ - public Service getService(UUID uuid) throws AsdcCatalogException { - final JSONObject service = getCatalog().getJSONObject("services") - .getJSONObject(uuid.toString()); - return convert(service, Service.class); - } - - /* (non-Javadoc) - * @see org.openecomp.vid.asdc.AsdcClient#getServices() - */ - public Collection getServices() throws AsdcCatalogException { - final Collection services = new LinkedList (); - - for (String key : getCatalog().getJSONObject("services").keySet()) { - final JSONObject json = getCatalog().getJSONObject("services").getJSONObject(key); - final Service service = convert(json, Service.class); - services.add(service); - } - - return services; - } - - /* (non-Javadoc) - * @see org.openecompt.vid.asdc.AsdcClient#getServices(java.util.Map) - */ - public Collection getServices(Map filter) throws AsdcCatalogException { - final Collection services = new LinkedList (); - - for (String key : getCatalog().getJSONObject("services").keySet()) { - final JSONObject json = getCatalog().getJSONObject("services").getJSONObject(key); - - boolean filterMatch = true; - - for (Entry entry : filter.entrySet()) { - for (int i = 0; i < entry.getValue().length; i++) { - if (!json.getString(entry.getKey()).equals(entry.getValue()[i])) { - filterMatch = false; - break; - } - } - } - - if (filterMatch) services.add(convert(json, Service.class)); - } - - return services; - } - - /* (non-Javadoc) - * @see org.openecomp.vid.asdc.AsdcClient#getResourceArtifact(java.util.UUID, java.util.UUID) - */ - public Artifact getResourceArtifact(UUID resourceUuid, UUID artifactUuid) throws AsdcCatalogException { - final JSONArray artifacts = getCatalog().getJSONObject("resources") - .getJSONObject(resourceUuid.toString()) - .getJSONArray("artifacts"); - - for (int i = 0; i < artifacts.length(); i++) { - final JSONObject artifact = artifacts.getJSONObject(i); - - if (artifact.getString("artifactUUID").equals(artifactUuid.toString())) { - return convert(artifact, Artifact.class); - } - } - - return null; - } - - /* (non-Javadoc) - * @see org.openecomp.vid.asdc.AsdcClient#getServiceArtifact(java.util.UUID, java.util.UUID) - */ - public Artifact getServiceArtifact(UUID serviceUuid, UUID artifactUuid) throws AsdcCatalogException { - final JSONArray artifacts = getCatalog().getJSONObject("services") - .getJSONObject(serviceUuid.toString()) - .getJSONArray("artifacts"); - - for (int i = 0; i < artifacts.length(); i++) { - final JSONObject artifact = artifacts.getJSONObject(i); - - if (artifact.getString("artifactUUID").equals(artifactUuid.toString())) { - return convert(artifact, Artifact.class); - } - } - - return null; - } - - /* (non-Javadoc) - * @see org.openecomp.vid.asdc.AsdcClient#getResourceToscaModel(java.util.UUID) - */ - public Path getResourceToscaModel(UUID resourceUuid) throws AsdcCatalogException { - final String toscaModelURL = getCatalog().getJSONObject("resources") - .getJSONObject(resourceUuid.toString()) - .getString("toscaModelURL"); - - - final InputStream toscaModelStream = getClass().getClassLoader().getResourceAsStream(toscaModelURL); - - if (toscaModelStream == null) return null; - - return null;//getToscaModel(toscaModelStream); - } - - /* (non-Javadoc) - * @see org.openecomp.vid.asdc.AsdcClient#getServiceToscaModel(java.util.UUID) - */ - public Path getServiceToscaModel(UUID serviceUuid) throws AsdcCatalogException { - final String toscaModelURL = getCatalog().getJSONObject("services") - .getJSONObject(serviceUuid.toString()) - .getString("toscaModelURL"); - - final InputStream toscaModelStream = getClass().getClassLoader().getResourceAsStream(toscaModelURL); - - if (toscaModelStream == null) return null; - - return null;//getToscaModel(toscaModelStream); - } - - /** - * Gets the tosca model. - * - * @param csarInputStream the csar input stream - * @return the tosca model - * @throws AsdcCatalogException the asdc catalog exception - */ - private ToscaCsar getToscaModel(InputStream csarInputStream) throws AsdcCatalogException { - final Path csarFile; - - try { - csarFile = Files.createTempFile("csar", ".zip"); - Files.copy(csarInputStream, csarFile, StandardCopyOption.REPLACE_EXISTING); - } catch (IOException e) { - throw new AsdcCatalogException("Caught IOException while creating CSAR", e); - } - - try (final ZipFile csar = new ZipFile(csarFile.toFile())) { - - final InputStream toscaMetaStream = csar.getInputStream(csar.getEntry("TOSCA-Metadata/TOSCA.meta")); - final ToscaMeta toscaMeta = new ToscaMeta.Builder(toscaMetaStream).build(); - final String entryDefinitions = toscaMeta.get("Entry-Definitions"); - final InputStream toscaParentEntryYamlStream = csar.getInputStream(csar.getEntry(entryDefinitions)); - - final Yaml yaml = new Yaml(); - final ToscaModel parentModel = yaml.loadAs(toscaParentEntryYamlStream, ToscaModel.class); - - final ToscaCsar.Builder csarBuilder = new ToscaCsar.Builder(parentModel); - - for (Map> imports : parentModel.getImports()) { - for (Entry> entry : imports.entrySet()) { - final InputStream toscaChildEntryYamlStream = csar.getInputStream(csar.getEntry("Definitions/" + entry.getValue().get("file"))); - final ToscaModel childModel = yaml.loadAs(toscaChildEntryYamlStream, ToscaModel.class); - csarBuilder.addVnf(childModel); - } - } - - return csarBuilder.build(); - } catch (IOException e) { - throw new AsdcCatalogException("Caught IOException while processing CSAR", e); - } - } - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/asdc/parser/ToscaParser.java b/vid-app-common/src/main/java/org/openecomp/vid/asdc/parser/ToscaParser.java deleted file mode 100644 index eb1669846..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/asdc/parser/ToscaParser.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.openecomp.vid.asdc.parser; - -import java.nio.file.Path; - -import org.openecomp.sdc.tosca.parser.exceptions.SdcToscaParserException; -import org.openecomp.vid.asdc.AsdcCatalogException; -import org.openecomp.vid.asdc.beans.tosca.ToscaCsar; -import org.openecomp.vid.asdc.beans.Service; -import org.openecomp.vid.model.ServiceModel; - -public interface ToscaParser{ - ToscaCsar parse(Path path) throws AsdcCatalogException; - - ServiceModel makeServiceModel(String uuid,Path path,Service asdcServiceMetadata) throws Exception; -} \ No newline at end of file diff --git a/vid-app-common/src/main/java/org/openecomp/vid/asdc/parser/ToscaParserImpl.java b/vid-app-common/src/main/java/org/openecomp/vid/asdc/parser/ToscaParserImpl.java deleted file mode 100644 index bea5da877..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/asdc/parser/ToscaParserImpl.java +++ /dev/null @@ -1,225 +0,0 @@ -package org.openecomp.vid.asdc.parser; - -import java.io.IOException; -import java.io.InputStream; -import java.nio.file.Path; -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.util.Set; -import java.util.UUID; -import java.util.Map.Entry; -import java.util.zip.ZipFile; - -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.sdc.tosca.parser.exceptions.SdcToscaParserException; -import org.openecomp.vid.asdc.AsdcCatalogException; -import org.openecomp.vid.asdc.beans.Service; -import org.openecomp.vid.asdc.beans.tosca.NodeTemplate; -import org.openecomp.vid.asdc.beans.tosca.ToscaCsar; -import org.openecomp.vid.asdc.beans.tosca.ToscaMeta; -import org.openecomp.vid.asdc.beans.tosca.ToscaModel; -import org.openecomp.vid.model.ModelConstants; -import org.openecomp.vid.model.Network; -import org.openecomp.vid.model.Node; -import org.openecomp.vid.model.ServiceModel; -import org.openecomp.vid.model.VNF; -import org.openecomp.vid.properties.VidProperties; -import org.springframework.beans.factory.annotation.Autowired; -import org.yaml.snakeyaml.Yaml; -import org.yaml.snakeyaml.error.YAMLException; - -public class ToscaParserImpl implements ToscaParser { - /** The Constant LOG. */ - static final EELFLoggerDelegate LOG = EELFLoggerDelegate.getLogger(ToscaParserImpl.class); - - @Autowired - private final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); - - - private static final String asdcModelNamespace = VidProperties.getAsdcModelNamespace(); - private static final String vnfTag = asdcModelNamespace + ModelConstants.VNF; - private static final String networkTag = asdcModelNamespace + ModelConstants.NETWORK; - private static final String vfModuleTag = asdcModelNamespace + ModelConstants.VF_MODULE; - - - @Override - public ToscaCsar parse(Path path) throws AsdcCatalogException { - return getToscaCsar(path); - } - - private ToscaCsar getToscaCsar(final Path csarFile) throws AsdcCatalogException { - try (final ZipFile csar = new ZipFile(csarFile.toFile())) { - - final InputStream toscaMetaStream = csar.getInputStream(csar.getEntry("TOSCA-Metadata/TOSCA.meta")); - final ToscaMeta toscaMeta = new ToscaMeta.Builder(toscaMetaStream).build(); - final String entryDefinitions = toscaMeta.get("Entry-Definitions"); - final InputStream toscaParentEntryYamlStream = csar.getInputStream(csar.getEntry(entryDefinitions)); - - try { - final Yaml yaml = new Yaml(); - final ToscaModel parentModel = yaml.loadAs(toscaParentEntryYamlStream, ToscaModel.class); - - final ToscaCsar.Builder csarBuilder = new ToscaCsar.Builder(parentModel); - - for (Map> imports : parentModel.getImports()) { - LOG.debug("imports = " + imports.toString()); - for (Entry> entry : imports.entrySet()) { - if (entry.getValue() != null) { - String fname = entry.getValue().get("file"); - if ((fname != null) && (fname.startsWith("service") || fname.startsWith("resource"))) { - LOG.debug("fname = " + fname); - final InputStream toscaChildEntryYamlStream = csar - .getInputStream(csar.getEntry("Definitions/" + fname)); - - final ToscaModel childModel = yaml.loadAs(toscaChildEntryYamlStream, ToscaModel.class); - csarBuilder.addVnf(childModel); - } - } - } - } - - return csarBuilder.build(); - } catch (YAMLException e) { - throw new AsdcCatalogException("Caught exception while processing TOSCA YAML", e); - } - } catch (IOException e) { - throw new AsdcCatalogException("Caught IOException while processing CSAR", e); - } - } - - public ServiceModel makeServiceModel(String uuid, final Path serviceCsar,Service service ) throws AsdcCatalogException, SdcToscaParserException { - - - final ServiceModel serviceModel = new ServiceModel(); - ToscaCsar toscaCsar = getToscaCsar(serviceCsar); - String methodName = "getServices"; - LOG.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + methodName + " start"); - Boolean isNewFlow = false; - final Map vnfs = new HashMap(); - final Map networks = new HashMap(); - final ToscaModel asdcServiceToscaModel = toscaCsar.getParent(); - serviceModel.setService(ServiceModel.extractService(asdcServiceToscaModel, service)); - - - populateVnfsAndNetwork(methodName, isNewFlow, vnfs, networks, asdcServiceToscaModel, serviceModel); - - // If we see customization uuid under vnf or network, follow 1702 flow - if (isNewFlow) { - return (getCustomizedServices(asdcServiceToscaModel, serviceModel)); - } else { - VNF vnf = null; - for (ToscaModel vnfModel : toscaCsar.getChildren()) { - // using uuid to match should only be valid for 1610 models - final String vnfUuid = (vnfModel.getMetadata().getUUID()); - // find the VNF with that uuid, uuid is not the key anymore - vnf = findVNFAccordingToUUID(vnfs, vnfUuid); - if (vnf == null) { - LOG.warn("Couldn't find VNF object " + vnfUuid + ". Problem with Tosca model?"); - continue; - } - extractAndUpdateInputs(vnf, vnfModel); - ServiceModel.extractGroups(vnfModel, serviceModel); - } - - serviceModel.setVnfs(vnfs); - serviceModel.setNetworks(networks); - return serviceModel; - } - } - - private VNF findVNFAccordingToUUID(final Map vnfs, final String vnfUuid) { - VNF vnf = null; - for (Entry vnfComp : vnfs.entrySet()) { - if (((vnfComp.getValue().getUuid()).equalsIgnoreCase(vnfUuid))) { - // found the vnf - vnf = vnfComp.getValue(); - } - } - return vnf; - } - - private void extractAndUpdateInputs(VNF vnf, ToscaModel vnfModel) { - vnf.setInputs(vnfModel.gettopology_template().getInputs()); - } - - private static void populateVnfsAndNetwork(String methodName, Boolean isNewFlow, final Map vnfs, - final Map networks, final ToscaModel asdcServiceToscaModel, ServiceModel serviceModel) - throws AsdcCatalogException, SdcToscaParserException { - for (Entry component : extractNodeTemplates(asdcServiceToscaModel)) { - final String modelCustomizationName = component.getKey(); - LOG.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + methodName - + " model customization name: " + modelCustomizationName); - final NodeTemplate nodeTemplate = component.getValue(); - final String type = nodeTemplate.getType(); - - if (type.startsWith(vnfTag)) { - LOG.debug(EELFLoggerDelegate.debugLogger, - dateFormat.format(new Date()) + methodName + " found node template type: " + type); - final VNF vnf = new VNF(); - vnf.extractVnf(modelCustomizationName, nodeTemplate); -// populateNodeVersionIfMissing(nodeTemplate, vnf,service); - LOG.debug(EELFLoggerDelegate.debugLogger, - dateFormat.format(new Date()) + methodName + " VNF commands: " + vnf.getCommands()); - vnfs.put(modelCustomizationName, vnf); - isNewFlow = isNewFlow(vnf); - } - // Networks - if (type.startsWith(networkTag)) { - LOG.debug(EELFLoggerDelegate.debugLogger, - dateFormat.format(new Date()) + methodName + " found node template type: " + type); - final Network network = new Network(); - network.extractNetwork(modelCustomizationName, nodeTemplate); -// populateNodeVersionIfMissing(nodeTemplate, network, service); - isNewFlow = isNewFlow(network); - networks.put(modelCustomizationName, network); - - } - } - serviceModel.setVnfs(vnfs); - serviceModel.setNetworks(networks); - - } - - private static Set> extractNodeTemplates(final ToscaModel asdcServiceToscaModel) { - return asdcServiceToscaModel.gettopology_template().getnode_templates().entrySet(); - } - - private static boolean isNewFlow(Node node) { - return (node.getCustomizationUuid() != null) && (node.getCustomizationUuid().length() > 0); - } - - private static boolean isNodeVersionMissing(Node Node) { - return Node.getVersion() == null; - } - - private static void populateNodeVersionIfMissing(final NodeTemplate nodeTemplate, final Node node, Service service) - throws AsdcCatalogException { - if (isNodeVersionMissing(node)) { - node.setVersion(service.getVersion()); - } - } - - private ServiceModel getCustomizedServices(ToscaModel asdcServiceToscaModel, ServiceModel serviceModel) { - String methodName = "asdcServiceToscaModel"; - LOG.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + methodName + " start"); - - // asdcServiceToscaModel should have vf modules and vol groups populated - // at this point but - // they are not associated with the VNFs - ServiceModel.extractGroups(asdcServiceToscaModel,serviceModel); - // Now put the vf modules and volume groups under the VNF they belong - // too - serviceModel.associateGroups(); - return (serviceModel); - } - - - private UUID extractUUIDFromNodeTemplate(final NodeTemplate nodeTemplate) { - return UUID.fromString(nodeTemplate.getMetadata().getUUID()); - } - - -} \ No newline at end of file diff --git a/vid-app-common/src/main/java/org/openecomp/vid/asdc/parser/ToscaParserImpl2.java b/vid-app-common/src/main/java/org/openecomp/vid/asdc/parser/ToscaParserImpl2.java deleted file mode 100644 index f364d0b3d..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/asdc/parser/ToscaParserImpl2.java +++ /dev/null @@ -1,254 +0,0 @@ -package org.openecomp.vid.asdc.parser; - -import org.openecomp.sdc.tosca.parser.api.ISdcCsarHelper; -import org.openecomp.sdc.tosca.parser.exceptions.SdcToscaParserException; -import org.openecomp.sdc.tosca.parser.impl.FilterType; -import org.openecomp.sdc.tosca.parser.impl.SdcToscaParserFactory; -import org.openecomp.sdc.toscaparser.api.Group; -import org.openecomp.sdc.toscaparser.api.NodeTemplate; -import org.openecomp.sdc.toscaparser.api.Property; -import org.openecomp.sdc.toscaparser.api.parameters.Input; -import org.openecomp.vid.asdc.beans.Service; -import org.openecomp.vid.model.*; - -import java.nio.file.Path; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class ToscaParserImpl2 { - - - public class Constants { - public final static String uuid = "UUID"; - public final static String description = "description"; - public final static String serviceType = "serviceType"; - public final static String serviceRole = "serviceRole"; - public final static String ecompGeneratedNaming = "ecompGeneratedNaming"; - - public final static String customizationUUID = "customizationUUID"; - public final static String vfModuleModelVersion = "vfModuleModelVersion"; - public final static String vfModuleModelCustomizationUUID = "vfModuleModelCustomizationUUID"; - public final static String volume_group = "volume_group"; - public final static String vfModuleModelInvariantUUID = "vfModuleModelInvariantUUID"; - public final static String vfModuleModelUUID = "vfModuleModelUUID"; - public final static String invariantUUID = "invariantUUID"; - public final static String version = "version"; - public final static String name = "name"; - public final static String category = "category"; - public final static String vfModuleModelName = "vfModuleModelName"; - public final static String getInput = "get_input"; - } - - public ToscaParserImpl2() { - - } - - public ServiceModel makeServiceModel(Path path, Service asdcServiceMetadata) throws Exception { - ServiceModel serviceModel = new ServiceModel(); - SdcToscaParserFactory factory = SdcToscaParserFactory.getInstance(); - ISdcCsarHelper sdcCsarHelper = factory.getSdcCsarHelper(path.toFile().getAbsolutePath()); //, false); - serviceModel.setService(extractServiceFromCsar(asdcServiceMetadata, sdcCsarHelper)); - serviceModel.setVolumeGroups(extractVolumeGroups(sdcCsarHelper)); - serviceModel.setVfModules(extractVfModuleFromCsar(sdcCsarHelper)); - serviceModel.setVnfs(extractVnfsFromCsar(serviceModel,sdcCsarHelper)); - serviceModel.setNetworks(extractNetworksFromCsar(sdcCsarHelper)); - return serviceModel; - } - - private org.openecomp.vid.model.Service extractServiceFromCsar(Service asdcServiceMetadata, ISdcCsarHelper csarHelper) throws SdcToscaParserException { - org.openecomp.vid.model.Service service = new org.openecomp.vid.model.Service(); - - service.setName(csarHelper.getServiceMetadata().getValue(Constants.name)); - service.setCategory(csarHelper.getServiceMetadata().getValue(Constants.category)); - service.setInvariantUuid(csarHelper.getServiceMetadata().getValue(Constants.invariantUUID)); - service.setUuid(csarHelper.getServiceMetadata().getValue(Constants.uuid)); - service.setVersion(asdcServiceMetadata.getVersion()); - service.setDescription(csarHelper.getServiceMetadata().getValue(Constants.description)); - service.setInputs(inputsListToInputsMap(csarHelper.getServiceInputs())); - service.setServiceEcompNaming(csarHelper.getServiceMetadata().getValue(Constants.ecompGeneratedNaming)); - service.setServiceType(csarHelper.getServiceMetadata().getValue(Constants.serviceType)); - service.setServiceRole(csarHelper.getServiceMetadata().getValue(Constants.serviceRole)); - - return service; - } - - private Map extractVnfsFromCsar(ServiceModel serviceModel,ISdcCsarHelper csarHelper) { - List nodeTemplates = csarHelper.getServiceVfList(); - Map vnfsMaps = new HashMap(); - - for (NodeTemplate nodeTemplate : nodeTemplates) { - VNF vnf = new VNF(); - populateNodeFromNodeTemplate(nodeTemplate, csarHelper, vnf); - - vnf.setModelCustomizationName(nodeTemplate.getName()); - Map vfModuleHashMap = getVfModulesFromVF(csarHelper, vnf.getCustomizationUuid()); - vnf.setVfModules(vfModuleHashMap); - - Map volumeGroupMap = getVolumeGroupsFromVF(csarHelper, vnf.getCustomizationUuid()); - vnf.setVolumeGroups(volumeGroupMap); - - vnfsMaps.put(nodeTemplate.getName(), vnf); - } - return vnfsMaps; - } - - private Map getVfModulesFromVF(ISdcCsarHelper csarHelper, String vfUuid) { - Map vfModuleHashMap = new HashMap(); - for (Group group : csarHelper.getVfModulesByVf(vfUuid)) { - vfModuleHashMap.put(group.getName(), populateVfModuleFromGroup(group)); - } - return vfModuleHashMap; - } - - private Map getVolumeGroupsFromVF(ISdcCsarHelper csarHelper, String vfCustomizationUuid) { - Map volumeGroupMap = new HashMap(); - List groups = csarHelper.getVfModulesByVf(vfCustomizationUuid); - for (Group group : groups) { - boolean isVolumeGroup = Boolean.valueOf(group.getPropertyValue(Constants.volume_group).toString()); - if (isVolumeGroup) { - volumeGroupMap.put(group.getName(), populateVolumeGroupFromGroup(group)); - } - } - return volumeGroupMap; - } - - private Map extractNetworksFromCsar(ISdcCsarHelper csarHelper) { - List nodeTemplates = csarHelper.getServiceVlList(); - Map networksMap = new HashMap(); - - for (NodeTemplate nodeTemplate : nodeTemplates) { - Network newNetwork = new Network(); - populateNodeFromNodeTemplate(nodeTemplate, csarHelper, newNetwork); - newNetwork.setModelCustomizationName(nodeTemplate.getName()); - networksMap.put(nodeTemplate.getName(), newNetwork); - } - return networksMap; - } - - private Map extractVfModuleFromCsar(ISdcCsarHelper csarHelper) { - List serviceVfList = csarHelper.getServiceVfList(); - HashMap vfModuleHashMap = new HashMap<>(); - - for (NodeTemplate nodeTemplate : serviceVfList) { - Map nodeTemplateVfModule = - getVfModulesFromVF(csarHelper, nodeTemplate.getMetaData().getValue(Constants.customizationUUID)); - vfModuleHashMap.putAll(nodeTemplateVfModule); - } - return vfModuleHashMap; - } - - private Map extractVolumeGroups(ISdcCsarHelper csarHelper) { - HashMap volumeGroupHashMap = new HashMap<>(); - for (NodeTemplate nodeTemplate : csarHelper.getServiceVfList()) { - Map nodeTemplateVolumeGroups = - getVolumeGroupsFromVF(csarHelper, csarHelper.getNodeTemplateCustomizationUuid(nodeTemplate)); - volumeGroupHashMap.putAll(nodeTemplateVolumeGroups); - } - return volumeGroupHashMap; - } - - private Map inputsListToInputsMap(List inputList) { - Map inputs = new HashMap<>(); - for (org.openecomp.sdc.toscaparser.api.parameters.Input input : inputList) { - inputs.put(input.getName(), convertInput(input, new org.openecomp.vid.asdc.beans.tosca.Input())); - } - return inputs; - } - - private Node populateNodeFromNodeTemplate(NodeTemplate nodeTemplate, ISdcCsarHelper csarHelper, Node newNode) { - newNode.setCustomizationUuid(csarHelper.getNodeTemplateCustomizationUuid(nodeTemplate)); - newNode.setDescription(nodeTemplate.getMetaData().getValue(Constants.description)); - newNode.setInvariantUuid(nodeTemplate.getMetaData().getValue(Constants.invariantUUID)); - newNode.setUuid(nodeTemplate.getMetaData().getValue(Constants.uuid)); - newNode.setName(nodeTemplate.getMetaData().getValue(Constants.name)); - newNode.setVersion(nodeTemplate.getMetaData().getValue(Constants.version)); - newNode.setInputs(extractInputsAndCommandsForNodeTemplate(nodeTemplate, csarHelper, newNode)); - Map propertiesMap = setPropertiesOfVnf(nodeTemplate.getPropertiesObjects()); - newNode.setProperties(propertiesMap); - return newNode; - } - - private VfModule populateVfModuleFromGroup(Group group){ - VfModule vfModule = new VfModule(); - - vfModule.setVersion(group.getMetadata().getValue(Constants.vfModuleModelVersion)); - vfModule.setCustomizationUuid(group.getMetadata().getValue(Constants.vfModuleModelCustomizationUUID)); - vfModule.setModelCustomizationName(group.getMetadata().getValue(Constants.vfModuleModelName)); - vfModule.setName(group.getMetadata().getValue(Constants.vfModuleModelName)); - vfModule.setVolumeGroupAllowed(Boolean.valueOf((group.getPropertyValue(Constants.volume_group)).toString())); - vfModule.setDescription(group.getDescription()); - vfModule.setInvariantUuid(group.getMetadata().getValue(Constants.vfModuleModelInvariantUUID)); - vfModule.setUuid(group.getMetadata().getValue(Constants.vfModuleModelUUID)); - return vfModule; - } - - private VolumeGroup populateVolumeGroupFromGroup(Group group){ - VolumeGroup volumeGroup = new VolumeGroup(); - volumeGroup.setDescription(group.getDescription()); - volumeGroup.setInvariantUuid(group.getMetadata().getValue(Constants.vfModuleModelInvariantUUID)); - volumeGroup.setName(group.getMetadata().getValue(Constants.vfModuleModelName)); - volumeGroup.setModelCustomizationName(group.getMetadata().getValue(Constants.vfModuleModelName)); - volumeGroup.setVersion(group.getMetadata().getValue(Constants.vfModuleModelVersion)); - volumeGroup.setUuid(group.getMetadata().getValue(Constants.vfModuleModelUUID)); - volumeGroup.setCustomizationUuid(group.getMetadata().getValue(Constants.vfModuleModelCustomizationUUID)); - - return volumeGroup; - } - - - private Map extractInputsAndCommandsForNodeTemplate(NodeTemplate nodeTemplate, ISdcCsarHelper csarHelper, Node newNode){ - Map inputMap = new HashMap<>(); - Map commandPropertyMap = new HashMap<>(); - - List inputs = csarHelper.getServiceInputs(); - Map properties = csarHelper.filterNodeTemplatePropertiesByValue(nodeTemplate, FilterType.CONTAINS, Constants.getInput); - for (Map.Entry property : properties.entrySet()) { - String inputKey = property.getValue(); - String key = extractInputValue(inputKey); - for (Input input: inputs){ - if(input.getName().equals(key)){ - org.openecomp.vid.asdc.beans.tosca.Input localInput = new org.openecomp.vid.asdc.beans.tosca.Input(); - localInput = convertInput(input, localInput); - String name = property.getKey(); - commandPropertyMap.put(name, extractCommands(name, key)); - inputMap.put(name, localInput); - } - } - } - newNode.setCommands(commandPropertyMap); - return inputMap; - } - - private String extractInputValue(String inputKey) { - return inputKey.substring(inputKey.indexOf(":") + 1); - } - - private org.openecomp.vid.asdc.beans.tosca.Input convertInput(Input parserInput, org.openecomp.vid.asdc.beans.tosca.Input localInput){ - localInput.setDefault(parserInput.getDefault()); - localInput.setDescription(parserInput.getDescription()); - localInput.setRequired(parserInput.isRequired()); - localInput.setType(parserInput.getType()); - localInput.setConstraints(parserInput.getConstraints()); -// localInput.setentry_schema() - return localInput; - } - - private CommandProperty extractCommands(String displayName, String inputName){ - CommandProperty commandProperty = new CommandProperty(); - commandProperty.setDisplayName(displayName); - commandProperty.setCommand(Constants.getInput); - commandProperty.setInputName(inputName); - return commandProperty; - } - - private Map setPropertiesOfVnf(List properties) { - Map propertiesMap = new HashMap(); - for (Property property : properties) { - propertiesMap.put(property.getName(), property.getValue().toString()); - } - return propertiesMap; - } - - -} \ No newline at end of file diff --git a/vid-app-common/src/main/java/org/openecomp/vid/asdc/rest/RestfulAsdcClient.java b/vid-app-common/src/main/java/org/openecomp/vid/asdc/rest/RestfulAsdcClient.java deleted file mode 100755 index 67375aa6c..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/asdc/rest/RestfulAsdcClient.java +++ /dev/null @@ -1,467 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.asdc.rest; - -import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.vid.asdc.AsdcCatalogException; -import org.openecomp.vid.asdc.AsdcClient; -import org.openecomp.vid.asdc.beans.Artifact; -import org.openecomp.vid.asdc.beans.Resource; -import org.openecomp.vid.asdc.beans.Service; -import org.openecomp.vid.asdc.parser.ToscaParserImpl; -import org.openecomp.vid.model.ModelConstants; -import org.openecomp.vid.properties.VidProperties; - -import javax.ws.rs.NotFoundException; -import javax.ws.rs.ProcessingException; -import javax.ws.rs.WebApplicationException; -import javax.ws.rs.client.Client; -import javax.ws.rs.client.ResponseProcessingException; -import javax.ws.rs.client.WebTarget; -import javax.ws.rs.core.GenericType; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.MultivaluedHashMap; -import java.io.IOException; -import java.io.InputStream; -import java.net.URI; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.StandardCopyOption; -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.Collection; -import java.util.Collections; -import java.util.Map; -import java.util.Map.Entry; -import java.util.UUID; - -/** - * The Class RestfulAsdcClient. - */ -@SuppressWarnings("Duplicates") -public class RestfulAsdcClient implements AsdcClient { - - /** - * The Class Builder. - */ - public static class Builder { - - /** - * The client. - */ - private final Client client; - - /** - * The uri. - */ - private final URI uri; - - /** - * The auth. - */ - private String auth = null; - - /** - * Instantiates a new builder. - * - * @param client the client - * @param uri the uri - */ - public Builder(Client client, URI uri) { - this.client = client; - this.client.register(JacksonJsonProvider.class); - this.uri = uri; - } - - /** - * Auth. - * - * @param auth the auth - * @return the builder - */ - public Builder auth(String auth) { - this.auth = auth; - return this; - } - - /** - * Builds the. - * - * @return the restful asdc client - */ - public RestfulAsdcClient build() { - return new RestfulAsdcClient(this); - } - } - - /** - * The Constant LOG. - */ - static final EELFLoggerDelegate LOG = EELFLoggerDelegate.getLogger(RestfulAsdcClient.class); - - /** - * The Constant dateFormat. - */ - final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); - - /** - * The client. - */ - private final Client client; - - /** - * The uri. - */ - private final URI uri; - - /** - * The common headers. - */ - private final MultivaluedHashMap commonHeaders; - - /** - * The auth. - */ - private final String auth; - - ToscaParserImpl p = new ToscaParserImpl(); - - /** - * Instantiates a new restful asdc client. - * - * @param builder the builder - */ - private RestfulAsdcClient(Builder builder) { - client = builder.client; - uri = builder.uri; - auth = builder.auth; - - commonHeaders = new MultivaluedHashMap(); - commonHeaders.put("X-ECOMP-InstanceID", Collections.singletonList((Object) "VID")); - commonHeaders.put("Authorization", Collections.singletonList((Object) (auth))); - } - - private Path createTmpFile(InputStream csarInputStream) throws AsdcCatalogException { - final Path csarFile; - try { - csarFile = Files.createTempFile("csar", ".zip"); - Files.copy(csarInputStream, csarFile, StandardCopyOption.REPLACE_EXISTING); - } catch (IOException e) { - throw new AsdcCatalogException("Caught IOException while creating CSAR", e); - } - return csarFile; - } - - /** - * Gets the client. - * - * @return the client - */ - private Client getClient() { - return client; - } - - /* (non-Javadoc) - * @see org.openecomp.vid.asdc.AsdcClient#getResource(java.util.UUID) - */ - public Resource getResource(UUID uuid) throws AsdcCatalogException { - - String path = VidProperties.getPropertyWithDefault(ModelConstants.ASDC_RESOURCE_API_PATH, ModelConstants.DEFAULT_ASDC_RESOURCE_API_PATH); - try { - return getClient() - .target(uri) - .path(path + "/" + uuid.toString() + "/metadata") - .request(MediaType.APPLICATION_JSON_TYPE) - .headers(commonHeaders) - .header("Content-Type", MediaType.APPLICATION_JSON) - .get(Resource.class); - } catch (ResponseProcessingException e) { - //Couldn't convert response to Java type - throw new AsdcCatalogException("ASDC response could not be processed", e); - } catch (ProcessingException e) { - //IO problems during request - throw new AsdcCatalogException("Failed to get a response from ASDC service", e); - } catch (WebApplicationException e) { - //Web service returned data, but the response status wasn't a good one (i.e. non 2xx) - throw new AsdcCatalogException(e); - } - } - - /* (non-Javadoc) - * @see org.openecomp.vid.asdc.AsdcClient#getResourceArtifact(java.util.UUID, java.util.UUID) - */ - public Artifact getResourceArtifact(UUID resourceUuid, UUID artifactUuid) throws AsdcCatalogException { - String path = VidProperties.getPropertyWithDefault(ModelConstants.ASDC_RESOURCE_API_PATH, ModelConstants.DEFAULT_ASDC_RESOURCE_API_PATH); - try { - return getClient() - .target(uri) - .path(path + "/" + resourceUuid + "/artifacts/" + artifactUuid) - .request(MediaType.APPLICATION_JSON_TYPE) - .headers(commonHeaders) - .header("Content-Type", MediaType.APPLICATION_JSON) - .get(Artifact.class); - } catch (ResponseProcessingException e) { - //Couldn't convert response to Java type - throw new AsdcCatalogException("ASDC response could not be processed", e); - } catch (ProcessingException e) { - //IO problems during request - throw new AsdcCatalogException("Failed to get a response from ASDC service", e); - } catch (WebApplicationException e) { - //Web service returned data, but the response status wasn't a good one (i.e. non 2xx) - throw new AsdcCatalogException(e); - } - } - - /* (non-Javadoc) - * @see org.openecomp.vid.asdc.AsdcClient#getResources() - */ - public Collection getResources() throws AsdcCatalogException { - String path = VidProperties.getPropertyWithDefault(ModelConstants.ASDC_RESOURCE_API_PATH, ModelConstants.DEFAULT_ASDC_RESOURCE_API_PATH); - try { - return getClient() - .target(uri) - .path(path) - .request(MediaType.APPLICATION_JSON_TYPE) - .headers(commonHeaders) - .header("Content-Type", MediaType.APPLICATION_JSON) - .get(new GenericType>() { - }); - } catch (ResponseProcessingException e) { - //Couldn't convert response to Java type - throw new AsdcCatalogException("ASDC response could not be processed", e); - } catch (ProcessingException e) { - //IO problems during request - throw new AsdcCatalogException("Failed to get a response from ASDC service", e); - } catch (WebApplicationException e) { - //Web service returned data, but the response status wasn't a good one (i.e. non 2xx) - throw new AsdcCatalogException(e); - } - } - - /* (non-Javadoc) - * @see org.openecomp.vid.asdc.AsdcClient#getResources(java.util.Map) - */ - public Collection getResources(Map filter) throws AsdcCatalogException { - String path = VidProperties.getPropertyWithDefault(ModelConstants.ASDC_RESOURCE_API_PATH, ModelConstants.DEFAULT_ASDC_RESOURCE_API_PATH); - WebTarget target = getClient() - .target(uri) - .path(path); - - for (Entry filterEntry : filter.entrySet()) { - target = target.queryParam(filterEntry.getKey(), (Object[]) filterEntry.getValue()); - } - - try { - return target.request() - .accept(MediaType.APPLICATION_JSON_TYPE) - .headers(commonHeaders) - .header("Content-Type", MediaType.APPLICATION_JSON) - .get(new GenericType>() { - }); - } catch (ResponseProcessingException e) { - //Couldn't convert response to Java type - throw new AsdcCatalogException("ASDC response could not be processed", e); - } catch (ProcessingException e) { - //IO problems during request - throw new AsdcCatalogException("Failed to get a response from ASDC service", e); - } catch (NotFoundException e) { - throw e; - } catch (WebApplicationException e) { - //Web service returned data, but the response status wasn't a good one (i.e. non 2xx) - throw new AsdcCatalogException(e); - } - } - - /* (non-Javadoc) - * @see org.openecomp.vid.asdc.AsdcClient#getResourceToscaModel(java.util.UUID) - */ - public Path getResourceToscaModel(UUID resourceUuid) throws AsdcCatalogException { - String path = VidProperties.getPropertyWithDefault(ModelConstants.ASDC_RESOURCE_API_PATH, ModelConstants.DEFAULT_ASDC_RESOURCE_API_PATH); - try (final InputStream csarInputStream = (InputStream) getClient() - .target(uri) - .path(path + "/" + resourceUuid + "/toscaModel") - .request(MediaType.APPLICATION_OCTET_STREAM_TYPE) - .headers(commonHeaders) - .header("Content-Type", MediaType.APPLICATION_OCTET_STREAM) - .get(InputStream.class)) { - - return getToscaCsar(csarInputStream); - } catch (IOException e) { - throw new AsdcCatalogException("Failed to retrieve resource TOSCA model from ASDC", e); - } - } - - /* (non-Javadoc) - * @see org.openecomp.vid.asdc.AsdcClient#getService(java.util.UUID) - */ - public Service getService(UUID uuid) throws AsdcCatalogException { - - String path = VidProperties.getPropertyWithDefault(ModelConstants.ASDC_SVC_API_PATH, ModelConstants.DEFAULT_ASDC_SVC_API_PATH); - try { - return getClient() - .target(uri) - .path(path + "/" + uuid.toString() + "/metadata") - .request(MediaType.APPLICATION_JSON) - .headers(commonHeaders) - .get(Service.class); - } catch (ResponseProcessingException e) { - //Couldn't convert response to Java type - throw new AsdcCatalogException("ASDC response could not be processed", e); - } catch (ProcessingException e) { - //IO problems during request - throw new AsdcCatalogException("Failed to get a response from ASDC service", e); - } catch (WebApplicationException e) { - //Web service returned data, but the response status wasn't a good one (i.e. non 2xx) - throw new AsdcCatalogException(e); - } - } - - /* (non-Javadoc) - * @see org.openecomp.vid.asdc.AsdcClient#getServiceArtifact(java.util.UUID, java.util.UUID) - */ - public Artifact getServiceArtifact(UUID serviceUuid, UUID artifactUuid) throws AsdcCatalogException { - String path = VidProperties.getPropertyWithDefault(ModelConstants.ASDC_SVC_API_PATH, ModelConstants.DEFAULT_ASDC_SVC_API_PATH); - - try { - return getClient() - .target(uri) - .path(path + "/" + serviceUuid + "/artifacts/" + artifactUuid) - .request(MediaType.APPLICATION_JSON_TYPE) - .headers(commonHeaders) - .header("Content-Type", MediaType.APPLICATION_JSON) - .get(Artifact.class); - } catch (ResponseProcessingException e) { - //Couldn't convert response to Java type - throw new AsdcCatalogException("ASDC response could not be processed", e); - } catch (ProcessingException e) { - //IO problems during request - throw new AsdcCatalogException("Failed to get a response from ASDC service", e); - } catch (WebApplicationException e) { - //Web service returned data, but the response status wasn't a good one (i.e. non 2xx) - throw new AsdcCatalogException(e); - } - } - - /* (non-Javadoc) - * @see org.openecomp.vid.asdc.AsdcClient#getServices() - */ - public Collection getServices() throws AsdcCatalogException { - String path = VidProperties.getPropertyWithDefault(ModelConstants.ASDC_SVC_API_PATH, ModelConstants.DEFAULT_ASDC_SVC_API_PATH); - try { - return getClient() - .target(uri) - .path(path) - .request() - .accept(MediaType.APPLICATION_JSON_TYPE) - .headers(commonHeaders) - .header("Content-Type", MediaType.APPLICATION_JSON) - .get(new GenericType>() { - }); - } catch (ResponseProcessingException e) { - //Couldn't convert response to Java type - throw new AsdcCatalogException("ASDC response could not be processed", e); - } catch (ProcessingException e) { - //IO problems during request - throw new AsdcCatalogException("Failed to get a response from ASDC service", e); - } catch (WebApplicationException e) { - //Web service returned data, but the response status wasn't a good one (i.e. non 2xx) - throw new AsdcCatalogException(e); - } - } - - /* (non-Javadoc) - * @see org.openecomp.vid.asdc.AsdcClient#getServices(java.util.Map) - */ - public Collection getServices(Map filter) throws AsdcCatalogException { - - String path = VidProperties.getPropertyWithDefault(ModelConstants.ASDC_SVC_API_PATH, ModelConstants.DEFAULT_ASDC_SVC_API_PATH); - WebTarget target = getClient() - .target(uri) - .path(path); - - - for (Entry filterEntry : filter.entrySet()) { - target = target.queryParam(filterEntry.getKey(), (Object[]) filterEntry.getValue()); - } - - try { - return target.request() - .accept(MediaType.APPLICATION_JSON_TYPE) - .headers(commonHeaders) - .header("Content-Type", MediaType.APPLICATION_JSON) - .get(new GenericType>() { - }); - } catch (ResponseProcessingException e) { - //Couldn't convert response to Java type - throw new AsdcCatalogException("ASDC response could not be processed", e); - } catch (ProcessingException e) { - //IO problems during request - throw new AsdcCatalogException("Failed to get a response from ASDC service", e); - } catch (NotFoundException e) { - throw e; - } catch (WebApplicationException e) { - //Web service returned data, but the response status wasn't a good one (i.e. non 2xx) - throw new AsdcCatalogException(e); - } - } - - - /* (non-Javadoc) - * @see org.openecomp.vid.asdc.AsdcClient#getServiceToscaModel(java.util.UUID) - */ - public Path getServiceToscaModel(UUID serviceUuid) throws AsdcCatalogException { - String path = VidProperties.getPropertyWithDefault(ModelConstants.ASDC_SVC_API_PATH, ModelConstants.DEFAULT_ASDC_SVC_API_PATH); - try { - final InputStream csarInputStream = (InputStream) getClient() - .target(uri) - .path(path + "/" + serviceUuid + "/toscaModel") - .request(MediaType.APPLICATION_OCTET_STREAM_TYPE) - .headers(commonHeaders) - .header("Content-Type", MediaType.APPLICATION_OCTET_STREAM) - .get(InputStream.class); - - - return getToscaCsar(csarInputStream); - } catch (ResponseProcessingException e) { - //Couldn't convert response to Java type - throw new AsdcCatalogException("ASDC response could not be processed", e); - } catch (ProcessingException e) { - //IO problems during request - throw new AsdcCatalogException("Failed to get a response from ASDC service", e); - } catch (WebApplicationException e) { - //Web service returned data, but the response status wasn't a good one (i.e. non 2xx) - throw new AsdcCatalogException(e); - } - } - - - /** - * Gets the tosca model. - * - * @param csarInputStream the csar input stream - * @return the tosca model - * @throws AsdcCatalogException the asdc catalog exception - */ - private Path getToscaCsar(InputStream csarInputStream) throws AsdcCatalogException { - return createTmpFile(csarInputStream); - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/changeManagement/ChangeManagementRequest.java b/vid-app-common/src/main/java/org/openecomp/vid/changeManagement/ChangeManagementRequest.java deleted file mode 100644 index adcb54683..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/changeManagement/ChangeManagementRequest.java +++ /dev/null @@ -1,63 +0,0 @@ -package org.openecomp.vid.changeManagement; - -import java.util.List; -import java.util.HashMap; -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -@JsonPropertyOrder({ - "requestDetails", - "requestType" -}) - -public class ChangeManagementRequest { - - public ChangeManagementRequest() {} - - @JsonProperty("requestDetails") - private List requestDetails; - - @JsonProperty("requestType") - private String requestType; - - @JsonIgnore - private Map additionalProperties = new HashMap(); - - @JsonProperty("requestDetails") - public List getRequestDetails() { - return requestDetails; - } - - @JsonProperty("requestDetails") - public void setRequestDetails(List requestDetails) { - this.requestDetails = requestDetails; - } - - @JsonProperty("requestType") - public String getRequestType() { - return requestType; - } - - @JsonProperty("requestType") - public void setRequestType(String requestType) { - this.requestType = requestType; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/changeManagement/ChangeManagementResponse.java b/vid-app-common/src/main/java/org/openecomp/vid/changeManagement/ChangeManagementResponse.java deleted file mode 100644 index 10ba035d6..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/changeManagement/ChangeManagementResponse.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.openecomp.vid.changeManagement; - -import java.util.ArrayList; -import java.util.List; - -public class ChangeManagementResponse { - public List cmResponses = null; - - - - public ChangeManagementResponse(String vnfName) { - List cmResponses = new ArrayList<>(); - cmResponses.add(new CmResponse(vnfName)); - this.cmResponses = cmResponses; - - } - - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/changeManagement/CloudConfiguration.java b/vid-app-common/src/main/java/org/openecomp/vid/changeManagement/CloudConfiguration.java deleted file mode 100644 index a5debc6db..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/changeManagement/CloudConfiguration.java +++ /dev/null @@ -1,55 +0,0 @@ -package org.openecomp.vid.changeManagement; - -import java.util.HashMap; -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ -"lcpCloudRegionId", -"tenantId" -}) -public class CloudConfiguration { - @JsonProperty("lcpCloudRegionId") - private String lcpCloudRegionId; - @JsonProperty("tenantId") - private String tenantId; - @JsonIgnore - private Map additionalProperties = new HashMap(); - - @JsonProperty("lcpCloudRegionId") - public String getLcpCloudRegionId() { - return lcpCloudRegionId; - } - - @JsonProperty("lcpCloudRegionId") - public void setLcpCloudRegionId(String lcpCloudRegionId) { - this.lcpCloudRegionId = lcpCloudRegionId; - } - - @JsonProperty("tenantId") - public String getTenantId() { - return tenantId; - } - - @JsonProperty("tenantId") - public void setTenantId(String tenantId) { - this.tenantId = tenantId; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/changeManagement/CmResponse.java b/vid-app-common/src/main/java/org/openecomp/vid/changeManagement/CmResponse.java deleted file mode 100644 index 70e09d83c..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/changeManagement/CmResponse.java +++ /dev/null @@ -1,17 +0,0 @@ -package org.openecomp.vid.changeManagement; - -public class CmResponse { - - public String orchestratorRequestId; - public String serviceInstanceId; - public String vnfInstanceId; - public String vnfName; - - public CmResponse(String vnfName){ - this.orchestratorRequestId = "Request Id"; - this.serviceInstanceId = "Service instance Id"; - this.vnfInstanceId = "Vnf instance Id"; - this.vnfName = vnfName; - } - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/changeManagement/LeanCloudConfiguration.java b/vid-app-common/src/main/java/org/openecomp/vid/changeManagement/LeanCloudConfiguration.java deleted file mode 100644 index 663ff8c49..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/changeManagement/LeanCloudConfiguration.java +++ /dev/null @@ -1,20 +0,0 @@ -package org.openecomp.vid.changeManagement; - -/** - * Created by Oren on 9/5/17. - */ -public class LeanCloudConfiguration { - - public LeanCloudConfiguration() { - } - - public LeanCloudConfiguration(org.openecomp.vid.domain.mso.CloudConfiguration cloudConfiguration) { - this.tenantId = cloudConfiguration.getTenantId(); - this.lcpCloudRegionId = cloudConfiguration.getLcpCloudRegionId(); - - } - public String lcpCloudRegionId; - - public String tenantId; - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/changeManagement/ModelInfo.java b/vid-app-common/src/main/java/org/openecomp/vid/changeManagement/ModelInfo.java deleted file mode 100644 index 517628ca0..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/changeManagement/ModelInfo.java +++ /dev/null @@ -1,138 +0,0 @@ -package org.openecomp.vid.changeManagement; -import java.util.HashMap; -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ -"modelType", -"modelInvariantId", -"modelVersionId", -"modelName", -"modelVersion", -"modelCustomizationName", -"modelCustomizationId" -}) -public class ModelInfo { - - public ModelInfo(){ - - } - - public ModelInfo(org.openecomp.vid.domain.mso.ModelInfo modelInfo){ - this.setModelType(modelInfo.getModelType().toString()); - this.setModelInvariantId(modelInfo.getModelInvariantId()); - this.setModelVersionId(modelInfo.getModelNameVersionId()); - this.setModelName(modelInfo.getModelName()); - this.setModelVersion(modelInfo.getModelVersion()); - this.setModelCustomizationId(modelInfo.getModelCustomizationId()); - this.setModelVersionId(modelInfo.getModelVersionId()); - } - - - @JsonProperty("modelType") - private String modelType; - @JsonProperty("modelInvariantId") - private String modelInvariantId; - @JsonProperty("modelVersionId") - private String modelVersionId; - @JsonProperty("modelName") - private String modelName; - @JsonProperty("modelVersion") - private String modelVersion; - @JsonProperty("modelCustomizationName") - private String modelCustomizationName; - @JsonProperty("modelCustomizationId") - private String modelCustomizationId; - @JsonIgnore - private Map additionalProperties = new HashMap(); - - @JsonProperty("modelType") - public String getModelType() { - return modelType; - } - - @JsonProperty("modelType") - public void setModelType(String modelType) { - this.modelType = modelType; - } - - @JsonProperty("modelInvariantId") - public String getModelInvariantId() { - return modelInvariantId; - } - - @JsonProperty("modelInvariantId") - public void setModelInvariantId(String modelInvariantId) { - this.modelInvariantId = modelInvariantId; - } - - @JsonProperty("modelVersionId") - public String getModelVersionId() { - return modelVersionId; - } - - @JsonProperty("modelVersionId") - public void setModelVersionId(String modelVersionId) { - this.modelVersionId = modelVersionId; - } - - @JsonProperty("modelName") - public String getModelName() { - return modelName; - } - - @JsonProperty("modelName") - public void setModelName(String modelName) { - this.modelName = modelName; - } - - @JsonProperty("modelVersion") - public String getModelVersion() { - return modelVersion; - } - - @JsonProperty("modelVersion") - public void setModelVersion(String modelVersion) { - this.modelVersion = modelVersion; - } - - @JsonProperty("modelCustomizationName") - public String getModelCustomizationName() { - return modelCustomizationName; - } - - @JsonProperty("modelCustomizationName") - public void setModelCustomizationName(String modelCustomizationName) { - this.modelCustomizationName = modelCustomizationName; - } - - @JsonProperty("modelCustomizationId") - public String getModelCustomizationId() { - return modelCustomizationId; - } - - @JsonProperty("modelCustomizationId") - public void setModelCustomizationId(String modelCustomizationId) { - this.modelCustomizationId = modelCustomizationId; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - - - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/changeManagement/ModelInfoOfRelatedInstance.java b/vid-app-common/src/main/java/org/openecomp/vid/changeManagement/ModelInfoOfRelatedInstance.java deleted file mode 100644 index c60ed2f77..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/changeManagement/ModelInfoOfRelatedInstance.java +++ /dev/null @@ -1,122 +0,0 @@ -package org.openecomp.vid.changeManagement; - -import java.util.HashMap; -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ -"modelType", -"modelInvariantId", -"modelVersionId", -"modelName", -"modelVersion", -"modelCustomizationName", -"modelCustomizationId" -}) - -public class ModelInfoOfRelatedInstance { - - @JsonProperty("modelType") - private String modelType; - @JsonProperty("modelInvariantId") - private String modelInvariantId; - @JsonProperty("modelVersionId") - private String modelVersionId; - @JsonProperty("modelName") - private String modelName; - @JsonProperty("modelVersion") - private String modelVersion; - @JsonProperty("modelCustomizationName") - private String modelCustomizationName; - @JsonProperty("modelCustomizationId") - private String modelCustomizationId; - @JsonIgnore - private Map additionalProperties = new HashMap(); - - @JsonProperty("modelType") - public String getModelType() { - return modelType; - } - - @JsonProperty("modelType") - public void setModelType(String modelType) { - this.modelType = modelType; - } - - @JsonProperty("modelInvariantId") - public String getModelInvariantId() { - return modelInvariantId; - } - - @JsonProperty("modelInvariantId") - public void setModelInvariantId(String modelInvariantId) { - this.modelInvariantId = modelInvariantId; - } - - @JsonProperty("modelVersionId") - public String getModelVersionId() { - return modelVersionId; - } - - @JsonProperty("modelVersionId") - public void setModelVersionId(String modelVersionId) { - this.modelVersionId = modelVersionId; - } - - @JsonProperty("modelName") - public String getModelName() { - return modelName; - } - - @JsonProperty("modelName") - public void setModelName(String modelName) { - this.modelName = modelName; - } - - @JsonProperty("modelVersion") - public String getModelVersion() { - return modelVersion; - } - - @JsonProperty("modelVersion") - public void setModelVersion(String modelVersion) { - this.modelVersion = modelVersion; - } - - @JsonProperty("modelCustomizationName") - public String getModelCustomizationName() { - return modelCustomizationName; - } - - @JsonProperty("modelCustomizationName") - public void setModelCustomizationName(String modelCustomizationName) { - this.modelCustomizationName = modelCustomizationName; - } - - @JsonProperty("modelCustomizationId") - public String getModelCustomizationId() { - return modelCustomizationId; - } - - @JsonProperty("modelCustomizationId") - public void setModelCustomizationId(String modelCustomizationId) { - this.modelCustomizationId = modelCustomizationId; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/changeManagement/MsoRequestDetails.java b/vid-app-common/src/main/java/org/openecomp/vid/changeManagement/MsoRequestDetails.java deleted file mode 100644 index 9e442f28b..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/changeManagement/MsoRequestDetails.java +++ /dev/null @@ -1,31 +0,0 @@ -package org.openecomp.vid.changeManagement; - - -import java.util.ArrayList; -import java.util.List; - -/** - * Created by Oren on 9/5/17. - */ -public class MsoRequestDetails { - - public ModelInfo modelInfo; - - public LeanCloudConfiguration cloudConfiguration; - - public UpdateRequestInfo requestInfo; - - public List relatedInstanceList; - - public RequestParameters requestParameters; - - public MsoRequestDetails(RequestDetails r) { - this.modelInfo = new ModelInfo(r.getModelInfo()); - this.cloudConfiguration = new LeanCloudConfiguration(r.getCloudConfiguration()); - this.requestInfo = new UpdateRequestInfo(r.getRequestInfo()); - this.relatedInstanceList = new ArrayList<>(); - relatedInstanceList = r.getRelatedInstList(); - - - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/changeManagement/RelatedInstance.java b/vid-app-common/src/main/java/org/openecomp/vid/changeManagement/RelatedInstance.java deleted file mode 100644 index 49368c20e..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/changeManagement/RelatedInstance.java +++ /dev/null @@ -1,29 +0,0 @@ -package org.openecomp.vid.changeManagement; - -import com.fasterxml.jackson.annotation.*; - -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "instanceId", - "modelInfo" -}) -public class RelatedInstance { - - @JsonProperty("instanceId") - public String instanceId; - - - @JsonProperty("modelInfo") - public ModelInfo modelInfo; - - @JsonGetter - public String getInstanceId() { - return instanceId; - } - - @JsonSetter - public void setInstanceId(String instanceId) { - this.instanceId = instanceId; - } - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/changeManagement/RelatedInstanceList.java b/vid-app-common/src/main/java/org/openecomp/vid/changeManagement/RelatedInstanceList.java deleted file mode 100644 index 21a41c3f7..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/changeManagement/RelatedInstanceList.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.openecomp.vid.changeManagement; - -import com.fasterxml.jackson.annotation.*; - -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "relatedInstance" -}) -public class RelatedInstanceList { - - @JsonProperty("relatedInstance") - public RelatedInstance relatedInstance; - - @JsonSetter - public RelatedInstance getRelatedInstance() { - return relatedInstance; - } - - @JsonSetter - public void setRelatedInstance(RelatedInstance relatedInstance) { - this.relatedInstance = relatedInstance; - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/changeManagement/RequestDetails.java b/vid-app-common/src/main/java/org/openecomp/vid/changeManagement/RequestDetails.java deleted file mode 100644 index 94e4c4468..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/changeManagement/RequestDetails.java +++ /dev/null @@ -1,56 +0,0 @@ -package org.openecomp.vid.changeManagement; - -import com.fasterxml.jackson.annotation.*; - -import java.util.List; - -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ -"modelInfo", -"cloudConfiguration", -"requestInfo", -"requestParameters", -"vnfName", -"vnfInstanceId" -}) -public class RequestDetails extends org.openecomp.vid.mso.rest.RequestDetails{ - - @JsonProperty("vnfName") - private String vnfName; - @JsonProperty("vnfInstanceId") - private String vnfInstanceId; - - /** The related model list. */ - @JsonProperty("relatedInstanceList") - public List relatedInstList; - - @JsonProperty("vnfName") - public String getVnfName() { - return vnfName; - } - - @JsonProperty("vnfName") - public void setVnfName(String vnfName) { - this.vnfName = vnfName; - } - @JsonProperty("vnfInstanceId") - public String getVnfInstanceId() { - return vnfInstanceId; - } - - @JsonProperty("vnfInstanceId") - public void setVnfInstanceId(String vnfInstanceId) { - this.vnfInstanceId = vnfInstanceId; - } - - @JsonGetter - public List getRelatedInstList() { - return relatedInstList; - } - - @JsonSetter - public void setRelatedInstList(List relatedInstList) { - this.relatedInstList = relatedInstList; - } - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/changeManagement/RequestDetailsWrapper.java b/vid-app-common/src/main/java/org/openecomp/vid/changeManagement/RequestDetailsWrapper.java deleted file mode 100644 index 2f49aff0a..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/changeManagement/RequestDetailsWrapper.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.openecomp.vid.changeManagement; - -/** - * Created by Oren on 9/5/17. - */ -public class RequestDetailsWrapper { - - public MsoRequestDetails requestDetails; -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/changeManagement/RequestInfo.java b/vid-app-common/src/main/java/org/openecomp/vid/changeManagement/RequestInfo.java deleted file mode 100644 index a7236c4b1..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/changeManagement/RequestInfo.java +++ /dev/null @@ -1,69 +0,0 @@ -package org.openecomp.vid.changeManagement; - -import java.util.HashMap; -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ -"source", -"suppressRollback", -"requestorId" -}) -public class RequestInfo { - @JsonProperty("source") - private String source; - @JsonProperty("suppressRollback") - private Boolean suppressRollback; - @JsonProperty("requestorId") - private String requestorId; - @JsonIgnore - private Map additionalProperties = new HashMap(); - - @JsonProperty("source") - public String getSource() { - return source; - } - - @JsonProperty("source") - public void setSource(String source) { - this.source = source; - } - - @JsonProperty("suppressRollback") - public Boolean getSuppressRollback() { - return suppressRollback; - } - - @JsonProperty("suppressRollback") - public void setSuppressRollback(Boolean suppressRollback) { - this.suppressRollback = suppressRollback; - } - - @JsonProperty("requestorId") - public String getRequestorId() { - return requestorId; - } - - @JsonProperty("requestorId") - public void setRequestorId(String requestorId) { - this.requestorId = requestorId; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/changeManagement/RequestParameters.java b/vid-app-common/src/main/java/org/openecomp/vid/changeManagement/RequestParameters.java deleted file mode 100644 index 37cad4735..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/changeManagement/RequestParameters.java +++ /dev/null @@ -1,44 +0,0 @@ -package org.openecomp.vid.changeManagement; - -import java.util.HashMap; -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ -"usePreload" -}) - -public class RequestParameters { - - - @JsonProperty("usePreload") - private Boolean usePreload; - @JsonIgnore - private Map additionalProperties = new HashMap(); - - @JsonProperty("usePreload") - public Boolean getUsePreload() { - return usePreload; - } - - @JsonProperty("usePreload") - public void setUsePreload(Boolean usePreload) { - this.usePreload = usePreload; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/changeManagement/UpdateRequestInfo.java b/vid-app-common/src/main/java/org/openecomp/vid/changeManagement/UpdateRequestInfo.java deleted file mode 100644 index ab8189484..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/changeManagement/UpdateRequestInfo.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.openecomp.vid.changeManagement; - -import org.openecomp.vid.domain.mso.*; - -/** - * Created by Oren on 9/5/17. - */ -public class UpdateRequestInfo { - - public UpdateRequestInfo() { - } - - - public UpdateRequestInfo(org.openecomp.vid.domain.mso.RequestInfo requestInfo) { - this.requestorId = requestInfo.getRequestorId(); - this.suppressRollback = requestInfo.getSuppressRollback(); - this.source = requestInfo.getSource(); - } - public String source; - - public Boolean suppressRollback; - - public String requestorId; - - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/client/FakeHttpSession.java b/vid-app-common/src/main/java/org/openecomp/vid/client/FakeHttpSession.java deleted file mode 100644 index 226e6c4d2..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/client/FakeHttpSession.java +++ /dev/null @@ -1,224 +0,0 @@ -package org.openecomp.vid.client; - -import org.apache.commons.io.IOUtils; -import org.json.JSONArray; -import org.json.JSONObject; -import org.json.JSONTokener; - -import javax.servlet.ServletContext; -import javax.servlet.http.HttpSession; -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.util.Collections; -import java.util.Enumeration; -import java.util.HashMap; -import java.util.Map; - -/** - * Created by pickjonathan on 03/07/2017. - */ -public class FakeHttpSession implements HttpSession { - - /** - * Setup the creation time - */ - public FakeHttpSession() { - File file = new File("resources/roles.json"); - - String rolesInputStream = null; - try { - rolesInputStream = IOUtils.toString(FakeHttpSession.class.getClassLoader().getResourceAsStream("roles.json"),"UTF8"); - } catch (IOException e) { - e.printStackTrace(); - } - JSONTokener tokener = new JSONTokener(rolesInputStream); - JSONObject roles = new JSONObject(tokener); - - JSONArray rolesArray = roles.getJSONArray("roles"); - - //set permissions to the roles from file. - this.setAttribute("role", rolesArray); - - creationTime = System.currentTimeMillis(); - } - - - /** - * Setup the creation time - * @param id The new session id - */ - public FakeHttpSession(String id) - { - this.id = id; - creationTime = System.currentTimeMillis(); - } - - /* (non-Javadoc) - * @see javax.servlet.http.HttpSession#getCreationTime() - */ - public long getCreationTime() - { - return creationTime; - } - - /* (non-Javadoc) - * @see javax.servlet.http.HttpSession#getId() - */ - public String getId() - { - if (id == null) - { - System.out.println("Inventing data in FakeHttpSession.getId() to remain plausible."); - id = "fake"; - } - - return id; - } - - /* (non-Javadoc) - * @see javax.servlet.http.HttpSession#getLastAccessedTime() - */ - public long getLastAccessedTime() - { - return creationTime; - } - - /* (non-Javadoc) - * @see javax.servlet.http.HttpSession#getServletContext() - */ - public ServletContext getServletContext() - { - return null; - } - - /* (non-Javadoc) - * @see javax.servlet.http.HttpSession#setMaxInactiveInterval(int) - */ - public void setMaxInactiveInterval(int maxInactiveInterval) - { - this.maxInactiveInterval = maxInactiveInterval; - } - - /* (non-Javadoc) - * @see javax.servlet.http.HttpSession#getMaxInactiveInterval() - */ - public int getMaxInactiveInterval() - { - return maxInactiveInterval; - } - - /** - * @see javax.servlet.http.HttpSession#getSessionContext() - * @deprecated - */ - @SuppressWarnings({"UnnecessaryFullyQualifiedName"}) - @Deprecated - public javax.servlet.http.HttpSessionContext getSessionContext() - { - return null; - } - - /* (non-Javadoc) - * @see javax.servlet.http.HttpSession#getAttribute(java.lang.String) - */ - public Object getAttribute(String name) - { - return attributes.get(name); - } - - /* (non-Javadoc) - * @see javax.servlet.http.HttpSession#getValue(java.lang.String) - */ - @Deprecated - public Object getValue(String name) - { - return attributes.get(name); - } - - /* (non-Javadoc) - * @see javax.servlet.http.HttpSession#getAttributeNames() - */ - public Enumeration getAttributeNames() - { - return Collections.enumeration(attributes.keySet()); - } - - /* (non-Javadoc) - * @see javax.servlet.http.HttpSession#getValueNames() - */ - @Deprecated - public String[] getValueNames() - { - return attributes.keySet().toArray(new String[attributes.keySet().size()]); - } - - /* (non-Javadoc) - * @see javax.servlet.http.HttpSession#setAttribute(java.lang.String, java.lang.Object) - */ - public void setAttribute(String name, Object value) - { - attributes.put(name, value); - } - - /* (non-Javadoc) - * @see javax.servlet.http.HttpSession#putValue(java.lang.String, java.lang.Object) - */ - @Deprecated - public void putValue(String name, Object value) - { - attributes.put(name, value); - } - - /* (non-Javadoc) - * @see javax.servlet.http.HttpSession#removeAttribute(java.lang.String) - */ - public void removeAttribute(String name) - { - attributes.remove(name); - } - - /* (non-Javadoc) - * @see javax.servlet.http.HttpSession#removeValue(java.lang.String) - */ - @Deprecated - public void removeValue(String name) - { - attributes.remove(name); - } - - /* (non-Javadoc) - * @see javax.servlet.http.HttpSession#invalidate() - */ - public void invalidate() - { - } - - /* (non-Javadoc) - * @see javax.servlet.http.HttpSession#isNew() - */ - public boolean isNew() - { - return true; - } - - /** - * The session id - */ - private String id = null; - - /** - * The list of attributes - */ - private Map attributes = new HashMap(); - - /** - * When were we created - */ - private long creationTime; - - /** - * How long before we timeout? - */ - private int maxInactiveInterval = 30 * 60 * 1000; -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/client/HttpBasicClient.java b/vid-app-common/src/main/java/org/openecomp/vid/client/HttpBasicClient.java deleted file mode 100755 index ef2ade914..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/client/HttpBasicClient.java +++ /dev/null @@ -1,67 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.client; - - -import java.text.DateFormat; -import java.text.SimpleDateFormat; - -import javax.servlet.ServletContext; -import javax.ws.rs.client.Client; -import javax.ws.rs.client.ClientBuilder; - -import org.glassfish.jersey.client.ClientConfig; -import org.glassfish.jersey.client.ClientProperties; -import org.springframework.beans.factory.annotation.Autowired; - -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; - -/** - * General HTTP client. - */ - -public class HttpBasicClient{ - - /** The servlet context. */ - @Autowired - private ServletContext servletContext; - - /** The logger. */ - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(HttpBasicClient.class); - - /** The Constant dateFormat. */ - final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); - - /** - * Obtain a basic HTTP client . - * - * @return Client client object - * @throws Exception the exception - */ - public static Client getClient() throws Exception { - - ClientConfig config = new ClientConfig(); - config.property(ClientProperties.SUPPRESS_HTTP_COMPLIANCE_VALIDATION, true); - - return ClientBuilder.newClient(config) - .register(org.openecomp.aai.util.CustomJacksonJaxBJsonProvider.class); - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/client/HttpsBasicClient.java b/vid-app-common/src/main/java/org/openecomp/vid/client/HttpsBasicClient.java deleted file mode 100755 index 676a7e798..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/client/HttpsBasicClient.java +++ /dev/null @@ -1,143 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.client; - -import java.io.File; -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.Date; - -import javax.net.ssl.HostnameVerifier; -import javax.net.ssl.HttpsURLConnection; -import javax.net.ssl.SSLContext; -import javax.net.ssl.SSLSession; -import javax.ws.rs.client.Client; -import javax.ws.rs.client.ClientBuilder; - -import org.eclipse.jetty.util.security.Password; -import org.glassfish.jersey.client.ClientConfig; -import org.glassfish.jersey.client.ClientProperties; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.util.SystemProperties; -import org.openecomp.vid.properties.VidProperties; - - /** - * General SSL client using the VID tomcat keystore. It doesn't use client certificates. - */ - -public class HttpsBasicClient{ - - /** The logger. */ - static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(HttpsBasicClient.class); - - /** The Constant dateFormat. */ - final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); - - /** - * Retrieve an SSL client. - * - * @return Client The SSL client - * @throws Exception the exception - */ - public static Client getClient() throws Exception { - String methodName = "getClient"; - ClientConfig config = new ClientConfig(); - //config.getFeatures().put(JSONConfiguration.FEATURE_POJO_MAPPING, Boolean.TRUE); - //config.getClasses().add(org.openecomp.aai.util.CustomJacksonJaxBJsonProvider.class); - - SSLContext ctx = null; - - try { - - config.property(ClientProperties.SUPPRESS_HTTP_COMPLIANCE_VALIDATION, true); - - String truststore_path = SystemProperties.getProperty(VidProperties.VID_TRUSTSTORE_FILENAME); - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + " " + methodName + " truststore_path=" + truststore_path); - String truststore_password = SystemProperties.getProperty(VidProperties.VID_TRUSTSTORE_PASSWD_X); - - - String decrypted_truststore_password = Password.deobfuscate(truststore_password); - //logger.debug(dateFormat.format(new Date()) + " " + methodName + " decrypted_truststore_password=" + decrypted_truststore_password); - - File tr = new File (truststore_path); - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + " " + methodName + " absolute truststore path=" + tr.getAbsolutePath()); - - //String keystore_path = certFilePath + AAIProperties.FILESEPARTOR + SystemProperties.getProperty(AAIProperties.AAI_KEYSTORE_FILENAME); - //String keystore_password = SystemProperties.getProperty(AAIProperties.AAI_KEYSTORE_PASSWD_X); - //String decrypted_keystore_password = EncryptedPropValue.decryptTriple(keystore_password); - - System.setProperty("javax.net.ssl.trustStore", truststore_path); - System.setProperty("javax.net.ssl.trustStorePassword", decrypted_truststore_password); - HttpsURLConnection.setDefaultHostnameVerifier( new HostnameVerifier(){ - public boolean verify(String string,SSLSession ssls) { - return true; - } - }); - - //May need to make the algorithm a parameter. MSO requires TLSv1.1 or TLSv1.2 - ctx = SSLContext.getInstance("TLSv1.2"); - - /* - KeyManagerFactory kmf = null; - try { - kmf = KeyManagerFactory.getInstance("SunX509"); - FileInputStream fin = new FileInputStream(keystore_path); - KeyStore ks = KeyStore.getInstance("PKCS12"); - char[] pwd = decrypted_keystore_password.toCharArray(); - ks.load(fin, pwd); - kmf.init(ks, pwd); - } catch (Exception e) { - System.out.println("Error setting up kmf: exiting"); - e.printStackTrace(); - System.exit(1); - } - - ctx.init(kmf.getKeyManagers(), null, null); - */ - ctx.init(null, null, null); - //config.getProperties().put(HTTPSProperties.PROPERTY_HTTPS_PROPERTIES, - // new HTTPSProperties( , ctx)); - - return ClientBuilder.newBuilder() - .sslContext(ctx) - .hostnameVerifier(new HostnameVerifier() { - @Override - public boolean verify( String s, SSLSession sslSession ) { - return true; - } - }).withConfig(config) - .build() - .register(org.openecomp.aai.util.CustomJacksonJaxBJsonProvider.class); - - } catch (Exception e) { - logger.debug(EELFLoggerDelegate.debugLogger, "Error setting up config: exiting"); - //System.out.println("Error setting up config: exiting"); - e.printStackTrace(); - return null; - } - - //Client client = ClientBuilder.newClient(config); - // uncomment this line to get more logging for the request/response - // client.addFilter(new LoggingFilter(System.out)); - - //return client; - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/controller/AaiController.java b/vid-app-common/src/main/java/org/openecomp/vid/controller/AaiController.java deleted file mode 100755 index a8bdf39bb..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/controller/AaiController.java +++ /dev/null @@ -1,952 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.controller; - -import org.codehaus.jackson.JsonGenerationException; -import org.codehaus.jackson.map.JsonMappingException; -import org.codehaus.jackson.map.ObjectMapper; -import org.json.simple.JSONArray; -import org.json.simple.JSONObject; -import org.json.simple.parser.JSONParser; -import org.openecomp.aai.util.AAIRestInterface; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.domain.User; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.util.SystemProperties; -import org.openecomp.vid.aai.AaiResponse; -import org.openecomp.vid.aai.SubscriberData; -import org.openecomp.vid.aai.SubscriberFilteredResults; -import org.openecomp.vid.aai.model.AaiGetTenatns.GetTenantsResponse; -import org.openecomp.vid.model.VersionByInvariantIdsRequest; -import org.openecomp.vid.roles.Role; -import org.openecomp.vid.roles.RoleProvider; -import org.openecomp.vid.roles.RoleValidator; -import org.openecomp.vid.services.AaiService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.servlet.ModelAndView; - -import javax.servlet.ServletContext; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpSession; -import javax.ws.rs.BadRequestException; -import javax.ws.rs.DefaultValue; -import javax.ws.rs.QueryParam; -import javax.ws.rs.WebApplicationException; -import javax.ws.rs.core.Response; -import java.io.File; -import java.io.IOException; -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.*; - -/** - * Controller to handle a&ai requests. - */ - -@RestController -public class AaiController extends RestrictedBaseController { - - /** - * The Constant dateFormat. - */ - final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); - /** - * The from app id. - */ - protected String fromAppId = "VidAaiController"; - /** - * The view name. - */ - String viewName; - /** - * The logger. - */ - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(AaiController.class); - /** - * The model. - */ - private Map model = new HashMap(); - /** - * The servlet context. - */ - @Autowired - private ServletContext servletContext; - /** - * aai service - */ - @Autowired - private AaiService aaiService; - public AaiController() { - - } - - public AaiController(ServletContext servletContext) { - this.servletContext = servletContext; - - } - - /** - * Return tenant details. - * - * @param jsonObject the json object - * @return String The parsing results - */ - public static String parseCustomerObjectForTenants(JSONObject jsonObject) { - - JSONArray tenantArray = new JSONArray(); - boolean bconvert = false; - - try { - - JSONObject serviceSubsObj = (JSONObject) jsonObject.get("service-subscriptions"); - - if (serviceSubsObj != null) { - JSONArray srvcSubArray = (JSONArray) serviceSubsObj.get("service-subscription"); - - if (srvcSubArray != null) { - Iterator i = srvcSubArray.iterator(); - - while (i.hasNext()) { - - JSONObject innerObj = (JSONObject) i.next(); - - if (innerObj == null) - continue; - - JSONObject relationShipListsObj = (JSONObject) innerObj.get("relationship-list"); - if (relationShipListsObj != null) { - JSONArray rShipArray = (JSONArray) relationShipListsObj.get("relationship"); - if (rShipArray != null) { - Iterator i1 = rShipArray.iterator(); - - while (i1.hasNext()) { - - JSONObject inner1Obj = (JSONObject) i1.next(); - - if (inner1Obj == null) - continue; - - String relatedTo = checkForNull((String) inner1Obj.get("related-to")); - if (relatedTo.equalsIgnoreCase("tenant")) { - JSONObject tenantNewObj = new JSONObject(); - - String relatedLink = checkForNull((String) inner1Obj.get("related-link")); - tenantNewObj.put("link", relatedLink); - - JSONArray rDataArray = (JSONArray) inner1Obj.get("relationship-data"); - if (rDataArray != null) { - Iterator i2 = rDataArray.iterator(); - - while (i2.hasNext()) { - JSONObject inner2Obj = (JSONObject) i2.next(); - - if (inner2Obj == null) - continue; - - String rShipKey = checkForNull((String) inner2Obj.get("relationship-key")); - String rShipVal = checkForNull((String) inner2Obj.get("relationship-value")); - if (rShipKey.equalsIgnoreCase("cloud-region.cloud-owner")) { - tenantNewObj.put("cloudOwner", rShipVal); - } else if (rShipKey.equalsIgnoreCase("cloud-region.cloud-region-id")) { - tenantNewObj.put("cloudRegionID", rShipVal); - } - - if (rShipKey.equalsIgnoreCase("tenant.tenant-id")) { - tenantNewObj.put("tenantID", rShipVal); - } - } - } - - JSONArray relatedTPropArray = (JSONArray) inner1Obj.get("related-to-property"); - if (relatedTPropArray != null) { - Iterator i3 = relatedTPropArray.iterator(); - - while (i3.hasNext()) { - JSONObject inner3Obj = (JSONObject) i3.next(); - - if (inner3Obj == null) - continue; - - String propKey = checkForNull((String) inner3Obj.get("property-key")); - String propVal = checkForNull((String) inner3Obj.get("property-value")); - if (propKey.equalsIgnoreCase("tenant.tenant-name")) { - tenantNewObj.put("tenantName", propVal); - } - } - } - bconvert = true; - tenantArray.add(tenantNewObj); - } - } - } - } - } - } - } - } catch (NullPointerException ex) { - - - } - - if (bconvert) - return tenantArray.toJSONString(); - else - return ""; - - } - - - /** - * Retrieve the service subscription from the jsonObject. - * - * @param jsonObject the json object - * @return String - */ - public static String parseServiceSubscriptionObjectForTenants(JSONObject jsonObject) { - - JSONArray tenantArray = new JSONArray(); - boolean bconvert = false; - - try { - JSONObject relationShipListsObj = (JSONObject) jsonObject.get("relationship-list"); - if (relationShipListsObj != null) { - JSONArray rShipArray = (JSONArray) relationShipListsObj.get("relationship"); - if (rShipArray != null) { - Iterator i1 = rShipArray.iterator(); - - while (i1.hasNext()) { - - JSONObject inner1Obj = (JSONObject) i1.next(); - - if (inner1Obj == null) - continue; - - String relatedTo = checkForNull((String) inner1Obj.get("related-to")); - if (relatedTo.equalsIgnoreCase("tenant")) { - JSONObject tenantNewObj = new JSONObject(); - - String relatedLink = checkForNull((String) inner1Obj.get("related-link")); - tenantNewObj.put("link", relatedLink); - - JSONArray rDataArray = (JSONArray) inner1Obj.get("relationship-data"); - if (rDataArray != null) { - Iterator i2 = rDataArray.iterator(); - - while (i2.hasNext()) { - JSONObject inner2Obj = (JSONObject) i2.next(); - - if (inner2Obj == null) - continue; - - String rShipKey = checkForNull((String) inner2Obj.get("relationship-key")); - String rShipVal = checkForNull((String) inner2Obj.get("relationship-value")); - if (rShipKey.equalsIgnoreCase("cloud-region.cloud-owner")) { - tenantNewObj.put("cloudOwner", rShipVal); - } else if (rShipKey.equalsIgnoreCase("cloud-region.cloud-region-id")) { - tenantNewObj.put("cloudRegionID", rShipVal); - } - - if (rShipKey.equalsIgnoreCase("tenant.tenant-id")) { - tenantNewObj.put("tenantID", rShipVal); - } - } - } - - JSONArray relatedTPropArray = (JSONArray) inner1Obj.get("related-to-property"); - if (relatedTPropArray != null) { - Iterator i3 = relatedTPropArray.iterator(); - - while (i3.hasNext()) { - JSONObject inner3Obj = (JSONObject) i3.next(); - - if (inner3Obj == null) - continue; - - String propKey = checkForNull((String) inner3Obj.get("property-key")); - String propVal = checkForNull((String) inner3Obj.get("property-value")); - if (propKey.equalsIgnoreCase("tenant.tenant-name")) { - tenantNewObj.put("tenantName", propVal); - } - } - } - bconvert = true; - tenantArray.add(tenantNewObj); - } - } - - } - } - } catch (NullPointerException ex) { - - - } - - if (bconvert) - return tenantArray.toJSONString(); - else - return ""; - - } - - /** - * Check for null. - * - * @param local the local - * @return the string - */ - private static String checkForNull(String local) { - if (local != null) - return local; - else - return ""; - - } - - /** - * Welcome method. - * - * @param request the request - * @return ModelAndView The view - */ - @RequestMapping(value = {"/subscriberSearch"}, method = RequestMethod.GET) - public ModelAndView welcome(HttpServletRequest request) { - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== AaiController welcome start"); - return new ModelAndView(getViewName()); - } - - @RequestMapping(value = {"/aai_get_aic_zones"}, method = RequestMethod.GET) - public ResponseEntity getAicZones(HttpServletRequest request) throws JsonGenerationException, JsonMappingException, IOException { - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== getAicZones controller start"); - AaiResponse response = aaiService.getAaiZones(); - return aaiResponseToResponseEntity(response); - } - - @RequestMapping(value = {"/aai_get_aic_zone_for_pnf/{globalCustomerId}/{serviceType}/{serviceId}"}, method = RequestMethod.GET) - public ResponseEntity getAicZoneForPnf(@PathVariable("globalCustomerId") String globalCustomerId ,@PathVariable("serviceType") String serviceType , @PathVariable("serviceId") String serviceId ,HttpServletRequest request) throws JsonGenerationException, JsonMappingException, IOException { - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== getAicZoneForPnf controller start"); - AaiResponse response = aaiService.getAicZoneForPnf(globalCustomerId , serviceType , serviceId); - return aaiResponseToResponseEntity(response); - } - - /* (non-Javadoc) - * @see org.openecomp.portalsdk.core.controller.RestrictedBaseController#getViewName() - */ - public String getViewName() { - return viewName; - } - - /* (non-Javadoc) - * @see org.openecomp.portalsdk.core.controller.RestrictedBaseController#setViewName(java.lang.String) - */ - public void setViewName(String viewName) { - this.viewName = viewName; - } - - /** - * Get services from a&ai. - * - * @return ResponseEntity The response entity with the logged in user uuid. - * @throws IOException Signals that an I/O exception has occurred. - * @throws InterruptedException the interrupted exception - */ - @RequestMapping(value = {"/getuserID"}, method = RequestMethod.GET) - public ResponseEntity getUserID(HttpServletRequest request) throws IOException, InterruptedException { - - String userId = ""; - HttpSession session = request.getSession(); - if (session != null) { - User user = (User) session.getAttribute(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME)); - if (user != null) { - //userId = user.getHrid(); - userId = user.getLoginId(); - if (userId == null) - userId = user.getOrgUserId(); - } - } - - return new ResponseEntity(userId, HttpStatus.OK); - } - - /** - * Get services from a&ai. - * - * @return ResponseEntity The response entity - * @throws IOException Signals that an I/O exception has occurred. - * @throws InterruptedException the interrupted exception - */ - @RequestMapping(value = "/aai_get_services", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) - public ResponseEntity doGetServices(HttpServletRequest request) throws IOException, InterruptedException { - - RoleValidator roleValidator = new RoleValidator(new RoleProvider().getUserRoles(request)); - - AaiResponse subscriberList = aaiService.getServices(roleValidator); - ResponseEntity responseEntity = aaiResponseToResponseEntity(subscriberList); - - return responseEntity; - } - - - @RequestMapping(value = {"/aai_get_version_by_invariant_id"}, method = RequestMethod.POST) - public ResponseEntity getVersionByInvariantId(HttpServletRequest request, @RequestBody VersionByInvariantIdsRequest versions) throws IOException { - ResponseEntity responseEntity; - ObjectMapper objectMapper = new ObjectMapper(); - - Response result = aaiService.getVersionByInvariantId(versions.versions); - - return new ResponseEntity(result.readEntity(String.class), HttpStatus.OK); - } - - - private ResponseEntity aaiResponseToResponseEntity(AaiResponse aaiResponseData) - throws IOException, JsonGenerationException, JsonMappingException { - ResponseEntity responseEntity; - ObjectMapper objectMapper = new ObjectMapper(); - if (aaiResponseData.getHttpCode() == 200) { - responseEntity = new ResponseEntity(objectMapper.writeValueAsString(aaiResponseData.getT()), HttpStatus.OK); - } else { - responseEntity = new ResponseEntity(aaiResponseData.getErrorMessage(), HttpStatus.valueOf(aaiResponseData.getHttpCode())); - } - return responseEntity; - } - - /** - * Lookup single service instance in a&ai. Get the service-subscription and customer, too, i guess? - * - * @param serviceInstanceId the service instance Id - * @return ResponseEntity The response entity - * @throws IOException Signals that an I/O exception has occurred. - * @throws InterruptedException the interrupted exception - */ - @RequestMapping(value = "/aai_get_service_instance/{service-instance-id}/{service-instance-type}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) - public ResponseEntity doGetServiceInstance(@PathVariable("service-instance-id") String serviceInstanceId, @PathVariable("service-instance-type") String serviceInstanceType) throws IOException, InterruptedException { - File certiPath = GetCertificatesPath(); - Response resp = null; - - if (serviceInstanceType.equalsIgnoreCase("Service Instance Id")) { - resp = doAaiGet(certiPath.getAbsolutePath(), - "search/nodes-query?search-node-type=service-instance&filter=service-instance-id:EQUALS:" - + serviceInstanceId, false); - } else { - resp = doAaiGet(certiPath.getAbsolutePath(), - "search/nodes-query?search-node-type=service-instance&filter=service-instance-name:EQUALS:" - + serviceInstanceId, false); - } - return convertResponseToResponseEntity(resp); - } - - /** - * Get services from a&ai. - * - * @param globalCustomerId the global customer id - * @param serviceSubscriptionId the service subscription id - * @return ResponseEntity The response entity - * @throws IOException Signals that an I/O exception has occurred. - * @throws InterruptedException the interrupted exception - */ - @RequestMapping(value = "/aai_get_service_subscription/{global-customer-id}/{service-subscription-id}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) - public ResponseEntity doGetServices(@PathVariable("global-customer-id") String globalCustomerId, - @PathVariable("service-subscription-id") String serviceSubscriptionId) throws IOException, InterruptedException { - File certiPath = GetCertificatesPath(); - Response resp = doAaiGet(certiPath.getAbsolutePath(), "business/customers/customer/" + globalCustomerId - + "/service-subscriptions/service-subscription/" + serviceSubscriptionId + "?depth=0", false); - return convertResponseToResponseEntity(resp); - } - - /** - * Obtain the subscriber list from a&ai. - * - * @param fullSet the full set - * @return ResponseEntity The response entity - * @throws IOException Signals that an I/O exception has occurred. - * @throws InterruptedException the interrupted exception - */ - @RequestMapping(value = "/aai_get_subscribers", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) - public ResponseEntity doGetSubscriberList(HttpServletRequest request, @DefaultValue("n") @QueryParam("fullSet") String fullSet) throws IOException, InterruptedException { - return getFullSubscriberList(request); - } - - /** - * Obtain the Target Prov Status from the System.Properties file. - * - * @return ResponseEntity The response entity - * @throws IOException Signals that an I/O exception has occurred. - * @throws InterruptedException the interrupted exception - */ - @RequestMapping(value = "/get_system_prop_vnf_prov_status", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) - public ResponseEntity getTargetProvStatus() throws IOException, InterruptedException { - String p = SystemProperties.getProperty("aai.vnf.provstatus"); - return new ResponseEntity(p, HttpStatus.OK); - } - - /** - * Obtain the full subscriber list from a&ai. - *

    - * g @return ResponseEntity The response entity - * - * @throws IOException Signals that an I/O exception has occurred. - * @throws InterruptedException the interrupted exception - */ - @RequestMapping(value = "/aai_get_full_subscribers", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) - public ResponseEntity getFullSubscriberList(HttpServletRequest request) throws IOException, InterruptedException { - ObjectMapper objectMapper = new ObjectMapper(); - ResponseEntity responseEntity; - RoleValidator roleValidator = new RoleValidator(new RoleProvider().getUserRoles(request)); - SubscriberFilteredResults subscriberList = aaiService.getFullSubscriberList(roleValidator); - if (subscriberList.getHttpCode() == 200) { - responseEntity = new ResponseEntity(objectMapper.writeValueAsString(subscriberList.getSubscriberList()), HttpStatus.OK); - } else { - responseEntity = new ResponseEntity(subscriberList.getErrorMessage(), HttpStatus.valueOf(subscriberList.getHttpCode())); - } - - - return responseEntity; - } - - - @RequestMapping(value = "/get_vnf_data_by_globalid_and_service_type/{globalCustomerId}/{serviceType}", - method = RequestMethod.GET, - produces = MediaType.APPLICATION_JSON_VALUE) - public ResponseEntity getVnfDataByGlobalIdAndServiceType(HttpServletRequest request, - @PathVariable("globalCustomerId") String globalCustomerId, - @PathVariable("serviceType") String serviceType) throws IOException { - - Response resp = aaiService.getVNFData(globalCustomerId, serviceType); - return convertResponseToResponseEntity(resp); - } - - - /** - * Refresh the subscriber list from a&ai. - * - * @return ResponseEntity The response entity - * @throws IOException Signals that an I/O exception has occurred. - */ - @RequestMapping(value = "/aai_refresh_subscribers", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) - public ResponseEntity doRefreshSubscriberList() throws IOException { - Response resp = getSubscribers(false); - return convertResponseToResponseEntity(resp); - } - - /** - * Refresh the full subscriber list from a&ai. - * - * @return ResponseEntity The response entity - * @throws IOException Signals that an I/O exception has occurred. - */ - @RequestMapping(value = "/aai_refresh_full_subscribers", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) - public ResponseEntity doRefreshFullSubscriberList() throws IOException { - Response resp = getSubscribers(false); - return convertResponseToResponseEntity(resp); - } - - /** - * Get subscriber details from a&ai. - * - * @param subscriberId the subscriber id - * @return ResponseEntity The response entity - */ - @RequestMapping(value = "/aai_sub_details/{subscriberId}", method = RequestMethod.GET) - public ResponseEntity GetSubscriberDetails(HttpServletRequest request, @PathVariable("subscriberId") String subscriberId) throws IOException { - ObjectMapper objectMapper = new ObjectMapper(); - ResponseEntity responseEntity; - List roles = new RoleProvider().getUserRoles(request); - RoleValidator roleValidator = new RoleValidator(roles); - AaiResponse subscriberData = aaiService.getSubscriberData(subscriberId, roleValidator); - String httpMessage = subscriberData.getT() != null ? - objectMapper.writeValueAsString(subscriberData.getT()) : - subscriberData.getErrorMessage(); - - responseEntity = new ResponseEntity(httpMessage, HttpStatus.valueOf(subscriberData.getHttpCode())); - return responseEntity; - } - - /** - * Issue a named query to a&ai. - * - * @param namedQueryId the named query id - * @param globalCustomerId the global customer id - * @param serviceType the service type - * @param serviceInstance the service instance - * @return ResponseEntity The response entity - */ - @RequestMapping(value = "/aai_sub_viewedit/{namedQueryId}/{globalCustomerId}/{serviceType}/{serviceInstance}", method = RequestMethod.GET) - public ResponseEntity viewEditGetComponentList( - @PathVariable("namedQueryId") String namedQueryId, - @PathVariable("globalCustomerId") String globalCustomerId, - @PathVariable("serviceType") String serviceType, - @PathVariable("serviceInstance") String serviceInstance) { - - String componentListPayload = getComponentListPutPayload(namedQueryId, globalCustomerId, serviceType, serviceInstance); - File certiPath = GetCertificatesPath(); - - Response resp = doAaiPost(certiPath.getAbsolutePath(), "search/named-query", componentListPayload, false); - return convertResponseToResponseEntity(resp); - } - - - @RequestMapping(value = "/aai_get_vnf_data/{globalCustomerId}/{serviceType}/{serviceInstanceId}", method = RequestMethod.GET) - public AaiResponse getVnfData( - @PathVariable("globalCustomerId") String globalCustomerId, - @PathVariable("serviceType") String serviceType, - @PathVariable("serviceInstanceId") String serviceInstanceId) { - - return aaiService.getVNFData(globalCustomerId, serviceType, serviceInstanceId); - - } - - - // @RequestMapping(value="/aai_get_tenants/{global-customer-id}", method = RequestMethod.GET) - // public ResponseEntity viewEditGetComponentList( - // @PathVariable("global-customer-id") String globalCustomerId) { - // return new ResponseEntity(getTenants(globalCustomerId), HttpStatus.OK); - // } - - /** - * Issue a named query to a&ai. - * - * @param namedQueryId the named query id - * @param globalCustomerId the global customer id - * @param serviceType the service type - * @return ResponseEntity The response entity - */ - @RequestMapping(value = "/aai_get_models_by_service_type/{namedQueryId}/{globalCustomerId}/{serviceType}", method = RequestMethod.GET) - public ResponseEntity viewEditGetComponentList( - @PathVariable("namedQueryId") String namedQueryId, - @PathVariable("globalCustomerId") String globalCustomerId, - @PathVariable("serviceType") String serviceType) { - - String componentListPayload = getModelsByServiceTypePayload(namedQueryId, globalCustomerId, serviceType); - File certiPath = GetCertificatesPath(); - - Response resp = doAaiPost(certiPath.getAbsolutePath(), "search/named-query", componentListPayload, false); - return convertResponseToResponseEntity(resp); - } - - /** - * Parses the for tenants. - * - * @param resp the resp - * @return the string - */ - private String parseForTenants(String resp) { - String tenantList = ""; - - try { - JSONParser jsonParser = new JSONParser(); - - JSONObject jsonObject = (JSONObject) jsonParser.parse(resp); - - return parseCustomerObjectForTenants(jsonObject); - } catch (Exception ex) { - - } - - return tenantList; - } - - /** - * Parses the for tenants by service subscription. - * - * @param resp the resp - * @return the string - */ - private String parseForTenantsByServiceSubscription(String resp) { - String tenantList = ""; - - try { - JSONParser jsonParser = new JSONParser(); - - JSONObject jsonObject = (JSONObject) jsonParser.parse(resp); - - return parseServiceSubscriptionObjectForTenants(jsonObject); - } catch (Exception ex) { - - } - - return tenantList; - } - - /** - * Obtain tenants for a given service type. - * - * @param globalCustomerId the global customer id - * @param serviceType the service type - * @return ResponseEntity The response entity - */ - @RequestMapping(value = "/aai_get_tenants/{global-customer-id}/{service-type}", method = RequestMethod.GET) - public ResponseEntity viewEditGetTenantsFromServiceType(HttpServletRequest request, - @PathVariable("global-customer-id") String globalCustomerId, @PathVariable("service-type") String serviceType) { - - ResponseEntity responseEntity; - try { - ObjectMapper objectMapper = new ObjectMapper(); - List roles = new RoleProvider().getUserRoles(request); - RoleValidator roleValidator = new RoleValidator(roles); - AaiResponse response = aaiService.getTenants(globalCustomerId, serviceType, roleValidator); - if (response.getHttpCode() == 200) { - responseEntity = new ResponseEntity(objectMapper.writeValueAsString(response.getT()), HttpStatus.OK); - } else { - responseEntity = new ResponseEntity(response.getErrorMessage(), HttpStatus.valueOf(response.getHttpCode())); - } - } catch (Exception e) { - responseEntity = new ResponseEntity("Unable to proccess getTenants reponse", HttpStatus.INTERNAL_SERVER_ERROR); - } - return responseEntity; - } - - - private ResponseEntity convertResponseToResponseEntity(Response resp) { - ResponseEntity respEnt; - ObjectMapper objectMapper = new ObjectMapper(); - if (resp == null) { - respEnt = new ResponseEntity("Failed to fetch data from A&AI, check server logs for details.", HttpStatus.INTERNAL_SERVER_ERROR); - } else { - respEnt = new ResponseEntity(resp.readEntity(String.class), HttpStatus.valueOf(resp.getStatus())); - } - return respEnt; - } - - /** - * Gets the tenants. - * - * @param globalCustomerId the global customer id - * @return the tenants - */ - private ResponseEntity getTenants(String globalCustomerId) { - File certiPath = GetCertificatesPath(); - Response resp = doAaiGet(certiPath.getAbsolutePath(), "business/customers/customer/" + globalCustomerId, false); - - ResponseEntity respEnt; - if (resp.getStatus() >= 200 && resp.getStatus() <= 299) { - respEnt = new ResponseEntity(parseForTenants((String) resp.readEntity(String.class)), HttpStatus.OK); - } else { - respEnt = new ResponseEntity((String) resp.readEntity(String.class), HttpStatus.valueOf(resp.getStatus())); - } - return respEnt; - - } - - /** - * Gets the tenants from service type. - * - * @param globalCustomerId the global customer id - * @param serviceType the service type - * @return the tenants from service type - */ - private ResponseEntity getTenantsFromServiceType(String globalCustomerId, String serviceType) { - - - File certiPath = GetCertificatesPath(); - String url = "business/customers/customer/" + globalCustomerId + "/service-subscriptions/service-subscription/" + serviceType; - - Response resp = doAaiGet(certiPath.getAbsolutePath(), url, false); - - ResponseEntity respEnt; - if (resp.getStatus() >= 200 && resp.getStatus() <= 299) { - respEnt = new ResponseEntity(parseForTenantsByServiceSubscription((String) resp.readEntity(String.class)), HttpStatus.OK); - } else { - respEnt = new ResponseEntity((String) resp.readEntity(String.class), HttpStatus.valueOf(resp.getStatus())); - } - return respEnt; - - } - - /** - * Gets the services. - * - * @return the services - */ - private Response getServices() { - File certiPath = GetCertificatesPath(); - Response resp = doAaiGet(certiPath.getAbsolutePath(), "service-design-and-creation/services", false); - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "getServices() resp=" + resp.getStatusInfo()); - - //model.put("aai_get_services", resp); - return resp; - } - - /** - * Gets the subscribers. - * - * @param isFullSet the is full set - * @return the subscribers - */ - private Response getSubscribers(boolean isFullSet) { - - File certiPath = GetCertificatesPath(); - String depth = "0"; - - Response resp = doAaiGet(certiPath.getAbsolutePath(), "business/customers?subscriber-type=INFRA&depth=" + depth, false); - if (resp != null) { - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "getSubscribers() resp=" + resp.getStatusInfo().toString()); - } - return resp; - } - - /** - * Gets the subscriber details. - * - * @param subscriberId the subscriber id - * @return the subscriber details - */ - private Response getSubscriberDetails(String subscriberId) { - File certiPath = GetCertificatesPath(); - Response resp = doAaiGet(certiPath.getAbsolutePath(), "business/customers/customer/" + subscriberId + "?depth=2", false); - //String resp = doAaiGet(certiPath.getAbsolutePath(), "business/customers/customer/" + subscriberId, false); - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "getSubscriberDetails() resp=" + resp.getStatusInfo().toString()); - return resp; - } - - /** - * Gets the certificates path. - * - * @return the file - */ - private File GetCertificatesPath() { - if (servletContext != null) - return new File(servletContext.getRealPath("/WEB-INF/cert/")); - return null; - } - - /** - * Send a GET request to a&ai. - * - * @param certiPath the certi path - * @param uri the uri - * @param xml the xml - * @return String The response - */ - protected Response doAaiGet(String certiPath, String uri, boolean xml) { - String methodName = "getSubscriberList"; - String transId = UUID.randomUUID().toString(); - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - - Response resp = null; - try { - - AAIRestInterface restContrller = new AAIRestInterface(certiPath); - resp = restContrller.RestGet(fromAppId, transId, uri, xml); - - } catch (WebApplicationException e) { - final String message = ((BadRequestException) e).getResponse().readEntity(String.class); - logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + message); - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + message); - } catch (Exception e) { - logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); - } - - return resp; - } - - /** - * Send a POST request to a&ai. - * - * @param certiPath the certi path - * @param uri the uri - * @param payload the payload - * @param xml the xml - * @return String The response - */ - protected Response doAaiPost(String certiPath, String uri, String payload, boolean xml) { - String methodName = "getSubscriberList"; - String transId = UUID.randomUUID().toString(); - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - - Response resp = null; - try { - - AAIRestInterface restContrller = new AAIRestInterface(certiPath); - resp = restContrller.RestPost(fromAppId, transId, uri, payload, xml); - - } catch (Exception e) { - logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); - } - - return resp; - } - - /** - * Gets the component list put payload. - * - * @param namedQueryId the named query id - * @param globalCustomerId the global customer id - * @param serviceType the service type - * @param serviceInstance the service instance - * @return the component list put payload - */ - private String getComponentListPutPayload(String namedQueryId, String globalCustomerId, String serviceType, String serviceInstance) { - return - " {" + - " \"instance-filters\": {" + - " \"instance-filter\": [" + - " {" + - " \"customer\": {" + - " \"global-customer-id\": \"" + globalCustomerId + "\"" + - " }," + - " \"service-instance\": {" + - " \"service-instance-id\": \"" + serviceInstance + "\"" + - " }," + - " \"service-subscription\": {" + - " \"service-type\": \"" + serviceType + "\"" + - " }" + - " }" + - " ]" + - " }," + - " \"query-parameters\": {" + - " \"named-query\": {" + - " \"named-query-uuid\": \"" + namedQueryId + "\"" + - " }" + - " }" + - "}"; - - } - - private String getModelsByServiceTypePayload(String namedQueryId, String globalCustomerId, String serviceType) { - // TODO Auto-generated method stub - return " {" + - " \"instance-filters\": {" + - " \"instance-filter\": [" + - " {" + - " \"customer\": {" + - " \"global-customer-id\": \"" + globalCustomerId + "\"" + - " }," + - " \"service-subscription\": {" + - " \"service-type\": \"" + serviceType + "\"" + - " }" + - " }" + - " ]" + - " }," + - " \"query-parameters\": {" + - " \"named-query\": {" + - " \"named-query-uuid\": \"" + namedQueryId + "\"" + - " }" + - " }" + - "}"; - - } -} - diff --git a/vid-app-common/src/main/java/org/openecomp/vid/controller/BrowseServiceTypesController.java b/vid-app-common/src/main/java/org/openecomp/vid/controller/BrowseServiceTypesController.java deleted file mode 100755 index 0698cfd9c..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/controller/BrowseServiceTypesController.java +++ /dev/null @@ -1,87 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.controller; - - - -import java.text.DateFormat; -import java.text.SimpleDateFormat; - - -import javax.servlet.ServletContext; -import javax.servlet.http.HttpServletRequest; - -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.springframework.beans.factory.annotation.Autowired; - -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.RestController; -import org.springframework.web.servlet.ModelAndView; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; - - -/** - * The Class BrowseServiceTypesController. - */ -@RestController -public class BrowseServiceTypesController extends RestrictedBaseController{ - - /** The view name. */ - String viewName; - - /** The logger. */ - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(BrowseServiceTypesController.class); - - /** The Constant dateFormat. */ - final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); - - /** The servlet context. */ - private @Autowired ServletContext servletContext; - - /** - * Welcome. - * - * @param request the request - * @return the model and view - */ - @RequestMapping(value = {"/browseservicetypes" }, method = RequestMethod.GET) - public ModelAndView welcome(HttpServletRequest request) { - - return new ModelAndView(getViewName()); - } - - /* (non-Javadoc) - * @see org.openecomp.portalsdk.core.controller.RestrictedBaseController#getViewName() - */ - public String getViewName() { - return viewName; - } - - /* (non-Javadoc) - * @see org.openecomp.portalsdk.core.controller.RestrictedBaseController#setViewName(java.lang.String) - */ - public void setViewName(String viewName) { - this.viewName = viewName; - } - - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/controller/ChangeManagementController.java b/vid-app-common/src/main/java/org/openecomp/vid/controller/ChangeManagementController.java deleted file mode 100644 index 1af715464..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/controller/ChangeManagementController.java +++ /dev/null @@ -1,71 +0,0 @@ -package org.openecomp.vid.controller; - -import org.json.simple.JSONArray; -import org.openecomp.portalsdk.core.controller.UnRestrictedBaseController; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.vid.services.ChangeManagementService; -import org.openecomp.vid.services.WorkflowService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; - -import org.openecomp.vid.changeManagement.ChangeManagementRequest; -import org.openecomp.vid.mso.rest.Request; - -import java.io.IOException; -import java.util.Collection; - -import javax.servlet.http.HttpServletRequest; - -/** - * Controller to handle ChangeManagement feature requests. - */ -@RestController -@RequestMapping("change-management") -public class ChangeManagementController extends UnRestrictedBaseController { - private EELFLoggerDelegate logger; - private String fromAppId; - private final WorkflowService workflowService; - private final ChangeManagementService changeManagementService; - - @Autowired - public ChangeManagementController(WorkflowService workflowService, ChangeManagementService changeManagementService) { - this.logger = EELFLoggerDelegate.getLogger(ChangeManagementController.class); - this.fromAppId = "VidChangeManagementController"; - this.workflowService = workflowService; - this.changeManagementService = changeManagementService; - } - - @RequestMapping(value = {"/workflow"}, method = RequestMethod.GET) - public ResponseEntity> getWorkflow(@RequestParam("vnfs") Collection vnfs) throws IOException, InterruptedException { - Collection result = this.workflowService.getWorkflowsForVNFs(vnfs); - return new ResponseEntity<>(result, HttpStatus.OK); - } - - @RequestMapping(value = {"/mso"}, method = RequestMethod.GET) - public ResponseEntity> getMSOChangeManagements() throws IOException, InterruptedException { - Collection result = this.changeManagementService.getMSOChangeManagements(); - return new ResponseEntity<>(result, HttpStatus.OK); - } - - @RequestMapping(value = "/workflow/{vnfName}", method = RequestMethod.POST) - public ResponseEntity changeManagement(@PathVariable("vnfName") String vnfName, - HttpServletRequest request, - @RequestBody ChangeManagementRequest changeManagmentRequest) - throws Exception { - return this.changeManagementService.doChangeManagement(changeManagmentRequest, vnfName); - } - - - @RequestMapping(value = {"/scheduler"}, method = RequestMethod.GET) - public ResponseEntity getSchedulerChangeManagements() throws IOException, InterruptedException { - JSONArray result = this.changeManagementService.getSchedulerChangeManagements(); - return new ResponseEntity<>(result, HttpStatus.OK); - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/controller/HealthCheckController.java b/vid-app-common/src/main/java/org/openecomp/vid/controller/HealthCheckController.java deleted file mode 100755 index abef8d62b..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/controller/HealthCheckController.java +++ /dev/null @@ -1,196 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.controller; - -import java.io.IOException; -import java.sql.Connection; -import java.sql.DriverManager; -import java.sql.SQLException; -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.Date; - -import org.springframework.http.MediaType; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.RestController; - -import org.openecomp.portalsdk.core.controller.UnRestrictedBaseController; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.util.SystemProperties; -import org.openecomp.vid.dao.FnAppDoaImpl; - -/** - * Controller for user profile view. The view is restricted to authenticated - * users. The view name resolves to page user_profile.jsp which uses Angular. - */ - -@RestController -@RequestMapping("/") -public class HealthCheckController extends UnRestrictedBaseController { - - - /** The logger. */ - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(HealthCheckController.class); - - /** The Constant dateFormat. */ - final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); - - private static final String HEALTH_CHECK_PATH = "/healthCheck"; - - /** - * Model for JSON response with health-check results. - */ - public class HealthStatus { - // Either 200 or 500 - public int statusCode; - - // Additional detail in case of error, empty in case of success. - public String message; - - public String date; - - public HealthStatus(int code, String msg) { - this.statusCode = code; - this.message = msg; - } - - public HealthStatus(int code,String date, String msg) { - this.statusCode = code; - this.message = msg; - this.date=date; - } - - public int getStatusCode() { - return statusCode; - } - - public void setStatusCode(int code) { - this.statusCode = code; - } - - public String getMessage() { - return message; - } - - public void setMessage(String msg) { - this.message = msg; - } - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - } - - @SuppressWarnings("unchecked") - public int getProfileCount(String driver, String URL, String username, String password) { - FnAppDoaImpl doa= new FnAppDoaImpl(); - int count= doa.getProfileCount(driver,URL,username,password); - return count; - } - - - - /** - * Obtain the HealthCheck Status from the System.Properties file. - * Used by IDNS for redundancy - * @return ResponseEntity The response entity - * @throws IOException Signals that an I/O exception has occurred. - * @throws InterruptedException the interrupted exception - */ - @RequestMapping(value="/healthCheck",method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) - public HealthStatus gethealthCheckStatusforIDNS() throws IOException, InterruptedException { - - String driver = SystemProperties.getProperty("db.driver"); - String URL = SystemProperties.getProperty("db.connectionURL"); - String username = SystemProperties.getProperty("db.userName"); - String password = SystemProperties.getProperty("db.password"); - - logger.debug(EELFLoggerDelegate.debugLogger, "driver ::" + driver); - logger.debug(EELFLoggerDelegate.debugLogger, "URL::" + URL); - logger.debug(EELFLoggerDelegate.debugLogger, "username::" + username); - logger.debug(EELFLoggerDelegate.debugLogger,"password::" + password); - - - HealthStatus healthStatus = null; - try { - logger.debug(EELFLoggerDelegate.debugLogger, "Performing health check"); - int count=getProfileCount(driver,URL,username,password); - logger.debug(EELFLoggerDelegate.debugLogger,"count:::"+count); - healthStatus = new HealthStatus(200, "health check succeeded"); - } catch (Exception ex) { - - logger.error(EELFLoggerDelegate.errorLogger, "Failed to perform health check", ex); - healthStatus = new HealthStatus(500, "health check failed: " + ex.toString()); - } - return healthStatus; - } - - /** - * Obtain the HealthCheck Status from the System.Properties file. - * - * @return ResponseEntity The response entity - * @throws IOException Signals that an I/O exception has occurred. - * @throws InterruptedException the interrupted exception - * Project : - */ - @RequestMapping(value="rest/healthCheck/{User-Agent}/{X-ECOMP-RequestID}",method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) - public HealthStatus getHealthCheck( - @PathVariable("User-Agent") String UserAgent, - @PathVariable("X-ECOMP-RequestID") String ECOMPRequestID) throws IOException, InterruptedException { - - String driver = SystemProperties.getProperty("db.driver"); - String URL = SystemProperties.getProperty("db.connectionURL"); - String username = SystemProperties.getProperty("db.userName"); - String password = SystemProperties.getProperty("db.password"); - - logger.debug(EELFLoggerDelegate.debugLogger, "driver ::" + driver); - logger.debug(EELFLoggerDelegate.debugLogger, "URL::" + URL); - logger.debug(EELFLoggerDelegate.debugLogger, "username::" + username); - logger.debug(EELFLoggerDelegate.debugLogger,"password::" + password); - - - HealthStatus healthStatus = null; - try { - logger.debug(EELFLoggerDelegate.debugLogger, "Performing health check"); - logger.debug(EELFLoggerDelegate.debugLogger, "User-Agent" + UserAgent); - logger.debug(EELFLoggerDelegate.debugLogger, "X-ECOMP-RequestID" + ECOMPRequestID); - - - int count=getProfileCount(driver,URL,username,password); - - logger.debug(EELFLoggerDelegate.debugLogger,"count:::"+count); - healthStatus = new HealthStatus(200,dateFormat.format(new Date()) ,"health check succeeded"); - } catch (Exception ex) { - - logger.error(EELFLoggerDelegate.errorLogger, "Failed to perform health check", ex); - healthStatus = new HealthStatus(500,dateFormat.format(new Date()),"health check failed: " + ex.toString()); - } - return healthStatus; - } -} - diff --git a/vid-app-common/src/main/java/org/openecomp/vid/controller/MsoConfig.java b/vid-app-common/src/main/java/org/openecomp/vid/controller/MsoConfig.java deleted file mode 100644 index e0b59204a..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/controller/MsoConfig.java +++ /dev/null @@ -1,29 +0,0 @@ -package org.openecomp.vid.controller; - -import com.fasterxml.jackson.databind.ObjectMapper; -import org.openecomp.vid.factories.MsoRequestFactory; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - - -@Configuration -public class MsoConfig { - - /** - * Gets the object mapper. - * - * @return the object mapper - */ - @Bean - public ObjectMapper getObjectMapper() { - return new ObjectMapper(); - } - - @Bean - public MsoRequestFactory createRequestDetailsFactory(){ - return new MsoRequestFactory(); - } - - - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/controller/MsoController.java b/vid-app-common/src/main/java/org/openecomp/vid/controller/MsoController.java deleted file mode 100755 index 451b19de7..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/controller/MsoController.java +++ /dev/null @@ -1,770 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.controller; - - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.OutputStream; -import java.io.PrintWriter; -import java.io.StringWriter; -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.ArrayList; -//import java.util.UUID; -import java.util.Date; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Scanner; -import java.util.stream.Collectors; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.codehaus.jackson.JsonEncoding; -import org.codehaus.jackson.JsonFactory; -import org.codehaus.jackson.JsonGenerator; -import org.codehaus.jackson.JsonParser; -import org.codehaus.jackson.JsonToken; -import org.glassfish.jersey.client.ClientResponse; -import org.json.simple.JSONArray; -import org.json.simple.JSONObject; -import org.json.simple.parser.JSONParser; -import org.openecomp.vid.model.ExceptionResponse; -import org.openecomp.vid.mso.*; -import org.openecomp.vid.mso.rest.*; -import org.springframework.http.HttpStatus; -//import org.springframework.http.ResponseEntity; -//import org.springframework.http.RequestEntity; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.ExceptionHandler; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.RestController; -import org.springframework.web.servlet.ModelAndView; - -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.util.SystemProperties; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.ObjectReader; -import com.fasterxml.jackson.databind.DeserializationFeature; - -/** - * The Class MsoController. - */ -@RestController -@RequestMapping("mso") -public class MsoController extends RestrictedBaseController { - - /** - * The view name. - */ - String viewName; - - /** - * The logger. - */ - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(MsoController.class); - - /** - * The Constant dateFormat. - */ - final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); - - /** - * The Constant SVC_INSTANCE_ID. - */ - public final static String SVC_INSTANCE_ID = ""; - public final static String REQUEST_TYPE = ""; - - /** - * The Constant VNF_INSTANCE_ID. - */ - public final static String VNF_INSTANCE_ID = ""; - - /** - * Welcome. - * - * @param request the request - * @return the model and view - - public ModelAndView welcome(HttpServletRequest request) { - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== MsoController welcome start"); - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + " MSO_SERVER_URL=" + - SystemProperties.getProperty(MsoProperties.MSO_SERVER_URL) ); - return new ModelAndView(getViewName()); - } - */ - - /* (non-Javadoc) - * @see org.openecomp.portalsdk.core.controller.RestrictedBaseController#getViewName() - - public String getViewName() { - return viewName; - } - */ - - /* (non-Javadoc) - * @see org.openecomp.portalsdk.core.controller.RestrictedBaseController#setViewName(java.lang.String) - - public void setViewName(String viewName) { - this.viewName = viewName; - } - */ - - /** - * Creates the svc instance. - * - * @param request the request - * @return the response entity - * @throws Exception the exception - */ - @RequestMapping(value = "/mso_create_svc_instance", method = RequestMethod.POST) - public ResponseEntity createSvcInstance(HttpServletRequest request, @RequestBody RequestDetails mso_request) throws Exception { - String methodName = "createSvcInstance"; - - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - - MsoBusinessLogic mbl = new MsoBusinessLogic(); - // always return OK, the MSO status code is embedded in the body - - MsoResponseWrapper w = mbl.createSvcInstance(mso_request); - - return (new ResponseEntity(w.getResponse(), HttpStatus.OK)); - - } - - - /** - * Creates the svc instance. - * - * @param request the request - * @return the response entity - * @throws Exception the exception - */ - - public ResponseEntity createSvcInstanceNewRest(HttpServletRequest request, @RequestBody RequestDetails mso_request) throws Exception { - String methodName = "createSvcInstance"; - - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - - MsoBusinessLogicNew mbln = new MsoBusinessLogicNew(); - - // always return OK, the MSO status code is embedded in the body - - MsoResponseWrapper w = mbln.createSvcInstanceRest(mso_request); - - if (w == null) { - return null; - } - return (new ResponseEntity(w.getResponse(), HttpStatus.OK)); - - } - - /** - * Creates the svc instance. - * - * @param request the request - * @return the response entity - * @throws Exception the exception - */ - - public ResponseEntity createSvcInstanceNew(HttpServletRequest request, @RequestBody RequestDetails mso_request) throws Exception { - String methodName = "createSvcInstance"; - - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - - MsoBusinessLogicNew mbln = new MsoBusinessLogicNew(); - // always return OK, the MSO status code is embedded in the body - - MsoResponseWrapper w = mbln.createSvcInstance(mso_request); - - if (w == null) { - return null; - } - - return (new ResponseEntity(w.getResponse(), HttpStatus.OK)); - - } - - /** - * Creates the vnf. - * - * @param serviceInstanceId the service instance id - * @param request the request - * @return the response entity - * @throws Exception the exception - */ - @RequestMapping(value = "/mso_create_vnf_instance/{serviceInstanceId}", method = RequestMethod.POST) - public ResponseEntity createVnf(@PathVariable("serviceInstanceId") String serviceInstanceId, HttpServletRequest request, @RequestBody RequestDetails mso_request) throws Exception { - - MsoBusinessLogic mbl = new MsoBusinessLogic(); - - MsoResponseWrapper w = mbl.createVnf(mso_request, serviceInstanceId); - - // always return OK, the MSO status code is embedded in the body - - return (new ResponseEntity(w.getResponse(), HttpStatus.OK)); - - } - - /** - * Creates the nw instance. - * - * @param serviceInstanceId the service instance id - * @param request the request - * @return the response entity - * @throws Exception the exception - */ - @RequestMapping(value = "/mso_create_nw_instance/{serviceInstanceId}", method = RequestMethod.POST) - public ResponseEntity createNwInstance(@PathVariable("serviceInstanceId") String serviceInstanceId, HttpServletRequest request, @RequestBody RequestDetails mso_request) throws Exception { - String methodName = "createNwInstance"; - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start, serviceInstanceId = " + serviceInstanceId); - - MsoBusinessLogic mbl = new MsoBusinessLogic(); - - MsoResponseWrapper w = mbl.createNwInstance(mso_request, serviceInstanceId); - - return (new ResponseEntity(w.getResponse(), HttpStatus.OK)); - - } - - /** - * Creates the volume group instance. - * - * @param serviceInstanceId the service instance id - * @param vnfInstanceId the vnf instance id - * @param request the request - * @return the response entity - * @throws Exception the exception - */ - @RequestMapping(value = "/mso_create_volumegroup_instance/{serviceInstanceId}/vnfs/{vnfInstanceId}", method = RequestMethod.POST) - public ResponseEntity createVolumeGroupInstance(@PathVariable("serviceInstanceId") String serviceInstanceId, @PathVariable("vnfInstanceId") String vnfInstanceId, - HttpServletRequest request, @RequestBody RequestDetails mso_request) throws Exception { - String methodName = "createVolumeGroupInstance"; - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - - MsoBusinessLogic mbl = new MsoBusinessLogic(); - - MsoResponseWrapper w = mbl.createVolumeGroupInstance(mso_request, serviceInstanceId, vnfInstanceId); - - // always return OK, the MSO status code is embedded in the body - return (new ResponseEntity(w.getResponse(), HttpStatus.OK)); - } - - /** - * Creates the vf module instance. - * - * @param serviceInstanceId the service instance id - * @param vnfInstanceId the vnf instance id - * @param request the request - * @return the response entity - * @throws Exception the exception - */ - @RequestMapping(value = "/mso_create_vfmodule_instance/{serviceInstanceId}/vnfs/{vnfInstanceId}", method = RequestMethod.POST) - public ResponseEntity createVfModuleInstance(@PathVariable("serviceInstanceId") String serviceInstanceId, - @PathVariable("vnfInstanceId") String vnfInstanceId, HttpServletRequest request, @RequestBody RequestDetails mso_request) throws Exception { - String methodName = "createVfModuleInstance"; - - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - - MsoBusinessLogic mbl = new MsoBusinessLogic(); - - MsoResponseWrapper w = mbl.createVfModuleInstance(mso_request, serviceInstanceId, vnfInstanceId); - - // always return OK, the MSO status code is embedded in the body - - return (new ResponseEntity(w.getResponse(), HttpStatus.OK)); - } - - /** - * Creates the instance. - * - * @param request the request - * @param path the path - * @return the mso response wrapper - * @throws ClientHandlerException the client handler exception - * @throws Exception the exception - */ - protected MsoResponseWrapper createInstance(RequestDetails request, String path) throws Exception { - String methodName = "createInstance"; - logger.debug(dateFormat.format(new Date()) + "<== " + methodName + " start"); - - try { - MsoRestInterfaceIfc restController = new MsoRestInterface(); - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " calling Post, request = (" + request + ")"); - - RestObject restObjStr = new RestObject(); - String str = new String(); - restObjStr.set(str); - restController.Post(str, request, "", path, restObjStr); - MsoResponseWrapper w = MsoUtil.wrapResponse(restObjStr); - - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " w=" + w.getResponse()); - return w; - } catch (Exception e) { - logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); - throw e; - } - } - - /** - * Delete svc instance. - * - * @param serviceInstanceId the service instance id - * @param request the request - * @return the response entity - * @throws Exception the exception - */ - @RequestMapping(value = "/mso_delete_svc_instance/{serviceInstanceId}", method = RequestMethod.POST) - public ResponseEntity deleteSvcInstance(@PathVariable("serviceInstanceId") String serviceInstanceId, - HttpServletRequest request, @RequestBody RequestDetails mso_request) throws Exception { - - String methodName = "deleteSvcInstance"; - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - - MsoBusinessLogic mbl = new MsoBusinessLogic(); - - MsoResponseWrapper w = mbl.deleteSvcInstance(mso_request, serviceInstanceId); - - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " w=" + w.getResponse()); - // always return OK, the MSO status code is embedded in the body - - return (new ResponseEntity(w.getResponse(), HttpStatus.OK)); - - } - - /** - * Delete vnf. - * - * @param serviceInstanceId the service instance id - * @param vnfInstanceId the vnf instance id - * @param request the request - * @return the response entity - * @throws Exception the exception - */ - @RequestMapping(value = "/mso_delete_vnf_instance/{serviceInstanceId}/vnfs/{vnfInstanceId}", method = RequestMethod.POST) - - public ResponseEntity deleteVnf(@PathVariable("serviceInstanceId") String serviceInstanceId, @PathVariable("vnfInstanceId") String vnfInstanceId, - HttpServletRequest request, @RequestBody RequestDetails mso_request) throws Exception { - String methodName = "deleteVnf"; - - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - - MsoBusinessLogic mlb = new MsoBusinessLogic(); - - MsoResponseWrapper w = mlb.deleteVnf(mso_request, serviceInstanceId, vnfInstanceId); - - // always return OK, the MSO status code is embedded in the body - return (new ResponseEntity(w.getResponse(), HttpStatus.OK)); - - } - - /** - * Delete vf module. - * - * @param serviceInstanceId the service instance id - * @param vnfInstanceId the vnf instance id - * @param vfModuleId the vf module id - * @param request the request - * @return the response entity - * @throws Exception the exception - */ - //mso_delete_vf_module/bc305d54-75b4-431b-adb2-eb6b9e546014/vnfs/fe9000-0009-9999/vfmodules/abeeee-abeeee-abeeee - @RequestMapping(value = "/mso_delete_vfmodule_instance/{serviceInstanceId}/vnfs/{vnfInstanceId}/vfModules/{vfModuleId}", method = RequestMethod.POST) - public ResponseEntity deleteVfModule( - @PathVariable("serviceInstanceId") String serviceInstanceId, @PathVariable("vnfInstanceId") String vnfInstanceId, - @PathVariable("vfModuleId") String vfModuleId, HttpServletRequest request, @RequestBody RequestDetails mso_request) throws Exception { - - String methodName = "deleteVfModule"; - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - - MsoBusinessLogic mbl = new MsoBusinessLogic(); - - MsoResponseWrapper w = mbl.deleteVfModule(mso_request, serviceInstanceId, vnfInstanceId, vfModuleId); - - // always return OK, the MSO status code is embedded in the body - return (new ResponseEntity(w.getResponse(), HttpStatus.OK)); - - } - - /** - * Delete volume group instance. - * - * @param serviceInstanceId the service instance id - * @param vnfInstanceId the vnf instance id - * @param volumeGroupId the volume group id - * @param request the request - * @return the response entity - * @throws Exception the exception - */ - @RequestMapping(value = "/mso_delete_volumegroup_instance/{serviceInstanceId}/vnfs/{vnfInstanceId}/volumeGroups/{volumeGroupId}", method = RequestMethod.POST) - public ResponseEntity deleteVolumeGroupInstance( - @PathVariable("serviceInstanceId") String serviceInstanceId, @PathVariable("vnfInstanceId") String vnfInstanceId, @PathVariable("volumeGroupId") String volumeGroupId, - HttpServletRequest request, @RequestBody RequestDetails mso_request) throws Exception { - String methodName = "deleteVolumeGroupInstance"; - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - - MsoBusinessLogic mbl = new MsoBusinessLogic(); - - MsoResponseWrapper w = mbl.deleteVolumeGroupInstance(mso_request, serviceInstanceId, vnfInstanceId, volumeGroupId); - - // always return OK, the MSO status code is embedded in the body - return (new ResponseEntity(w.getResponse(), HttpStatus.OK)); - } - - /** - * Delete nw instance. - * - * @param serviceInstanceId the service instance id - * @param networkInstanceId the network instance id - * @param request the request - * @return the response entity - * @throws Exception the exception - */ - @RequestMapping(value = "/mso_delete_nw_instance/{serviceInstanceId}/networks/{networkInstanceId}", method = RequestMethod.POST) - public ResponseEntity deleteNwInstance(@PathVariable("serviceInstanceId") String serviceInstanceId, - @PathVariable("networkInstanceId") String networkInstanceId, HttpServletRequest request, @RequestBody RequestDetails mso_request) throws Exception { - String methodName = "deleteNwInstance"; - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - - MsoBusinessLogic mbl = new MsoBusinessLogic(); - - MsoResponseWrapper w = mbl.deleteNwInstance(mso_request, serviceInstanceId, networkInstanceId); - - // always return OK, the MSO status code is embedded in the body - return (new ResponseEntity(w.getResponse(), HttpStatus.OK)); - - } - - /** - * Gets the orchestration request. - * - * @param requestId the request id - * @param request the request - * @return the orchestration request - * @throws Exception the exception - */ - @RequestMapping(value = "/mso_get_orch_req/{requestId}", method = RequestMethod.GET) - public ResponseEntity getOrchestrationRequest(@PathVariable("requestId") String requestId, - HttpServletRequest request) throws Exception { - - String methodName = "getOrchestrationRequest"; - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - - - MsoBusinessLogic mbl = new MsoBusinessLogic(); - - MsoResponseWrapper w = mbl.getOrchestrationRequest(requestId); - - // always return OK, the MSO status code is embedded in the body - return (new ResponseEntity(w.getResponse(), HttpStatus.OK)); - } - - - /** - * Gets the orchestration requests. - * - * @param filterString the filter string - * @param request the request - * @return the orchestration requests - * @throws Exception the exception - */ - @RequestMapping(value = "/mso_get_orch_reqs/{filterString}", method = RequestMethod.GET) - public ResponseEntity getOrchestrationRequests(@PathVariable("filterString") String filterString, - HttpServletRequest request) throws Exception { - - String methodName = "getOrchestrationRequests"; - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - - - MsoBusinessLogic mbl = new MsoBusinessLogic(); - - MsoResponseWrapper w = mbl.getOrchestrationRequests(filterString); - - // always return OK, the MSO status code is embedded in the body - return (new ResponseEntity(w.getResponse(), HttpStatus.OK)); - } - - - /** - * activate to a pnf instance. - * - * @param serviceInstanceId the id of the service. - * @param requestDetails the body of the request. - * @return the response entity - * @throws Exception the exception - */ - @RequestMapping(value = "/mso_activate_service_instance/{serviceInstanceId}", method = RequestMethod.POST) - public ResponseEntity activateServiceInstance(@PathVariable("serviceInstanceId") String serviceInstanceId, @RequestBody RequestDetails requestDetails) throws Exception { - String methodName = "activateServiceInstance"; - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - - MsoBusinessLogic mbl = new MsoBusinessLogic(); - - MsoResponseWrapper w = mbl.activateServiceInstance(requestDetails, serviceInstanceId); - return new ResponseEntity<>(w.getResponse(), HttpStatus.OK); - } - - - /** - * Gets the orchestration requests for the dashboard. - * currently its all the orchestration requests with RequestType updateInstance or replaceInstance. - * @return the orchestration requests - * @throws Exception the exception - */ - @RequestMapping(value = "/mso_get_orch_reqs/dashboard", method = RequestMethod.GET) - public List getOrchestrationRequestsForDashboard() throws Exception { - - String methodName = "getOrchestrationRequestsForDashboard"; - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - - - MsoBusinessLogic mbl = new MsoBusinessLogic(); - - return mbl.getOrchestrationRequestsForDashboard(); - } - - /** - * Gets the Manual Tasks for the given request id. - * - * @param originalRequestId the id of the original request. - * @return the tasks - * @throws Exception the exception - */ - @RequestMapping(value = "/mso_get_man_task/{originalRequestId}", method = RequestMethod.GET) - public List getManualTasksByRequestId(@PathVariable("originalRequestId") String originalRequestId) throws Exception { - - String methodName = "getManualTasksByRequestId"; - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - - - MsoBusinessLogic mbl = new MsoBusinessLogic(); - - return mbl.getManualTasksByRequestId(originalRequestId); - } - - - - /** - * Complete the manual task. - * - * @param taskId the id of the task to complete. - * @param requestDetails the body of the request. - * @return the response entity - * @throws Exception the exception - */ - @RequestMapping(value = "/mso_post_man_task/{taskId}", method = RequestMethod.POST) - public ResponseEntity manualTaskComplete(@PathVariable("taskId") String taskId , @RequestBody RequestDetails requestDetails) throws Exception { - - String methodName = "manualTaskComplete"; - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - - MsoBusinessLogic mbl = new MsoBusinessLogic(); - - MsoResponseWrapper w = mbl.completeManualTask(requestDetails, taskId); - return new ResponseEntity(w.getResponse(), HttpStatus.OK); - } - - - - - - /** - * Gets the orchestration requests for svc instance. - * - * @param svc_instance_id the svc instance id - * @return the orchestration requests for svc instance - * @throws Exception the exception - */ -// public MsoResponseWrapper getOrchestrationRequestsForSvcInstance(String svc_instance_id) throws Exception { - -// String methodName = "getOrchestrationRequestsForSvcInstance"; -// logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); -// MsoResponseWrapper w = null; -// -// try { -// MsoRestInterfaceIfc restController = MsoRestInterfaceFactory.getInstance(); -// String p = SystemProperties.getProperty(MsoProperties.MSO_REST_API_GET_ORC_REQS); -// String path = p + svc_instance_id; -// -// RestObject restObjStr = new RestObject(); -// String str = new String(); -// restObjStr.set(str); -// -// restController.Get(str, "", path, restObjStr); -// w = MsoUtil.wrapResponse(restObjStr); -// logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " w=" + w.getResponse()); -// -// } catch (Exception e) { -// logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); -// logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); -// throw e; -// } -// return w; -// } - - /** - * Exception handler. - * - * @param e the e - * @param response the response - * @throws IOException Signals that an I/O exception has occurred. - */ - @ExceptionHandler(Exception.class) - private void exceptionHandler(Exception e, HttpServletResponse response) throws IOException { - - /* - * The following "logger.error" lines "should" be sufficient for logging the exception. - * However, the console output in my Eclipse environment is NOT showing ANY of the - * logger statements in this class. Thus the temporary "e.printStackTrace" statement - * is also included. - */ - - String methodName = "exceptionHandler"; - logger.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); - StringWriter sw = new StringWriter(); - e.printStackTrace(new PrintWriter(sw)); - logger.error(EELFLoggerDelegate.errorLogger, sw.toString()); - - /* - * Temporary - IF the above mentioned "logger.error" glitch is resolved ... - * this statement could be removed since it would then likely result in duplicate - * trace output. - */ - e.printStackTrace(System.err); - - response.setContentType("application/json; charset=UTF-8"); - response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); - - ExceptionResponse exceptionResponse = new ExceptionResponse(); - exceptionResponse.setException(e.getClass().toString().replaceFirst("^.*\\.", "")); - exceptionResponse.setMessage(e.getMessage()); - - response.getWriter().write(new ObjectMapper().writeValueAsString(exceptionResponse)); - - response.flushBuffer(); - - } - - /** - * Parses the orchestration requests for svc instance. - * - * @param resp the resp - * @return the list - * @throws ParseException the parse exception - * @throws Exception the exception - */ - @SuppressWarnings("unchecked") - public List parseOrchestrationRequestsForSvcInstance(ClientResponse resp) throws org.json.simple.parser.ParseException, Exception { - - String methodName = "parseOrchestrationRequestsForSvcInstance"; - - ArrayList json_list = new ArrayList(); - - String rlist_str = resp.readEntity(String.class); - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + " Response string: " + rlist_str); - - JSONParser parser = new JSONParser(); - try { - Object obj = parser.parse(rlist_str); - - JSONObject jsonObject = (JSONObject) obj; - - JSONArray requestList = (JSONArray) jsonObject.get("requestList"); - - if (requestList != null && !(requestList.isEmpty())) - for (Object container : requestList) { - - JSONObject containerJsonObj = (JSONObject) container; - //logger.debug(dateFormat.format(new Date()) + "<== " + "." + methodName + " reqJsonObj: " + containerJsonObj.toJSONString()); - JSONObject reqJsonObj = (JSONObject) containerJsonObj.get("request"); - - //logger.debug(dateFormat.format(new Date()) + "<== " + "." + methodName + " reqJsonObj.requestId: " + - // reqJsonObj.get("requestId") ); - JSONObject result = new JSONObject(); - - result.put("requestId", reqJsonObj.get("requestId")); - if (reqJsonObj.get("requestType") != null) { - result.put("requestType", (reqJsonObj.get("requestType").toString())); - } - JSONObject req_status = (JSONObject) reqJsonObj.get("requestStatus"); - if (req_status != null) { - result.put("timestamp", (req_status.get("timestamp"))); - result.put("requestState", (req_status.get("requestState"))); - result.put("statusMessage", (req_status.get("statusMessage"))); - result.put("percentProgress", (req_status.get("percentProgress"))); - } - json_list.add(result); - } - } catch (org.json.simple.parser.ParseException pe) { - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + " Parse exception: " + pe.toString()); - throw pe; - } catch (Exception e) { - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + " Exception: " + e.toString()); - throw e; - } - return (json_list); - } - - /** - * Retrieve request object. - * - * @param request the request - * @return the request details - * @throws Exception the exception - */ - public RequestDetails retrieveRequestObject(HttpServletRequest request, @RequestBody RequestDetails mso_request) throws Exception { - - String methodName = "retrieveRequestObject"; - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - - ObjectMapper mapper = new ObjectMapper(); - //JSON from String to Object - //RequestDetails mso_request; - - try { - //mso_request = new RequestDetails(); - //mso_request = mapper.readValue(request.getInputStream(), RequestDetails.class); - } catch (Exception e) { - logger.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + methodName + " Unable to read json object RequestDetails e=" + e.getMessage()); - throw e; - } - if (mso_request == null) { - logger.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + methodName + " mso_request is null"); - throw new Exception("RequestDetails is missing"); - } - try { - String json_req = mapper.writeValueAsString(mso_request); - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " request=[" + json_req + "]"); - } catch (Exception e) { - logger.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + methodName + " Unable to convert RequestDetails to json string e=" + e.getMessage()); - throw e; - } - return (mso_request); - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/controller/PolicyController.java b/vid-app-common/src/main/java/org/openecomp/vid/controller/PolicyController.java deleted file mode 100644 index 83e177a61..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/controller/PolicyController.java +++ /dev/null @@ -1,90 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.controller; - -import java.util.UUID; - -import javax.servlet.http.HttpServletRequest; - -import org.json.simple.JSONObject; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.vid.policy.PolicyProperties; -import org.openecomp.vid.policy.PolicyResponseWrapper; -import org.openecomp.vid.policy.PolicyRestInterfaceFactory; -import org.openecomp.vid.policy.PolicyRestInterfaceIfc; -import org.openecomp.vid.policy.PolicyUtil; -import org.openecomp.vid.policy.RestObject; -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.RestController; - -/** - * Controller to handle Policy requests. - */ - -@RestController -public class PolicyController extends RestrictedBaseController{ - - /** The logger. */ - static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(PolicyController.class); - - @RequestMapping(value="/get_policy",method = RequestMethod.POST) - public ResponseEntity getPolicyInfo( HttpServletRequest request, @RequestBody JSONObject policy_request) throws Exception { - - logger.debug("#####################POLICY API CALL STARTED ###############"+ PolicyProperties.POLICY_GET_CONFIG_VAL); - logger.debug("#####################Policy Request ###############"+policy_request.toString()); - - String path = PolicyProperties.getProperty(PolicyProperties.POLICY_GET_CONFIG_VAL); - PolicyResponseWrapper policyResWrapper = getPolicyConfig(policy_request,path); - - logger.debug("$$$$$$$$$$$$$$$$$$$$$$ " + new ResponseEntity(policyResWrapper.getResponse(), HttpStatus.OK).toString()); - - return ( new ResponseEntity(policyResWrapper.getResponse(), HttpStatus.valueOf(policyResWrapper.getStatus())) ); - } - - protected static PolicyResponseWrapper getPolicyConfig(JSONObject request, String path) throws Exception { - String methodName = "getPolicyConfig"; - String uuid = UUID.randomUUID().toString(); - logger.debug( "starting getPolicyConfig "); - - try { - //STARTING REST API CALL AS AN FACTORY INSTACE - PolicyRestInterfaceIfc restController = PolicyRestInterfaceFactory.getInstance(); - - RestObject restObjStr = new RestObject(); - String str = new String(); - restObjStr.set(str); - restController.Post(str, request, uuid, path, restObjStr ); - PolicyResponseWrapper policyRespWrapper = PolicyUtil.wrapResponse (restObjStr); - - logger.debug( "<== " + methodName + " w=" + policyRespWrapper.getResponse()); - return policyRespWrapper; - } catch (Exception e) { - logger.debug( "EXCEPTION in getPolicyConfig <== " + "." + methodName + e.toString()); - throw e; - } - } -} - diff --git a/vid-app-common/src/main/java/org/openecomp/vid/controller/PropertyController.java b/vid-app-common/src/main/java/org/openecomp/vid/controller/PropertyController.java deleted file mode 100755 index 90080769b..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/controller/PropertyController.java +++ /dev/null @@ -1,122 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.controller; - -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.Date; - -import javax.servlet.http.HttpServletRequest; - -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.RestController; -import org.springframework.web.servlet.ModelAndView; - -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.util.SystemProperties; - -/** - * The Class PropertyController. - */ -@RestController -public class PropertyController extends RestrictedBaseController{ - - /** The view name. */ - String viewName; - - /** The logger. */ - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(PropertyController.class); - - /** The Constant dateFormat. */ - final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); - - /** - * Welcome. - * - * @param request the request - * @return the model and view - */ - @RequestMapping(value = {"/propertyhome" }, method = RequestMethod.GET) - public ModelAndView welcome(HttpServletRequest request) { - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== PropertyController welcome start"); - return new ModelAndView(getViewName()); - } - - /* (non-Javadoc) - * @see org.openecomp.portalsdk.core.controller.RestrictedBaseController#getViewName() - */ - public String getViewName() { - return viewName; - } - - /* (non-Javadoc) - * @see org.openecomp.portalsdk.core.controller.RestrictedBaseController#setViewName(java.lang.String) - */ - public void setViewName(String _viewName) { - this.viewName = _viewName; - } - - /** - * Gets the property. - * - * @param name the name - * @param defaultvalue the defaultvalue - * @param request the request - * @return the property - * @throws Exception the exception - */ - @RequestMapping(value = "/get_property/{name}/{defaultvalue}", method = RequestMethod.GET) - public ResponseEntity getProperty (@PathVariable("name") String name, @PathVariable("defaultvalue") String defaultvalue, - HttpServletRequest request) throws Exception { - - String methodName = "getProperty"; - ResponseEntity resp = null; - String pvalue = null; - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - - try { - // convert "_" to "." in the property name - if (name == null || name.length() == 0 ) { - return ( new ResponseEntity (defaultvalue, HttpStatus.OK)); - } - // convert "_" to "." in the property name - String propertyName = name.replace('_', '.'); - pvalue = SystemProperties.getProperty(propertyName); - if ( ( pvalue == null ) || ( pvalue.length() == 0 ) ) { - pvalue = defaultvalue; - } - resp = new ResponseEntity(pvalue, HttpStatus.OK); - } - catch (Exception e) { - logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); - throw e; - } - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " returning " + pvalue); - return ( resp ); - } - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/controller/SchedulerController.java b/vid-app-common/src/main/java/org/openecomp/vid/controller/SchedulerController.java deleted file mode 100644 index 0fd2079e9..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/controller/SchedulerController.java +++ /dev/null @@ -1,244 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.controller; - -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.UUID; - -import javax.servlet.http.HttpServletRequest; - -import org.json.simple.JSONObject; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.RestController; - -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.util.SystemProperties; -import org.openecomp.vid.scheduler.RestObjects.GetTimeSlotsRestObject; -import org.openecomp.vid.scheduler.RestObjects.PostCreateNewVnfRestObject; -import org.openecomp.vid.scheduler.RestObjects.PostSubmitVnfChangeRestObject; -import org.openecomp.vid.scheduler.SchedulerProperties; -import org.openecomp.vid.scheduler.SchedulerRestInterface; -import org.openecomp.vid.scheduler.SchedulerResponseWrappers.GetTimeSlotsWrapper; -import org.openecomp.vid.scheduler.SchedulerResponseWrappers.PostCreateNewVnfWrapper; -import org.openecomp.vid.scheduler.SchedulerResponseWrappers.PostSubmitVnfChangeTimeSlotsWrapper; -import org.openecomp.vid.scheduler.SchedulerUtil; - -/** - * Controller to handle Scheduler requests. - */ - -@RestController -public class SchedulerController extends RestrictedBaseController { - - static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(SchedulerController.class); - - /** The request date format. */ - public DateFormat requestDateFormat = new SimpleDateFormat("EEE, dd MMM YYYY HH:mm:ss z"); - - @Autowired - private SchedulerRestInterface restController; - - /* - * - * GET SCHEDULER CONTROLLERS - * - */ - - @RequestMapping(value = "/get_time_slots/{scheduler_request}", method = RequestMethod.GET) - public ResponseEntity getTimeSlots(HttpServletRequest request, @PathVariable("scheduler_request") String scheduler_request) throws Exception { - - Date startingTime = new Date(); - String startTimeRequest = requestDateFormat.format(startingTime); - - System.out.println("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"); - System.out.println(startTimeRequest + " | Controller Scheduler GET : /get_time_slots/{scheduler_request} \n"); - System.out.println("Original Request : \n " + scheduler_request + '\n'); - - String path = SystemProperties.getProperty(SchedulerProperties.SCHEDULER_GET_TIME_SLOTS) + scheduler_request; - - GetTimeSlotsWrapper schedulerResWrapper = getTimeSlots(scheduler_request, path, scheduler_request); - - Date endTime = new Date(); - String endTimeRequest = requestDateFormat.format(endTime); - System.out.println(endTimeRequest + " | Controller Scheduler - GET\n"); - - return (new ResponseEntity(schedulerResWrapper.getResponse(), HttpStatus.OK)); - - } - - protected GetTimeSlotsWrapper getTimeSlots(String request, String path, String uuid) throws Exception { - - try { - //STARTING REST API CALL AS AN FACTORY INSTACE - System.out.println("<== Get Time Slots Request START \n"); - - GetTimeSlotsRestObject restObjStr = new GetTimeSlotsRestObject(); - String str = new String(); - - restObjStr.set(str); - - restController.Get(str, uuid, path, restObjStr); - GetTimeSlotsWrapper schedulerRespWrapper = SchedulerUtil.getTimeSlotsWrapResponse(restObjStr); - - System.out.println("<== Get Time Slots Request END : Response = " + schedulerRespWrapper.getResponse() + '\n'); - - return schedulerRespWrapper; - - } catch (Exception e) { - System.out.println("<== Get Time Slots Request ERROR : " + e.toString() + '\n'); - throw e; - } - } - - /* - * - * POST SCHEDULER CONTROLLERS - * - */ - - @SuppressWarnings("unchecked") - @RequestMapping(value = "/post_create_new_vnf_change", method = RequestMethod.POST) - public ResponseEntity postCreateNewVNFChange(HttpServletRequest request, @RequestBody JSONObject scheduler_request) throws Exception { - - Date startingTime = new Date(); - String startTimeRequest = requestDateFormat.format(startingTime); - - System.out.println("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"); - System.out.println(startTimeRequest + " | Controller Scheduler POST : post_create_new_vnf_change \n"); - - //Generating uuid - String uuid = UUID.randomUUID().toString(); - - scheduler_request.put("scheduleId", uuid); - System.out.println("<== UUID : " + uuid + '\n'); - - //adding uuid to the request payload - scheduler_request.put("scheduleId", uuid); - - System.out.println("<== UUID : " + uuid + '\n'); - System.out.println("Original Request : \n " + scheduler_request.toString() + '\n'); - - String path = SystemProperties.getProperty(SchedulerProperties.SCHEDULER_CREATE_NEW_VNF_CHANGE_INSTANCE_VAL) + uuid; - - PostCreateNewVnfWrapper responseWrapper = postSchedulingRequest(scheduler_request, path, uuid); - - Date endTime = new Date(); - String endTimeRequest = requestDateFormat.format(endTime); - System.out.println(endTimeRequest + " | Controller Scheduler - POST\n"); - - return (new ResponseEntity(responseWrapper.getResponse(), HttpStatus.OK)); - } - - protected PostCreateNewVnfWrapper postSchedulingRequest(JSONObject request, String path, String uuid) throws Exception { - - try { - //STARTING REST API CALL AS AN FACTORY INSTACE - System.out.println("<== Post Create New Vnf Scheduling Request START \n"); - - PostCreateNewVnfRestObject restObjStr = new PostCreateNewVnfRestObject(); - String str = new String(); - - restObjStr.set(str); - restController.Post(str, request, path, restObjStr); - - int status = restObjStr.getStatusCode(); - if (status >= 200 && status <= 299) { - restObjStr.setUUID(uuid); - } - - PostCreateNewVnfWrapper responseWrapper = SchedulerUtil.postCreateNewVnfWrapResponse(restObjStr); - - System.out.println("<== Post Create New Vnf Scheduling Request END : Response = " + responseWrapper.getResponse() + '\n'); - - return responseWrapper; - - } catch (Exception e) { - System.out.println("<== Post Create New Vnf Scheduling Request ERROR : " + e.toString() + '\n'); - throw e; - } - } - - @RequestMapping(value = "/submit_vnf_change_timeslots", method = RequestMethod.POST) - public ResponseEntity postSubmitVnfChangeTimeslots(HttpServletRequest request, @RequestBody JSONObject scheduler_request) throws Exception { - - Date startingTime = new Date(); - String startTimeRequest = requestDateFormat.format(startingTime); - - System.out.println("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"); - System.out.println(startTimeRequest + " | Controller Scheduler POST : submit_vnf_change_timeslots \n"); - - //Generating uuid - String uuid = (String) scheduler_request.get("scheduleId"); - scheduler_request.remove("scheduleId"); - - System.out.println("<== UUID : " + uuid + '\n'); - System.out.println("Original Request : \n " + scheduler_request.toString() + '\n'); - - String path = SystemProperties.getProperty(SchedulerProperties.SCHEDULER_SUBMIT_NEW_VNF_CHANGE).replace("{scheduleId}", uuid); - - PostSubmitVnfChangeTimeSlotsWrapper responseWrapper = postSubmitSchedulingRequest(scheduler_request, path, uuid); - - Date endTime = new Date(); - String endTimeRequest = requestDateFormat.format(endTime); - System.out.println(endTimeRequest + " | Controller Scheduler - POST Submit\n"); - - return (new ResponseEntity(responseWrapper.getResponse(), HttpStatus.OK)); - } - - protected PostSubmitVnfChangeTimeSlotsWrapper postSubmitSchedulingRequest(JSONObject request, String path, String uuid) throws Exception { - - try { - //STARTING REST API CALL AS AN FACTORY INSTACE - System.out.println("<== Post Submit Scheduling Request START \n"); - - PostSubmitVnfChangeRestObject restObjStr = new PostSubmitVnfChangeRestObject(); - String str = new String(); - - restObjStr.set(str); - restController.Post(str, request, path, restObjStr); - - int status = restObjStr.getStatusCode(); - if (status >= 200 && status <= 299) { - restObjStr.setUUID(uuid); - } - - PostSubmitVnfChangeTimeSlotsWrapper responseWrapper = SchedulerUtil.postSubmitNewVnfWrapResponse(restObjStr); - - System.out.println("<== Post Submit Scheduling Request END : Response = " + responseWrapper.getResponse() + '\n'); - - return responseWrapper; - - } catch (Exception e) { - System.out.println("<== Post Submit Scheduling Request ERROR : " + e.toString() + '\n'); - throw e; - } - } -} - diff --git a/vid-app-common/src/main/java/org/openecomp/vid/controller/VidController.java b/vid-app-common/src/main/java/org/openecomp/vid/controller/VidController.java deleted file mode 100755 index f21036eb3..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/controller/VidController.java +++ /dev/null @@ -1,119 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.controller; - -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.sdc.tosca.parser.exceptions.SdcToscaParserException; -import org.openecomp.vid.asdc.AsdcCatalogException; -import org.openecomp.vid.asdc.beans.SecureServices; -import org.openecomp.vid.exceptions.VidServiceUnavailableException; -import org.openecomp.vid.model.ServiceModel; -import org.openecomp.vid.roles.Role; -import org.openecomp.vid.roles.RoleProvider; -import org.openecomp.vid.roles.RoleValidator; -import org.openecomp.vid.services.VidService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.RestController; -import org.springframework.web.servlet.ModelAndView; - -import javax.servlet.http.HttpServletRequest; -import java.util.List; -import java.util.Map; - -//import org.openecomp.vid.model.Service; - -@RestController -public class VidController extends RestrictedBaseController { - - private static final EELFLoggerDelegate LOG = EELFLoggerDelegate.getLogger(VidController.class); - - private final VidService service; - - @Autowired - public VidController(VidService vidService) throws SdcToscaParserException{ - - service = vidService; - } -// - /** - * Gets the services. - * - * @param request the request - * @return the services - * @throws VidServiceUnavailableException the vid service unavailable exception - */ - @RequestMapping(value={"/rest/models/services"}, method = RequestMethod.GET) - public SecureServices getServices(HttpServletRequest request) throws VidServiceUnavailableException { - try { - LOG.info("Start API for browse ASDC was called"); - SecureServices secureServices = new SecureServices(); - RoleProvider roleProvider = new RoleProvider(); - Map requestParams = request.getParameterMap(); - List roles = new RoleProvider().getUserRoles(request); - secureServices.setServices(service.getServices(requestParams)); - //Disable roles until AAF integration finishes - //secureServices.setReadOnly(roleProvider.userPermissionIsReadOnly(roles)); - return secureServices; - } catch (AsdcCatalogException e) { - LOG.error("Failed to retrieve service definitions from SDC", e); - throw new VidServiceUnavailableException("Failed to retrieve service definitions from SDC", e); - } catch (Throwable t) { - LOG.debug("Unexpected error while retrieving service definitions from SDC: " + t.getMessage() + ":", t); - t.printStackTrace(); - throw new VidServiceUnavailableException("Unexpected error while retrieving service definitions from SDC: " + t.getMessage(), t); - } - } - - /** - * Gets the services. - * - * @param uuid the uuid - * @return the services - * @throws VidServiceUnavailableException the vid service unavailable exception - */ - @RequestMapping(value={"/rest/models/services/{uuid}"}, method = RequestMethod.GET) - public ServiceModel getServices(@PathVariable("uuid") String uuid, HttpServletRequest request) throws VidServiceUnavailableException { - try { -// RoleValidator roleValidator = new RoleValidator(new RoleProvider().getUserRoles(request)); - return service.getService(uuid); - } catch (AsdcCatalogException e) { - LOG.error("Failed to retrieve service definitions from SDC", e); - throw new VidServiceUnavailableException("Failed to retrieve service definitions from SDC", e); - } - } - - - /** - * Gets the services view. - * - * @param request the request - * @return the services view - * @throws VidServiceUnavailableException the vid service unavailable exception - */ - @RequestMapping(value={"/serviceModels"}, method=RequestMethod.GET) - public ModelAndView getServicesView(HttpServletRequest request) throws VidServiceUnavailableException { - return new ModelAndView("serviceModels"); - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/controller/ViewEditSubController.java b/vid-app-common/src/main/java/org/openecomp/vid/controller/ViewEditSubController.java deleted file mode 100755 index e23b99ba4..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/controller/ViewEditSubController.java +++ /dev/null @@ -1,107 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.controller; - - -import java.io.File; -import java.text.DateFormat; -import java.util.HashMap; -import java.util.Map; - - - - -import javax.servlet.ServletContext; -import javax.servlet.http.HttpServletRequest; - -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.RestController; -import org.springframework.web.servlet.ModelAndView; - -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; - - -/** - * The Class ViewEditSubController. - */ -@RestController -public class ViewEditSubController extends RestrictedBaseController{ - - /** The view name. */ - String viewName; - - /** The logger. */ - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ViewEditSubController.class); - - /** The model. */ - private Map model = new HashMap(); - - /** The servlet context. */ - private @Autowired ServletContext servletContext; - - /** - * Welcome. - * - * @param request the request - * @return the model and view - */ - @RequestMapping(value = {"/vieweditsub" }, method = RequestMethod.GET) - public ModelAndView welcome(HttpServletRequest request) { - return new ModelAndView("vieweditsub","model", model); - // return new ModelAndView(getViewName()); - } - - /** - * Post subscriber. - * - * @param request the request - */ - @RequestMapping(value="/vieweditsub/subedit", method = RequestMethod.POST) - public void PostSubscriber(HttpServletRequest request) { - - String subID = request.getParameter("subscriberID"); - model.put("subInfo", subID); - - } - - /* (non-Javadoc) - * @see org.openecomp.portalsdk.core.controller.RestrictedBaseController#getViewName() - */ - public String getViewName() { - return viewName; - } - - /* (non-Javadoc) - * @see org.openecomp.portalsdk.core.controller.RestrictedBaseController#setViewName(java.lang.String) - */ - public void setViewName(String viewName) { - this.viewName = viewName; - } - - - - -} - diff --git a/vid-app-common/src/main/java/org/openecomp/vid/controller/ViewLogController.java b/vid-app-common/src/main/java/org/openecomp/vid/controller/ViewLogController.java deleted file mode 100755 index 31e64983e..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/controller/ViewLogController.java +++ /dev/null @@ -1,84 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.controller; - -import java.text.DateFormat; -import java.text.SimpleDateFormat; - -import javax.servlet.ServletContext; -import javax.servlet.http.HttpServletRequest; - -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.springframework.beans.factory.annotation.Autowired; - -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.RestController; -import org.springframework.web.servlet.ModelAndView; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; - - -/** - * The Class ViewLogController. - */ -@RestController -public class ViewLogController extends RestrictedBaseController{ - - /** The view name. */ - String viewName; - - /** The logger. */ - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ViewLogController.class); - - /** The Constant dateFormat. */ - final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); - - /** The servlet context. */ - private @Autowired ServletContext servletContext; - - /** - * Welcome. - * - * @param request the request - * @return the model and view - */ - @RequestMapping(value = {"/viewlog" }, method = RequestMethod.GET) - public ModelAndView welcome(HttpServletRequest request) { - - return new ModelAndView(getViewName()); - } - - /* (non-Javadoc) - * @see org.openecomp.portalsdk.core.controller.RestrictedBaseController#getViewName() - */ - public String getViewName() { - return viewName; - } - - /* (non-Javadoc) - * @see org.openecomp.portalsdk.core.controller.RestrictedBaseController#setViewName(java.lang.String) - */ - public void setViewName(String viewName) { - this.viewName = viewName; - } - - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/controller/WebConfig.java b/vid-app-common/src/main/java/org/openecomp/vid/controller/WebConfig.java deleted file mode 100644 index 1e13d0eb6..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/controller/WebConfig.java +++ /dev/null @@ -1,122 +0,0 @@ -package org.openecomp.vid.controller; - -import com.fasterxml.jackson.databind.ObjectMapper; -import org.apache.commons.io.IOUtils; -import org.json.JSONObject; -import org.json.JSONTokener; -import org.openecomp.vid.aai.AaiClient; -import org.openecomp.vid.aai.AaiClientInterface; -import org.openecomp.vid.asdc.AsdcClient; -import org.openecomp.vid.asdc.local.LocalAsdcClient; -import org.openecomp.vid.asdc.memory.InMemoryAsdcClient; -import org.openecomp.vid.asdc.parser.ToscaParserImpl2; -import org.openecomp.vid.asdc.rest.RestfulAsdcClient; -import org.openecomp.vid.properties.AsdcClientConfiguration; -import org.openecomp.vid.properties.AsdcClientConfiguration.AsdcClientType; -import org.openecomp.vid.services.AaiService; -import org.openecomp.vid.services.AaiServiceImpl; -import org.openecomp.vid.services.VidService; -import org.openecomp.vid.services.VidServiceImpl; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -import javax.net.ssl.SSLContext; -import javax.ws.rs.client.Client; -import javax.ws.rs.client.ClientBuilder; -import java.io.IOException; -import java.io.InputStream; -import java.net.URI; -import java.net.URISyntaxException; -import java.security.KeyManagementException; -import java.security.NoSuchAlgorithmException; -import java.util.Arrays; - -@Configuration -public class WebConfig { - - /** - * Gets the object mapper. - * - * @return the object mapper - */ - @Bean - public ObjectMapper getObjectMapper() { - return new ObjectMapper(); - } - - - - @Bean - public VidService vidService(AsdcClient asdcClient) { - return new VidServiceImpl(asdcClient); - } - - @Bean - public AaiService getAaiService(){ - return new AaiServiceImpl(); - } - - @Bean - public AaiClientInterface getAaiClientInterface(){ - return new AaiClient(); - } - - @Bean - public AsdcClient asdcClient(AsdcClientConfiguration asdcClientConfig) throws IOException { - switch (asdcClientConfig.getAsdcClientType()) { - case IN_MEMORY: - final InputStream asdcCatalogFile = VidController.class.getClassLoader().getResourceAsStream("catalog.json"); - final JSONTokener tokener = new JSONTokener(asdcCatalogFile); - final JSONObject catalog = new JSONObject(tokener); - - return new InMemoryAsdcClient.Builder().catalog(catalog).build(); - case REST: - - final String protocol = asdcClientConfig.getAsdcClientProtocol(); - final String host = asdcClientConfig.getAsdcClientHost(); - final int port = asdcClientConfig.getAsdcClientPort(); - final String auth = asdcClientConfig.getAsdcClientAuth(); - Client cl = null; - if (protocol.equalsIgnoreCase("https")) { - try { - SSLContext ctx = SSLContext.getInstance("TLSv1.2"); - ctx.init(null, null, null); - cl = ClientBuilder.newBuilder().sslContext(ctx).build(); - } catch (NoSuchAlgorithmException n) { - throw new RuntimeException("SDC Client could not be instantiated due to unsupported protocol TLSv1.2", n); - } catch (KeyManagementException k) { - throw new RuntimeException("SDC Client could not be instantiated due to a key management exception", k); - } - } else { - cl = ClientBuilder.newBuilder().build(); - } - - try { - final URI uri = new URI(protocol + "://" + host + ":" + port + "/"); - return new RestfulAsdcClient.Builder(cl, uri) - .auth(auth) - .build(); - } catch (URISyntaxException e) { - throw new RuntimeException("SDC Client could not be instantiated due to a syntax error in the URI", e); - } - - case LOCAL: - - final InputStream asdcServicesFile = VidController.class.getClassLoader().getResourceAsStream("sdcservices.json"); - - final JSONTokener jsonTokener = new JSONTokener(IOUtils.toString(asdcServicesFile)); - final JSONObject sdcServicesCatalog = new JSONObject(jsonTokener); - - return new LocalAsdcClient.Builder().catalog(sdcServicesCatalog).build(); - - default: - throw new RuntimeException(asdcClientConfig.getAsdcClientType() + " is invalid; must be one of " + Arrays.toString(AsdcClientType.values())); - } - } - - @Bean - public ToscaParserImpl2 getToscaParser() { - return new ToscaParserImpl2(); - } - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/controller/test/TestAaiController.java b/vid-app-common/src/main/java/org/openecomp/vid/controller/test/TestAaiController.java deleted file mode 100755 index 79017410c..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/controller/test/TestAaiController.java +++ /dev/null @@ -1,93 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.controller.test; - -import java.io.IOException; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.codehaus.jackson.map.ObjectMapper; -import org.openecomp.vid.model.ExceptionResponse; -import org.springframework.web.bind.annotation.ExceptionHandler; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.RestController; - -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; - -/** - * The Class TestAaiController. - */ -@RestController -@RequestMapping("testaai") -public class TestAaiController extends RestrictedBaseController { - - /** - * Gets the subscription service type list. - * - * @param globalCustomerId the global customer id - * @param request the request - * @return the subscription service type list - * @throws Exception the exception - */ - @RequestMapping(value = "/getSubscriptionServiceTypeList/{globalCustomerId}", method = RequestMethod.GET) - public String getSubscriptionServiceTypeList(@PathVariable("globalCustomerId") String globalCustomerId, HttpServletRequest request) - throws Exception { - - System.err.println("GET SUBSCRIPTION SERVICE TYPE LIST: globalCustomerId: " + globalCustomerId); - - return "[\"vMOG\", \"sevice type 2\", \"sevice type 3\", \"sevice type 4\"]"; - } - - /** - * Exception. - * - * @param e the e - * @param response the response - * @throws IOException Signals that an I/O exception has occurred. - */ - @ExceptionHandler(Exception.class) - private void exception(Exception e, HttpServletResponse response) throws IOException { - - /* - * This logging step should preferably be replaced with an appropriate - * logging method consistent whatever logging mechanism the rest of the - * application code uses. - */ - - e.printStackTrace(System.err); - - response.setContentType("application/json; charset=UTF-8"); - response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); - - ExceptionResponse exceptionResponse = new ExceptionResponse(); - exceptionResponse.setException(e.getClass().toString().replaceFirst("^.*\\.", "")); - exceptionResponse.setMessage(e.getMessage()); - - response.getWriter().write(new ObjectMapper().writeValueAsString(exceptionResponse)); - - response.flushBuffer(); - - } - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/controller/test/TestAsdcController.java b/vid-app-common/src/main/java/org/openecomp/vid/controller/test/TestAsdcController.java deleted file mode 100755 index 84a56b3b2..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/controller/test/TestAsdcController.java +++ /dev/null @@ -1,112 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.controller.test; - -import java.io.IOException; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.codehaus.jackson.map.ObjectMapper; -import org.openecomp.vid.model.ExceptionResponse; -import org.springframework.web.bind.annotation.ExceptionHandler; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.RestController; - -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; - -/** - * The Class TestAsdcController. - */ -@RestController -@RequestMapping("testasdc") -public class TestAsdcController extends RestrictedBaseController { - - /** - * Gets the model. - * - * @param modelId the model id - * @param request the request - * @return the model - * @throws Exception the exception - */ - @RequestMapping(value = "/getModel/{modelId}", method = RequestMethod.GET) - public String getModel(@PathVariable("modelId") String modelId, HttpServletRequest request) throws Exception { - - System.err.println("SDC: GET MODEL: modelId: " + modelId); - - // @formatter:off - return - "{" + - "\"uuid\": \"5be686dc-fdca-4d54-8548-5d0ed23e962b\"," + - "\"invariantUUID\": \"e5962da9-fe4f-433a-bc99-b43e0d88a9a1\"," + - "\"name\": \"DE220127\"," + - "\"version\": \"0.1\"," + - "\"inputs\": {" + - "\"defaultGateway\": {" + - "\"type\": \"String\"," + - "\"default\": \"192.168.1.1\"," + - "\"description\": \"Router default gateway - use any valid IPv4 address\"" + - "}," + - "\"subnetMask\": {" + - "\"type\": \"String\"," + - "\"default\": \"255.255.255.0\"," + - "\"description\": \"Router subnet mask - example (255.255.255.0)\"" + - "}" + - "}" + - "}"; - // @formatter:on - } - - /** - * Exception. - * - * @param e the e - * @param response the response - * @throws IOException Signals that an I/O exception has occurred. - */ - @ExceptionHandler(Exception.class) - private void exception(Exception e, HttpServletResponse response) throws IOException { - - /* - * This logging step should preferably be replaced with an appropriate - * logging method consistent whatever logging mechanism the rest of the - * application code uses. - */ - - e.printStackTrace(System.err); - - response.setContentType("application/json; charset=UTF-8"); - response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); - - ExceptionResponse exceptionResponse = new ExceptionResponse(); - exceptionResponse.setException(e.getClass().toString().replaceFirst("^.*\\.", "")); - exceptionResponse.setMessage(e.getMessage()); - - response.getWriter().write(new ObjectMapper().writeValueAsString(exceptionResponse)); - - response.flushBuffer(); - - } - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/controller/test/TestMsoController.java b/vid-app-common/src/main/java/org/openecomp/vid/controller/test/TestMsoController.java deleted file mode 100755 index 02c29f678..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/controller/test/TestMsoController.java +++ /dev/null @@ -1,729 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.controller.test; - -import java.io.IOException; -import java.util.stream.Collectors; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.codehaus.jackson.map.ObjectMapper; -import org.openecomp.vid.model.ExceptionResponse; -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.ExceptionHandler; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.RestController; - -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; - -/* - * The "TestMsoController" class is primarily designed to help test "msoCommitController.js" - * - * This class expects and receives JSON data in the same format as expected - * in the "real" application version of this code. However, string versions of JSON are - * maintained internally here instead of marshalled / unmarshalled JSON objects. - * The primary reasons for this were to encapsulate all the test code in this single file and - * minimize the time required to support initial test cases. - * - * The non-test equivalent of this controller could alternatively incorporate POJO objects - * instead of strings. However, the same data format sent to / received from the browser - * JavaScript code would still be expected. - * - * Two specific mechanisms used in this test class may be useful to the application version: - * - * 1) The use of "{variable}" elements in @RequestMappings along with the corresponding - * @PathVariable declarations. - * - * 2) The use of @ExceptionHandler for general purpose exception handler. - * (See @ExceptionHandler comments) - * - * This class is intended to be used in either: - * - * A) Eclipse environments - * OR - * B) Linux environments with ONLY a single user running tests. - * The "quick and dirty" error simulation approach used here makes use of static states for some - * scenarios. Thus multiple users simultaneously testing in Linux environments - * may have contention issues. - */ - -/** - * The Class TestMsoController. - */ -@RestController -@RequestMapping("testmso") -public class TestMsoController extends RestrictedBaseController { - - /* - * Artificial delay (in milliseconds) added before responding to create / - * delete requests - */ - - /** The Constant TEST_DELAY_SHORT_MSEC. */ - private final static int TEST_DELAY_SHORT_MSEC = 1000; - - /* - * Long delay to simulate non-responsive server test - */ - - /** The Constant TEST_DELAY_LONG_MSEC. */ - private final static int TEST_DELAY_LONG_MSEC = 15000; - - /* - * Default number of polls expected before transaction complete. - */ - - /** The Constant MAXIMUM_POLLS_DEFAULT. */ - private final static int MAXIMUM_POLLS_DEFAULT = 4; - - /* - * Number of polls to simulate "maximum polls exceeded" test. - */ - - /** The Constant MAXIMUM_POLLS_LARGE. */ - private final static int MAXIMUM_POLLS_LARGE = 10; - - /* - * Simulated error types. The GUI front end is expected to set these values - * in the "modelName" field of the "mso_create_svc_instance" request. - */ - - /** The Constant ERROR_POLICY_EXCEPTION. */ - private final static String ERROR_POLICY_EXCEPTION = "ERROR_POLICY_EXCEPTION"; - - /** The Constant ERROR_SERVICE_EXCEPTION. */ - private final static String ERROR_SERVICE_EXCEPTION = "ERROR_SERVICE_EXCEPTION"; - - /** The Constant ERROR_POLL_FAILURE. */ - private final static String ERROR_POLL_FAILURE = "ERROR_POLL_FAILURE"; - - /** The Constant ERROR_INVALID_FIELD_INITIAL. */ - private final static String ERROR_INVALID_FIELD_INITIAL = "ERROR_INVALID_FIELD_INITIAL"; - - /** The Constant ERROR_INVALID_FIELD_POLL. */ - private final static String ERROR_INVALID_FIELD_POLL = "ERROR_INVALID_FIELD_POLL"; - - /** The Constant ERROR_GENERAL_SERVER_EXCEPTION. */ - private final static String ERROR_GENERAL_SERVER_EXCEPTION = "ERROR_GENERAL_SERVER_EXCEPTION"; - - /** The Constant ERROR_MAX_POLLS. */ - private final static String ERROR_MAX_POLLS = "ERROR_MAX_POLLS"; - - /** The Constant ERROR_SERVER_TIMEOUT_INITIAL. */ - private final static String ERROR_SERVER_TIMEOUT_INITIAL = "ERROR_SERVER_TIMEOUT_INITIAL"; - - /** The Constant ERROR_SERVER_TIMEOUT_POLL. */ - private final static String ERROR_SERVER_TIMEOUT_POLL = "ERROR_SERVER_TIMEOUT_POLL"; - - /** The simulated error. */ - private String simulatedError = ""; - - /** The maximum polls. */ - private int maximumPolls = 0; - - /** The attempt count. */ - private int attemptCount = 0; - - /** - * Creates the svc instance. - * - * @param request the request - * @return the response entity - * @throws Exception the exception - */ - @RequestMapping(value = "/mso_create_svc_instance", method = RequestMethod.POST) - public ResponseEntity createSvcInstance(HttpServletRequest request) throws Exception { - readAndLogRequest("CREATE SERVICE INSTANCE", request); - Thread.sleep(TEST_DELAY_SHORT_MSEC); - maximumPolls = MAXIMUM_POLLS_DEFAULT; // Simulates MSO polling behavior - attemptCount = 0; - - /* - * This block of code simulates various errors and would NOT be expected - * in a non-test method - */ - System.err.println("simulatedError: " + simulatedError); - - if (simulatedError.equals(ERROR_POLICY_EXCEPTION)) { - return new ResponseEntity(policyExceptionResponse, HttpStatus.OK); - } - if (simulatedError.equals(ERROR_SERVICE_EXCEPTION)) { - return new ResponseEntity(serviceExceptionResponse, HttpStatus.OK); - } - if (simulatedError.equals(ERROR_INVALID_FIELD_INITIAL)) { - /* - * Force invalid response field name. Return - * "XXXXXrequestReferences" instead of "requestReferences" - */ - return new ResponseEntity(acceptResponse.replace("requestReferences", "XXXXXrequestReferences"), - HttpStatus.OK); - } - - if (simulatedError.equals(ERROR_GENERAL_SERVER_EXCEPTION)) { - throw new IOException("an example of an IO exception"); - } - - if (simulatedError.equals(ERROR_SERVER_TIMEOUT_INITIAL)) { - Thread.sleep(TEST_DELAY_LONG_MSEC); - } - - if (simulatedError.equals(ERROR_MAX_POLLS)) { - maximumPolls = MAXIMUM_POLLS_LARGE; - } - - /* - * End of block of simulated error code. - */ - - return new ResponseEntity(acceptResponse, HttpStatus.OK); - } - - /** - * Delete svc instance. - * - * @param serviceInstanceId the service instance id - * @param request the request - * @return the response entity - * @throws Exception the exception - */ - @RequestMapping(value = "/mso_delete_svc_instance/{serviceInstanceId}", method = RequestMethod.POST) - public ResponseEntity deleteSvcInstance(@PathVariable("serviceInstanceId") String serviceInstanceId, - HttpServletRequest request) throws Exception { - readAndLogRequest("DELETE SERVICE INSTANCE: serviceInstanceId: " + serviceInstanceId, request); - Thread.sleep(TEST_DELAY_SHORT_MSEC); - maximumPolls = MAXIMUM_POLLS_DEFAULT; // Simulates MSO polling behavior - attemptCount = 0; - return new ResponseEntity(acceptResponse, HttpStatus.OK); - } - - /** - * Creates the vnf instance. - * - * @param serviceInstanceId the service instance id - * @param request the request - * @return the response entity - * @throws Exception the exception - */ - @RequestMapping(value = "/mso_create_vnf_instance/{serviceInstanceId}", method = RequestMethod.POST) - public ResponseEntity createVnfInstance(@PathVariable("serviceInstanceId") String serviceInstanceId, - HttpServletRequest request) throws Exception { - readAndLogRequest("CREATE VNF INSTANCE: serviceInstanceId: " + serviceInstanceId, request); - Thread.sleep(TEST_DELAY_SHORT_MSEC); - maximumPolls = MAXIMUM_POLLS_DEFAULT; // Simulates MSO polling behavior - attemptCount = 0; - return new ResponseEntity(acceptResponse, HttpStatus.OK); - } - - /** - * Delete vnf instance. - * - * @param serviceInstanceId the service instance id - * @param vnfInstanceId the vnf instance id - * @param request the request - * @return the response entity - * @throws Exception the exception - */ - @RequestMapping(value = "/mso_delete_vnf_instance/{serviceInstanceId}/vnfs/{vnfInstanceId}", method = RequestMethod.POST) - public ResponseEntity deleteVnfInstance(@PathVariable("serviceInstanceId") String serviceInstanceId, - @PathVariable("vnfInstanceId") String vnfInstanceId, HttpServletRequest request) throws Exception { - readAndLogRequest( - "DELETE VNF INSTANCE: serviceInstanceId: " + serviceInstanceId + " vnfInstanceId: " + vnfInstanceId, - request); - Thread.sleep(TEST_DELAY_SHORT_MSEC); - maximumPolls = MAXIMUM_POLLS_DEFAULT; // Simulates MSO polling behavior - attemptCount = 0; - return new ResponseEntity(acceptResponse, HttpStatus.OK); - } - - /** - * Creates the vf module instance. - * - * @param serviceInstanceId the service instance id - * @param vnfInstanceId the vnf instance id - * @param request the request - * @return the response entity - * @throws Exception the exception - */ - // /serviceInstances/v2/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs/ff305d54-75b4-ff1b-adb2-eb6b9e5460ff/vfModules - @RequestMapping(value = "/mso_create_vfmodule_instance/{serviceInstanceId}/vnfs/{vnfInstanceId}", method = RequestMethod.POST) - public ResponseEntity createVfModuleInstance(@PathVariable("serviceInstanceId") String serviceInstanceId, - @PathVariable("vnfInstanceId") String vnfInstanceId, HttpServletRequest request) throws Exception { - readAndLogRequest("CREATE VF MODULE INSTANCE: serviceInstanceId: " + serviceInstanceId + " vnfInstanceId: " - + vnfInstanceId, request); - Thread.sleep(TEST_DELAY_SHORT_MSEC); - maximumPolls = MAXIMUM_POLLS_DEFAULT; // Simulates MSO polling behavior - attemptCount = 0; - return new ResponseEntity(acceptResponse, HttpStatus.OK); - } - - /** - * Delete vf module instance. - * - * @param serviceInstanceId the service instance id - * @param vnfInstanceId the vnf instance id - * @param vfModuleInstanceId the vf module instance id - * @param request the request - * @return the response entity - * @throws Exception the exception - */ - // /serviceInstances/v2/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs/ff305d54-75b4-ff1b-adb2-eb6b9e5460ff/vfModules/ff305d54-75b4-ff1b-bdb2-eb6b9e5460ff - @RequestMapping(value = "/mso_delete_vfmodule_instance/{serviceInstanceId}/vnfs/{vnfInstanceId}/vfModules/{vfModuleInstanceId}", method = RequestMethod.POST) - public ResponseEntity deleteVfModuleInstance(@PathVariable("serviceInstanceId") String serviceInstanceId, - @PathVariable("vnfInstanceId") String vnfInstanceId, - @PathVariable("vfModuleInstanceId") String vfModuleInstanceId, HttpServletRequest request) - throws Exception { - readAndLogRequest("DELETE VF MODULE INSTANCE: serviceInstanceId: " + serviceInstanceId + " vnfInstanceId: " - + vnfInstanceId + " vfModuleInstanceId: " + vfModuleInstanceId, request); - Thread.sleep(TEST_DELAY_SHORT_MSEC); - maximumPolls = MAXIMUM_POLLS_DEFAULT; // Simulates MSO polling behavior - attemptCount = 0; - return new ResponseEntity(acceptResponse, HttpStatus.OK); - } - - // POST - /** - * Creates the volume group instance. - * - * @param serviceInstanceId the service instance id - * @param vnfInstanceId the vnf instance id - * @param request the request - * @return the response entity - * @throws Exception the exception - */ - // /serviceInstances/v2/ff305d54-75b4-431b-adb2-eb6b9e5ff000/volumeGroups - @RequestMapping(value = "/mso_create_volumegroup_instance/{serviceInstanceId}/vnfs/{vnfInstanceId}", method = RequestMethod.POST) - public ResponseEntity createVolumeGroupInstance(@PathVariable("serviceInstanceId") String serviceInstanceId, - @PathVariable("vnfInstanceId") String vnfInstanceId, HttpServletRequest request) throws Exception { - readAndLogRequest("CREATE VOLUME GROUP INSTANCE: seviceInstanceId: " + serviceInstanceId + " vnfInstanceId: " - + vnfInstanceId, request); - Thread.sleep(TEST_DELAY_SHORT_MSEC); - maximumPolls = MAXIMUM_POLLS_DEFAULT; // Simulates MSO polling behavior - attemptCount = 0; - return new ResponseEntity(acceptResponse, HttpStatus.OK); - } - - /** - * Delete volume group instance. - * - * @param serviceInstanceId the service instance id - * @param vnfInstanceId the vnf instance id - * @param volumeGroupInstanceId the volume group instance id - * @param request the request - * @return the response entity - * @throws Exception the exception - */ - // /serviceInstances/v2/ff305d54-75b4-431b-adb2-eb6b9e5ff000/volumeGroups/ff305d54-75b4-ff1b-cdb2-eb6b9e5460ff - @RequestMapping(value = "/mso_delete_volumegroup_instance/{serviceInstanceId}/vnfs/{vnfInstanceId}/volumeGroups/{volumeGroupInstanceId}", method = RequestMethod.POST) - public ResponseEntity deleteVolumeGroupInstance(@PathVariable("serviceInstanceId") String serviceInstanceId, - @PathVariable("vnfInstanceId") String vnfInstanceId, - @PathVariable("volumeGroupInstanceId") String volumeGroupInstanceId, HttpServletRequest request) - throws Exception { - readAndLogRequest("DELETE NW INSTANCE: serviceInstanceId: " + serviceInstanceId + " vnfInstanceId: " - + vnfInstanceId + " volumeGroupInstanceId: " + volumeGroupInstanceId, request); - Thread.sleep(TEST_DELAY_SHORT_MSEC); - maximumPolls = MAXIMUM_POLLS_DEFAULT; // Simulates MSO polling behavior - attemptCount = 0; - return new ResponseEntity(acceptResponse, HttpStatus.OK); - } - - /** - * Creates the nw instance. - * - * @param serviceInstanceId the service instance id - * @param request the request - * @return the response entity - * @throws Exception the exception - */ - @RequestMapping(value = "/mso_create_nw_instance/{serviceInstanceId}", method = RequestMethod.POST) - public ResponseEntity createNwInstance(@PathVariable("serviceInstanceId") String serviceInstanceId, - HttpServletRequest request) throws Exception { - readAndLogRequest("CREATE NW INSTANCE: serviceInstanceId: " + serviceInstanceId, request); - Thread.sleep(TEST_DELAY_SHORT_MSEC); - maximumPolls = MAXIMUM_POLLS_DEFAULT; // Simulates MSO polling behavior - attemptCount = 0; - return new ResponseEntity(acceptResponse, HttpStatus.OK); - } - - /** - * Delete nw instance. - * - * @param serviceInstanceId the service instance id - * @param networkInstanceId the network instance id - * @param request the request - * @return the response entity - * @throws Exception the exception - */ - @RequestMapping(value = "/mso_delete_nw_instance/{serviceInstanceId}/networks/{networkInstanceId}", method = RequestMethod.POST) - public ResponseEntity deleteNwInstance(@PathVariable("serviceInstanceId") String serviceInstanceId, - @PathVariable("networkInstanceId") String networkInstanceId, HttpServletRequest request) throws Exception { - readAndLogRequest("DELETE NW INSTANCE: serviceInstanceId: " + serviceInstanceId + " networkInstanceId: " - + networkInstanceId, request); - Thread.sleep(TEST_DELAY_SHORT_MSEC); - maximumPolls = MAXIMUM_POLLS_DEFAULT; // Simulates MSO polling behavior - attemptCount = 0; - return new ResponseEntity(acceptResponse, HttpStatus.OK); - } - - /** - * Gets the orchestration request. - * - * @param requestId the request id - * @param request the request - * @return the orchestration request - * @throws Exception the exception - */ - @RequestMapping(value = "/mso_get_orch_req/{requestId}", method = RequestMethod.GET) - public ResponseEntity getOrchestrationRequest(@PathVariable("requestId") String requestId, - HttpServletRequest request) throws Exception { - - System.err.println("GET ORCHESTRATION REQUEST: requestId: " + requestId); - - /* - * This block of code simulates various errors and would NOT be expected - * in a non-test method - */ - - if (simulatedError.equals(ERROR_INVALID_FIELD_POLL)) { - /* - * Force invalid response field name. Return "XXXXXrequestStatus" - * instead of "requestStatus" - */ - return new ResponseEntity(inProgressResponse.replace("requestStatus", "XXXXXrequestStatus"), - HttpStatus.OK); - } - - if (simulatedError.equals(ERROR_POLL_FAILURE)) { - /* - * Force status field with "Failure" - */ - return new ResponseEntity(inProgressResponse.replace("InProgress", "Failure"), HttpStatus.OK); - } - - if (simulatedError.equals(ERROR_SERVER_TIMEOUT_POLL)) { - Thread.sleep(TEST_DELAY_LONG_MSEC); - } - - /* - * End of block of simulated error code. - */ - - /* - * This logic simulates how MSO might behave ... i.e. return different - * results depending on the value of 'maximumPolls'. - * - */ - int percentProgress = (++attemptCount * 100) / maximumPolls; - - System.err.println("attempts: " + attemptCount + " max: " + maximumPolls + " percent: " + percentProgress); - - String response = inProgressResponse.replace("\"50\"", "\"" + Integer.toString(percentProgress) + "\""); - - if (attemptCount < maximumPolls) { - if (attemptCount > 1) { - response = response.replace("vLan setup", "setup step " + Integer.toString(attemptCount)); - } - return new ResponseEntity(response, HttpStatus.OK); - } else { - return new ResponseEntity( - response.replace("InProgress", "Complete").replace("vLan setup complete", ""), HttpStatus.OK); - } - } - - /** - * Gets the orchestration requests. - * - * @param filterString the filter string - * @param request the request - * @return the orchestration requests - * @throws Exception the exception - */ - @RequestMapping(value = "/mso_get_orch_reqs/{filterString}", method = RequestMethod.GET) - public ResponseEntity getOrchestrationRequests(@PathVariable("filterString") String filterString, - HttpServletRequest request) throws Exception { - - System.err.println("GET ORCHESTRATION REQUESTS: filterString: " + filterString); - - return new ResponseEntity(getOrchestrationRequestsResponse, HttpStatus.OK); - - } - - /* - * General purpose exception handler that could be used in application code. - * - * The method returns exceptions as error code 500. Both the exception type - * and message are written as a JSON object. - * - * See the following references: - * - * 1) The ExceptionResponse POJO. - * - * 2) The "getHttpErrorMessage" function in "utilityService.js" - an example - * of how the browser JavaScript code can interpret this response. - */ - - /** - * Exception. - * - * @param e the e - * @param response the response - * @throws IOException Signals that an I/O exception has occurred. - */ - @ExceptionHandler(Exception.class) - private void exception(Exception e, HttpServletResponse response) throws IOException { - - /* - * This logging step should preferably be replaced with an appropriate - * logging method consistent whatever logging mechanism the rest of the - * application code uses. - */ - - e.printStackTrace(System.err); - - response.setContentType("application/json; charset=UTF-8"); - response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); - - ExceptionResponse exceptionResponse = new ExceptionResponse(); - exceptionResponse.setException(e.getClass().toString().replaceFirst("^.*\\.", "")); - exceptionResponse.setMessage(e.getMessage()); - - response.getWriter().write(new ObjectMapper().writeValueAsString(exceptionResponse)); - - response.flushBuffer(); - - } - - /* - * 'readAndLogRequest' only intended to be used for testing. - * - * The method reads JSON from the input stream and thus prevents other - * mechanisms from reading the input. - */ - - /** - * Read and log request. - * - * @param label the label - * @param request the request - * @throws Exception the exception - */ - private void readAndLogRequest(String label, HttpServletRequest request) throws Exception { - String input = request.getReader().lines().collect(Collectors.joining(System.lineSeparator())); - - ObjectMapper mapper = new ObjectMapper(); - Object json = mapper.readValue(input, Object.class); - - System.err.println(label + "\n" + mapper.writerWithDefaultPrettyPrinter().writeValueAsString(json)); - - /* - * Only needed for error simulation ... - */ - if (input.matches("^.*modelName.*$")) { - simulatedError = input.replaceAll("^.*\"modelName\":\"", "").replaceAll("\".*$", ""); - } - } - - /* - * Various test responses: - */ - - // @formatter:off - - /** The accept response. */ - /* - * Sample responses to initial create / delete transaction - */ - private String acceptResponse = - "{" + - " \"status\": 202," + - " \"entity\": {" + - " \"requestReferences\": {" + - " \"instanceId\": \"bc305d54-75b4-431b-adb2-eb6b9e546014\"," + - " \"requestId\": \"rq1234d1-5a33-55df-13ab-12abad84e331\"" + - " }" + - " }" + - "}"; - - /** The policy exception response. */ - private String policyExceptionResponse = - "{" + - " \"status\": 400," + - " \"entity\": { " + - " \"requestError\": {" + - " \"policyException\": {" + - " \"messageId\": \"POL9003\"," + - " \"text\": \"Message content size exceeds the allowable limit\"" + - " }" + - " }" + - " }" + - "}"; - - /** The service exception response. */ - private String serviceExceptionResponse = - "{" + - " \"status\": 400," + - " \"entity\": { " + - " \"requestError\": {" + - " \"serviceException\": {" + - " \"messageId\": \"SVC2000\"," + - " \"text\": \"Missing Parameter: %1. Error code is %2\"," + - " \"variables\": [" + - " \"severity\"," + - " \"400\"" + - " ]" + - " }" + - " }" + - " }" + - "}" + - ""; - - /** The in progress response. */ - /* - * Sample response to subsequent getOrchestrationRequest - */ - private String inProgressResponse = - "{" + - " \"status\": 200," + - " \"entity\": {" + - " \"request\": {" + - " \"requestId\": \"rq1234d1-5a33-55df-13ab-12abad84e333\"," + - " \"startTime\": \"Thu, 04 Jun 2009 02:51:59 GMT\"," + - " \"instanceIds\": {" + - " \"serviceInstanceId\": \"bc305d54-75b4-431b-adb2-eb6b9e546014\"" + - " }," + - " \"requestScope\": \"service\"," + - " \"requestType\": \"createInstance\"," + - " \"requestDetails\": {" + - " \"modelInfo\": {" + - " \"modelType\": \"service\"," + - " \"modelId\": \"sn5256d1-5a33-55df-13ab-12abad84e764\"," + - " \"modelNameVersionId\": \"ab6478e4-ea33-3346-ac12-ab121484a333\"," + - " \"modelName\": \"WanBonding\"," + - " \"modelVersion\": \"1\"" + - " }," + - " \"subscriberInfo\": {" + - " \"globalSubscriberId\": \"C12345\"," + - " \"subscriberName\": \"General Electric Division 12\"" + - " }," + - " \"requestParameters\": {" + - " \"vpnId\": \"1a2b3c4d5e6f\"," + - " \"productName\": \"Trinity\"," + - " \"customerId\": \"icore9883749\"" + - " }" + - " }," + - " \"requestStatus\": {" + - " \"timestamp\": \"Thu, 04 Jun 2009 02:53:39 GMT\"," + - " \"requestState\": \"InProgress\"," + - " \"statusMessage\": \"vLan setup complete\"," + - " \"percentProgress\": \"50\"" + - " }" + - " }" + - " }" + - "}"; - - /* - * Sample response to subsequent getOrchestrationRequests - */ - - /** The get orchestration requests response. */ - private String getOrchestrationRequestsResponse = - "{" + - " \"status\": 200," + - " \"entity\": {" + - " \"requestList\": [" + - " {" + - " \"request\": {" + - " \"requestId\": \"rq1234d1-5a33-55df-13ab-12abad84e333\"," + - " \"startTime\": \"Thu, 04 Jun 2009 02:51:59 GMT\"," + - " \"finishTime\": \"Thu, 04 Jun 2009 02:55:59 GMT\"," + - " \"instanceReferences\": {" + - " \"serviceInstanceId\": \"bc305d54-75b4-431b-adb2-eb6b9e546014\"" + - " }," + - " \"requestScope\": \"service\"," + - " \"requestType\": \"createInstance\"," + - " \"requestDetails\": {" + - " \"modelInfo\": {" + - " \"modelType\": \"service\"," + - " \"modelId\": \"sn5256d1-5a33-55df-13ab-12abad84e764\"," + - " \"modelNameVersionId\": \"ab6478e4-ea33-3346-ac12-ab121484a333\"," + - " \"modelName\": \"WanBonding\"," + - " \"modelVersion\": \"1\"" + - " }," + - " \"subscriberInfo\": {" + - " \"globalSubscriberId\": \"C12345\"," + - " \"subscriberName\": \"General Electric Division 12\"" + - " }," + - " \"requestParameters\": {" + - " \"vpnId\": \"1a2b3c4d5e6f\"," + - " \"productName\": \"Trinity\"," + - " \"customerId\": \"icore9883749\"" + - " }" + - " }," + - " \"requestStatus\": {" + - " \"timestamp\": \"Thu, 04 Jun 2009 02:54:49 GMT\"," + - " \"requestState\": \"complete\"," + - " \"statusMessage\": \"Resource Created\"," + - " \"percentProgress\": \"100\"" + - " }" + - " }" + - " }," + - " {" + - " \"request\": {" + - " \"requestId\": \"rq1234d1-5a33-55df-13ab-12abad84e334\"," + - " \"startTime\": \"Thu, 04 Jun 2009 03:52:59 GMT\"," + - " \"instanceReferences\": {" + - " \"serviceInstanceId\": \"bc305d54-75b4-431b-adb2-eb6b9e546014\"" + - " }," + - " \"requestScope\": \"service\"," + - " \"requestType\": \"updateInstance\"," + - " \"requestDetails\": {" + - " \"modelInfo\": {" + - " \"modelType\": \"service\"," + - " \"modelId\": \"sn5256d1-5a33-55df-13ab-12abad84e764\"," + - " \"modelNameVersionId\": \"ab6478e4-ea33-3346-ac12-ab121484a333\"," + - " \"modelName\": \"WanBonding\"," + - " \"modelVersion\": \"1\"" + - " }," + - " \"subscriberInfo\": {" + - " \"globalSubscriberId\": \"C12345\"," + - " \"subscriberName\": \"General Electric Division 12\"" + - " }," + - " \"requestParameters\": {" + - " \"vpnId\": \"1a2b3c4d5e70\"," + - " \"productName\": \"Trinity\"," + - " \"customerId\": \"icore9883749\"" + - " }" + - " }," + - " \"requestStatus\": {" + - " \"timestamp\": \"Thu, 04 Jun 2009 03:53:39 GMT\"," + - " \"requestState\": \"InProgress\"," + - " \"statusMessage\": \"vLan setup complete\"," + - " \"percentProgress\": \"50\"" + - " }" + - " }" + - " }" + - " ]" + - " }" + - "}"; -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/controller/test/TestPageController.java b/vid-app-common/src/main/java/org/openecomp/vid/controller/test/TestPageController.java deleted file mode 100755 index 92f86f0bd..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/controller/test/TestPageController.java +++ /dev/null @@ -1,57 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.controller.test; - -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.servlet.ModelAndView; - -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; - -/** - * The Class TestPageController. - */ -@Controller -public class TestPageController extends RestrictedBaseController { - - /** - * Test mso page. - * - * @return the model and view - */ - @RequestMapping(value = { "testMso.htm" }, method = RequestMethod.GET) - public ModelAndView testMsoPage() { - return new ModelAndView(getViewName()); - } - - /** - * Test view edit page. - * - * @return the model and view - */ - @RequestMapping(value = { "testViewEdit" }, method = RequestMethod.GET) - public ModelAndView testViewEditPage() { - return new ModelAndView(getViewName()); - } - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/dao/FnAppDoaImpl.java b/vid-app-common/src/main/java/org/openecomp/vid/dao/FnAppDoaImpl.java deleted file mode 100755 index 6d2810aa0..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/dao/FnAppDoaImpl.java +++ /dev/null @@ -1,112 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.dao; - -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.net.URI; -import java.net.URL; -import java.sql.Connection; -import java.sql.DriverManager; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.util.Properties; - -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; - - -public class FnAppDoaImpl { - - /** The logger. */ - static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(FnAppDoaImpl.class); - - public int getProfileCount(String driver, String URL, String username, String password) { - Connection dbc = null; - PreparedStatement pst = null; - ResultSet rs = null; - String q = null; - int count = 0; - try { - dbc = getConnection(driver,URL,username,password); - logger.debug(EELFLoggerDelegate.debugLogger, "getConnection:::"+ dbc); - q = "select count(*) from fn_app"; - pst = dbc.prepareStatement(q); - rs = pst.executeQuery(); - - if (rs.next()) - count = rs.getInt(1); - } catch(Exception ex) { - logger.error(EELFLoggerDelegate.errorLogger, "Failed to perform health check", ex); - } finally { - cleanup(rs,pst,dbc); - } - logger.debug(EELFLoggerDelegate.debugLogger, "count:::"+ count); - return count; - } - - public static Connection getConnection(String driver2, String url, String username, String password) throws IOException, SQLException, ClassNotFoundException{ - java.sql.Connection con=null; - - if( url!=null && username!=null && password!=null ){ - con = DriverManager.getConnection(url, username, password); - } - - System.out.println("Connection Successful"); - return con; - - } - - public static void cleanup(ResultSet rs, PreparedStatement st, Connection c) { - if (rs != null) { - try { - rs.close(); - } catch (Exception e) { - if (logger != null) - logger.error("Error when trying to close result set", e); - } - } - if (st != null) { - try { - st.close(); - } catch (Exception e) { - if (logger != null) - logger.error("Error when trying to close statement", e); - } - } - if (c != null) { - try { - c.rollback(); - } catch (Exception e) { - if (logger != null) - logger.error("Error when trying to rollback connection", e); - } - try { - c.close(); - } catch (Exception e) { - if (logger != null) - logger.error("Error when trying to close connection", e); - } - } - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/dao/ProfileDao.java b/vid-app-common/src/main/java/org/openecomp/vid/dao/ProfileDao.java deleted file mode 100755 index 256a4bd8d..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/dao/ProfileDao.java +++ /dev/null @@ -1,45 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.dao; - -import java.util.List; -import org.openecomp.portalsdk.core.domain.Profile; - -/** - * The Interface ProfileDao. - */ -public interface ProfileDao { - - /** - * Find all. - * - * @return the list - */ - List findAll(); - - /** - * Gets the profile. - * - * @param id the id - * @return the profile - */ - Profile getProfile(int id); -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/exceptions/VidServiceUnavailableException.java b/vid-app-common/src/main/java/org/openecomp/vid/exceptions/VidServiceUnavailableException.java deleted file mode 100755 index fcd897f78..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/exceptions/VidServiceUnavailableException.java +++ /dev/null @@ -1,69 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.exceptions; - -import org.springframework.http.HttpStatus; -import org.springframework.web.bind.annotation.ResponseStatus; - -/** - * The Class VidServiceUnavailableException. - */ -@ResponseStatus(value=HttpStatus.SERVICE_UNAVAILABLE) -public class VidServiceUnavailableException extends Exception { - - /** The Constant serialVersionUID. */ - private static final long serialVersionUID = 1L; - - /** - * Instantiates a new vid service unavailable exception. - */ - public VidServiceUnavailableException() { - super(); - } - - /** - * Instantiates a new vid service unavailable exception. - * - * @param msg the msg - */ - public VidServiceUnavailableException(String msg) { - super(msg); - } - - /** - * Instantiates a new vid service unavailable exception. - * - * @param t the t - */ - public VidServiceUnavailableException(Throwable t) { - super(t); - } - - /** - * Instantiates a new vid service unavailable exception. - * - * @param msg the msg - * @param t the t - */ - public VidServiceUnavailableException(String msg, Throwable t) { - super(msg, t); - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/factories/MsoRequestFactory.java b/vid-app-common/src/main/java/org/openecomp/vid/factories/MsoRequestFactory.java deleted file mode 100644 index 9cc9c5f66..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/factories/MsoRequestFactory.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.openecomp.vid.factories; - -import org.openecomp.vid.mso.rest.RequestDetails; - -/** - * Created by pickjonathan on 19/06/2017. - */ -public class MsoRequestFactory { - - public RequestDetails createMsoRequest(String path) - { - return null; - } - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/model/CommandProperty.java b/vid-app-common/src/main/java/org/openecomp/vid/model/CommandProperty.java deleted file mode 100755 index 740f9d781..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/model/CommandProperty.java +++ /dev/null @@ -1,93 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.model; - -import java.util.Map; - -/** - * The Class Command Property. - */ -public class CommandProperty { - - /** The display name for this input */ - private String displayName; - - /** The command, "get_input" */ - private String command; - - /** The input name we refer to back under the inputs section */ - private String inputName; - - /** - * Gets the display name. - * - * @return the displayName - */ - public String getDisplayName() { - return displayName; - } - /** - * Gets the command. - * - * @return the command - */ - public String getCommand() { - return command; - } - /** - * Gets the inputName. - * - * @return the inputName - */ - public String getInputName() { - return inputName; - } - /** - * Sets the display name value. - * - * @param i the new get_input value - */ - public void setDisplayName(String i) { - this.displayName = i; - } - /** - * Sets the command value. - * - * @param i the new command value - */ - public void setCommand(String i) { - this.command = i; - } - - /** - * Sets the input name value. - * - * @param i the new input name value - */ - public void setInputName(String i) { - this.inputName=i; - } - - public String toString () { - String result = "displayName=" + displayName + " command=" + command + " inputName" + inputName; - return result; - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/model/ExceptionResponse.java b/vid-app-common/src/main/java/org/openecomp/vid/model/ExceptionResponse.java deleted file mode 100755 index 686971d76..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/model/ExceptionResponse.java +++ /dev/null @@ -1,70 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.model; - -/** - * The Class ExceptionResponse. - */ -public class ExceptionResponse { - - /** The exception. */ - private String exception; - - /** The message. */ - private String message; - - /** - * Gets the exception. - * - * @return the exception - */ - public String getException() { - return exception; - } - - /** - * Sets the exception. - * - * @param exception the new exception - */ - public void setException(String exception) { - this.exception = exception; - } - - /** - * Gets the message. - * - * @return the message - */ - public String getMessage() { - return message; - } - - /** - * Sets the message. - * - * @param message the new message - */ - public void setMessage(String message) { - this.message = message; - } - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/model/ModelConstants.java b/vid-app-common/src/main/java/org/openecomp/vid/model/ModelConstants.java deleted file mode 100755 index af5f0db91..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/model/ModelConstants.java +++ /dev/null @@ -1,42 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.model; -/** - * The Class ModelConstants - */ -public class ModelConstants { - - /** The Constant GET_INPUT_TAG. */ - public final static String GET_INPUT_TAG = "get_input"; - - public static final String ASDC_MODEL_NAMESPACE = "asdc.model.namespace"; - public static final String ASDC_SVC_API_PATH = "sdc.svc.api.path"; - public static final String ASDC_RESOURCE_API_PATH = "sdc.resource.api.path"; - - public static final String DEFAULT_ASDC_MODEL_NAMESPACE = "org.openecomp."; - public static final String DEFAULT_ASDC_SVC_API_PATH = "sdc/v1/catalog/services"; - public static final String DEFAULT_ASDC_RESOURCE_API_PATH = "sdc/v1/catalog/resources"; - - public final static String VF_MODULE = "groups.VfModule"; - public final static String VNF = "resource.vf"; - public final static String NETWORK = "resource.vl"; - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/model/ModelUtil.java b/vid-app-common/src/main/java/org/openecomp/vid/model/ModelUtil.java deleted file mode 100644 index f0208185a..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/model/ModelUtil.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * - */ -package org.openecomp.vid.model; - -/** - * The Class ModelUtil. - * - */ -public class ModelUtil { - /** - * Gets the tags for the given element according to the configured namespace - * @param namespaces the namespace list from the configuration - * @param constantValue the constant portion of the tag name, i.e. resource.vf... - * @return the tags - */ - public static String[] getTags ( String[] namespaces, String constantValue ) { - String[] tags; - if ( namespaces == null || namespaces.length == 0 ) { - return null; - } - int le = namespaces.length; - tags = new String[le]; - for ( int i = 0; i < le; i++ ) { - tags[i] = namespaces[i] + constantValue; - } - return (tags); - } - /** - * Determine if a note template type matches a set of configurable tags - * @param type the node template type - * @param tags the model configurable namespaces - * @return true if type starts with a tag in the array, false otherwise - */ - public static boolean isType ( String type, String[] tags ) { - if ( (tags != null) && (tags.length > 0) ) { - for ( int i = 0; i < tags.length; i++ ) { - if ( type.startsWith (tags[i]) ) { - return (true); - } - } - } - return (false); - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/model/Network.java b/vid-app-common/src/main/java/org/openecomp/vid/model/Network.java deleted file mode 100755 index e763496fc..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/model/Network.java +++ /dev/null @@ -1,62 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.model; - -import org.openecomp.vid.asdc.beans.tosca.NodeTemplate; - -/** - * The Class Network. - */ -public class Network extends Node { - - /** The model customization name. */ - private String modelCustomizationName; - - /** - * Instantiates a new network. - */ - public Network() { - super(); - } - /** - * Gets the model customization name. - * - * @return the model customization name - */ - public String getModelCustomizationName() { - return modelCustomizationName; - } - /** - * Sets the model customization name. - * - * @param modelCustomizationName the new model customization name - */ - public void setModelCustomizationName(String modelCustomizationName) { - this.modelCustomizationName = modelCustomizationName; - } - - public void extractNetwork(String modelCustomizationName, NodeTemplate nodeTemplate) { - - super.extractNode(nodeTemplate); - setModelCustomizationName(modelCustomizationName); - - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/model/NewNetwork.java b/vid-app-common/src/main/java/org/openecomp/vid/model/NewNetwork.java deleted file mode 100644 index 48e3a55fd..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/model/NewNetwork.java +++ /dev/null @@ -1,56 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.model; - -import org.openecomp.vid.asdc.beans.tosca.NodeTemplate; - -/** - * The Class Network. - */ -public class NewNetwork extends NewNode { - - /** The model customization name. */ - private String modelCustomizationName; - - /** - * Instantiates a new network. - */ - public NewNetwork() { - super(); - } - /** - * Gets the model customization name. - * - * @return the model customization name - */ - public String getModelCustomizationName() { - return modelCustomizationName; - } - /** - * Sets the model customization name. - * - * @param modelCustomizationName the new model customization name - */ - public void setModelCustomizationName(String modelCustomizationName) { - this.modelCustomizationName = modelCustomizationName; - } - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/model/NewNode.java b/vid-app-common/src/main/java/org/openecomp/vid/model/NewNode.java deleted file mode 100644 index 681131fc9..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/model/NewNode.java +++ /dev/null @@ -1,209 +0,0 @@ -package org.openecomp.vid.model; - -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.HashMap; -import java.util.Map; - -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.vid.asdc.beans.tosca.Input; - - -public class NewNode { - - /** The Constant LOG. */ - private static final EELFLoggerDelegate LOG = EELFLoggerDelegate.getLogger(Node.class); - - /** The Constant dateFormat. */ - final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); - - /** The uuid. */ - private String uuid; - - /** The invariant uuid. */ - private String invariantUuid; - - /** The description. */ - private String description; - - /** The name. */ - private String name; - - /** The version. */ - private String version; - - /** The model customization uuid. */ - private String customizationUuid; - - /** The inputs. */ - private Map inputs; - - /** The get_input or other constructs from node template properties. */ - private Map commands; - - /** The get_input or other constructs from node template properties. */ - private Map properties; - /** - * Instantiates a new node. - */ - public NewNode() { - this.commands = new HashMap(); - this.properties = new HashMap(); - } - - /** - * Gets the uuid. - * - * @return the uuid - */ - public String getUuid() { - return uuid; - } - - /** - * Gets the invariant uuid. - * - * @return the invariant uuid - */ - public String getInvariantUuid() { - return invariantUuid; - } - - /** - * Gets the description. - * - * @return the description - */ - public String getDescription() { - return description; - } - - /** - * Gets the name. - * - * @return the name - */ - public String getName() { - return name; - } - - /** - * Gets the version. - * - * @return the version - */ - public String getVersion() { - return version; - } - - /** - * Gets the customization uuid. - * - * @return the model customization uuid - */ - public String getCustomizationUuid() { - return customizationUuid; - } - /** - * Gets the inputs. - * - * @return the inputs - */ - public Map getInputs() { - return inputs; - } - /** - * Gets the commands. - * - * @return the commands - */ - public Map getCommands() { - return commands; - } - /** - * Gets the properties. - * - * @return the properties - */ - public Map getProperties() { - return properties; - } - /** - * Sets the uuid. - * - * @param uuid the new uuid - */ - public void setUuid(String uuid) { - this.uuid = uuid; - } - - /** - * Sets the invariant uuid. - * - * @param invariantUuid the new invariant uuid - */ - public void setInvariantUuid(String invariantUuid) { - this.invariantUuid = invariantUuid; - } - - /** - * Sets the description. - * - * @param description the new description - */ - public void setDescription(String description) { - this.description = description; - } - - /** - * Sets the name. - * - * @param name the new name - */ - public void setName(String name) { - this.name = name; - } - - /** - * Sets the version. - * - * @param version the new version - */ - public void setVersion(String version) { - this.version = version; - } - /** - * Sets the customization uuid. - * - * @param u the new customization uuid - */ - public void setCustomizationUuid(String u) { - this.customizationUuid = u; - } - - /** - * Sets the inputs. - * - * @param inputs the inputs - */ - public void setInputs(Map inputs) { - this.inputs = inputs; - } - /** - * Sets the commands. - * - * @param m the commands - */ - public void setCommands( Mapm ) { - commands = m; - } - /** - * Sets the properties. - * - * @param p the properties - */ - public void setProperties( Mapp) { - properties = p; - } - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/model/NewService.java b/vid-app-common/src/main/java/org/openecomp/vid/model/NewService.java deleted file mode 100644 index 1dcf0224e..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/model/NewService.java +++ /dev/null @@ -1,252 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.model; - -import java.util.Map; -import java.util.UUID; - -import org.openecomp.vid.asdc.beans.tosca.Input; - -/** - * The Class Service. - */ -public class NewService { - - /** The uuid. */ - private String uuid; - - /** The invariant uuid. */ - private String invariantUuid; - - /** The name. */ - private String name; - - /** The version. */ - private String version; - - /** The tosca model URL. */ - private String toscaModelURL; - - /** The category. */ - private String category; - - /** The description. */ - private String description; - - /** The service ecomp naming flag */ - private String serviceEcompNaming; - - /** The inputs. */ - private Map inputs; - - /** - * Gets the uuid. - * - * @return the uuid - */ - public String getUuid() { - return uuid; - } - - /** - * Gets the invariant uuid. - * - * @return the invariant uuid - */ - public String getInvariantUuid() { - return invariantUuid; - } - - /** - * Gets the name. - * - * @return the name - */ - public String getName() { - return name; - } - - /** - * Gets the version. - * - * @return the version - */ - public String getVersion() { - return version; - } - - /** - * Gets the tosca model URL. - * - * @return the tosca model URL - */ - public String getToscaModelURL() { - return toscaModelURL; - } - - /** - * Gets the category. - * - * @return the category - */ - public String getCategory() { - return category; - } - - /** - * Gets the description. - * - * @return the description - */ - public String getDescription() { - return description; - } - - /** - * Gets the inputs. - * - * @return the inputs - */ - public Map getInputs() { - return inputs; - } - /** - * Get the serviceEcompNaming value - * - * @return serviceEcompNaming - */ - public String getServiceEcompNaming() { - return serviceEcompNaming; - } - /** - * Sets the uuid. - * - * @param uuid the new uuid - */ - public void setUuid(String uuid) { - this.uuid = uuid; - } - - /** - * Sets the invariant uuid. - * - * @param invariantUuid the new invariant uuid - */ - public void setInvariantUuid(String invariantUuid) { - this.invariantUuid = invariantUuid; - } - - /** - * Sets the name. - * - * @param name the new name - */ - public void setName(String name) { - this.name = name; - } - - /** - * Sets the version. - * - * @param version the new version - */ - public void setVersion(String version) { - this.version = version; - } - - /** - * Sets the tosca model URL. - * - * @param toscaModelURL the new tosca model URL - */ - public void setToscaModelURL(String toscaModelURL) { - this.toscaModelURL = toscaModelURL; - } - - /** - * Sets the category. - * - * @param category the new category - */ - public void setCategory(String category) { - this.category = category; - } - - /** - * Sets the description. - * - * @param description the new description - */ - public void setDescription(String description) { - this.description = description; - } - - /** - * Sets the inputs. - * - * @param inputs the inputs - */ - public void setInputs(Map inputs) { - this.inputs = inputs; - } - /** - * Sets the service ecomp naming. - * - * @param serviceEcompNaming the new service ecomp naming - */ - public void setServiceEcompNaming(String serviceEcompNaming) { - this.serviceEcompNaming = serviceEcompNaming; - } - /* (non-Javadoc) - * @see java.lang.Object#hashCode() - */ - @Override - public int hashCode() { - final UUID uuid = UUID.fromString(getUuid()); - - return uuid.hashCode(); - } - - /* (non-Javadoc) - * @see java.lang.Object#equals(java.lang.Object) - */ - @Override - public boolean equals(Object o) { - if (o == this) return true; - if (!(o instanceof NewService)) return false; - - final NewService service = (NewService) o; - - return (service.getUuid().equals(getUuid())); - } - /*public static void extractVfModuleCustomizationUUID (Service s, String vnfCustomizationName, VfModule vfMod ) { - - //Look for vnfCustomizationName..vfModuleCustomizationName - String nameToFind = vnfCustomizationName + ".." + vfMod.getModelCustomizationName(); - for (Entry vfModuleComponent : s.getVfModules().entrySet()) { - VfModule xMod = vfModuleComponent.getValue(); - if ( (xMod.getModelCustomizationName() != null) && (xMod.getModelCustomizationName().equalsIgnoreCase(nameToFind)) ) { - vfMod.setCustomizationUuid( xMod.getCustomizationUuid()); - return; - } - } - }*/ -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/model/NewServiceModel.java b/vid-app-common/src/main/java/org/openecomp/vid/model/NewServiceModel.java deleted file mode 100644 index 6fda979c1..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/model/NewServiceModel.java +++ /dev/null @@ -1,259 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.model; - -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.HashMap; -import java.util.Map; -import java.util.Map.Entry; - -import org.openecomp.vid.asdc.beans.tosca.Group; -import org.openecomp.vid.asdc.beans.tosca.ToscaModel; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.vid.properties.VidProperties; -/** - * The Class ServiceModel. - */ -public class NewServiceModel { - - /** The Constant LOG. */ - private static final EELFLoggerDelegate LOG = EELFLoggerDelegate.getLogger(NewServiceModel.class); - - /** The Constant dateFormat. */ - final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); - /** The service. */ - private Service service; - - /** The vnfs. */ - private Map vnfs; - - /** The networks. */ - private Map networks; - - /** - * The vf modules. The VNF also has vfmodules but the vfmodules at the service level may have additional info - * that is not present in the VNF, like the vf module customization String - */ - private Map vfModules; - /** - * The volume groups. The VNF also has volume groups but the volume groups will be populated at the service level - * for newer models - */ - private Map volumeGroups; - /** - * Instantiates a new service model. - */ - public NewServiceModel() {} - - /** - * Gets the service. - * - * @return the service - */ - public Service getService() { - return service; - } - - /** - * Gets the vnfs. - * - * @return the vnfs - */ - public Map getVnfs() { - return vnfs; - } - - /** - * Gets the networks. - * - * @return the networks - */ - public Map getNetworks() { - return networks; - } - - /** - * Sets the service. - * - * @param service the new service - */ - public void setService(Service service) { - this.service = service; - } - - /** - * Sets the vnfs. - * - * @param vnfs the vnfs - */ - public void setVnfs(Map vnfs) { - this.vnfs = vnfs; - } - - /** - * Sets the networks. - * - * @param networks the networks - */ - public void setNetworks(Map networks) { - this.networks = networks; - } - /** - * Gets the vf modules. - * - * @return the vf modules - */ - public Map getVfModules() { - return vfModules; - } - /** - * Gets the volume groups. - * - * @return the volume groups - */ - public Map getVolumeGroups() { - return volumeGroups; - } - /** - * Sets the vf modules. - * - * @param vfModules the vf modules - */ - public void setVfModules(Map vfModules) { - this.vfModules = vfModules; - } - /** - * Sets the volume groups. - * - * @param volumeGroups the volume groups - */ - public void setVolumeGroups(Map volumeGroups) { - this.volumeGroups = volumeGroups; - } - /** - * Extract service. - * - * @param serviceToscaModel the service tosca model - * @param asdcServiceMetadata the asdc service metadata - * @return the service - */ - public static Service extractService(ToscaModel serviceToscaModel, org.openecomp.vid.asdc.beans.Service asdcServiceMetadata) { - - final Service service = new Service(); - - service.setCategory(serviceToscaModel.getMetadata().getCategory()); - service.setInvariantUuid(serviceToscaModel.getMetadata().getInvariantUUID()); - service.setName(serviceToscaModel.getMetadata().getName()); - service.setUuid(serviceToscaModel.getMetadata().getUUID()); - service.setDescription(serviceToscaModel.getMetadata().getDescription()); - service.setServiceEcompNaming(serviceToscaModel.getMetadata().getServiceEcompNaming()); - service.setInputs(serviceToscaModel.gettopology_template().getInputs()); - //FIXME: SDC is not sending the Version with the Tosca Model for 1610 - they should send it in 1702 - //THIS IS A TEMPORARY FIX, AT SOME POINT UNCOMMENT ME - //service.setVersion(serviceToscaModel.getMetadata().getVersion()); - service.setVersion(asdcServiceMetadata.getVersion()); - - return service; - } - public static void extractGroups (ToscaModel serviceToscaModel,NewServiceModel serviceModel) { - // Get the groups. The groups may duplicate the groups that are in the VNF model and have - // additional data like the VF module customization String> - - final Map vfModules = new HashMap (); - final Map volumeGroups = new HashMap (); - - String asdcModelNamespace = VidProperties.getAsdcModelNamespace(); - String vfModuleTag = asdcModelNamespace + ModelConstants.VF_MODULE; - - for (Entry component : serviceToscaModel.gettopology_template().getGroups().entrySet()) { - final Group group = component.getValue(); - final String type = group.getType(); - final String customizationName = component.getKey(); - - if (type.startsWith(vfModuleTag)) { - VfModule vfMod = VfModule.extractVfModule(customizationName, group); - vfModules.put(customizationName, vfMod); - if ( vfMod.isVolumeGroupAllowed() ) { - //volume groups have the same customization name as the vf module - volumeGroups.put(customizationName, VolumeGroup.extractVolumeGroup(customizationName,group)); - } - } - } - // add this point vfModules and volume groups are disconnected from VNF - serviceModel.setVfModules (vfModules); - serviceModel.setVolumeGroups (volumeGroups); - - } - /** - * Populate the vf modules and volume groups that we may have under the service level under each VNF. - */ -// public void associateGroups() { -// String methodName = "associateGroups()"; -// LOG.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + methodName + " start"); -// // go through the vnfs, get the vnf normalized name and look for a vf module with a customization name that starts -// // with vnf + ".." -// String vnfCustomizationName = null; -// String normalizedVnfCustomizationName = null; -// String vfModuleCustomizationName = null; -// NewVNF tmpVnf = null; -// -// if ( ( getVnfs() != null ) && (!(getVnfs().isEmpty())) ) { -// for (Entry vnfComponent : getVnfs().entrySet()) { -// vnfCustomizationName = vnfComponent.getValue().getModelCustomizationName(); -// normalizedVnfCustomizationName = VNF.normalizeName(vnfCustomizationName); -// -// LOG.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + methodName + -// " VNF customizationName=" + vnfCustomizationName + "normalized customization name=" + normalizedVnfCustomizationName); -// -// // now check to see if there is a vf module with customization name that starts with normalizedVnfCustomizationName -// -// if (( getVfModules() != null ) && (!(getVfModules().isEmpty()))) { -// for (Entry vfModuleComponent : getVfModules().entrySet()) { -// vfModuleCustomizationName = vfModuleComponent.getValue().getModelCustomizationName(); -// -// LOG.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + methodName + -// " VF Module customizationName=" + vfModuleCustomizationName ); -// if ( vfModuleCustomizationName.startsWith(normalizedVnfCustomizationName + ".." )) { -// -// // this vf module belongs to the VNF -// tmpVnf = vnfComponent.getValue(); -// (tmpVnf.getVfModules()).put(vfModuleComponent.getKey(), vfModuleComponent.getValue()); -// -// LOG.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + methodName + -// " Associated VF Module customizationName=" + vfModuleComponent.getKey() + " with VNF customization name=" + vnfCustomizationName); -// -// // now find if this vf module has volume groups, if so, find the volume group with the same customization name and put it under the VNF -// if ( vfModuleComponent.getValue().isVolumeGroupAllowed() ) { -// if (( getVolumeGroups() != null ) && (!(getVolumeGroups().isEmpty()))) { -// if (getVolumeGroups().containsKey((vfModuleCustomizationName))) { -// (vnfComponent.getValue().getVolumeGroups()).put(vfModuleCustomizationName, (getVolumeGroups()).get(vfModuleCustomizationName)); -// } -// } -// } -// } -// } -// } -// } -// } - -// } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/model/NewVNF.java b/vid-app-common/src/main/java/org/openecomp/vid/model/NewVNF.java deleted file mode 100644 index e84f963c5..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/model/NewVNF.java +++ /dev/null @@ -1,123 +0,0 @@ -package org.openecomp.vid.model; - -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.HashMap; -import java.util.Map; -import java.util.regex.Pattern; - -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.vid.asdc.beans.tosca.NodeTemplate; - -public class NewVNF extends NewNode { - - /** The Constant LOG. */ - private static final EELFLoggerDelegate LOG = EELFLoggerDelegate.getLogger(VNF.class); - - /** The Constant dateFormat. */ - final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); - - /** The pattern used to normalize VNF names */ - final static Pattern COMPONENT_INSTANCE_NAME_DELIMETER_PATTERN = Pattern.compile("[\\.\\-]+"); - - /** The model customization name. */ - private String modelCustomizationName; - - /** The vf modules. */ - private Map vfModules = new HashMap(); - - /** The volume groups. */ - private Map volumeGroups = new HashMap(); - - /** - * Instantiates a newvnf. - */ - public NewVNF() { - super(); - } - - /** - * Gets the model customization name. - * - * @return the model customization name - */ - public String getModelCustomizationName() { - return modelCustomizationName; - } - - /** - * Gets the vf modules. - * - * @return the vf modules - */ - public Map getVfModules() { - return vfModules; - } - - /** - * Sets the vf modules. - * - * @param vfModules the vf modules - */ - public void setVfModules(Map vfModules) { - this.vfModules = vfModules; - } - - /** - * Gets the volume groups. - * - * @return the volume groups - */ - public Map getVolumeGroups() { - return volumeGroups; - } - - /** - * Sets the volume groups. - * - * @param volumeGroups the volume groups - */ - public void setVolumeGroups(Map volumeGroups) { - this.volumeGroups = volumeGroups; - } - - - /** - * Sets the model customization name. - * - * @param modelCustomizationName the new model customization name - */ - public void setModelCustomizationName(String modelCustomizationName) { - this.modelCustomizationName = modelCustomizationName; - } - /** - * Normalize the VNF name - * @param originalName - * @return the normalized name - */ - public static String normalizeName (String originalName) { - - String normalizedName = originalName.toLowerCase(); - normalizedName = COMPONENT_INSTANCE_NAME_DELIMETER_PATTERN.matcher(normalizedName).replaceAll(" "); - String[] splitArr = null; - - try { - splitArr = normalizedName.split(" "); - } - catch (Exception ex ) { - return (normalizedName); - } - StringBuffer sb = new StringBuffer(); - if ( splitArr != null ) { - for (String splitElement : splitArr) { - sb.append(splitElement); - } - return (sb.toString()); - } - else { - return (normalizedName); - } - - } - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/model/Node.java b/vid-app-common/src/main/java/org/openecomp/vid/model/Node.java deleted file mode 100755 index 1352653e1..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/model/Node.java +++ /dev/null @@ -1,301 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.model; - -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.util.Map.Entry; - -import org.openecomp.vid.asdc.beans.tosca.Input; -import org.openecomp.vid.asdc.beans.tosca.NodeTemplate; - -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -/** - * The Class Node. - */ -public class Node { - /** The Constant LOG. */ - private static final EELFLoggerDelegate LOG = EELFLoggerDelegate.getLogger(Node.class); - - /** The Constant dateFormat. */ - final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); - - /** The uuid. */ - private String uuid; - - /** The invariant uuid. */ - private String invariantUuid; - - /** The description. */ - private String description; - - /** The name. */ - private String name; - - /** The version. */ - private String version; - - /** The model customization uuid. */ - private String customizationUuid; - - /** The inputs. */ - private Map inputs; - - /** The get_input or other constructs from node template properties. */ - private Map commands; - - /** The get_input or other constructs from node template properties. */ - private Map properties; - /** - * Instantiates a new node. - */ - public Node() { - this.commands = new HashMap(); - this.properties = new HashMap(); - } - - /** - * Gets the uuid. - * - * @return the uuid - */ - public String getUuid() { - return uuid; - } - - /** - * Gets the invariant uuid. - * - * @return the invariant uuid - */ - public String getInvariantUuid() { - return invariantUuid; - } - - /** - * Gets the description. - * - * @return the description - */ - public String getDescription() { - return description; - } - - /** - * Gets the name. - * - * @return the name - */ - public String getName() { - return name; - } - - /** - * Gets the version. - * - * @return the version - */ - public String getVersion() { - return version; - } - - /** - * Gets the customization uuid. - * - * @return the model customization uuid - */ - public String getCustomizationUuid() { - return customizationUuid; - } - /** - * Gets the inputs. - * - * @return the inputs - */ - public Map getInputs() { - return inputs; - } - /** - * Gets the commands. - * - * @return the commands - */ - public Map getCommands() { - return commands; - } - /** - * Gets the properties. - * - * @return the properties - */ - public Map getProperties() { - return properties; - } - /** - * Sets the uuid. - * - * @param uuid the new uuid - */ - public void setUuid(String uuid) { - this.uuid = uuid; - } - - /** - * Sets the invariant uuid. - * - * @param invariantUuid the new invariant uuid - */ - public void setInvariantUuid(String invariantUuid) { - this.invariantUuid = invariantUuid; - } - - /** - * Sets the description. - * - * @param description the new description - */ - public void setDescription(String description) { - this.description = description; - } - - /** - * Sets the name. - * - * @param name the new name - */ - public void setName(String name) { - this.name = name; - } - - /** - * Sets the version. - * - * @param version the new version - */ - public void setVersion(String version) { - this.version = version; - } - /** - * Sets the customization uuid. - * - * @param u the new customization uuid - */ - public void setCustomizationUuid(String u) { - this.customizationUuid = u; - } - - /** - * Sets the inputs. - * - * @param inputs the inputs - */ - public void setInputs(Map inputs) { - this.inputs = inputs; - } - /** - * Sets the commands. - * - * @param m the commands - */ - public void setCommands( Mapm ) { - commands = m; - } - /** - * Sets the properties. - * - * @param p the properties - */ - public void setProperties( Mapp) { - properties = p; - } - /** - * Extract node. - * - * @param modelCustomizationName the model customization name - * @param nodeTemplate the node template - * @return the node - */ - public void extractNode (NodeTemplate nodeTemplate) { - - String methodName = "extractNode"; - - setUuid(nodeTemplate.getMetadata().getUUID()); - setInvariantUuid(nodeTemplate.getMetadata().getInvariantUUID()); - setDescription(nodeTemplate.getMetadata().getDescription()); - setName(nodeTemplate.getMetadata().getName()); - setVersion(nodeTemplate.getMetadata().getVersion()); - // add customizationUUID - setCustomizationUuid(nodeTemplate.getMetadata().getCustomizationUUID()); - - try { - // nodeTemplate.getProperties() map of String->Object - for (Entry e : nodeTemplate.getProperties().entrySet()) { - - String k = e.getKey(); - - LOG.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + methodName + " node template property: " + k ); - - if ( e.getValue() != null ) { - LOG.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + methodName + " property: " + - k + "=" + e.getValue()); - //LOG.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + methodName + " V class name: " + - // e.getValue().getClass().getName()); - Class c = e.getValue().getClass(); - if ( c.getName().equalsIgnoreCase(java.lang.String.class.getName())) { - getProperties().put (k, (String)e.getValue()); - } - else { - Class[] interfaces = e.getValue().getClass().getInterfaces(); - - for(Class ifc: interfaces ) { - //LOG.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + methodName + " ifc name: " + - // ifc.getName()); - if ( ifc.getName().equalsIgnoreCase(java.util.Map.class.getName()) ) { - // only extract get_input for now - @SuppressWarnings("unchecked") - HashMap v = (HashMap)e.getValue(); - for (Entry entry : v.entrySet()) { - // only include get_input for now - if ( ModelConstants.GET_INPUT_TAG.equalsIgnoreCase ( entry.getKey() ) ) { - CommandProperty cp = new CommandProperty(); - cp.setCommand(entry.getKey()); - cp.setInputName(entry.getValue()); - cp.setDisplayName(k); - getCommands().put(k,cp); - } - } - } - } - - } - } - } - } - catch ( Exception e ) { - LOG.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + methodName + " Unable to parse node properties: e=" + - e.toString()); - } - } - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/model/ProxyResponse.java b/vid-app-common/src/main/java/org/openecomp/vid/model/ProxyResponse.java deleted file mode 100644 index 132c54ad9..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/model/ProxyResponse.java +++ /dev/null @@ -1,21 +0,0 @@ -package org.openecomp.vid.model; - -/** - * Created by Oren on 7/10/17. - */ -public class ProxyResponse { - - protected String errorMessage; - - protected int httpCode; - - public String getErrorMessage() { - return errorMessage; - } - - - public int getHttpCode() { - return httpCode; - } - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/model/Resource.java b/vid-app-common/src/main/java/org/openecomp/vid/model/Resource.java deleted file mode 100755 index 4dcc975b1..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/model/Resource.java +++ /dev/null @@ -1,28 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.model; - -/** - * The Class Resource. - */ -public class Resource { - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/model/Result.java b/vid-app-common/src/main/java/org/openecomp/vid/model/Result.java deleted file mode 100755 index d8bf6eb64..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/model/Result.java +++ /dev/null @@ -1,58 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.model; - -/** - * The Class Result. - */ -public class Result { - - /** The result. */ - private String result; - - /** - * Instantiates a new result. - * - * @param result the result - */ - public Result(String result) { - this.result = result; - } - - /** - * Gets the result. - * - * @return the result - */ - public String getResult() { - return result; - } - - /** - * Sets the result. - * - * @param result the new result - */ - public void setResult(String result) { - this.result = result; - } - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/model/Service.java b/vid-app-common/src/main/java/org/openecomp/vid/model/Service.java deleted file mode 100755 index c6269b978..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/model/Service.java +++ /dev/null @@ -1,276 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.model; - -import java.util.Map; -import java.util.UUID; -import java.util.Map.Entry; - -import org.openecomp.vid.asdc.beans.tosca.Input; - -/** - * The Class Service. - */ -public class Service { - - /** The uuid. */ - private String uuid; - - /** The invariant uuid. */ - private String invariantUuid; - - /** The name. */ - private String name; - - /** The version. */ - private String version; - - /** The tosca model URL. */ - private String toscaModelURL; - - /** The category. */ - private String category; - - /** The Service Type. */ - private String serviceType; - - /** The Service Role */ - private String serviceRole; - - /** The description. */ - private String description; - - /** The service ecomp naming flag */ - private String serviceEcompNaming; - - /** The inputs. */ - private Map inputs; - - /** - * Gets the uuid. - * - * @return the uuid - */ - public String getUuid() { - return uuid; - } - - /** - * Gets the invariant uuid. - * - * @return the invariant uuid - */ - public String getInvariantUuid() { - return invariantUuid; - } - - /** - * Gets the name. - * - * @return the name - */ - public String getName() { - return name; - } - - /** - * Gets the version. - * - * @return the version - */ - public String getVersion() { - return version; - } - - /** - * Gets the tosca model URL. - * - * @return the tosca model URL - */ - public String getToscaModelURL() { - return toscaModelURL; - } - - /** - * Gets the category. - * - * @return the category - */ - public String getCategory() { - return category; - } - - /** - * Gets the description. - * - * @return the description - */ - public String getDescription() { - return description; - } - - /** - * Gets the inputs. - * - * @return the inputs - */ - public Map getInputs() { - return inputs; - } - /** - * Get the serviceEcompNaming value - * - * @return serviceEcompNaming - */ - public String getServiceEcompNaming() { - return serviceEcompNaming; - } - /** - * Sets the uuid. - * - * @param uuid the new uuid - */ - public void setUuid(String uuid) { - this.uuid = uuid; - } - - /** - * Sets the invariant uuid. - * - * @param invariantUuid the new invariant uuid - */ - public void setInvariantUuid(String invariantUuid) { - this.invariantUuid = invariantUuid; - } - - /** - * Sets the name. - * - * @param name the new name - */ - public void setName(String name) { - this.name = name; - } - - /** - * Sets the version. - * - * @param version the new version - */ - public void setVersion(String version) { - this.version = version; - } - - /** - * Sets the tosca model URL. - * - * @param toscaModelURL the new tosca model URL - */ - public void setToscaModelURL(String toscaModelURL) { - this.toscaModelURL = toscaModelURL; - } - - /** - * Sets the category. - * - * @param category the new category - */ - public void setCategory(String category) { - this.category = category; - } - - /** - * Sets the description. - * - * @param description the new description - */ - public void setDescription(String description) { - this.description = description; - } - - /** - * Sets the inputs. - * - * @param inputs the inputs - */ - public void setInputs(Map inputs) { - this.inputs = inputs; - } - /** - * Sets the service ecomp naming. - * - * @param serviceEcompNaming the new service ecomp naming - */ - public void setServiceEcompNaming(String serviceEcompNaming) { - this.serviceEcompNaming = serviceEcompNaming; - } - /* (non-Javadoc) - * @see java.lang.Object#hashCode() - */ - @Override - public int hashCode() { - final UUID uuid = UUID.fromString(getUuid()); - - return uuid.hashCode(); - } - - /* (non-Javadoc) - * @see java.lang.Object#equals(java.lang.Object) - */ - @Override - public boolean equals(Object o) { - if (o == this) return true; - if (!(o instanceof Service)) return false; - - final Service service = (Service) o; - - return (service.getUuid().equals(getUuid())); - } - - public String getServiceType() { - return serviceType; - } - - public void setServiceType(String serviceType) { - this.serviceType = serviceType; - } - - public String getServiceRole() { - return serviceRole; - } - - public void setServiceRole(String serviceRole) { - this.serviceRole = serviceRole; - } - - /*public static void extractVfModuleCustomizationUUID (Service s, String vnfCustomizationName, VfModule vfMod ) { - - //Look for vnfCustomizationName..vfModuleCustomizationName - String nameToFind = vnfCustomizationName + ".." + vfMod.getModelCustomizationName(); - for (Entry vfModuleComponent : s.getVfModules().entrySet()) { - VfModule xMod = vfModuleComponent.getValue(); - if ( (xMod.getModelCustomizationName() != null) && (xMod.getModelCustomizationName().equalsIgnoreCase(nameToFind)) ) { - vfMod.setCustomizationUuid( xMod.getCustomizationUuid()); - return; - } - } - }*/ -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/model/ServiceModel.java b/vid-app-common/src/main/java/org/openecomp/vid/model/ServiceModel.java deleted file mode 100755 index e879fd470..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/model/ServiceModel.java +++ /dev/null @@ -1,261 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.model; - -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.util.Map.Entry; - -import org.openecomp.vid.asdc.beans.tosca.Group; -import org.openecomp.vid.asdc.beans.tosca.ToscaModel; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.vid.properties.VidProperties; -/** - * The Class ServiceModel. - */ -@SuppressWarnings("ALL") -public class ServiceModel { - - /** The Constant LOG. */ - private static final EELFLoggerDelegate LOG = EELFLoggerDelegate.getLogger(ServiceModel.class); - - /** The Constant dateFormat. */ - final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); - /** The service. */ - private Service service; - - /** The vnfs. */ - private Map vnfs; - - /** The networks. */ - private Map networks; - - /** - * The vf modules. The VNF also has vfmodules but the vfmodules at the service level may have additional info - * that is not present in the VNF, like the vf module customization String - */ - private Map vfModules; - /** - * The volume groups. The VNF also has volume groups but the volume groups will be populated at the service level - * for newer models - */ - private Map volumeGroups; - /** - * Instantiates a new service model. - */ - public ServiceModel() {} - - /** - * Gets the service. - * - * @return the service - */ - public Service getService() { - return service; - } - - /** - * Gets the vnfs. - * - * @return the vnfs - */ - public Map getVnfs() { - return vnfs; - } - - /** - * Gets the networks. - * - * @return the networks - */ - public Map getNetworks() { - return networks; - } - - /** - * Sets the service. - * - * @param service the new service - */ - public void setService(Service service) { - this.service = service; - } - - /** - * Sets the vnfs. - * - * @param vnfs the vnfs - */ - public void setVnfs(Map vnfs) { - this.vnfs = vnfs; - } - - /** - * Sets the networks. - * - * @param networks the networks - */ - public void setNetworks(Map networks) { - this.networks = networks; - } - /** - * Gets the vf modules. - * - * @return the vf modules - */ - public Map getVfModules() { - return vfModules; - } - /** - * Gets the volume groups. - * - * @return the volume groups - */ - public Map getVolumeGroups() { - return volumeGroups; - } - /** - * Sets the vf modules. - * - * @param vfModules the vf modules - */ - public void setVfModules(Map vfModules) { - this.vfModules = vfModules; - } - /** - * Sets the volume groups. - * - * @param volumeGroups the volume groups - */ - public void setVolumeGroups(Map volumeGroups) { - this.volumeGroups = volumeGroups; - } - /** - * Extract service. - * - * @param serviceToscaModel the service tosca model - * @param asdcServiceMetadata the asdc service metadata - * @return the service - */ - public static Service extractService(ToscaModel serviceToscaModel, org.openecomp.vid.asdc.beans.Service asdcServiceMetadata) { - - final Service service = new Service(); - - service.setCategory(serviceToscaModel.getMetadata().getCategory()); - service.setInvariantUuid(serviceToscaModel.getMetadata().getInvariantUUID()); - service.setName(serviceToscaModel.getMetadata().getName()); - service.setUuid(serviceToscaModel.getMetadata().getUUID()); - service.setDescription(serviceToscaModel.getMetadata().getDescription()); - service.setServiceEcompNaming(serviceToscaModel.getMetadata().getServiceEcompNaming()); - service.setInputs(serviceToscaModel.gettopology_template().getInputs()); - //FIXME: SDC is not sending the Version with the Tosca Model for 1610 - they should send it in 1702 - //THIS IS A TEMPORARY FIX, AT SOME POINT UNCOMMENT ME - service.setVersion(serviceToscaModel.getMetadata().getVersion()); - //service.setVersion(asdcServiceMetadata.getVersion()); - - return service; - } - public static void extractGroups (ToscaModel serviceToscaModel,ServiceModel serviceModel) { - // Get the groups. The groups may duplicate the groups that are in the VNF model and have - // additional data like the VF module customization String> - - final Map vfModules = new HashMap (); - final Map volumeGroups = new HashMap (); - - String asdcModelNamespace = VidProperties.getAsdcModelNamespace(); - String vfModuleTag = asdcModelNamespace + ModelConstants.VF_MODULE; - - for (Entry component : serviceToscaModel.gettopology_template().getGroups().entrySet()) { - final Group group = component.getValue(); - final String type = group.getType(); - final String customizationName = component.getKey(); - - if (type.startsWith(vfModuleTag)) { - VfModule vfMod = VfModule.extractVfModule(customizationName, group); - vfModules.put(customizationName, vfMod); - if ( vfMod.isVolumeGroupAllowed() ) { - //volume groups have the same customization name as the vf module - volumeGroups.put(customizationName, VolumeGroup.extractVolumeGroup(customizationName,group)); - } - } - } - // add this point vfModules and volume groups are disconnected from VNF - serviceModel.setVfModules (vfModules); - serviceModel.setVolumeGroups (volumeGroups); - - } - /** - * Populate the vf modules and volume groups that we may have under the service level under each VNF. - */ - public void associateGroups() { - String methodName = "associateGroups()"; - LOG.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + methodName + " start"); - // go through the vnfs, get the vnf normalized name and look for a vf module with a customization name that starts - // with vnf + ".." - String vnfCustomizationName = null; - String normalizedVnfCustomizationName = null; - String vfModuleCustomizationName = null; - VNF tmpVnf = null; - - if ( ( getVnfs() != null ) && (!(getVnfs().isEmpty())) ) { - for (Entry vnfComponent : getVnfs().entrySet()) { - vnfCustomizationName = vnfComponent.getValue().getModelCustomizationName(); - normalizedVnfCustomizationName = VNF.normalizeName(vnfCustomizationName); - - LOG.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + methodName + - " VNF customizationName=" + vnfCustomizationName + "normalized customization name=" + normalizedVnfCustomizationName); - - // now check to see if there is a vf module with customization name that starts with normalizedVnfCustomizationName - - if (( getVfModules() != null ) && (!(getVfModules().isEmpty()))) { - for (Entry vfModuleComponent : getVfModules().entrySet()) { - vfModuleCustomizationName = vfModuleComponent.getValue().getModelCustomizationName(); - - LOG.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + methodName + - " VF Module customizationName=" + vfModuleCustomizationName ); - if ( vfModuleCustomizationName.startsWith(normalizedVnfCustomizationName + ".." )) { - - // this vf module belongs to the VNF - tmpVnf = vnfComponent.getValue(); - (tmpVnf.getVfModules()).put(vfModuleComponent.getKey(), vfModuleComponent.getValue()); - - LOG.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + methodName + - " Associated VF Module customizationName=" + vfModuleComponent.getKey() + " with VNF customization name=" + vnfCustomizationName); - - // now find if this vf module has volume groups, if so, find the volume group with the same customization name and put it under the VNF - if ( vfModuleComponent.getValue().isVolumeGroupAllowed() ) { - if (( getVolumeGroups() != null ) && (!(getVolumeGroups().isEmpty()))) { - if (getVolumeGroups().containsKey((vfModuleCustomizationName))) { - (vnfComponent.getValue().getVolumeGroups()).put(vfModuleCustomizationName, (getVolumeGroups()).get(vfModuleCustomizationName)); - } - } - } - } - } - } - } - } - - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/model/Subscriber.java b/vid-app-common/src/main/java/org/openecomp/vid/model/Subscriber.java deleted file mode 100644 index c5db6fdae..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/model/Subscriber.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.openecomp.vid.model; - - -import org.codehaus.jackson.annotate.JsonProperty; - -/** - * Created by Oren on 7/4/17. - */ -public class Subscriber { - - @JsonProperty("global-customer-id") - public String globalCustomerId; - - @JsonProperty("subscriber-name") - public String subscriberName; - - @JsonProperty("subscriber-type") - public String subscriberType; - - @JsonProperty("resource-version") - public String resourceVersion; - - - - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/model/SubscriberList.java b/vid-app-common/src/main/java/org/openecomp/vid/model/SubscriberList.java deleted file mode 100644 index 7f593e4de..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/model/SubscriberList.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.openecomp.vid.model; - -import org.openecomp.portalsdk.core.web.support.UserUtils; - -import java.util.List; - -/** - * Created by Oren on 7/4/17. - */ -public class SubscriberList { - - public List customer; - - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/model/VNF.java b/vid-app-common/src/main/java/org/openecomp/vid/model/VNF.java deleted file mode 100755 index 62e101ef8..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/model/VNF.java +++ /dev/null @@ -1,165 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.model; - -import java.util.Map; -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.HashMap; -import java.util.Map.Entry; -import java.util.regex.Pattern; - -import org.openecomp.vid.asdc.beans.tosca.NodeTemplate; - -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.vid.controller.VidController; - -import org.openecomp.vid.asdc.beans.tosca.Group; -import org.openecomp.vid.asdc.beans.tosca.Input; - -/** - * The Class VNF. - */ -public class VNF extends Node { - - /** The Constant LOG. */ - private static final EELFLoggerDelegate LOG = EELFLoggerDelegate.getLogger(VNF.class); - - /** The Constant dateFormat. */ - final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); - - /** The pattern used to normalize VNF names */ - final static Pattern COMPONENT_INSTANCE_NAME_DELIMETER_PATTERN = Pattern.compile("[\\.\\-]+"); - - /** The model customization name. */ - private String modelCustomizationName; - - /** The vf modules. */ - private Map vfModules = new HashMap(); - - /** The volume groups. */ - private Map volumeGroups = new HashMap(); - - /** - * Instantiates a new vnf. - */ - public VNF() { - super(); - } - - /** - * Gets the model customization name. - * - * @return the model customization name - */ - public String getModelCustomizationName() { - return modelCustomizationName; - } - - /** - * Gets the vf modules. - * - * @return the vf modules - */ - public Map getVfModules() { - return vfModules; - } - - /** - * Sets the vf modules. - * - * @param vfModules the vf modules - */ - public void setVfModules(Map vfModules) { - this.vfModules = vfModules; - } - - /** - * Gets the volume groups. - * - * @return the volume groups - */ - public Map getVolumeGroups() { - return volumeGroups; - } - - /** - * Sets the volume groups. - * - * @param volumeGroups the volume groups - */ - public void setVolumeGroups(Map volumeGroups) { - this.volumeGroups = volumeGroups; - } - - /** - * Extract vnf. - * - * @param modelCustomizationName the model customization name - * @param nodeTemplate the node template - * @return the vnf - */ - public void extractVnf(String modelCustomizationName, NodeTemplate nodeTemplate) { - - super.extractNode(nodeTemplate); - setModelCustomizationName(modelCustomizationName); - - } - - /** - * Sets the model customization name. - * - * @param modelCustomizationName the new model customization name - */ - public void setModelCustomizationName(String modelCustomizationName) { - this.modelCustomizationName = modelCustomizationName; - } - /** - * Normalize the VNF name - * @param originalName - * @return the normalized name - */ - public static String normalizeName (String originalName) { - - String normalizedName = originalName.toLowerCase(); - normalizedName = COMPONENT_INSTANCE_NAME_DELIMETER_PATTERN.matcher(normalizedName).replaceAll(" "); - String[] splitArr = null; - - try { - splitArr = normalizedName.split(" "); - } - catch (Exception ex ) { - return (normalizedName); - } - StringBuffer sb = new StringBuffer(); - if ( splitArr != null ) { - for (String splitElement : splitArr) { - sb.append(splitElement); - } - return (sb.toString()); - } - else { - return (normalizedName); - } - - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/model/VersionByInvariantIdsRequest.java b/vid-app-common/src/main/java/org/openecomp/vid/model/VersionByInvariantIdsRequest.java deleted file mode 100644 index 7c86165b4..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/model/VersionByInvariantIdsRequest.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.openecomp.vid.model; - -import java.util.List; - -/** - * Created by Oren on 9/5/17. - */ -public class VersionByInvariantIdsRequest { - - public List versions; -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/model/VfModule.java b/vid-app-common/src/main/java/org/openecomp/vid/model/VfModule.java deleted file mode 100755 index 3f6f1da22..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/model/VfModule.java +++ /dev/null @@ -1,308 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.model; - -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.util.Map.Entry; -import org.openecomp.vid.asdc.beans.tosca.Group; - -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; - -/** - * The Class VfModule. - */ -public class VfModule { - - /** The Constant LOG. */ - private static final EELFLoggerDelegate LOG = EELFLoggerDelegate.getLogger(VfModule.class); - - /** The Constant dateFormat. */ - final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); - - /** The uuid. */ - private String uuid; - - /** The invariant uuid. */ - private String invariantUuid; - - /** The customization uuid. */ - private String customizationUuid; - - /** The description. */ - private String description; - - /** The name. */ - private String name; - - /** The version. */ - private String version; - - /** The volume group allowed. */ - private boolean volumeGroupAllowed; - - /** The get_input or other constructs for VF Module. */ - private Map commands; - - /** The model customization name. */ - private String modelCustomizationName; - - /** - * Instantiates a new vf module. - */ - public VfModule() { - commands = new HashMap(); - } - /** - * Gets the model customization name. - * - * @return the model customization name - */ - public String getModelCustomizationName() { - return modelCustomizationName; - } - /** - * Gets the uuid. - * - * @return the uuid - */ - public String getUuid() { - return uuid; - } - - /** - * Gets the invariant uuid. - * - * @return the invariant uuid - */ - public String getInvariantUuid() { - return invariantUuid; - } - /** - * Gets the customization uuid. - * - * @return the invariant uuid - */ - public String getCustomizationUuid() { - return customizationUuid; - } - /** - * Gets the description. - * - * @return the description - */ - public String getDescription() { - return description; - } - /** - * Gets the commands. - * - * @return the commands - */ - public Map getCommands() { - return commands; - } - /** - * Gets the name. - * - * @return the name - */ - public String getName() { - return name; - } - - /** - * Gets the version. - * - * @return the version - */ - public String getVersion() { - return version; - } - - /** - * Checks if is volume group allowed. - * - * @return true, if is volume group allowed - */ - public boolean isVolumeGroupAllowed() { - return volumeGroupAllowed; - } - - /** - * Sets the uuid. - * - * @param uuid the new uuid - */ - public void setUuid(String uuid) { - this.uuid = uuid; - } - - /** - * Sets the invariant uuid. - * - * @param invariantUuid the new invariant uuid - */ - public void setInvariantUuid(String invariantUuid) { - this.invariantUuid = invariantUuid; - } - /** - * Sets the customization uuid. - * - * @param customizationUuid the new customization uuid - */ - public void setCustomizationUuid(String customizationUuid) { - this.customizationUuid = customizationUuid; - } - /** - * Sets the description. - * - * @param description the new description - */ - public void setDescription(String description) { - this.description = description; - } - - /** - * Sets the name. - * - * @param name the new name - */ - public void setName(String name) { - this.name = name; - } - - /** - * Sets the version. - * - * @param version the new version - */ - public void setVersion(String version) { - this.version = version; - } - - /** - * Sets the volume group allowed. - * - * @param volumeGroupAllowed the new volume group allowed - */ - public void setVolumeGroupAllowed(boolean volumeGroupAllowed) { - this.volumeGroupAllowed = volumeGroupAllowed; - } - /** - * Sets the commands. - * - * @param m the commands - */ - public void setCommands( Mapm ) { - commands = m; - } - /** - * Sets the model customization name. - * - * @param modelCustomizationName the new model customization name - */ - public void setModelCustomizationName(String modelCustomizationName) { - this.modelCustomizationName = modelCustomizationName; - } - /** - * Extract vf module. - * - * @param group the group - * @return the vf module - */ - public static VfModule extractVfModule(String modelCustomizationName, Group group) { - - String methodName = "extractVfModule"; - - final VfModule vfModule = new VfModule(); - - try { - vfModule.setUuid(group.getMetadata().getVfModuleModelUUID()); - vfModule.setInvariantUuid(group.getMetadata().getVfModuleModelInvariantUUID()); - vfModule.setDescription(group.getMetadata().getDescription()); - vfModule.setName(group.getMetadata().getVfModuleModelName()); - vfModule.setVersion(group.getMetadata().getVfModuleModelVersion()); - vfModule.setCustomizationUuid(group.getMetadata().getVfModuleModelCustomizationUUID()); - vfModule.setModelCustomizationName (modelCustomizationName); - - if (group.getProperties().containsKey("volume_group")) { - if (group.getProperties().get("volume_group") != null) { - - Class c = group.getProperties().get("volume_group").getClass(); - LOG.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + methodName + " class name=" + - c.getName()); - - if ( c.getName().equalsIgnoreCase(Boolean.class.getName()) ) { - Boolean b = (Boolean)group.getProperties().get("volume_group"); - vfModule.setVolumeGroupAllowed( b.booleanValue() ); - } - } - } else { - vfModule.setVolumeGroupAllowed(false); - } - } - catch ( Exception e ) { - LOG.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + methodName + " Unable to parse VF Module from group: e=" + - e.toString()); - } - /* Not extracting other types of properties for 1702 - try { - - for (Entry e : group.getProperties().entrySet()) { - - String k = e.getKey(); - if ( e.getValue() != null ) { - LOG.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + methodName + " property: " + - k + "=" + e.getValue()); - LOG.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + methodName + " V class name: " + - e.getValue().getClass().getName()); - Class[] interfaces = e.getValue().getClass().getInterfaces(); - - for(Class ifc: interfaces ){ - LOG.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + methodName + " ifc name: " + - ifc.getName()); - } - - // only extract get_input for now - for (Entry entry : v.entrySet()) { - // only include get_input for now - if ( ModelConstants.GET_INPUT_TAG.equalsIgnoreCase ( entry.getKey() ) ) { - CommandProperty cp = new CommandProperty(); - cp.setDisplayName(entry.getValue()); - cp.setCommand(entry.getKey()); - cp.setInputName(k); - (vfModule.getCommands()).put(k,cp); - } - } - } - } - } - catch ( Exception e ) { - LOG.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + methodName + " Unable to parse VF Module properties: e=" + - e.toString()); - }*/ - return vfModule; - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/model/VolumeGroup.java b/vid-app-common/src/main/java/org/openecomp/vid/model/VolumeGroup.java deleted file mode 100755 index baa535171..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/model/VolumeGroup.java +++ /dev/null @@ -1,196 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.model; - -import org.openecomp.vid.asdc.beans.tosca.Group; - -/** - * The Class VolumeGroup. - */ -public class VolumeGroup { - - /** The uuid. */ - private String uuid; - - /** The invariant uuid. */ - private String invariantUuid; - - /** The description. */ - private String description; - - /** The name. */ - private String name; - - /** The version. */ - private String version; - - /** The customization uuid. */ - private String customizationUuid; - - /** The customization uuid. */ - private String modelCustomizationName; - /** - * Instantiates a new volume group. - */ - public VolumeGroup() {} - - /** - * Gets the uuid. - * - * @return the uuid - */ - public String getUuid() { - return uuid; - } - /** - * Gets the customization uuid. - * - * @return the customization uuid - */ - public String getCustomizationUuid() { - return customizationUuid; - } - /** - * Gets the customization name. - * - * @return the customization name - */ - public String getModelCustomizationName() { - return modelCustomizationName; - } - /** - * Gets the invariant uuid. - * - * @return the invariant uuid - */ - public String getInvariantUuid() { - return invariantUuid; - } - - /** - * Gets the description. - * - * @return the description - */ - public String getDescription() { - return description; - } - - /** - * Gets the name. - * - * @return the name - */ - public String getName() { - return name; - } - - /** - * Gets the version. - * - * @return the version - */ - public String getVersion() { - return version; - } - - /** - * Sets the uuid. - * - * @param uuid the new uuid - */ - public void setUuid(String uuid) { - this.uuid = uuid; - } - - /** - * Sets the invariant uuid. - * - * @param invariantUuid the new invariant uuid - */ - public void setInvariantUuid(String invariantUuid) { - this.invariantUuid = invariantUuid; - } - - /** - * Sets the description. - * - * @param description the new description - */ - public void setDescription(String description) { - this.description = description; - } - - /** - * Sets the name. - * - * @param name the new name - */ - public void setName(String name) { - this.name = name; - } - - /** - * Sets the version. - * - * @param version the new version - */ - public void setVersion(String version) { - this.version = version; - } - /** - * Sets the customization uuid. - * - * @param u the new customization uuid - */ - public void setCustomizationUuid(String u) { - this.customizationUuid = u; - - } - /** - * Sets the customization name. - * - * @param u the new customization name - */ - public void setModelCustomizationName(String u) { - this.modelCustomizationName = u; - - } - /** - * Extract volume group. - * - * @param group the group - * @return the volume group - */ - public static VolumeGroup extractVolumeGroup(String modelCustomizationName, Group group) { - final VolumeGroup volumeGroup = new VolumeGroup(); - - volumeGroup.setUuid(group.getMetadata().getVfModuleModelUUID()); - volumeGroup.setInvariantUuid(group.getMetadata().getVfModuleModelInvariantUUID()); - volumeGroup.setDescription(group.getMetadata().getDescription()); - volumeGroup.setName(group.getMetadata().getVfModuleModelName()); - volumeGroup.setVersion(group.getMetadata().getVfModuleModelVersion()); - volumeGroup.setCustomizationUuid(group.getMetadata().getVfModuleModelCustomizationUUID()); - volumeGroup.setModelCustomizationName(modelCustomizationName); - return volumeGroup; - } - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/model/Workflow.java b/vid-app-common/src/main/java/org/openecomp/vid/model/Workflow.java deleted file mode 100644 index 6032ec5aa..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/model/Workflow.java +++ /dev/null @@ -1,47 +0,0 @@ -package org.openecomp.vid.model; - - -import java.util.Collection; - -public class Workflow { - //Private members: - private int id; - private String workflowName; - private Collection vnfNames; - - - //Constructors: - public Workflow() {} - - public Workflow(int id, String workflowName, Collection vnfNames) { - this.id = id; - this.workflowName = workflowName; - this.vnfNames = vnfNames; - } - - - //Setters and getters: - public int getId() { - return id; - } - - public String getWorkflowName() { - return workflowName; - } - - public Collection getVnfNames() { - return this.vnfNames; - } - - public void setId(int id) { - this.id = id; - } - - public void setWorkflowName(String workflowName) { - this.workflowName = workflowName; - } - - public void setVnfName(Collection vnfNames) { - this.vnfNames = vnfNames; - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/mso/MsoBusinessLogic.java b/vid-app-common/src/main/java/org/openecomp/vid/mso/MsoBusinessLogic.java deleted file mode 100644 index f6847e45d..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/mso/MsoBusinessLogic.java +++ /dev/null @@ -1,416 +0,0 @@ -package org.openecomp.vid.mso; - -import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.ObjectMapper; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.util.SystemProperties; -import org.openecomp.vid.controller.MsoController; -import org.openecomp.vid.mso.rest.*; - -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -import static org.openecomp.vid.controller.MsoController.SVC_INSTANCE_ID; -import static org.openecomp.vid.controller.MsoController.REQUEST_TYPE; -import static org.openecomp.vid.controller.MsoController.VNF_INSTANCE_ID; - -/** - * Created by pickjonathan on 19/06/2017. - */ -public class MsoBusinessLogic { - - /** - * The Mso REST client - * This should be replaced with mso client factory. - */ - private MsoInterface msoClientInterface; - - /** - * The logger. - */ - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(MsoController.class); - - /** - * The Constant dateFormat. - */ - final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); - - public MsoBusinessLogic() { - msoClientInterface = MsoRestInterfaceFactory.getInstance(); - } - - // this function should get params from tosca and send them to instance at mso, then return success response. - public MsoResponseWrapper createSvcInstance(RequestDetails msoRequest) throws Exception { - String methodName = "createSvcInstance "; - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - - String endpoint; - try { - endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_SVC_INSTANCE); - } catch (Exception exception) { - throw exception; - } - - return msoClientInterface.createSvcInstance(msoRequest, endpoint); - } - - public MsoResponseWrapper createVnf(RequestDetails requestDetails, String serviceInstanceId) throws Exception { - String methodName = "createVnf"; - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - - String endpoint; - try { - endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_VNF_INSTANCE); - } catch (Exception exception) { - throw exception; - } - - String vnf_endpoint = endpoint.replaceFirst(SVC_INSTANCE_ID, serviceInstanceId); - return msoClientInterface.createVnf(requestDetails, vnf_endpoint); - } - - public MsoResponseWrapper createNwInstance(RequestDetails requestDetails, String serviceInstanceId) throws Exception { - String methodName = "createNwInstance"; - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - - String endpoint; - try { - endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_NETWORK_INSTANCE); - } catch (Exception exception) { - throw exception; - } - - String nw_endpoint = endpoint.replaceFirst(SVC_INSTANCE_ID, serviceInstanceId); - return msoClientInterface.createNwInstance(requestDetails, nw_endpoint); - } - - public MsoResponseWrapper createVolumeGroupInstance(RequestDetails requestDetails, String serviceInstanceId, String vnfInstanceId) throws Exception { - String methodName = "createVolumeGroupInstance"; - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - - String endpoint; - try { - endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_VOLUME_GROUP_INSTANCE); - } catch (Exception exception) { - throw exception; - } - - String vnf_endpoint = endpoint.replaceFirst(SVC_INSTANCE_ID, serviceInstanceId); - vnf_endpoint = vnf_endpoint.replaceFirst(VNF_INSTANCE_ID, vnfInstanceId); - - return msoClientInterface.createVolumeGroupInstance(requestDetails, vnf_endpoint); - } - - public MsoResponseWrapper createVfModuleInstance(RequestDetails requestDetails, String serviceInstanceId, String vnfInstanceId) throws Exception{ - String methodName = "createVfModuleInstance"; - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - - String endpoint; - try { - endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_VF_MODULE_INSTANCE); - } catch (Exception exception) { - throw exception; - } - - String partial_endpoint = endpoint.replaceFirst(SVC_INSTANCE_ID, serviceInstanceId); - String vf_module_endpoint = partial_endpoint.replaceFirst(VNF_INSTANCE_ID, vnfInstanceId); - - return msoClientInterface.createVfModuleInstance(requestDetails, vf_module_endpoint); - } - - public MsoResponseWrapper deleteSvcInstance(RequestDetails requestDetails, String serviceInstanceId) throws Exception{ - String methodName = "deleteSvcInstance"; - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - - String endpoint; - try { - endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_SVC_INSTANCE); - } catch (Exception exception) { - throw exception; - } - - String svc_endpoint = endpoint + "/" + serviceInstanceId; - - return msoClientInterface.deleteSvcInstance(requestDetails, svc_endpoint); - } - - public MsoResponseWrapper deleteVnf(RequestDetails requestDetails, String serviceInstanceId, String vnfInstanceId) throws Exception{ - String methodName = "deleteVnf"; - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - - String endpoint; - try { - endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_VNF_INSTANCE); - } catch (Exception exception) { - throw exception; - } - String vnf_endpoint = endpoint.replaceFirst(SVC_INSTANCE_ID, serviceInstanceId); - vnf_endpoint = vnf_endpoint + '/' + vnfInstanceId; - - return msoClientInterface.deleteVnf(requestDetails, vnf_endpoint); - } - - public MsoResponseWrapper deleteVfModule(RequestDetails requestDetails, String serviceInstanceId, String vnfInstanceId, String vfModuleId) throws Exception{ - String methodName = "deleteVfModule"; - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - - String endpoint; - try { - endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_VF_MODULE_INSTANCE); - } catch (Exception exception) { - throw exception; - } - - String vf__modules_endpoint = endpoint.replaceFirst(SVC_INSTANCE_ID, serviceInstanceId).replaceFirst(VNF_INSTANCE_ID, vnfInstanceId); - - String delete_vf_endpoint = vf__modules_endpoint + '/' + vfModuleId; - - return msoClientInterface.deleteVfModule(requestDetails, delete_vf_endpoint); - } - - public MsoResponseWrapper deleteVolumeGroupInstance(RequestDetails requestDetails, String serviceInstanceId, String vnfInstanceId, String volumeGroupId)throws Exception{ - String methodName = "deleteVolumeGroupInstance"; - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - - String endpoint; - try { - endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_VOLUME_GROUP_INSTANCE); - } catch (Exception exception) { - throw exception; - } - - String svc_endpoint = endpoint.replaceFirst(SVC_INSTANCE_ID, serviceInstanceId); - String vnf_endpoint = svc_endpoint.replaceFirst(VNF_INSTANCE_ID, vnfInstanceId); - String delete_volume_group_endpoint = vnf_endpoint + "/" + volumeGroupId; - - return msoClientInterface.deleteVolumeGroupInstance(requestDetails, delete_volume_group_endpoint); - } - - public MsoResponseWrapper deleteNwInstance(RequestDetails requestDetails, String serviceInstanceId, String networkInstanceId) throws Exception{ - String methodName = "deleteNwInstance"; - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - - String endpoint; - try { - endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_NETWORK_INSTANCE); - } catch (Exception exception) { - throw exception; - } - - String svc_endpoint = endpoint.replaceFirst(SVC_INSTANCE_ID, serviceInstanceId); - String delete_nw_endpoint = svc_endpoint + "/" + networkInstanceId; - - return msoClientInterface.deleteNwInstance(requestDetails, delete_nw_endpoint); - } - - public MsoResponseWrapper getOrchestrationRequest(String requestId)throws Exception{ - String methodName = "getOrchestrationRequest"; - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - MsoResponseWrapper w = null; - try { - String p = SystemProperties.getProperty(MsoProperties.MSO_REST_API_GET_ORC_REQ); - String path = p + "/" + requestId; - - RestObject restObjStr = new RestObject(); - String str = new String(); - restObjStr.set(str); - - msoClientInterface.getOrchestrationRequest(str, "", path, restObjStr); - - return MsoUtil.wrapResponse(restObjStr); - - } catch (Exception e) { - logger.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); - throw e; - } - } - - public MsoResponseWrapper getOrchestrationRequests(String filterString)throws Exception{ - String methodName = "getOrchestrationRequest"; - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - MsoResponseWrapper w = null; - try { - String p = SystemProperties.getProperty(MsoProperties.MSO_REST_API_GET_ORC_REQS); - String path = p + filterString; - - RestObject restObjStr = new RestObject(); - String str = new String(); - restObjStr.set(str); - - msoClientInterface.getOrchestrationRequest(str, "", path, restObjStr); - - return MsoUtil.wrapResponse(restObjStr); - - } catch (Exception e) { - logger.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); - throw e; - } - } - - public List getOrchestrationRequestsForDashboard()throws Exception{ - String methodName = "getOrchestrationRequestsForDashboard"; - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - - try { - String path = SystemProperties.getProperty(MsoProperties.MSO_REST_API_GET_ORC_REQS); - path += "filter=modelType:EQUALS:vnf"; - RestObject restObjStr = new RestObject(); - String str = new String(); - restObjStr.set(str); - - MsoResponseWrapper msoResponseWrapper = msoClientInterface.getOrchestrationRequestsForDashboard(str, "", path, restObjStr); - List allOrchestrationRequests = deserializeOrchestrationRequestsJson(msoResponseWrapper.getEntity()); - - List filteredOrchestrationRequests = new ArrayList<>(); - for (RequestWrapper currentRequest:allOrchestrationRequests){ - if ((currentRequest.getRequest() != null) && (currentRequest.getRequest().getRequestScope() == Request.RequestScope.VNF) && ((currentRequest.getRequest().getRequestType() == - Request.RequestType.REPLACE_INSTANCE)||(currentRequest.getRequest().getRequestType() == - Request.RequestType.UPDATE_INSTANCE) )) { - filteredOrchestrationRequests.add(currentRequest.getRequest()); - } - } - return filteredOrchestrationRequests; - } catch (Exception e) { - logger.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); - throw e; - } - - } - - private List deserializeOrchestrationRequestsJson(String orchestrationRequestsJson) throws Exception { - String methodName = "deserializeOrchestrationRequestsJson"; - logger.debug(dateFormat.format(new Date()) + "<== " + methodName + " start"); - - ObjectMapper mapper = new ObjectMapper(); - mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); - mapper.configure(DeserializationFeature.READ_ENUMS_USING_TO_STRING, true); - RequestList requestList = mapper.readValue(orchestrationRequestsJson , RequestList.class); - return requestList.getRequestList(); - } - - - public List getManualTasksByRequestId(String originalRequestId)throws Exception{ - String methodName = "getManualTasksByRequestId"; - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - - try { - String p = SystemProperties.getProperty(MsoProperties.MSO_REST_API_GET_MAN_TASKS); - String path = p + "?originalRequestId=" + originalRequestId; - - RestObject restObjStr = new RestObject(); - String str = new String(); - restObjStr.set(str); - - MsoResponseWrapper msoResponseWrapper = msoClientInterface.getManualTasksByRequestId(str, "", path, restObjStr); - return deserializeManualTasksJson(msoResponseWrapper.getEntity()); - - } catch (Exception e) { - logger.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); - throw e; - } - } - - private List deserializeManualTasksJson(String manualTasksJson) throws Exception{ - String methodName = "deserializeManualTasksJson"; - logger.debug(dateFormat.format(new Date()) + "<== " + methodName + " start"); - - ObjectMapper mapper = new ObjectMapper(); - TaskList taskList = mapper.readValue(manualTasksJson , TaskList.class); - return taskList.getTaskList(); - } - - - public MsoResponseWrapper completeManualTask(RequestDetails requestDetails , String taskId)throws Exception{ - String methodName = "completeManualTask"; - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - MsoResponseWrapper w = null; - try { - String p = SystemProperties.getProperty(MsoProperties.MSO_REST_API_GET_MAN_TASKS); - String path = p + "/" + taskId + "/complete"; - - RestObject restObjStr = new RestObject(); - String str = new String(); - restObjStr.set(str); - - msoClientInterface.completeManualTask(requestDetails , str, "", path, restObjStr); - - return MsoUtil.wrapResponse(restObjStr); - - } catch (Exception e) { - logger.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); - throw e; - } - } - - public MsoResponseWrapper activateServiceInstance(RequestDetails requestDetails , String serviceInstanceId)throws Exception{ - String methodName = "activateServiceInstance"; - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - try { - String path ="/" + serviceInstanceId + "/activate"; - - RestObject restObjStr = new RestObject<>(); - String str = ""; - restObjStr.set(str); - - msoClientInterface.activateServiceInstance(requestDetails , str, "", path, restObjStr); - - return MsoUtil.wrapResponse(restObjStr); - - } catch (Exception e) { - logger.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); - throw e; - } - } - - - - - private String validateEndpointPath(String endpointEnvVariable) throws Exception { - String endpoint = SystemProperties.getProperty(endpointEnvVariable); - if (endpoint == null || endpoint.isEmpty()) { - throw new Exception(endpointEnvVariable + " env variable is not defined"); - } - return endpoint; - } - - public MsoResponseWrapper updateVnf(org.openecomp.vid.changeManagement.RequestDetails requestDetails, String serviceInstanceId, String vnfInstanceId) throws Exception { - String methodName = "updateVnf"; - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - - String endpoint; - try { - endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_VNF_INSTANCE); - } catch (Exception exception) { - throw exception; - } - String vnf_endpoint = endpoint.replaceFirst(SVC_INSTANCE_ID, serviceInstanceId); - vnf_endpoint = vnf_endpoint + '/' + vnfInstanceId; - return msoClientInterface.updateVnf(requestDetails, vnf_endpoint); - } - - public MsoResponseWrapper replaceVnf(org.openecomp.vid.changeManagement.RequestDetails requestDetails, String serviceInstanceId, String vnfInstanceId) throws Exception { - String methodName = "replaceVnf"; - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - - String endpoint; - try { - endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_VNF_CHANGE_MANAGEMENT_INSTANCE); - } catch (Exception exception) { - throw exception; - } - String vnf_endpoint = endpoint.replaceFirst(SVC_INSTANCE_ID, serviceInstanceId); - vnf_endpoint = vnf_endpoint.replace(VNF_INSTANCE_ID, vnfInstanceId); - vnf_endpoint = vnf_endpoint.replace(REQUEST_TYPE, "replace"); //No Constants file, TODO: once you create - add it. - return msoClientInterface.replaceVnf(requestDetails, vnf_endpoint); - } - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/mso/MsoClientFactory.java b/vid-app-common/src/main/java/org/openecomp/vid/mso/MsoClientFactory.java deleted file mode 100644 index fb0ead440..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/mso/MsoClientFactory.java +++ /dev/null @@ -1,37 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.mso; - -import org.openecomp.vid.mso.rest.MsoRestClientNew; - -/** - * A factory for creating MsoRestInterface objects. - */ -public class MsoClientFactory { - - /** - * MSO client factory that creates the right client according to env. - * @return - */ - public static MsoInterface getInstance() { - return new MsoRestClientNew(); - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/mso/MsoInterface.java b/vid-app-common/src/main/java/org/openecomp/vid/mso/MsoInterface.java deleted file mode 100644 index cdeb1bbd2..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/mso/MsoInterface.java +++ /dev/null @@ -1,75 +0,0 @@ -package org.openecomp.vid.mso; - -import org.openecomp.vid.mso.rest.Request; -import org.openecomp.vid.mso.rest.RequestDetails; -import org.openecomp.vid.mso.rest.Task; - -import java.util.List; - -/** - * Created by pickjonathan on 21/06/2017. - */ -public interface MsoInterface { - - /** - * This function will post MSO service with information about how to instantiate the requested service - * @param requestDetails The details about the service as they come from the web. - * @return MsoResponseWrapper containing information about the service instantiation - * --> success : see JSON at resources folder mso_create_instance_response. - * --> failure : would return 200 with failure data. - * @throws Exception - */ - MsoResponseWrapper createSvcInstance(RequestDetails requestDetails, String endpoint) throws Exception; - - /** - * will create a virtual network function using MSO service. - * @param requestDetails - information about the vnf to create - * @return - the response body recived from MSO - * @throws Exception - */ - MsoResponseWrapper createVnf(RequestDetails requestDetails, String endpoint) throws Exception; - - MsoResponseWrapper createNwInstance(RequestDetails requestDetails, String endpoint) throws Exception; - /** - * - * @param requestDetails - * @param path - * @return - * @throws Exception - */ - MsoResponseWrapper createVolumeGroupInstance(RequestDetails requestDetails, String path) throws Exception; - - /** - * - * @param requestDetails - * @return - * @throws Exception - */ - MsoResponseWrapper createVfModuleInstance(RequestDetails requestDetails, String endpoint) throws Exception; - - MsoResponseWrapper deleteSvcInstance(RequestDetails requestDetails, String endpoint) throws Exception; - - MsoResponseWrapper deleteVnf(RequestDetails requestDetails, String endpoint) throws Exception; - - MsoResponseWrapper deleteVfModule(RequestDetails requestDetails, String endpoint) throws Exception; - - MsoResponseWrapper deleteVolumeGroupInstance(RequestDetails requestDetails, String endpoint) throws Exception; - - MsoResponseWrapper deleteNwInstance(RequestDetails requestDetails, String endpoint) throws Exception; - - void getOrchestrationRequest(String t, String sourceId, String endpoint, RestObject restObject) throws Exception; - - MsoResponseWrapper getOrchestrationRequestsForDashboard(String t , String sourceId , String endpoint , RestObject restObject) throws Exception; - - MsoResponseWrapper getManualTasksByRequestId(String t , String sourceId , String endpoint , RestObject restObject) throws Exception; - - MsoResponseWrapper completeManualTask(RequestDetails requestDetails, String t, String sourceId, String endpoint, RestObject restObject) throws Exception; - - MsoResponseWrapper updateVnf(org.openecomp.vid.changeManagement.RequestDetails requestDetails, String vnf_endpoint) throws Exception; - - MsoResponseWrapper replaceVnf(org.openecomp.vid.changeManagement.RequestDetails requestDetails, String vnf_endpoint) throws Exception; - - - void activateServiceInstance(RequestDetails requestDetails, String t, String sourceId, String endpoint, RestObject restObject) throws Exception; - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/mso/MsoLocalClient.java b/vid-app-common/src/main/java/org/openecomp/vid/mso/MsoLocalClient.java deleted file mode 100644 index 0179400dc..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/mso/MsoLocalClient.java +++ /dev/null @@ -1,85 +0,0 @@ -package org.openecomp.vid.mso; - -import org.apache.commons.io.IOUtils; -import org.json.JSONObject; -import org.json.JSONTokener; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.vid.changeManagement.ChangeManagementRequest; -import org.openecomp.vid.controller.VidController; -import org.openecomp.vid.mso.rest.RequestDetails; - -import javax.ws.rs.client.Client; -import javax.ws.rs.core.MultivaluedHashMap; -import java.io.InputStream; -import java.text.DateFormat; -import java.text.SimpleDateFormat; - -/** - * Created by pickjonathan on 20/06/2017. - */ -public class MsoLocalClient implements MsoRestInterfaceIfc { - - /** - * The logger. - */ - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(MsoLocalClient.class); - - /** - * The Constant dateFormat. - */ - final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); - - /** - * The client. - */ - private static Client client = null; - - /** - * The common headers. - */ - private MultivaluedHashMap commonHeaders; - - /** - * Instantiates a new mso rest interface. - */ - public MsoLocalClient() { - super(); - } - - public void initMsoClient() { - final String methodname = "initRestClient()"; - } - - @Override - public void Get(T t, String sourceId, String path, RestObject restObject) throws Exception { - - } - - @Override - public void Delete(T t, RequestDetails r, String sourceID, String path, RestObject restObject) throws Exception { - - } - - @Override - public void Post(T t, RequestDetails r, String sourceID, String path, RestObject restObject) throws Exception { - initMsoClient(); - - final InputStream asdcServicesFile = MsoLocalClient.class.getClassLoader().getResourceAsStream("mso_create_instance_response.json"); - - t = (T) IOUtils.toString(asdcServicesFile); - restObject.setStatusCode(200); - restObject.set(t); - } - - @Override - public void logRequest(RequestDetails r) { - - } - - @Override - public void Put(T t, ChangeManagementRequest r, String sourceID, String path, RestObject restObject) - throws Exception { - - - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/mso/MsoLocalClientNew.java b/vid-app-common/src/main/java/org/openecomp/vid/mso/MsoLocalClientNew.java deleted file mode 100644 index 1b15df721..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/mso/MsoLocalClientNew.java +++ /dev/null @@ -1,216 +0,0 @@ -package org.openecomp.vid.mso; - -import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.ObjectMapper; -import org.apache.commons.io.IOUtils; -import org.apache.commons.lang3.NotImplementedException; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.vid.mso.rest.*; - -import java.io.InputStream; -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -/** - * Created by pickjonathan on 21/06/2017. - */ -public class MsoLocalClientNew implements MsoInterface { - - - /** - * The logger. - */ - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(MsoLocalClient.class); - - /** - * The Constant dateFormat. - */ - final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); - - - @Override - public MsoResponseWrapper createSvcInstance(RequestDetails requestDetails, String endpoint) throws Exception { - - String methodName = "createSvcInstance "; - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - MsoResponseWrapper w = createInstance(requestDetails, ""); - - return w; - } - - public MsoResponseWrapper createInstance(RequestDetails request, String path) throws Exception { - String methodName = "createInstance"; - logger.debug(dateFormat.format(new Date()) + "<== " + methodName + " start"); - - try { - RestObject restObjStr = new RestObject(); - - String str = new String(); - - restObjStr.set(str); - - final InputStream asdcServicesFile = MsoLocalClient.class.getClassLoader().getResourceAsStream("mso_create_instance_response.json"); - - restObjStr.setStatusCode(200); - restObjStr.set(IOUtils.toString(asdcServicesFile)); - - MsoResponseWrapper w = MsoUtil.wrapResponse(restObjStr); - - return w; - } catch (Exception e) { - logger.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); - throw e; - } - } - - @Override - public MsoResponseWrapper createVnf(RequestDetails requestDetails, String endpoint) throws Exception { - return null; - } - - @Override - public MsoResponseWrapper createNwInstance(RequestDetails requestDetails, String endpoint) throws Exception { - return null; - } - - @Override - public MsoResponseWrapper createVolumeGroupInstance(RequestDetails requestDetails, String path) throws Exception { - return null; - } - - @Override - public MsoResponseWrapper createVfModuleInstance(RequestDetails requestDetails, String endpoint) throws Exception { - return null; - } - - @Override - public MsoResponseWrapper deleteSvcInstance(RequestDetails requestDetails, String endpoint) throws Exception { - return null; - } - - @Override - public MsoResponseWrapper deleteVnf(RequestDetails requestDetails, String endpoint) throws Exception { - return null; - } - - @Override - public MsoResponseWrapper deleteVfModule(RequestDetails requestDetails, String endpoint) throws Exception { - return null; - } - - @Override - public MsoResponseWrapper deleteVolumeGroupInstance(RequestDetails requestDetails, String endpoint) throws Exception { - return null; - } - - @Override - public MsoResponseWrapper deleteNwInstance(RequestDetails requestDetails, String endpoint) throws Exception { - return null; - } - - @Override - public void getOrchestrationRequest(String t, String sourceId, String endpoint, RestObject restObject) throws Exception { } - - @Override - public MsoResponseWrapper getOrchestrationRequestsForDashboard(String t, String sourceId, String endpoint, RestObject restObject) throws Exception { - String methodName = "getOrchestrationRequestsForDashboard"; - logger.debug(dateFormat.format(new Date()) + "<== " + methodName + " start"); - - try { - - final InputStream asdcServicesFile = MsoLocalClient.class.getClassLoader().getResourceAsStream("mso_get_orchestration_requests.json"); - - restObject.setStatusCode(200); - restObject.set(IOUtils.toString(asdcServicesFile)); - - MsoResponseWrapper w = MsoUtil.wrapResponse(restObject); - - return w; - } catch (Exception e) { - logger.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); - throw e; - } - } - - public void activateServiceInstance(RequestDetails requestDetails, String t, String sourceId, String endpoint, RestObject restObject) throws Exception{ - String methodName = "activateServiceInstance"; - logger.debug(dateFormat.format(new Date()) + "<== " + methodName + " start"); - - try { - - final InputStream asdcServicesFile = MsoLocalClient.class.getClassLoader().getResourceAsStream("mso_activate_service_instance.json"); - - restObject.setStatusCode(200); - restObject.set(IOUtils.toString(asdcServicesFile)); - - } catch (Exception e) { - logger.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); - throw e; - } - } - - - @Override - public MsoResponseWrapper getManualTasksByRequestId(String t, String sourceId, String endpoint, RestObject restObject) throws Exception { - String methodName = "getManualTasksByRequestId"; - logger.debug(dateFormat.format(new Date()) + "<== " + methodName + " start"); - - try { - - final InputStream asdcServicesFile = MsoLocalClient.class.getClassLoader().getResourceAsStream("mso_get_manual_task_by_request_id.json"); - - restObject.setStatusCode(200); - restObject.set(IOUtils.toString(asdcServicesFile)); - - MsoResponseWrapper w = MsoUtil.wrapResponse(restObject); - - return w; - } catch (Exception e) { - logger.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); - throw e; - } - } - - @Override - public MsoResponseWrapper completeManualTask(RequestDetails requestDetails, String t, String sourceId, String endpoint, RestObject restObject) throws Exception { - String methodName = "getManualTasksByRequestId"; - logger.debug(dateFormat.format(new Date()) + "<== " + methodName + " start"); - - try { - - final InputStream asdcServicesFile = MsoLocalClient.class.getClassLoader().getResourceAsStream("mso_complete_manual_task.json"); - - restObject.setStatusCode(200); - restObject.set(IOUtils.toString(asdcServicesFile)); - - MsoResponseWrapper w = MsoUtil.wrapResponse(restObject); - - return w; - } catch (Exception e) { - logger.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); - throw e; - } - } - - @Override - public MsoResponseWrapper replaceVnf(org.openecomp.vid.changeManagement.RequestDetails requestDetails, String vnf_endpoint) throws Exception { - throw new NotImplementedException("Function was not implemented at this point."); - } - - - - @Override - public MsoResponseWrapper updateVnf(org.openecomp.vid.changeManagement.RequestDetails requestDetails, - String vnf_endpoint) { - // TODO Auto-generated method stub - return null; - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/mso/MsoProperties.java b/vid-app-common/src/main/java/org/openecomp/vid/mso/MsoProperties.java deleted file mode 100755 index 0eed0e1d1..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/mso/MsoProperties.java +++ /dev/null @@ -1,105 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.mso; - -import org.openecomp.portalsdk.core.util.SystemProperties; - -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; - -/** - * The Class MsoProperties. - */ -public class MsoProperties extends SystemProperties { - - /** The Constant MSO_SERVER_URL. */ - //VID Properties related to MSO - public static final String MSO_SERVER_URL = "mso.server.url"; - - /** The Constant MSO_DME2_SERVER_URL. */ - public static final String MSO_DME2_SERVER_URL = "mso.dme2.server.url"; - - /** The Constant MSO_DME2_CLIENT_TIMEOUT. */ - public static final String MSO_DME2_CLIENT_TIMEOUT = "mso.dme2.client.timeout"; - - /** The Constant MSO_DME2_CLIENT_READ_TIMEOUT. */ - public static final String MSO_DME2_CLIENT_READ_TIMEOUT = "mso.dme2.client.read.timeout"; - - /** The Constant MSO_SERVER_URL_DEFAULT. */ - public static final String MSO_SERVER_URL_DEFAULT= ""; - - /** The Constant MSO_POLLING_INTERVAL_MSECS. */ - // number of msecs to wait between polling requests - public static final String MSO_POLLING_INTERVAL_MSECS = "mso.polling.interval.msecs"; - - /** The Constant MSO_POLLING_INTERVAL_MSECS_DEFAULT. */ - public static final String MSO_POLLING_INTERVAL_MSECS_DEFAULT = "60000"; - - /** The Constant MSO_DME2_ENABLED. */ - public static final String MSO_DME2_ENABLED = "mso.dme2.enabled"; - - /** The Constant MSO_MAX_POLLS. */ - public static final String MSO_MAX_POLLS = "mso.max.polls"; - - /** The Constant MSO_MAX_POLLS_DEFAULT. */ - public static final String MSO_MAX_POLLS_DEFAULT = "10"; //10 - - /** The Constant MSO_USER_NAME. */ - public static final String MSO_USER_NAME = "mso.user.name"; //m03346 - - /** The Constant MSO_PASSWORD. */ - public static final String MSO_PASSWORD = "mso.password.x"; - - /** The Constant MSO_REST_API_SVC_INSTANCE. */ - public static final String MSO_REST_API_SVC_INSTANCE = "mso.restapi.svc.instance"; // /serviceInstances/v2 - - /** The Constant MSO_REST_API_VNF_INSTANCE. */ - public static final String MSO_REST_API_VNF_INSTANCE = "mso.restapi.vnf.instance"; // /serviceInstances/v2/{service_instance_id}/vnfs - - /** The Constant MSO_REST_API_VNF_CHANGE_MANAGEMENT_INSTANCE. */ - public static final String MSO_REST_API_VNF_CHANGE_MANAGEMENT_INSTANCE = "mso.restapi.vnf.changemanagement.instance"; // /serviceInstances/v2/{service_instance_id}/vnfs/{request_type} - - /** The Constant MSO_REST_API_NETWORK_INSTANCE. */ - public static final String MSO_REST_API_NETWORK_INSTANCE = "mso.restapi.network.instance"; // /serviceInstances/v2/{serviceInstanceId}/networks - - /** The Constant MSO_REST_API_GET_ORC_REQ. */ - public static final String MSO_REST_API_GET_ORC_REQ = "mso.restapi.get.orc.req"; - - /** The Constant MSO_REST_API_GET_ORC_REQS. */ - public static final String MSO_REST_API_GET_ORC_REQS = "mso.restapi.get.orc.reqs"; - - /** The Constant MSO_REST_API_GET_MAN_TASK. */ - public static final String MSO_REST_API_GET_MAN_TASKS = "mso.restapi.get.man.tasks"; - - /** The Constant MSO_REST_API_VF_MODULE_INSTANCE. */ - public static final String MSO_REST_API_VF_MODULE_INSTANCE = "mso.restapi.vf.module.instance"; - - /** The Constant MSO_REST_API_VOLUME_GROUP_INSTANCE. */ - public static final String MSO_REST_API_VOLUME_GROUP_INSTANCE = "mso.restapi.volume.group.instance"; //serviceInstances/v2/{serviceInstanceId}/volumeGroups - - /** The logger. */ - public EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(MsoProperties.class); - - /** The Constant dateFormat. */ - final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/mso/MsoResponseWrapper.java b/vid-app-common/src/main/java/org/openecomp/vid/mso/MsoResponseWrapper.java deleted file mode 100755 index d5a4a87ef..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/mso/MsoResponseWrapper.java +++ /dev/null @@ -1,107 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.mso; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import org.apache.commons.lang.builder.ToStringBuilder; - -/** - * This wrapper encapsulates the MSO response in the format expected by the pages. - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "status", - "entity" -}) - -public class MsoResponseWrapper { - - /** The status. */ - @JsonProperty("status") - private int status; - - /** The entity. */ - @JsonProperty("entity") - private String entity; - - /** - * Gets the entity. - * - * @return the entity - */ - @JsonProperty("entity") - public String getEntity() { - return entity; - } - - /** - * Gets the status. - * - * @return the status - */ - @JsonProperty("status") - public int getStatus() { - return status; - } - - /** - * Sets the status. - * - * @param v the new status - */ - @JsonProperty("status") - public void setStatus(int v) { - this.status = v; - } - - /** - * Sets the entity. - * - * @param v the new entity - */ - @JsonProperty("entity") - public void setEntity(String v) { - this.entity = v; - } - - /* (non-Javadoc) - * @see java.lang.Object#toString() - */ - @Override - public String toString() { - return ToStringBuilder.reflectionToString(this); - } - - /** - * Gets the response. - * - * @return the response - */ - public String getResponse () { - - StringBuilder b = new StringBuilder ("{ \"status\": "); - b.append(getStatus()).append(", \"entity\": " ).append(this.getEntity()).append("}"); - return (b.toString()); - } - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/mso/MsoRestInt.java b/vid-app-common/src/main/java/org/openecomp/vid/mso/MsoRestInt.java deleted file mode 100755 index b9f2dbcc9..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/mso/MsoRestInt.java +++ /dev/null @@ -1,71 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.mso; - -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.Date; - -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import com.fasterxml.jackson.databind.ObjectMapper; - -/** - * The Class MsoRestInt. - */ -public class MsoRestInt { - - /** The logger. */ - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(MsoRestInterface.class); - - /** The Constant dateFormat. */ - final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); - - /** The request date format. */ - public DateFormat requestDateFormat = new SimpleDateFormat("EEE, dd MMM YYYY HH:mm:ss z"); - - /** - * Instantiates a new mso rest int. - */ - public MsoRestInt() { - requestDateFormat.setTimeZone(java.util.TimeZone.getTimeZone("GMT")); - } - - /** - * Log request. - * - * @param r the r - */ - public void logRequest ( org.openecomp.vid.mso.rest.RequestDetails r ) { - String methodName = "logRequest"; - ObjectMapper mapper = new ObjectMapper(); - String r_json_str = ""; - if ( r != null ) { - r_json_str = r.toString(); - try { - r_json_str = mapper.writeValueAsString(r); - } - catch ( com.fasterxml.jackson.core.JsonProcessingException j ) { - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " Unable to parse request as json"); - } - } - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " Request=(" + r_json_str + ")"); - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/mso/MsoRestInterface.java b/vid-app-common/src/main/java/org/openecomp/vid/mso/MsoRestInterface.java deleted file mode 100755 index 5b331e908..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/mso/MsoRestInterface.java +++ /dev/null @@ -1,352 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.mso; - - -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.Collections; -import java.util.Date; - -import javax.ws.rs.client.Client; -import javax.ws.rs.client.Entity; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.MultivaluedHashMap; -import javax.ws.rs.core.Response; - -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.util.SystemProperties; - -import org.apache.commons.codec.binary.Base64; -import org.eclipse.jetty.util.security.Password; -import org.openecomp.vid.changeManagement.ChangeManagementRequest; -import org.openecomp.vid.client.HttpBasicClient; -import org.openecomp.vid.client.HttpsBasicClient; -import org.openecomp.vid.mso.rest.RequestDetails; - -/** - * The Class MsoRestInterface. - */ -public class MsoRestInterface extends MsoRestInt implements MsoRestInterfaceIfc { - - /** The logger. */ - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(MsoRestInterface.class); - - /** The Constant dateFormat. */ - final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); - - /** The client. */ - private static Client client = null; - - /** The common headers. */ - private MultivaluedHashMap commonHeaders; - - /** - * Instantiates a new mso rest interface. - */ - public MsoRestInterface() { - super(); - } - - /* (non-Javadoc) - * @see org.openecomp.vid.mso.MsoRestInterfaceIfc#initRestClient() - */ - public void initMsoClient() - { - final String methodname = "initRestClient()"; - - final String username = SystemProperties.getProperty(MsoProperties.MSO_USER_NAME); - final String password = SystemProperties.getProperty(MsoProperties.MSO_PASSWORD); - final String mso_url = SystemProperties.getProperty(MsoProperties.MSO_SERVER_URL); - final String decrypted_password = Password.deobfuscate(password); - - String authString = username + ":" + decrypted_password; - - byte[] authEncBytes = Base64.encodeBase64(authString.getBytes()); - String authStringEnc = new String(authEncBytes); - - commonHeaders = new MultivaluedHashMap (); - commonHeaders.put("Authorization", Collections.singletonList((Object) ("Basic " + authStringEnc))); - //Pass calling application identifier to SO - commonHeaders.put("X-FromAppId", - Collections.singletonList(SystemProperties.getProperty(SystemProperties.APP_DISPLAY_NAME))); - - boolean use_ssl = true; - if ( (mso_url != null) && ( !(mso_url.isEmpty()) ) ) { - if ( mso_url.startsWith("https")) { - use_ssl = true; - } - else { - use_ssl = false; - } - } - if (client == null) { - - try { - if ( use_ssl ) { - //logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + methodname + " getting HttpsBasicClient with username=" + username - // + " password=" + password); - client = HttpsBasicClient.getClient(); - } - else { - //logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + methodname + " getting HttpsBasicClient with username=" + username - // + " password=" + password); - client = HttpBasicClient.getClient(); - } - } catch (Exception e) { - logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + methodname + " Unable to get the SSL client"); - } - } - } - - /* (non-Javadoc) - * @see org.openecomp.vid.mso.MsoRestInterfaceIfc#Get(java.lang.Object, java.lang.String, java.lang.String, org.openecomp.vid.mso.RestObject) - */ - @SuppressWarnings("unchecked") - public void Get (T t, String sourceId, String path, RestObject restObject ) throws Exception { - String methodName = "Get"; - - logger.debug(EELFLoggerDelegate.debugLogger, methodName + " start"); - - String url=""; - restObject.set(t); - - url = SystemProperties.getProperty(MsoProperties.MSO_SERVER_URL) + path; - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " sending request to url= " + url); - - initMsoClient(); - - final Response cres = client.target(url) - .request() - .accept("application/json") - .headers(commonHeaders) - .get(); - - int status = cres.getStatus(); - restObject.setStatusCode (status); - - if (status == 200) { - t = (T) cres.readEntity(t.getClass()); - restObject.set(t); - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + methodName + " REST api was successfull!"); - - } else { - throw new Exception(methodName + " with status="+ status + ", url= " + url ); - } - - logger.debug(EELFLoggerDelegate.debugLogger,methodName + " received status=" + status ); - - return; - } - - /* (non-Javadoc) - * @see org.openecomp.vid.mso.MsoRestInterfaceIfc#Delete(java.lang.Object, org.openecomp.vid.mso.rest.RequestDetails, java.lang.String, java.lang.String, org.openecomp.vid.mso.RestObject) - */ - @SuppressWarnings("unchecked") - public void Delete(T t, RequestDetails r, String sourceID, String path, RestObject restObject) { - - String methodName = "Delete"; - String url=""; - Response cres = null; - - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " start"); - logRequest (r); - - try { - initMsoClient(); - - url = SystemProperties.getProperty(MsoProperties.MSO_SERVER_URL) + path; - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + " methodName sending request to: " + url); - - cres = client.target(url) - .request() - .accept("application/json") - .headers(commonHeaders) - //.entity(r) - .build("DELETE", Entity.entity(r, MediaType.APPLICATION_JSON)).invoke(); - // .method("DELETE", Entity.entity(r, MediaType.APPLICATION_JSON)); - //.delete(Entity.entity(r, MediaType.APPLICATION_JSON)); - - int status = cres.getStatus(); - restObject.setStatusCode (status); - - if (status == 404) { // resource not found - String msg = "Resource does not exist...: " + cres.getStatus(); - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + msg); - } else if (status == 200 || status == 204){ - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + "Resource " + url + " deleted"); - } else if (status == 202) { - String msg = "Delete in progress: " + status; - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + msg); - } - else { - String msg = "Deleting Resource failed: " + status; - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + msg); - } - - try { - t = (T) cres.readEntity(t.getClass()); - restObject.set(t); - } - catch ( Exception e ) { - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " No response entity, this is probably ok, e=" - + e.getMessage()); - } - - } - catch (Exception e) - { - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " with url="+url+ ", Exception: " + e.toString()); - throw e; - - } - } - - /* (non-Javadoc) - * @see org.openecomp.vid.mso.MsoRestInterfaceIfc#Post(java.lang.Object, org.openecomp.vid.mso.rest.RequestDetails, java.lang.String, java.lang.String, org.openecomp.vid.mso.RestObject) - */ - @SuppressWarnings("unchecked") - public void Post(T t, RequestDetails r, String sourceID, String path, RestObject restObject) throws Exception { - - String methodName = "Post"; - String url=""; - - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " start"); - - logRequest (r); - try { - - initMsoClient(); - - url = SystemProperties.getProperty(MsoProperties.MSO_SERVER_URL) + path; - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " sending request to url= " + url); - // Change the content length - final Response cres = client.target(url) - .request() - .accept("application/json") - .headers(commonHeaders) - //.header("content-length", 201) - //.header("X-FromAppId", sourceID) - .post(Entity.entity(r, MediaType.APPLICATION_JSON)); - - try { - t = (T) cres.readEntity(t.getClass()); - restObject.set(t); - } - catch ( Exception e ) { - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " No response entity, this is probably ok, e=" - + e.getMessage()); - } - - int status = cres.getStatus(); - restObject.setStatusCode (status); - - if ( status >= 200 && status <= 299 ) { - logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + methodName + " REST api POST was successful!"); - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " REST api POST was successful!"); - - } else { - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " with status="+status+", url="+url); - } - - } catch (Exception e) - { - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " with url="+url+ ", Exception: " + e.toString()); - throw e; - - } - } - - - /* (non-Javadoc) - * @see org.openecomp.vid.mso.MsoRestInterfaceIfc#Put(java.lang.Object, org.openecomp.vid.mso.rest.RequestDetails, java.lang.String, java.lang.String, org.openecomp.vid.mso.RestObject) - */ - @SuppressWarnings("unchecked") - public void Put(T t, ChangeManagementRequest r, String sourceID, String path, RestObject restObject) throws Exception { - - String methodName = "Put"; - String url=""; - - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " start"); - -// logRequest (r); - try { - - initMsoClient(); - - url = SystemProperties.getProperty(MsoProperties.MSO_SERVER_URL) + path; - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " sending request to url= " + url); - // Change the content length - final Response cres = client.target(url) - .request() - .accept("application/json") - .headers(commonHeaders) - //.header("content-length", 201) - //.header("X-FromAppId", sourceID) - .put(Entity.entity(r, MediaType.APPLICATION_JSON)); - - try { - t = (T) cres.readEntity(t.getClass()); - restObject.set(t); - } - catch ( Exception e ) { - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " No response entity, this is probably ok, e=" - + e.getMessage()); - } - - int status = cres.getStatus(); - restObject.setStatusCode (status); - - if ( status >= 200 && status <= 299 ) { - logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + methodName + " REST api POST was successful!"); - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " REST api POST was successful!"); - - } else { - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " with status="+status+", url="+url); - } - - } catch (Exception e) - { - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " with url="+url+ ", Exception: " + e.toString()); - throw e; - - } - } - - - /** - * Gets the single instance of MsoRestInterface. - * - * @param the generic type - * @param clazz the clazz - * @return single instance of MsoRestInterface - * @throws IllegalAccessException the illegal access exception - * @throws InstantiationException the instantiation exception - */ - public T getInstance(Class clazz) throws IllegalAccessException, InstantiationException - { - return clazz.newInstance(); - } - - - - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/mso/MsoRestInterfaceFactory.java b/vid-app-common/src/main/java/org/openecomp/vid/mso/MsoRestInterfaceFactory.java deleted file mode 100755 index ab12c7b14..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/mso/MsoRestInterfaceFactory.java +++ /dev/null @@ -1,44 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.mso; - -import org.openecomp.portalsdk.core.util.SystemProperties; -import org.openecomp.vid.mso.rest.MsoRestClientNew; - -/** - * A factory for creating MsoRestInterface objects. - */ -public class MsoRestInterfaceFactory { - - /** - * Gets the single instance of MsoRestInterfaceFactory. - * - * @return single instance of MsoRestInterfaceFactory - */ - public static MsoInterface getInstance() { - String msoPropertyName = "mso.client.type"; - if (SystemProperties.containsProperty(msoPropertyName) && - SystemProperties.getProperty(msoPropertyName).equals("LOCAL")) { - return new MsoLocalClientNew(); - } else - return new MsoRestClientNew(); - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/mso/MsoRestInterfaceIfc.java b/vid-app-common/src/main/java/org/openecomp/vid/mso/MsoRestInterfaceIfc.java deleted file mode 100755 index 4ff13eddd..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/mso/MsoRestInterfaceIfc.java +++ /dev/null @@ -1,92 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.mso; - -import org.openecomp.vid.changeManagement.ChangeManagementRequest; -import org.openecomp.vid.mso.rest.RequestDetails; - -/** - * The Interface MsoRestInterfaceIfc. - */ -public interface MsoRestInterfaceIfc { - - /** - * Inits the rest client. - */ - public void initMsoClient(); - - /** - * Gets the. - * - * @param the generic type - * @param t the t - * @param sourceId the source id - * @param path the path - * @param restObject the rest object - * @throws Exception the exception - */ - public void Get (T t, String sourceId, String path, RestObject restObject ) throws Exception; - - /** - * Delete. - * - * @param the generic type - * @param t the t - * @param r the r - * @param sourceID the source ID - * @param path the path - * @param restObject the rest object - * @throws Exception the exception - */ - public void Delete(T t, RequestDetails r, String sourceID, String path, RestObject restObject) throws Exception; - - /** - * Post. - * - * @param the generic type - * @param t the t - * @param r the r - * @param sourceID the source ID - * @param path the path - * @param restObject the rest object - * @throws Exception the exception - */ - public void Post(T t, RequestDetails r, String sourceID, String path, RestObject restObject) throws Exception; - - /** - * Put. - * - * @param the generic type - * @param t the t - * @param r the r - * @param sourceID the source ID - * @param path the path - * @param restObject the rest object - * @throws Exception the exception - */ - public void Put(T t, ChangeManagementRequest r, String sourceID, String path, RestObject restObject) throws Exception ; - /*** - * Log request. - * - * @param r the r - */ - public void logRequest ( RequestDetails r ); -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/mso/MsoUtil.java b/vid-app-common/src/main/java/org/openecomp/vid/mso/MsoUtil.java deleted file mode 100755 index 2c0148bb7..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/mso/MsoUtil.java +++ /dev/null @@ -1,125 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.mso; -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.Date; - -import org.glassfish.jersey.client.ClientResponse; - -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.vid.controller.MsoController; -import com.fasterxml.jackson.databind.ObjectMapper; - -/** - * The Class MsoUtil. - */ -public class MsoUtil { - - /** The logger. */ - private static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(MsoController.class); - - /** The Constant dateFormat. */ - final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); - - /** - * Wrap response. - * - * @param body the body - * @param statusCode the status code - * @return the mso response wrapper - */ - public static MsoResponseWrapper wrapResponse ( String body, int statusCode ) { - - MsoResponseWrapper w = new MsoResponseWrapper(); - w.setStatus (statusCode); - w.setEntity(body); - - return w; - } - - /** - * Wrap response. - * - * @param cres the cres - * @return the mso response wrapper - */ - public static MsoResponseWrapper wrapResponse (ClientResponse cres) { - String resp_str = ""; - if ( cres != null ) { - resp_str = cres.readEntity(String.class); - } - int statuscode = cres.getStatus(); - MsoResponseWrapper w = MsoUtil.wrapResponse ( resp_str, statuscode ); - return (w); - } - - /** - * Wrap response. - * - * @param rs the rs - * @return the mso response wrapper - */ - public static MsoResponseWrapper wrapResponse (RestObject rs) { - String resp_str = ""; - int status = 0; - if ( rs != null ) { - resp_str = rs.get(); - status = rs.getStatusCode(); - } - MsoResponseWrapper w = MsoUtil.wrapResponse ( resp_str, status ); - return (w); - } - - /** - * Convert pojo to string. - * - * @param the generic type - * @param t the t - * @return the string - * @throws JsonProcessingException the json processing exception - */ - public static String convertPojoToString ( T t ) throws com.fasterxml.jackson.core.JsonProcessingException { - - String methodName = "convertPojoToString"; - ObjectMapper mapper = new ObjectMapper(); - String r_json_str = ""; - if ( t != null ) { - try { - r_json_str = mapper.writeValueAsString(t); - } - catch ( com.fasterxml.jackson.core.JsonProcessingException j ) { - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " Unable to parse object as json"); - } - } - return (r_json_str); - } - - /** - * The main method. - * - * @param args the arguments - */ - public static void main(String[] args) { - // TODO Auto-generated method stub - - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/mso/RestMsoImplementation.java b/vid-app-common/src/main/java/org/openecomp/vid/mso/RestMsoImplementation.java deleted file mode 100644 index ba0fdfaa8..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/mso/RestMsoImplementation.java +++ /dev/null @@ -1,326 +0,0 @@ -package org.openecomp.vid.mso; - -import com.fasterxml.jackson.databind.ObjectMapper; -import org.apache.commons.codec.binary.Base64; -import org.eclipse.jetty.util.security.Password; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.util.SystemProperties; -import org.openecomp.vid.changeManagement.MsoRequestDetails; -import org.openecomp.vid.client.HttpBasicClient; -import org.openecomp.vid.client.HttpsBasicClient; -import org.openecomp.vid.mso.rest.RequestDetails; -import org.openecomp.vid.mso.rest.RestInterface; - -import javax.ws.rs.client.Client; -import javax.ws.rs.client.Entity; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.MultivaluedHashMap; -import javax.ws.rs.core.Response; -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.Collections; -import java.util.Date; - -/** - * Created by pickjonathan on 26/06/2017. - */ -public class RestMsoImplementation implements RestInterface { - - /** - * The logger. - */ - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(RestMsoImplementation.class); - - /** - * The Constant dateFormat. - */ - final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); - - /** The client. */ - private static Client client = null; - - /** The common headers. */ - private MultivaluedHashMap commonHeaders; - /** - * Instantiates a new mso rest interface. - */ - - @Override - public void initMsoClient() - { - final String methodname = "initRestClient()"; - - final String username = SystemProperties.getProperty(MsoProperties.MSO_USER_NAME); - final String password = SystemProperties.getProperty(MsoProperties.MSO_PASSWORD); - final String mso_url = SystemProperties.getProperty(MsoProperties.MSO_SERVER_URL); - final String decrypted_password = Password.deobfuscate(password); - - String authString = username + ":" + decrypted_password; - - byte[] authEncBytes = Base64.encodeBase64(authString.getBytes()); - String authStringEnc = new String(authEncBytes); - - commonHeaders = new MultivaluedHashMap(); - commonHeaders.put("Authorization", Collections.singletonList((Object) ("Basic " + authStringEnc))); - - boolean use_ssl = true; - if ( (mso_url != null) && ( !(mso_url.isEmpty()) ) ) { - if ( mso_url.startsWith("https")) { - use_ssl = true; - } - else { - use_ssl = false; - } - } - if (client == null) { - - try { - if ( use_ssl ) { - //logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + methodname + " getting HttpsBasicClient with username=" + username - // + " password=" + password); - client = HttpsBasicClient.getClient(); - } - else { - //logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + methodname + " getting HttpsBasicClient with username=" + username - // + " password=" + password); - client = HttpBasicClient.getClient(); - } - } catch (Exception e) { - logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + methodname + " Unable to get the SSL client"); - } - } - } - - public void Get (T t, String sourceId, String path, RestObject restObject ) throws Exception { - String methodName = "Get"; - - logger.debug(EELFLoggerDelegate.debugLogger, methodName + " start"); - - String url=""; - restObject.set(t); - - url = SystemProperties.getProperty(MsoProperties.MSO_SERVER_URL) + path; - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " sending request to url= " + url); - - initMsoClient(); - - final Response cres = client.target(url) - .request() - .accept("application/json") - .headers(commonHeaders) - .get(); - - int status = cres.getStatus(); - restObject.setStatusCode (status); - - if (status == 200 || status == 202) { - t = (T) cres.readEntity(t.getClass()); - restObject.set(t); - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + methodName + " REST api was successfull!"); - - } else { - throw new Exception(methodName + " with status="+ status + ", url= " + url ); - } - - logger.debug(EELFLoggerDelegate.debugLogger,methodName + " received status=" + status ); - - return; - } - - @Override - public void Delete(T t, RequestDetails r, String sourceID, String path, RestObject restObject) { - - String methodName = "Delete"; - String url=""; - Response cres = null; - - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " start"); - logRequest (r); - - try { - initMsoClient(); - - url = SystemProperties.getProperty(MsoProperties.MSO_SERVER_URL) + path; - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + " methodName sending request to: " + url); - - cres = client.target(url) - .request() - .accept("application/json") - .headers(commonHeaders) - //.entity(r) - .build("DELETE", Entity.entity(r, MediaType.APPLICATION_JSON)).invoke(); - // .method("DELETE", Entity.entity(r, MediaType.APPLICATION_JSON)); - //.delete(Entity.entity(r, MediaType.APPLICATION_JSON)); - - int status = cres.getStatus(); - restObject.setStatusCode (status); - - if (status == 404) { // resource not found - String msg = "Resource does not exist...: " + cres.getStatus(); - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + msg); - } else if (status == 200 || status == 204){ - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + "Resource " + url + " deleted"); - } else if (status == 202) { - String msg = "Delete in progress: " + status; - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + msg); - } - else { - String msg = "Deleting Resource failed: " + status; - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + msg); - } - - try { - t = (T) cres.readEntity(t.getClass()); - restObject.set(t); - } - catch ( Exception e ) { - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " No response entity, this is probably ok, e=" - + e.getMessage()); - } - - } - catch (Exception e) - { - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " with url="+url+ ", Exception: " + e.toString()); - throw e; - - } - } - - @Override - public void Post(T t, RequestDetails r, String sourceID, String path, RestObject restObject) throws Exception { - String methodName = "Post"; - String url=""; - - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " start"); - - logRequest (r); - try { - - initMsoClient(); - - url = SystemProperties.getProperty(MsoProperties.MSO_SERVER_URL) + path; - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " sending request to url= " + url); - // Change the content length - final Response cres = client.target(url) - .request() - .accept("application/json") - .headers(commonHeaders) - //.header("content-length", 201) - //.header("X-FromAppId", sourceID) - .post(Entity.entity(r, MediaType.APPLICATION_JSON)); - - try { - t = (T) cres.readEntity(t.getClass()); - restObject.set(t); - } - catch ( Exception e ) { - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " No response entity, this is probably ok, e=" - + e.getMessage()); - } - - int status = cres.getStatus(); - restObject.setStatusCode (status); - - if ( status >= 200 && status <= 299 ) { - logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + methodName + " REST api POST was successful!"); - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " REST api POST was successful!"); - - } else { - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " with status="+status+", url="+url); - } - - } catch (Exception e) - { - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " with url="+url+ ", Exception: " + e.toString()); - throw e; - - } - } - - @Override - public void logRequest(RequestDetails r) { - String methodName = "logRequest"; - ObjectMapper mapper = new ObjectMapper(); - String r_json_str = ""; - if ( r != null ) { - r_json_str = r.toString(); - try { - r_json_str = mapper.writeValueAsString(r); - } - catch ( com.fasterxml.jackson.core.JsonProcessingException j ) { - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " Unable to parse request as json"); - } - } - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " Request=(" + r_json_str + ")"); - } - - @Override - public void logRequest(org.openecomp.vid.changeManagement.RequestDetails r) { - String methodName = "logRequest"; - ObjectMapper mapper = new ObjectMapper(); - String r_json_str = ""; - if ( r != null ) { - r_json_str = r.toString(); - try { - r_json_str = mapper.writeValueAsString(r); - } - catch ( com.fasterxml.jackson.core.JsonProcessingException j ) { - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " Unable to parse request as json"); - } - } - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " Request=(" + r_json_str + ")"); - } - - @Override - public void Put(T t, org.openecomp.vid.changeManagement.RequestDetailsWrapper r, String sourceID, String path, RestObject restObject) throws Exception { - - String methodName = "Put"; - String url=""; - - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " start"); - -// logRequest (r); - try { - - initMsoClient(); - - url = SystemProperties.getProperty(MsoProperties.MSO_SERVER_URL) + path; - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " sending request to url= " + url); - // Change the content length - final Response cres = client.target(url) - .request() - .accept("application/json") - .headers(commonHeaders) - //.header("content-length", 201) - //.header("X-FromAppId", sourceID) - .put(Entity.entity(r, MediaType.APPLICATION_JSON)); - - try { - t = (T) cres.readEntity(t.getClass()); - restObject.set(t); - } - catch ( Exception e ) { - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " No response entity, this is probably ok, e=" - + e.getMessage()); - } - - int status = cres.getStatus(); - restObject.setStatusCode (status); - - if ( status >= 200 && status <= 299 ) { - logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + methodName + " REST api POST was successful!"); - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " REST api POST was successful!"); - - } else { - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " with status="+status+", url="+url); - } - - } catch (Exception e) - { - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " with url="+url+ ", Exception: " + e.toString()); - throw e; - - } - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/mso/RestObject.java b/vid-app-common/src/main/java/org/openecomp/vid/mso/RestObject.java deleted file mode 100755 index 881409e1a..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/mso/RestObject.java +++ /dev/null @@ -1,68 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.mso; - -/** - * The Class RestObject. - * - * @param the generic type - */ -public class RestObject { - - /** - * Generic version of the RestObject class. - * - */ - // T stands for "Type" - private T t; - - /** The status code. */ - private int statusCode= 0; - - /** - * Sets the. - * - * @param t the t - */ - public void set(T t) { this.t = t; } - - /** - * Gets the. - * - * @return the t - */ - public T get() { return t; } - - /** - * Sets the status code. - * - * @param v the new status code - */ - public void setStatusCode(int v) { this.statusCode = v; } - - /** - * Gets the status code. - * - * @return the status code - */ - public int getStatusCode() { return this.statusCode; } -} - diff --git a/vid-app-common/src/main/java/org/openecomp/vid/mso/rest/AsyncRequestStatus.java b/vid-app-common/src/main/java/org/openecomp/vid/mso/rest/AsyncRequestStatus.java deleted file mode 100755 index 1395f9ae3..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/mso/rest/AsyncRequestStatus.java +++ /dev/null @@ -1,123 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.mso.rest; - -//import java.util.HashMap; -//import java.util.Map; -//import javax.annotation.Generated; - -import org.openecomp.vid.domain.mso.InstanceIds; -import org.openecomp.vid.domain.mso.RequestStatus; -//import com.fasterxml.jackson.annotation.JsonAnyGetter; -//import com.fasterxml.jackson.annotation.JsonAnySetter; -//import com.fasterxml.jackson.annotation.JsonCreator; -//import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -//import com.fasterxml.jackson.annotation.JsonPropertyOrder; -//import com.fasterxml.jackson.annotation.JsonValue; -import org.apache.commons.lang.builder.EqualsBuilder; -import org.apache.commons.lang.builder.HashCodeBuilder; -import org.apache.commons.lang.builder.ToStringBuilder; - - -/** - * request structure. - */ -@JsonInclude(JsonInclude.Include.NON_NULL) - -public class AsyncRequestStatus extends org.openecomp.vid.domain.mso.AsyncRequestStatus { - - - /** The instance ids. */ - private InstanceIds instanceIds; - - /** The request status. */ - private RequestStatus requestStatus; - - /* (non-Javadoc) - * @see org.openecomp.vid.domain.mso.AsyncRequestStatus#getInstanceIds() - */ - public InstanceIds getInstanceIds() { - return instanceIds; - } - - /** - * Sets the instance ids. - * - * @param instanceIds the new instance ids - */ - public void setInstanceIds(InstanceIds instanceIds) { - this.instanceIds = instanceIds; - } - - - /** - * (Required). - * - * @return The requestStatus - */ - @JsonProperty("requestStatus") - public RequestStatus getRequestStatus() { - return requestStatus; - } - - /** - * (Required). - * - * @param requestStatus The requestStatus - */ - @JsonProperty("requestStatus") - public void setRequestStatus(RequestStatus requestStatus) { - this.requestStatus = requestStatus; - } - - /* (non-Javadoc) - * @see org.openecomp.vid.domain.mso.AsyncRequestStatus#toString() - */ - @Override - public String toString() { - return ToStringBuilder.reflectionToString(this); - } - - /* (non-Javadoc) - * @see org.openecomp.vid.domain.mso.AsyncRequestStatus#hashCode() - */ - @Override - public int hashCode() { - return new HashCodeBuilder().append(getCorrelator()).append(getFinishTime()).append(instanceIds).append(getRequestId()).append(getRequestScope()).append(getRequestStatus()).append(getRequestType()).append(getStartTime()).append(getAdditionalProperties()).toHashCode(); - } - - /* (non-Javadoc) - * @see org.openecomp.vid.domain.mso.AsyncRequestStatus#equals(java.lang.Object) - */ - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof AsyncRequestStatus) == false) { - return false; - } - AsyncRequestStatus rhs = ((AsyncRequestStatus) other); - return new EqualsBuilder().append(getCorrelator(), rhs.getCorrelator()).append(getFinishTime(), rhs.getFinishTime()).append(instanceIds, rhs.instanceIds).append(getRequestId(), rhs.getRequestId()).append(getRequestScope(), rhs.getRequestScope()).append(getRequestStatus(), rhs.getRequestStatus()).append(getRequestType(), rhs.getRequestType()).append(getStartTime(), rhs.getStartTime()).append(getAdditionalProperties(), rhs.getAdditionalProperties()).isEquals(); - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/mso/rest/MsoBusinessLogicNew.java b/vid-app-common/src/main/java/org/openecomp/vid/mso/rest/MsoBusinessLogicNew.java deleted file mode 100644 index 1afb2df21..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/mso/rest/MsoBusinessLogicNew.java +++ /dev/null @@ -1,67 +0,0 @@ -package org.openecomp.vid.mso.rest; - -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.vid.mso.MsoClientFactory; -import org.openecomp.vid.mso.MsoInterface; -import org.openecomp.vid.mso.MsoResponseWrapper; - -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.Date; - -/** - * Created by pickjonathan on 21/06/2017. - * This class was created only for testing the new logic. - * It is not used by any of the controllers binded to the ui. - * This can be deleted in the future in order to keep a cleaner project. - * If deleting please dont forget to delete the controllers, factory and all involved in the assert test. - */ -public class MsoBusinessLogicNew { - - /** - * \ - * The MSO Client - */ - private MsoInterface msoClient; - - private MsoInterface msoRestTempClient; - - /** - * The logger. - */ - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(MsoBusinessLogicNew.class); - - /** - * The Constant dateFormat. - */ - final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); - - public MsoBusinessLogicNew() { - msoClient = MsoClientFactory.getInstance(); - msoRestTempClient = new MsoRestClientNew(); - } - - public MsoResponseWrapper createSvcInstance(RequestDetails msoRequest) throws Exception { - String methodName = "createSvcInstance "; - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - -// String endpoint = SystemProperties.getProperty(MsoProperties.MSO_REST_API_SVC_INSTANCE); -// -// MsoResponseWrapper w = createInstance(msoRequest, p); - - MsoResponseWrapper w = msoClient.createSvcInstance(msoRequest, ""); - - return w; - } - - - public MsoResponseWrapper createSvcInstanceRest(RequestDetails msoRequest) throws Exception { - String methodName = "createSvcInstance "; - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - - - MsoResponseWrapper w = msoRestTempClient.createSvcInstance(msoRequest, ""); - - return w; - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/mso/rest/MsoRestClientNew.java b/vid-app-common/src/main/java/org/openecomp/vid/mso/rest/MsoRestClientNew.java deleted file mode 100644 index 1beeafb13..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/mso/rest/MsoRestClientNew.java +++ /dev/null @@ -1,333 +0,0 @@ -package org.openecomp.vid.mso.rest; - -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.vid.changeManagement.MsoRequestDetails; -import org.openecomp.vid.changeManagement.RequestDetailsWrapper; -import org.openecomp.vid.mso.*; -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.Date; - - -/** - * Created by pickjonathan on 21/06/2017. - */ -public class MsoRestClientNew extends RestMsoImplementation implements MsoInterface { - - /** - * The logger. - */ - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(MsoRestClientNew.class); - - /** - * The Constant dateFormat. - */ - final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); - - private final String ORIGINAL_REQUEST_ID = "originalRequestId"; - - - @Override - public MsoResponseWrapper createSvcInstance(RequestDetails requestDetails, String endpoint) throws Exception { - String methodName = "createSvcInstance "; - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - - return createInstance(requestDetails, endpoint); - } - - @Override - public MsoResponseWrapper createVnf(RequestDetails requestDetails, String endpoint) throws Exception { - - String methodName = "createVnf"; - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - - return createInstance(requestDetails, endpoint); - } - - @Override - public MsoResponseWrapper createNwInstance(RequestDetails requestDetails, String endpoint) throws Exception { - - String methodName = "createNwInstance"; - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - - return createInstance(requestDetails, endpoint); - } - - @Override - public MsoResponseWrapper createVolumeGroupInstance(RequestDetails requestDetails, String endpoint) throws Exception { - String methodName = "createVolumeGroupInstance"; - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - - return createInstance(requestDetails, endpoint); - } - - @Override - public MsoResponseWrapper createVfModuleInstance(RequestDetails requestDetails, String endpoint) throws Exception { - String methodName = "createVfModuleInstance"; - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - - return createInstance(requestDetails, endpoint); - } - - @Override - public MsoResponseWrapper deleteSvcInstance(RequestDetails requestDetails, String endpoint) throws Exception { - String methodName = "deleteSvcInstance"; - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - - return deleteInstance(requestDetails, endpoint); - } - - @Override - public MsoResponseWrapper deleteVnf(RequestDetails requestDetails, String endpoint) throws Exception { - String methodName = "deleteVnf"; - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - - return deleteInstance(requestDetails, endpoint); - } - - @Override - public MsoResponseWrapper deleteVfModule(RequestDetails requestDetails, String endpoint) throws Exception { - String methodName = "deleteVfModule"; - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - - return deleteInstance(requestDetails, endpoint); - } - - @Override - public MsoResponseWrapper deleteVolumeGroupInstance(RequestDetails requestDetails, String endpoint) throws Exception { - String methodName = "deleteVolumeGroupInstance"; - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - - return deleteInstance(requestDetails, endpoint); - } - - @Override - public MsoResponseWrapper deleteNwInstance(RequestDetails requestDetails, String endpoint) throws Exception { - String methodName = "deleteNwInstance"; - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - - return deleteInstance(requestDetails, endpoint); - } - - @Override - public void getOrchestrationRequest(String t, String sourceId, String endpoint, RestObject restObject) throws Exception { - Get(t, sourceId, endpoint, restObject); - } - - public void getManualTasks(String t, String sourceId, String endpoint, RestObject restObject) throws Exception { - Get(t, sourceId, endpoint, restObject); - } - - - public MsoResponseWrapper createInstance(RequestDetails request, String path) throws Exception { - String methodName = "createInstance"; - logger.debug(dateFormat.format(new Date()) + "<== " + methodName + " start"); - - try { - RestObject restObjStr = new RestObject(); - - String str = new String(); - - restObjStr.set(str); - - Post(str, request, "", path, restObjStr); - MsoResponseWrapper w = MsoUtil.wrapResponse(restObjStr); - - return w; - } catch (Exception e) { - logger.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); - throw e; - } - } - - - /** - * Delete instance. - * - * @param request the request - * @param path the path - * @return the mso response wrapper - * @throws Exception the exception - */ - public MsoResponseWrapper deleteInstance(RequestDetails request, String path) throws Exception { - String methodName = "deleteInstance"; - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - - try { - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " calling Delete, path =[" + path + "]"); - - RestObject restObjStr = new RestObject(); - String str = new String(); - restObjStr.set(str); - Delete(str, request, "", path, restObjStr); - MsoResponseWrapper w = MsoUtil.wrapResponse(restObjStr); - - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " w=" + w.getResponse()); - return w; - - } catch (Exception e) { - logger.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); - throw e; - } - - } - - public MsoResponseWrapper getOrchestrationRequestsForDashboard(String t, String sourceId, String endpoint, RestObject restObject) throws Exception{ - String methodName = "getOrchestrationRequestsForDashboard"; - logger.debug(dateFormat.format(new Date()) + "<== " + methodName + " start"); - - try { - getOrchestrationRequest(t, sourceId, endpoint, restObject); - MsoResponseWrapper w = MsoUtil.wrapResponse(restObject); - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " w=" + w.getResponse()); - - return w; - - } catch (Exception e){ - logger.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); - throw e; - } - } - - public MsoResponseWrapper getManualTasksByRequestId(String t , String sourceId , String endpoint , RestObject restObject) throws Exception{ - String methodName = "getManualTasksByRequestId"; - logger.debug(dateFormat.format(new Date()) + "<== " + methodName + " start"); - - try { - getManualTasks(t , sourceId , endpoint , restObject); - MsoResponseWrapper w = MsoUtil.wrapResponse(restObject); - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " w=" + w.getResponse()); - - return MsoUtil.wrapResponse(restObject); - - } catch (Exception e){ - logger.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); - throw e; - } - } - - - - @Override - public MsoResponseWrapper completeManualTask(RequestDetails requestDetails, String t, String sourceId, String endpoint, RestObject restObject) throws Exception { - String methodName = "completeManualTask"; - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " calling Complete "); - try { - - Post(t, requestDetails , sourceId, endpoint, restObject); - MsoResponseWrapper w = MsoUtil.wrapResponse(restObject); - - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " w=" + w.getResponse()); - return w; - - } catch (Exception e) { - logger.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); - throw e; - } - } - - @Override - public MsoResponseWrapper replaceVnf(org.openecomp.vid.changeManagement.RequestDetails requestDetails, String endpoint) throws Exception { - String methodName = "replaceVnf"; - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - - return replaceInstance(requestDetails, endpoint); - } - - public MsoResponseWrapper replaceInstance(org.openecomp.vid.changeManagement.RequestDetails request, String path) throws Exception { - String methodName = "replaceInstance"; - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - - try { - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " calling Replace VNF, path =[" + path + "]"); - - RestObject restObjStr = new RestObject(); - String str = new String(); - restObjStr.set(str); - RequestDetailsWrapper requestDetailsWrapper = new RequestDetailsWrapper(); - requestDetailsWrapper.requestDetails = new MsoRequestDetails(request); - - Post(str, request, "", path, restObjStr); - MsoResponseWrapper msoResponseWrapperObject = MsoUtil.wrapResponse(restObjStr); - int status = msoResponseWrapperObject.getStatus(); - if (status == 202){ - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + - ",post succeeded, msoResponseWrapperObject response:" + msoResponseWrapperObject.getResponse()); - } - else { - logger.error(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + - ": post failed, msoResponseWrapperObject status" + status + ", response:" + msoResponseWrapperObject.getResponse()); - - // TODO - } - return msoResponseWrapperObject; - - } catch (Exception e) { - logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); - throw e; - } - - } - - @Override - public MsoResponseWrapper updateVnf(org.openecomp.vid.changeManagement.RequestDetails requestDetails, String endpoint) throws Exception { - String methodName = "updateVnf"; - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - RequestDetailsWrapper wrapper = new RequestDetailsWrapper(); - wrapper.requestDetails = new MsoRequestDetails(requestDetails);; - return updateInstance(requestDetails, endpoint); - } - - public MsoResponseWrapper updateInstance(org.openecomp.vid.changeManagement.RequestDetails request, String path) throws Exception { - String methodName = "updateInstance"; - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start"); - - try { - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " calling Delete, path =[" + path + "]"); - - RestObject restObjStr = new RestObject(); - String str = new String(); - restObjStr.set(str); - RequestDetailsWrapper requestDetailsWrapper = new RequestDetailsWrapper(); - requestDetailsWrapper.requestDetails = new MsoRequestDetails(request); - - - - Put(str, requestDetailsWrapper, "", path, restObjStr); - MsoResponseWrapper w = MsoUtil.wrapResponse(restObjStr); - - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " w=" + w.getResponse()); - return w; - - } catch (Exception e) { - logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); - throw e; - } - - } - - public void activateServiceInstance(RequestDetails requestDetails, String t, String sourceId, String endpoint, RestObject restObject) throws Exception{ - String methodName = "activateServiceInstance"; - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start "); - try { - - Post(t, requestDetails , sourceId, endpoint, restObject); - MsoResponseWrapper w = MsoUtil.wrapResponse(restObject); - - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " w =" + w.getResponse()); - - } catch (Exception e) { - logger.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString()); - throw e; - } - } - -} \ No newline at end of file diff --git a/vid-app-common/src/main/java/org/openecomp/vid/mso/rest/RelatedInstance.java b/vid-app-common/src/main/java/org/openecomp/vid/mso/rest/RelatedInstance.java deleted file mode 100755 index b68f7c13b..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/mso/rest/RelatedInstance.java +++ /dev/null @@ -1,125 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.mso.rest; - -import java.util.HashMap; -import java.util.Map; -import javax.annotation.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import org.apache.commons.lang.builder.EqualsBuilder; -import org.apache.commons.lang.builder.HashCodeBuilder; -import org.apache.commons.lang.builder.ToStringBuilder; - - -/** - * modelInfo and optional instanceId and instanceName for a model related to the modelInfo being operated on. - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@Generated("org.jsonschema2pojo") -@JsonPropertyOrder({ - "instanceName", - "instanceId", - "modelInfo" -}) -public class RelatedInstance extends org.openecomp.vid.domain.mso.RelatedInstance{ - - - /** The model info. */ - @JsonProperty("modelInfo") - private org.openecomp.vid.domain.mso.ModelInfo modelInfo; - - /** The additional properties. */ - @JsonIgnore - private Map additionalProperties = new HashMap(); - - /** - * (Required). - * - * @return The modelInfo - */ - @JsonProperty("modelInfo") - public org.openecomp.vid.domain.mso.ModelInfo getModelInfo() { - return modelInfo; - } - - /** - * (Required). - * - * @param modelInfo The modelInfo - */ - @JsonProperty("modelInfo") - public void setModelInfo(org.openecomp.vid.domain.mso.ModelInfo modelInfo) { - this.modelInfo = modelInfo; - } - - /* (non-Javadoc) - * @see org.openecomp.vid.domain.mso.RelatedInstance#toString() - */ - @Override - public String toString() { - return ToStringBuilder.reflectionToString(this); - } - - /* (non-Javadoc) - * @see org.openecomp.vid.domain.mso.RelatedInstance#getAdditionalProperties() - */ - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - /* (non-Javadoc) - * @see org.openecomp.vid.domain.mso.RelatedInstance#setAdditionalProperty(java.lang.String, java.lang.Object) - */ - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - /* (non-Javadoc) - * @see org.openecomp.vid.domain.mso.RelatedInstance#hashCode() - */ - @Override - public int hashCode() { - return new HashCodeBuilder().append(getInstanceName()).append(getInstanceId()).append(modelInfo).append(additionalProperties).toHashCode(); - } - - /* (non-Javadoc) - * @see org.openecomp.vid.domain.mso.RelatedInstance#equals(java.lang.Object) - */ - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof RelatedInstance) == false) { - return false; - } - RelatedInstance rhs = ((RelatedInstance) other); - return new EqualsBuilder().append(getInstanceName(), rhs.getInstanceName()).append(getInstanceId(), rhs.getInstanceId()).append(modelInfo, rhs.getModelInfo()).append(additionalProperties, rhs.additionalProperties).isEquals(); - } - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/mso/rest/RelatedModel.java b/vid-app-common/src/main/java/org/openecomp/vid/mso/rest/RelatedModel.java deleted file mode 100755 index 427d71dd1..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/mso/rest/RelatedModel.java +++ /dev/null @@ -1,125 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.mso.rest; - -import java.util.HashMap; -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import org.apache.commons.lang.builder.EqualsBuilder; -import org.apache.commons.lang.builder.HashCodeBuilder; -import org.apache.commons.lang.builder.ToStringBuilder; - - -/** - * modelInfo and optional instance id for a model related to the modelInfo being operated on. - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "instanceId", - "modelInfo" -}) -public class RelatedModel extends org.openecomp.vid.domain.mso.RelatedModel { - - /** (Required). */ - @JsonProperty("modelInfo") - private org.openecomp.vid.domain.mso.ModelInfo modelInfo; - -// /** The related model object instance list. */ -// @JsonProperty("instanceId") -// private org.openecomp.vid.domain.mso.InstanceIds instanceId; - - /** The additional properties. */ - @JsonIgnore - private Map additionalProperties = new HashMap(); - - /** - * (Required). - * - * @return The modelInfo - */ - @JsonProperty("modelInfo") - public org.openecomp.vid.domain.mso.ModelInfo getModelInfo() { - return modelInfo; - } - - /** - * (Required). - * - * @param modelInfo The modelInfo - */ - @JsonProperty("modelInfo") - public void setModelInfo(org.openecomp.vid.domain.mso.ModelInfo modelInfo) { - this.modelInfo = modelInfo; - } - - /* (non-Javadoc) - * @see org.openecomp.vid.domain.mso.RelatedModel#toString() - */ - @Override - public String toString() { - return ToStringBuilder.reflectionToString(this); - } - - /* (non-Javadoc) - * @see org.openecomp.vid.domain.mso.RelatedModel#getAdditionalProperties() - */ - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - /* (non-Javadoc) - * @see org.openecomp.vid.domain.mso.RelatedModel#setAdditionalProperty(java.lang.String, java.lang.Object) - */ - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - /* (non-Javadoc) - * @see org.openecomp.vid.domain.mso.RelatedModel#hashCode() - */ - @Override - public int hashCode() { - return new HashCodeBuilder().append(getInstanceId()).append(modelInfo).append(additionalProperties).toHashCode(); - } - - /* (non-Javadoc) - * @see org.openecomp.vid.domain.mso.RelatedModel#equals(java.lang.Object) - */ - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof RelatedModel) == false) { - return false; - } - RelatedModel rhs = ((RelatedModel) other); - return new EqualsBuilder().append(getInstanceId(), rhs.getInstanceId()).append(modelInfo, rhs.modelInfo).append(additionalProperties, rhs.additionalProperties).isEquals(); - } - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/mso/rest/Request.java b/vid-app-common/src/main/java/org/openecomp/vid/mso/rest/Request.java deleted file mode 100755 index c8f7b8ba7..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/mso/rest/Request.java +++ /dev/null @@ -1,140 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.mso.rest; - -//import java.util.HashMap; -//import java.util.Map; -//import javax.annotation.Generated; - -import org.openecomp.vid.domain.mso.InstanceIds; -import org.openecomp.vid.domain.mso.RequestStatus; -//import com.fasterxml.jackson.annotation.JsonAnyGetter; -//import com.fasterxml.jackson.annotation.JsonAnySetter; -//import com.fasterxml.jackson.annotation.JsonCreator; -//import com.fasterxml.jackson.annotation.JsonIgnore; -//import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -//import com.fasterxml.jackson.annotation.JsonPropertyOrder; -//import com.fasterxml.jackson.annotation.JsonValue; -import org.apache.commons.lang.builder.EqualsBuilder; -//import org.apache.commons.lang.builder.HashCodeBuilder; -import org.apache.commons.lang.builder.ToStringBuilder; - - -/** - * request structure. - */ -public class Request extends org.openecomp.vid.domain.mso.Request { - - - /** The instance ids. */ - private InstanceIds instanceIds; - - /** The request details. */ - private RequestDetails requestDetails; - - /** The request status. */ - private RequestStatus requestStatus; - - - /* (non-Javadoc) - * @see org.openecomp.vid.domain.mso.Request#getInstanceIds() - */ - @JsonProperty("instanceIds") - public InstanceIds getInstanceIds() { - return instanceIds; - } - - /** - * Sets the instance ids. - * - * @param instanceIds The instanceIds - */ - @JsonProperty("instanceIds") - public void setInstanceIds(InstanceIds instanceIds) { - this.instanceIds = instanceIds; - } - - /** - * (Required). - * - * @return The requestDetails - */ - @JsonProperty("requestDetails") - public RequestDetails getRequestDetails() { - return requestDetails; - } - - /** - * (Required). - * - * @param requestDetails The requestDetails - */ - @JsonProperty("requestDetails") - public void setRequestDetails(RequestDetails requestDetails) { - this.requestDetails = requestDetails; - } - - - /** - * Gets the request status. - * - * @return The requestStatus - */ - @JsonProperty("requestStatus") - public RequestStatus getRequestStatus() { - return requestStatus; - } - - /** - * Sets the request status. - * - * @param requestStatus The requestStatus - */ - @JsonProperty("requestStatus") - public void setRequestStatus(RequestStatus requestStatus) { - this.requestStatus = requestStatus; - } - - - /* (non-Javadoc) - * @see org.openecomp.vid.domain.mso.Request#toString() - */ - @Override - public String toString() { - return ToStringBuilder.reflectionToString(this); - } - - /* (non-Javadoc) - * @see org.openecomp.vid.domain.mso.Request#equals(java.lang.Object) - */ - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof Request) == false) { - return false; - } - Request rhs = ((Request) other); - return new EqualsBuilder().append(getFinishTime(), rhs.getFinishTime()).append(getInstanceIds(), rhs.getInstanceIds()).append(getRequestDetails(), rhs.getRequestDetails()).append(getRequestId(), rhs.getRequestId()).append(getRequestScope(), rhs.getRequestScope()).append(getRequestStatus(), rhs.getRequestStatus()).append(getRequestType(), rhs.getRequestType()).append(getStartTime(), rhs.getStartTime()).append(getAdditionalProperties(), rhs.getAdditionalProperties()).isEquals(); - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/mso/rest/RequestDetails.java b/vid-app-common/src/main/java/org/openecomp/vid/mso/rest/RequestDetails.java deleted file mode 100755 index 0cf697e0b..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/mso/rest/RequestDetails.java +++ /dev/null @@ -1,232 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.mso.rest; - -import java.util.HashMap; -import java.util.Map; -import java.util.List; -//import javax.annotation.Generated; - -import org.openecomp.vid.domain.mso.CloudConfiguration; -import org.openecomp.vid.domain.mso.ModelInfo; -import org.openecomp.vid.domain.mso.RequestInfo; -import org.openecomp.vid.domain.mso.RequestParameters; -import org.openecomp.vid.domain.mso.SubscriberInfo; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import org.apache.commons.lang.builder.EqualsBuilder; -import org.apache.commons.lang.builder.HashCodeBuilder; -import org.apache.commons.lang.builder.ToStringBuilder; - - -/** - * aggregates the context, configuraiton and detailed parameters associated with the request into a single structure. - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "cloudConfiguration", - "modelInfo", - "relatedModelList", - "requestInfo", - "subscriberInfo", - "requestParameters" -}) -public class RequestDetails extends org.openecomp.vid.domain.mso.RequestDetails { - - /** The cloud configuration. */ - @JsonProperty("cloudConfiguration") - private CloudConfiguration cloudConfiguration; - - /** The model info. */ - @JsonProperty("modelInfo") - private ModelInfo modelInfo; - - /** The related model list. */ - @JsonProperty("relatedModelList") - private List relatedInstanceList; - - /** The request info. */ - @JsonProperty("requestInfo") - private RequestInfo requestInfo; - - /** The subscriber info. */ - @JsonProperty("subscriberInfo") - private SubscriberInfo subscriberInfo; - - /** The request parameters. */ - @JsonProperty("requestParameters") - private RequestParameters requestParameters; - - /** The additional properties. */ - @JsonIgnore - private Map additionalProperties = new HashMap(); - - /** - * Gets the cloud configuration. - * - * @return The cloudConfiguration - */ - @JsonProperty("cloudConfiguration") - public CloudConfiguration getCloudConfiguration() { - return cloudConfiguration; - } - - /** - * Sets the cloud configuration. - * - * @param cloudConfiguration The cloudConfiguration - */ - @JsonProperty("cloudConfiguration") - public void setCloudConfiguration(CloudConfiguration cloudConfiguration) { - this.cloudConfiguration = cloudConfiguration; - } - - /** - * Gets the model info. - * - * @return The modelInfo - */ - @JsonProperty("modelInfo") - public ModelInfo getModelInfo() { - return modelInfo; - } - - /** - * Sets the model info. - * - * @param modelInfo The modelInfo - */ - @JsonProperty("modelInfo") - public void setModelInfo(ModelInfo modelInfo) { - this.modelInfo = modelInfo; - } - /** - * Gets the related instance list. - * - * @return The relatedInstanceList - */ - @JsonProperty("relatedInstanceList") - public List getRelatedInstanceList() { - return relatedInstanceList; - } - - /** - * Sets the related model list. - * - * @param relatedInstanceList The relatedInstanceList - */ - @JsonProperty("relatedInstanceList") - public void setRelatedInstanceList( List relatedInstanceList) { - this.relatedInstanceList = relatedInstanceList; - } - - /** - * Gets the request info. - * - * @return The requestInfo - */ - @JsonProperty("requestInfo") - public RequestInfo getRequestInfo() { - return requestInfo; - } - - /** - * Sets the request info. - * - * @param requestInfo The requestInfo - */ - @JsonProperty("requestInfo") - public void setRequestInfo(RequestInfo requestInfo) { - this.requestInfo = requestInfo; - } - - /** - * Gets the subscriber info. - * - * @return The subscriberInfo - */ - @JsonProperty("subscriberInfo") - public SubscriberInfo getSubscriberInfo() { - return subscriberInfo; - } - - /** - * Sets the subscriber info. - * - * @param subscriberInfo The subscriberInfo - */ - @JsonProperty("subscriberInfo") - public void setSubscriberInfo(SubscriberInfo subscriberInfo) { - this.subscriberInfo = subscriberInfo; - } - - /* (non-Javadoc) - * @see org.openecomp.vid.domain.mso.RequestDetails#toString() - */ - @Override - public String toString() { - return ToStringBuilder.reflectionToString(this); - } - - /* (non-Javadoc) - * @see org.openecomp.vid.domain.mso.RequestDetails#getAdditionalProperties() - */ - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - /* (non-Javadoc) - * @see org.openecomp.vid.domain.mso.RequestDetails#setAdditionalProperty(java.lang.String, java.lang.Object) - */ - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - /* (non-Javadoc) - * @see org.openecomp.vid.domain.mso.RequestDetails#hashCode() - */ - @Override - public int hashCode() { - return new HashCodeBuilder().append(cloudConfiguration).append(modelInfo).append(relatedInstanceList).append(requestInfo).append(getRequestParameters()).append(subscriberInfo).append(additionalProperties).toHashCode(); - } - - /* (non-Javadoc) - * @see org.openecomp.vid.domain.mso.RequestDetails#equals(java.lang.Object) - */ - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof RequestDetails) == false) { - return false; - } - RequestDetails rhs = ((RequestDetails) other); - return new EqualsBuilder().append(cloudConfiguration, rhs.cloudConfiguration).append(modelInfo, rhs.modelInfo).append(relatedInstanceList, rhs.relatedInstanceList).append(requestInfo, rhs.requestInfo).append(getRequestParameters(), rhs.getRequestParameters()).append(subscriberInfo, rhs.subscriberInfo).append(additionalProperties, rhs.additionalProperties).isEquals(); - } - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/mso/rest/RequestList.java b/vid-app-common/src/main/java/org/openecomp/vid/mso/rest/RequestList.java deleted file mode 100755 index 8a57c74b7..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/mso/rest/RequestList.java +++ /dev/null @@ -1,137 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.mso.rest; - -import java.util.HashMap; -import java.util.Map; - -import javax.annotation.Generated; - -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -//import com.fasterxml.jackson.annotation.JsonInclude; -//import com.fasterxml.jackson.annotation.JsonProperty; -//import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import org.apache.commons.lang.builder.EqualsBuilder; -import org.apache.commons.lang.builder.HashCodeBuilder; -import org.apache.commons.lang.builder.ToStringBuilder; -import java.util.List; - -/** - * List of relatedModel structures that are related to a modelInfo being operated on. - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@Generated("org.jsonschema2pojo") -@JsonPropertyOrder({ - "finishTime", - "instanceIds", - "requestDetails", - "requestId", - "requestScope", - "requestStatus", - "requestType", - "startTime" -}) - -public class RequestList { - - /** The request list. */ - private List requestList; - - /** The additional properties. */ - @JsonIgnore - private Map additionalProperties = new HashMap(); - - /** - * (Required). - * - * @return The RelatedModel List - */ - public List getRequestList() { - return requestList; - } - - /** - * Sets the request list. - * - * @param l the new request list - */ - public void setRequestList(List l) { - this.requestList = l; - } - - /* (non-Javadoc) - * @see java.lang.Object#toString() - */ - @Override - public String toString() { - return ToStringBuilder.reflectionToString(this); - } - - /** - * Gets the additional properties. - * - * @return the additional properties - */ - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - /** - * Sets the additional property. - * - * @param name the name - * @param value the value - */ - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - /* (non-Javadoc) - * @see java.lang.Object#hashCode() - */ - @Override - public int hashCode() { - return new HashCodeBuilder().append(getRequestList()).append(additionalProperties).toHashCode(); - } - - /* (non-Javadoc) - * @see java.lang.Object#equals(java.lang.Object) - */ - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof RequestList) == false) { - return false; - } - RequestList rhs = ((RequestList) other); - return new EqualsBuilder().append(getRequestList(), rhs.getRequestList()).append(additionalProperties, rhs.additionalProperties).isEquals(); - } - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/mso/rest/RequestWrapper.java b/vid-app-common/src/main/java/org/openecomp/vid/mso/rest/RequestWrapper.java deleted file mode 100644 index b0e9fa125..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/mso/rest/RequestWrapper.java +++ /dev/null @@ -1,35 +0,0 @@ -package org.openecomp.vid.mso.rest; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * request wrapper structure. - */ -public class RequestWrapper { - - - /** The request. */ - private Request request; - - - /** - * Gets the request. - * - * @return The requestDetails - */ - @JsonProperty("request") - public Request getRequest() { - return request; - } - - /** - * Sets the request. - * - * @param request The request - */ - @JsonProperty - public void setRequest(Request request) { - this.request = request; - } - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/mso/rest/Response.java b/vid-app-common/src/main/java/org/openecomp/vid/mso/rest/Response.java deleted file mode 100644 index ee3a8bfef..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/mso/rest/Response.java +++ /dev/null @@ -1,54 +0,0 @@ -package org.openecomp.vid.mso.rest; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class Response { - - /** The status. */ - private int status; - - /** The entity. */ - private RequestList entity; - - /** - * Gets the status. - * - * @return The status - */ - @JsonProperty("status") - public int getStatus() { - return status; - } - - /** - * Sets the status. - * - * @param status The status - */ - @JsonProperty("status") - public void setStatus(int status) { - this.status = status; - } - - /** - * Gets the entity. - * - * @return The entity - */ - @JsonProperty("entity") - public RequestList getEntity() { - return entity; - } - - /** - * Sets the entity. - * - * @param entity The entity - */ - @JsonProperty("entity") - public void setEntity(RequestList entity) { - this.entity = entity; - } - - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/mso/rest/RestInterface.java b/vid-app-common/src/main/java/org/openecomp/vid/mso/rest/RestInterface.java deleted file mode 100644 index 1e2733587..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/mso/rest/RestInterface.java +++ /dev/null @@ -1,81 +0,0 @@ -package org.openecomp.vid.mso.rest; - -import org.openecomp.vid.mso.RestObject; - -/** - * Created by pickjonathan on 26/06/2017. - */ -public interface RestInterface { - - /** - * Inits the rest client. - */ - public void initMsoClient(); - - /** - * Gets the. - * - * @param the generic type - * @param t the t - * @param sourceId the source id - * @param path the path - * @param restObject the rest object - * @throws Exception the exception - */ - public void Get (T t, String sourceId, String path, RestObject restObject ) throws Exception; - - /** - * Delete. - * - * @param the generic type - * @param t the t - * @param r the r - * @param sourceID the source ID - * @param path the path - * @param restObject the rest object - * @throws Exception the exception - */ - public void Delete(T t, RequestDetails r, String sourceID, String path, RestObject restObject) throws Exception; - - /** - * Post. - * - * @param the generic type - * @param t the t - * @param r the r - * @param sourceID the source ID - * @param path the path - * @param restObject the rest object - * @throws Exception the exception - */ - public void Post(T t, RequestDetails r, String sourceID, String path, RestObject restObject) throws Exception; - - /** - * Put. - * - * @param the generic type - * @param t the t - * @param r the r - * @param sourceID the source ID - * @param path the path - * @param restObject the rest object - * @throws Exception the exception - */ - public void Put(T t, org.openecomp.vid.changeManagement.RequestDetailsWrapper r, String sourceID, String path, RestObject restObject) throws Exception; - - - /*** - * Log request. - * - * @param r the r - */ - public void logRequest ( RequestDetails r ); - /*** - * Log request. - * - * @param r the r - */ - public void logRequest(org.openecomp.vid.changeManagement.RequestDetails r); - - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/mso/rest/Task.java b/vid-app-common/src/main/java/org/openecomp/vid/mso/rest/Task.java deleted file mode 100644 index 8d72890ff..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/mso/rest/Task.java +++ /dev/null @@ -1,119 +0,0 @@ -package org.openecomp.vid.mso.rest; - -import java.util.List; - -public class Task { - - private String taskId; - private String type; - private String nfRole; - private String subscriptionServiceType; - private String originalRequestId; - private String originalRequestorId; - private String errorSource; - private String errorCode; - private String errorMessage; - private String buildingBlockName; - private String buildingBlockStep; - private List validResponses; - - - public String getTaskId() { - return taskId; - } - - public void setTaskId(String taskId) { - this.taskId = taskId; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public String getNfRole() { - return nfRole; - } - - public void setNfRole(String nfRole) { - this.nfRole = nfRole; - } - - public String getSubscriptionServiceType() { - return subscriptionServiceType; - } - - public void setSubscriptionServiceType(String subscriptionServiceType) { - this.subscriptionServiceType = subscriptionServiceType; - } - - public String getOriginalRequestId() { - return originalRequestId; - } - - public void setOriginalRequestId(String originalRequestId) { - this.originalRequestId = originalRequestId; - } - - public String getOriginalRequestorId() { - return originalRequestorId; - } - - public void setOriginalRequestorId(String originalRequestorId) { - this.originalRequestorId = originalRequestorId; - } - - public String getErrorSource() { - return errorSource; - } - - public void setErrorSource(String errorSource) { - this.errorSource = errorSource; - } - - public String getErrorCode() { - return errorCode; - } - - public void setErrorCode(String errorCode) { - this.errorCode = errorCode; - } - - public String getErrorMessage() { - return errorMessage; - } - - public void setErrorMessage(String errorMessage) { - this.errorMessage = errorMessage; - } - - public String getBuildingBlockName() { - return buildingBlockName; - } - - public void setBuildingBlockName(String buildingBlockName) { - this.buildingBlockName = buildingBlockName; - } - - public String getBuildingBlockStep() { - return buildingBlockStep; - } - - public void setBuildingBlockStep(String buildingBlockStep) { - this.buildingBlockStep = buildingBlockStep; - } - - public List getValidResponses() { - return validResponses; - } - - public void setValidResponses(List validResponses) { - this.validResponses = validResponses; - } - - - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/mso/rest/TaskList.java b/vid-app-common/src/main/java/org/openecomp/vid/mso/rest/TaskList.java deleted file mode 100644 index 7232364a3..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/mso/rest/TaskList.java +++ /dev/null @@ -1,16 +0,0 @@ -package org.openecomp.vid.mso.rest; - -import java.util.List; - -public class TaskList { - - public List getTaskList() { - return taskList; - } - - public void setTaskList(List taskList) { - this.taskList = taskList; - } - - private List taskList; -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/policy/PolicyProperties.java b/vid-app-common/src/main/java/org/openecomp/vid/policy/PolicyProperties.java deleted file mode 100644 index d273aa6a7..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/policy/PolicyProperties.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.openecomp.vid.policy; - -import org.openecomp.portalsdk.core.util.SystemProperties; - - -public class PolicyProperties extends SystemProperties { - - public static final String POLICY_CLIENTAUTH_VAL = "policy.ClientAuth"; - - public static final String POLICY_CLIENT_MECHID_VAL = "policy.client.mechId"; - - public static final String POLICY_CLIENT_PASSWORD_VAL = "policy.client.password"; - - public static final String POLICY_USERNAME_VAL = "policy.username"; - - public static final String POLICY_PASSWORD_VAL = "policy.password"; - - public static final String POLICY_AUTHORIZATION_VAL = "policy.Authorization"; - - public static final String POLICY_SERVER_URL_VAL = "policy.server.url"; - - public static final String POLICY_ENVIRONMENT_VAL = "policy.environment"; - - public static final String POLICY_GET_CONFIG_VAL = "policy.get.config"; - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/policy/PolicyResponseWrapper.java b/vid-app-common/src/main/java/org/openecomp/vid/policy/PolicyResponseWrapper.java deleted file mode 100644 index 02ca0f0ec..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/policy/PolicyResponseWrapper.java +++ /dev/null @@ -1,56 +0,0 @@ -package org.openecomp.vid.policy; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import org.apache.commons.lang.builder.ToStringBuilder; - -/** - * This wrapper encapsulates the Policy response - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "status", - "entity" -}) - -public class PolicyResponseWrapper { - - @JsonProperty("status") - private int status; - - @JsonProperty("entity") - private String entity; - - @JsonProperty("entity") - public String getEntity() { - return entity; - } - - @JsonProperty("status") - public int getStatus() { - return status; - } - - @JsonProperty("status") - public void setStatus(int v) { - this.status = v; - } - - @JsonProperty("entity") - public void setEntity(String v) { - this.entity = v; - } - - @Override - public String toString() { - return ToStringBuilder.reflectionToString(this); - } - - public String getResponse () { - - StringBuilder b = new StringBuilder ("{ \"status\": "); - b.append(getStatus()).append(", \"entity\": " ).append(this.getEntity()).append("}"); - return (b.toString()); - } -} \ No newline at end of file diff --git a/vid-app-common/src/main/java/org/openecomp/vid/policy/PolicyRestInt.java b/vid-app-common/src/main/java/org/openecomp/vid/policy/PolicyRestInt.java deleted file mode 100644 index 7c075a535..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/policy/PolicyRestInt.java +++ /dev/null @@ -1,67 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.policy; - -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.Date; - -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.vid.policy.rest.RequestDetails; - -import com.fasterxml.jackson.databind.ObjectMapper; - -public class PolicyRestInt { - - /** The logger. */ - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(PolicyRestInterface.class); - - /** The Constant dateFormat. */ - final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); - - /** The request date format. */ - public DateFormat requestDateFormat = new SimpleDateFormat("EEE, dd MMM YYYY HH:mm:ss z"); - - public PolicyRestInt() { - requestDateFormat.setTimeZone(java.util.TimeZone.getTimeZone("GMT")); - } - - /** - * Log request. - * - * @param r the r - */ - public void logRequest ( RequestDetails r ) { - String methodName = "logRequest"; - ObjectMapper mapper = new ObjectMapper(); - String r_json_str = ""; - if ( r != null ) { - r_json_str = r.toString(); - try { - r_json_str = mapper.writeValueAsString(r); - } - catch ( com.fasterxml.jackson.core.JsonProcessingException j ) { - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " Unable to parse request as json"); - } - } - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " Request=(" + r_json_str + ")"); - } -} \ No newline at end of file diff --git a/vid-app-common/src/main/java/org/openecomp/vid/policy/PolicyRestInterface.java b/vid-app-common/src/main/java/org/openecomp/vid/policy/PolicyRestInterface.java deleted file mode 100644 index d6a59da20..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/policy/PolicyRestInterface.java +++ /dev/null @@ -1,234 +0,0 @@ -package org.openecomp.vid.policy; - -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.Collections; -import java.util.Date; - -import javax.ws.rs.client.Client; -import javax.ws.rs.client.Entity; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.MultivaluedHashMap; -import javax.ws.rs.core.Response; - -import org.apache.commons.codec.binary.Base64; -import org.eclipse.jetty.util.security.Password; -import org.json.simple.JSONObject; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.util.SystemProperties; -import org.openecomp.vid.client.HttpBasicClient; -import org.openecomp.vid.policy.rest.RequestDetails; - -public class PolicyRestInterface extends PolicyRestInt implements PolicyRestInterfaceIfc { - - /** The logger. */ - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(PolicyRestInterface.class); - - /** The Constant dateFormat. */ - final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); - - /** The client. */ - private static Client client = null; - - /** The common headers. */ - private MultivaluedHashMap commonHeaders; - - public PolicyRestInterface() { - super(); - } - - public void initRestClient() - { - final String methodname = "initRestClient()"; - - //final String clientAuth = SystemProperties.getProperty(PolicyProperties.POLICY_CLIENTAUTH_VAL); - //final String authorization = SystemProperties.getProperty(PolicyProperties.POLICY_AUTHORIZATION_VAL); - final String mechId = SystemProperties.getProperty(PolicyProperties.POLICY_CLIENT_MECHID_VAL); - final String clientPassword = SystemProperties.getProperty(PolicyProperties.POLICY_CLIENT_PASSWORD_VAL); - final String username = SystemProperties.getProperty(PolicyProperties.POLICY_USERNAME_VAL); - final String password = SystemProperties.getProperty(PolicyProperties.POLICY_PASSWORD_VAL); - final String environment = SystemProperties.getProperty(PolicyProperties.POLICY_ENVIRONMENT_VAL); - - final String decrypted_client_password = Password.deobfuscate(clientPassword); - String mechAuthString = mechId + ":" + decrypted_client_password; - byte[] mechAuthEncBytes = Base64.encodeBase64(mechAuthString.getBytes()); - String clientAuth = new String(mechAuthEncBytes); - - final String decrypted_password = Password.deobfuscate(password); - String authString = username + ":" + decrypted_password; - byte[] authEncBytes = Base64.encodeBase64(authString.getBytes()); - String authorization = new String(authEncBytes); - - commonHeaders = new MultivaluedHashMap (); - commonHeaders.put("ClientAuth", Collections.singletonList((Object) ("Basic " + clientAuth))); - commonHeaders.put("Authorization", Collections.singletonList((Object) ("Basic " + authorization))); - commonHeaders.put("Environment", Collections.singletonList((Object) (environment))); - - if (client == null) { - - try { - client = HttpBasicClient.getClient(); - } catch (Exception e) { - System.out.println( methodname + " Unable to get the SSL client"); - } - } - } - - @SuppressWarnings("unchecked") - public void Get (T t, String sourceId, String path, RestObject restObject ) throws Exception { - String methodName = "Get"; - - logger.debug(EELFLoggerDelegate.debugLogger, methodName + " start"); - - String url=""; - restObject.set(t); - - url = SystemProperties.getProperty(PolicyProperties.POLICY_SERVER_URL_VAL) + path; - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " sending request to url= " + url); - - initRestClient(); - - final Response cres = client.target(url) - .request() - .accept("application/json") - .headers(commonHeaders) - .get(); - - int status = cres.getStatus(); - restObject.setStatusCode (status); - - if (status == 200) { - t = (T) cres.readEntity(t.getClass()); - restObject.set(t); - logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + methodName + " REST api was successfull!"); - - } else { - throw new Exception(methodName + " with status="+ status + ", url= " + url ); - } - - logger.debug(EELFLoggerDelegate.debugLogger,methodName + " received status=" + status ); - - return; - } - - @SuppressWarnings("unchecked") - public void Delete(T t, RequestDetails r, String sourceID, String path, RestObject restObject) { - - String methodName = "Delete"; - String url=""; - Response cres = null; - - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " start"); - logRequest (r); - - try { - initRestClient(); - - url = SystemProperties.getProperty(PolicyProperties.POLICY_SERVER_URL_VAL) + path; - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + " methodName sending request to: " + url); - - cres = client.target(url) - .request() - .accept("application/json") - .headers(commonHeaders) - //.entity(r) - .build("DELETE", Entity.entity(r, MediaType.APPLICATION_JSON)).invoke(); - // .method("DELETE", Entity.entity(r, MediaType.APPLICATION_JSON)); - //.delete(Entity.entity(r, MediaType.APPLICATION_JSON)); - - int status = cres.getStatus(); - restObject.setStatusCode (status); - - if (status == 404) { // resource not found - String msg = "Resource does not exist...: " + cres.getStatus(); - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + msg); - } else if (status == 200 || status == 204){ - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + "Resource " + url + " deleted"); - } else if (status == 202) { - String msg = "Delete in progress: " + status; - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + msg); - } - else { - String msg = "Deleting Resource failed: " + status; - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + msg); - } - - try { - t = (T) cres.readEntity(t.getClass()); - restObject.set(t); - } - catch ( Exception e ) { - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " No response entity, this is probably ok, e=" - + e.getMessage()); - } - - } - catch (Exception e) - { - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " with url="+url+ ", Exception: " + e.toString()); - throw e; - - } - } - - @SuppressWarnings("unchecked") - public void Post(T t, JSONObject requestDetails, String uuid, String path, RestObject restObject) throws Exception { - - String methodName = "Post"; - String url=""; - - System.out.println( "POST policy rest interface"); - - // logRequest (requestDetails); - try { - - initRestClient(); - - url = SystemProperties.getProperty(PolicyProperties.POLICY_SERVER_URL_VAL) + path; - System.out.println( "<== " + methodName + " sending request to url= " + url); - // Change the content length - final Response cres = client.target(url) - .request() - .accept("application/json") - .headers(commonHeaders) - //.header("content-length", 201) - //.header("X-FromAppId", sourceID) - .post(Entity.entity(requestDetails, MediaType.APPLICATION_JSON)); - - try { - t = (T) cres.readEntity(t.getClass()); - restObject.set(t); - } - catch ( Exception e ) { - - System.out.println("<== " + methodName + " No response entity, this is probably ok, e=" + e.getMessage()); - } - - int status = cres.getStatus(); - restObject.setStatusCode (status); - - if ( status >= 200 && status <= 299 ) { - System.out.println( "<== " + methodName + " REST api POST was successful!"); - - } else { - System.out.println( "<== " + methodName + " with status="+status+", url="+url); - } - - } catch (Exception e) - { - System.out.println( "<== " + methodName + " with url="+url+ ", Exception: " + e.toString()); - throw e; - - } - } - - public T getInstance(Class clazz) throws IllegalAccessException, InstantiationException - { - return clazz.newInstance(); - } - - @Override - public void logRequest(RequestDetails r) { - // TODO Auto-generated method stub - } -} \ No newline at end of file diff --git a/vid-app-common/src/main/java/org/openecomp/vid/policy/PolicyRestInterfaceFactory.java b/vid-app-common/src/main/java/org/openecomp/vid/policy/PolicyRestInterfaceFactory.java deleted file mode 100644 index 1570875c0..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/policy/PolicyRestInterfaceFactory.java +++ /dev/null @@ -1,14 +0,0 @@ - -package org.openecomp.vid.policy; - -public class PolicyRestInterfaceFactory { - - - public static PolicyRestInterfaceIfc getInstance () { - PolicyRestInterfaceIfc obj = null; - - obj = new PolicyRestInterface(); - - return ( obj ); - } -} \ No newline at end of file diff --git a/vid-app-common/src/main/java/org/openecomp/vid/policy/PolicyRestInterfaceIfc.java b/vid-app-common/src/main/java/org/openecomp/vid/policy/PolicyRestInterfaceIfc.java deleted file mode 100644 index f56924b36..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/policy/PolicyRestInterfaceIfc.java +++ /dev/null @@ -1,58 +0,0 @@ - -package org.openecomp.vid.policy; - -import org.json.simple.JSONObject; -import org.openecomp.vid.policy.rest.RequestDetails; - -public interface PolicyRestInterfaceIfc { - /** - * Inits the rest client. - */ - public void initRestClient(); - - /** - * Gets the. - * - * @param the generic type - * @param t the t - * @param sourceId the source id - * @param path the path - * @param restObject the rest object - * @throws Exception the exception - */ - public void Get (T t, String sourceId, String path, RestObject restObject ) throws Exception; - - /** - * Delete. - * - * @param the generic type - * @param t the t - * @param r the r - * @param sourceID the source ID - * @param path the path - * @param restObject the rest object - * @throws Exception the exception - */ - public void Delete(T t, RequestDetails r, String sourceID, String path, RestObject restObject) throws Exception; - - /** - * Post. - * - * @param the generic type - * @param t the t - * @param r the r - * @param sourceID the source ID - * @param path the path - * @param restObject the rest object - * @throws Exception the exception - */ - public void Post(T t, JSONObject r, String sourceID, String path, RestObject restObject) throws Exception; - - /*** - * Log request. - * - * @param r the r - */ - public void logRequest ( RequestDetails r ); - -} \ No newline at end of file diff --git a/vid-app-common/src/main/java/org/openecomp/vid/policy/PolicyUtil.java b/vid-app-common/src/main/java/org/openecomp/vid/policy/PolicyUtil.java deleted file mode 100644 index ceda7c427..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/policy/PolicyUtil.java +++ /dev/null @@ -1,71 +0,0 @@ -package org.openecomp.vid.policy; - -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.Date; - -import org.glassfish.jersey.client.ClientResponse; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.vid.policy.PolicyResponseWrapper; -import org.openecomp.vid.policy.PolicyUtil; -import org.openecomp.vid.policy.RestObject; - -import com.fasterxml.jackson.databind.ObjectMapper; - -public class PolicyUtil { - - private static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(PolicyUtil.class); - - final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); - - public static PolicyResponseWrapper wrapResponse ( String body, int statusCode ) { - - PolicyResponseWrapper w = new PolicyResponseWrapper(); - w.setStatus (statusCode); - w.setEntity(body); - - return w; - } - - public static PolicyResponseWrapper wrapResponse (ClientResponse cres) { - String resp_str = ""; - if ( cres != null ) { - resp_str = cres.readEntity(String.class); - } - int statuscode = cres.getStatus(); - PolicyResponseWrapper w = PolicyUtil.wrapResponse ( resp_str, statuscode ); - return (w); - } - - public static PolicyResponseWrapper wrapResponse (RestObject rs) { - String resp_str = ""; - int status = 0; - if ( rs != null ) { - resp_str = rs.get(); - status = rs.getStatusCode(); - } - PolicyResponseWrapper w = PolicyUtil.wrapResponse ( resp_str, status ); - return (w); - } - - public static String convertPojoToString ( T t ) throws com.fasterxml.jackson.core.JsonProcessingException { - - String methodName = "convertPojoToString"; - ObjectMapper mapper = new ObjectMapper(); - String r_json_str = ""; - if ( t != null ) { - try { - r_json_str = mapper.writeValueAsString(t); - } - catch ( com.fasterxml.jackson.core.JsonProcessingException j ) { - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " Unable to parse object as json"); - } - } - return (r_json_str); - } - - - public static void main(String[] args) { - // TODO Auto-generated method stub - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/policy/RestObject.java b/vid-app-common/src/main/java/org/openecomp/vid/policy/RestObject.java deleted file mode 100644 index de085f24b..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/policy/RestObject.java +++ /dev/null @@ -1,68 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.policy; - -/** - * The Class RestObject. - * - * @param the generic type - */ -public class RestObject { - - /** - * Generic version of the RestObject class. - * - */ - // T stands for "Type" - private T t; - - /** The status code. */ - private int statusCode= 0; - - /** - * Sets the. - * - * @param t the t - */ - public void set(T t) { this.t = t; } - - /** - * Gets the. - * - * @return the t - */ - public T get() { return t; } - - /** - * Sets the status code. - * - * @param v the new status code - */ - public void setStatusCode(int v) { this.statusCode = v; } - - /** - * Gets the status code. - * - * @return the status code - */ - public int getStatusCode() { return this.statusCode; } - -} \ No newline at end of file diff --git a/vid-app-common/src/main/java/org/openecomp/vid/policy/rest/RequestDetails.java b/vid-app-common/src/main/java/org/openecomp/vid/policy/rest/RequestDetails.java deleted file mode 100644 index 93e80d6b3..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/policy/rest/RequestDetails.java +++ /dev/null @@ -1,107 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.policy.rest; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/* - [ - { - "policyConfigMessage": "Config Retrieved! ", - "policyConfigStatus": "CONFIG_RETRIEVED", - "type": "JSON", - "config": "{\"service\":\"TimeLimitAndVerticalTopology\",\"policyName\":\"SNIRO_CM_1707.Demo_TimeLimitAndVerticalTopology_zone_localTime\",\"description\":\"dev instance\",\"templateVersion\":\"1702.03\",\"version\":\"1707\",\"priority\":\"4\",\"riskType\":\"test\",\"riskLevel\":\"3\",\"guard\":\"False\",\"content\":{\"serviceType\":\"networkOnDemand\",\"identity\":\"vnf_upgrade_policy\",\"policyScope\":{\"serviceType\":[\"networkOnDemand\"],\"aicZone\":[\" \"],\"entityType\":[\"vnf\"]},\"timeSchedule\":{\"allowedPeriodicTime\":[{\"day\":\"weekday\",\"timeRange\":[{\"start_time\":\"04:00:00\",\"end_time\":\"13:00:00\"}]}]},\"nodeType\":[\"vnf\"],\"type\":\"timeLimitAndVerticalTopology\",\"conflictScope\":\"vnf_zone\"}}", - "policyName": "SNIRO_CM_1707.Config_MS_Demo_TimeLimitAndVerticalTopology_zone_localTime.1.xml", - "policyVersion": "1", - "matchingConditions": { - "ECOMPName": "SNIRO-Placement", - "ConfigName": "", - "service": "TimeLimitAndVerticalTopology", - "uuid": "", - "Location": "" - }, - "responseAttributes": {}, - "property": null - }, - { - "policyConfigMessage": "Config Retrieved! ", - "policyConfigStatus": "CONFIG_RETRIEVED", - "type": "JSON", - "config": "{\"service\":\"TimeLimitAndVerticalTopology\",\"policyName\":\"SNIRO_CM_1707.Demo_TimeLimitAndVerticalTopology_pserver_localTime\",\"description\":\"dev instance\",\"templateVersion\":\"1702.03\",\"version\":\"1707\",\"priority\":\"4\",\"riskType\":\"test\",\"riskLevel\":\"3\",\"guard\":\"False\",\"content\":{\"serviceType\":\"networkOnDemand\",\"identity\":\"vnf_upgrade_policy\",\"policyScope\":{\"serviceType\":[\"networkOnDemand\"],\"aicZone\":[\" \"],\"entityType\":[\"vnf\"]},\"timeSchedule\":{\"allowedPeriodicTime\":[{\"day\":\"weekday\",\"timeRange\":[{\"start_time\":\"04:00:00\",\"end_time\":\"13:00:00\"}]}]},\"nodeType\":[\"vnf\"],\"type\":\"timeLimitAndVerticalTopology\",\"conflictScope\":\"vnf_pserver\"}}", - "policyName": "SNIRO_CM_1707.Config_MS_Demo_TimeLimitAndVerticalTopology_pserver_localTime.1.xml", - "policyVersion": "1", - "matchingConditions": { - "ECOMPName": "SNIRO-Placement", - "ConfigName": "", - "service": "TimeLimitAndVerticalTopology", - "uuid": "", - "Location": "" - }, - "responseAttributes": {}, - "property": null - }, - { - "policyConfigMessage": "Config Retrieved! ", - "policyConfigStatus": "CONFIG_RETRIEVED", - "type": "JSON", - "config": "{\"service\":\"TimeLimitAndVerticalTopology\",\"policyName\":\"SNIRO_CM_1707.Demo_TimeLimitAndVerticalTopology_vnf_localTime\",\"description\":\"dev instance\",\"templateVersion\":\"1702.03\",\"version\":\"1707\",\"priority\":\"4\",\"riskType\":\"test\",\"riskLevel\":\"3\",\"guard\":\"False\",\"content\":{\"serviceType\":\"networkOnDemand\",\"identity\":\"vnf_upgrade_policy\",\"policyScope\":{\"serviceType\":[\"networkOnDemand\"],\"aicZone\":[\" \"],\"entityType\":[\"vnf\"]},\"timeSchedule\":{\"allowedPeriodicTime\":[{\"day\":\"weekday\",\"timeRange\":[{\"start_time\":\"04:00:00\",\"end_time\":\"13:00:00\"}]}]},\"nodeType\":[\"vnf\"],\"type\":\"timeLimitAndVerticalTopology\",\"conflictScope\":\"vnf\"}}", - "policyName": "SNIRO_CM_1707.Config_MS_Demo_TimeLimitAndVerticalTopology_vnf_localTime.1.xml", - "policyVersion": "1", - "matchingConditions": { - "ECOMPName": "SNIRO-Placement", - "ConfigName": "", - "service": "TimeLimitAndVerticalTopology", - "uuid": "", - "Location": "" - }, - "responseAttributes": {}, - "property": null - } - ] -*/ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "policyConfigMessage", - "policyConfigStatus", - "type", - "config", - "policyName", - "policyVersion", - "matchingConditions" -}) -public class RequestDetails { - - @JsonProperty("policyName") - private String policyName; - - @JsonProperty("policyName") - public String getPolicyName() { - return policyName; - } - - @JsonProperty("policyName") - public void setPolicyName(String policyName) { - this.policyName = policyName; - } - -} \ No newline at end of file diff --git a/vid-app-common/src/main/java/org/openecomp/vid/properties/AsdcClientConfiguration.java b/vid-app-common/src/main/java/org/openecomp/vid/properties/AsdcClientConfiguration.java deleted file mode 100755 index 232023b4e..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/properties/AsdcClientConfiguration.java +++ /dev/null @@ -1,124 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.properties; - -import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.PropertySource; -import org.springframework.context.annotation.PropertySources; -import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; - -/** - * The Class AsdcClientConfiguration. - */ -@Configuration - -@PropertySources({ - @PropertySource(value="asdc.properties", ignoreResourceNotFound = true), - @PropertySource(value="${container.classpath:}/WEB-INF/conf/asdc.properties", ignoreResourceNotFound = true) -}) -public class AsdcClientConfiguration { - - @Bean - public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() { - return new PropertySourcesPlaceholderConfigurer(); - } - - @Value("${asdc.client.type}") - private AsdcClientType asdcClientType; - - /** The asdc client host. */ - @Value("${asdc.client.rest.host}") - private String asdcClientHost; - - /** The asdc client port. */ - @Value("${asdc.client.rest.port}") - private int asdcClientPort; - - /** The asdc client auth. */ - @Value("${asdc.client.rest.auth}") - public String asdcClientAuth; - - /** The asdc client protocol. */ - @Value("${asdc.client.rest.protocol}") - public String asdcClientProtocol; - - /** - * Gets the asdc client type. - * - * @return the asdc client type - */ - public AsdcClientType getAsdcClientType() { - return asdcClientType; - } - - /** - * Gets the asdc client host. - * - * @return the asdc client host - */ - public String getAsdcClientHost() { - return asdcClientHost; - } - - /** - * Gets the asdc client port. - * - * @return the asdc client port - */ - public int getAsdcClientPort() { - return asdcClientPort; - } - - /** - * Gets the asdc client auth. - * - * @return the asdc client auth - */ - public String getAsdcClientAuth() { - return asdcClientAuth; - } - - /** - * Gets the asdc client protocol. - * - * @return the asdc client protocol - */ - public String getAsdcClientProtocol() { - return asdcClientProtocol; - } - - /** - * The Enum AsdcClientType. - */ - public enum AsdcClientType { - - /** The in memory. */ - IN_MEMORY, - - /** The rest. */ - REST, - - /** The local. */ - LOCAL - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/properties/MsoClientConfiguration.java b/vid-app-common/src/main/java/org/openecomp/vid/properties/MsoClientConfiguration.java deleted file mode 100644 index f7a331a7e..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/properties/MsoClientConfiguration.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.openecomp.vid.properties; - -/** - * Created by pickjonathan on 20/06/2017. - */ -public class MsoClientConfiguration { - - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/properties/VidProperties.java b/vid-app-common/src/main/java/org/openecomp/vid/properties/VidProperties.java deleted file mode 100755 index 141b9b27c..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/properties/VidProperties.java +++ /dev/null @@ -1,93 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.properties; -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.Date; -import org.openecomp.vid.model.ModelConstants; -import org.openecomp.portalsdk.core.util.SystemProperties; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; - -import org.openecomp.vid.controller.VidController; -/** - * The Class VidProperties. - */ -public class VidProperties extends SystemProperties { - - //VID General Properties - - /** The Constant VID_TRUSTSTORE_FILENAME. */ - public static final String VID_TRUSTSTORE_FILENAME = "vid.truststore.filename"; - - /** The Constant VID_TRUSTSTORE_PASSWD_X. */ - public static final String VID_TRUSTSTORE_PASSWD_X = "vid.truststore.passwd.x"; - - /** The Constant FILESEPARATOR. */ - public static final String FILESEPARATOR = (System.getProperty("file.separator") == null) ? "/" : System.getProperty("file.separator"); - - /** The Constant LOG. */ - private static final EELFLoggerDelegate LOG = EELFLoggerDelegate.getLogger(VidController.class); - - /** The Constant dateFormat. */ - final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); - /** - * Gets the asdc model namespace prefix property - * - * @return the property value or a default value - */ - public static String getAsdcModelNamespace() { - String methodName = "getAsdcModelNamespace "; - String asdcModelNamespace = ModelConstants.DEFAULT_ASDC_MODEL_NAMESPACE; - try { - asdcModelNamespace = SystemProperties.getProperty(ModelConstants.ASDC_MODEL_NAMESPACE); - if ( asdcModelNamespace == null || asdcModelNamespace.isEmpty()) { - asdcModelNamespace = ModelConstants.DEFAULT_ASDC_MODEL_NAMESPACE; - } - } - catch ( Exception e ) { - LOG.error (EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + methodName + "unable to find the value, using the default " - + ModelConstants.DEFAULT_ASDC_MODEL_NAMESPACE); - asdcModelNamespace = ModelConstants.DEFAULT_ASDC_MODEL_NAMESPACE; - } - return (asdcModelNamespace); - } - /** - * Gets the specified property value. If the property is not defined, returns a default value. - * - * @return the property value or a default value - */ - public static String getPropertyWithDefault ( String propName, String defaultValue ) { - String methodName = "getPropertyWithDefault "; - String propValue = defaultValue; - try { - propValue = SystemProperties.getProperty(propName); - if ( propValue == null || propValue.isEmpty()) { - propValue = defaultValue; - } - } - catch ( Exception e ) { - LOG.error (EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + methodName + "unable to find the value, using the default " - + defaultValue); - propValue = defaultValue; - } - return (propValue); - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/roles/EcompRole.java b/vid-app-common/src/main/java/org/openecomp/vid/roles/EcompRole.java deleted file mode 100644 index 5242f5aaa..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/roles/EcompRole.java +++ /dev/null @@ -1,5 +0,0 @@ -package org.openecomp.vid.roles; - -public enum EcompRole { - READ; -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/roles/Role.java b/vid-app-common/src/main/java/org/openecomp/vid/roles/Role.java deleted file mode 100644 index f818e48fa..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/roles/Role.java +++ /dev/null @@ -1,48 +0,0 @@ -package org.openecomp.vid.roles; - -/** - * Created by Oren on 7/1/17. - */ - -public class Role { - - private EcompRole ecompRole; - - private String subscribeName; - - private String serviceType; - - private String tenant; - - public Role(EcompRole ecompRole, String serviceName, String serviceType, String tenant) { - this.ecompRole = ecompRole; - this.subscribeName = serviceName; - this.serviceType = serviceType; - this.tenant = tenant; - } - - public EcompRole getEcompRole() { - return ecompRole; - } - - - public String getSubscribeName() { - return subscribeName; - } - - public void setSubscribeName(String subscribeName) { - this.subscribeName = subscribeName; - } - - public String getServiceType() { - return serviceType; - } - - - public String getTenant() { - return tenant; - } - - - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/roles/RoleProvider.java b/vid-app-common/src/main/java/org/openecomp/vid/roles/RoleProvider.java deleted file mode 100644 index 2ed5bdbbf..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/roles/RoleProvider.java +++ /dev/null @@ -1,64 +0,0 @@ -package org.openecomp.vid.roles; - -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.web.support.UserUtils; - -import javax.servlet.http.HttpServletRequest; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -/** - * Created by Oren on 7/1/17. - */ -public class RoleProvider { - - private static final EELFLoggerDelegate LOG = EELFLoggerDelegate.getLogger(RoleProvider.class); - final String readPermissionString = "read"; - final String roleStringDelimiter = "_"; - - public static List extractRoleFromSession(HttpServletRequest request) { - - return new ArrayList(); - - } - - public List getUserRoles(HttpServletRequest request) { - List roleList = new ArrayList<>(); - //Disable roles until AAF integration finishes - /*HashMap roles = UserUtils.getRoles(request); - for (Object role : roles.keySet()) { - org.openecomp.portalsdk.core.domain.Role sdkRol = (org.openecomp.portalsdk.core.domain.Role) roles.get(role); - try { - if (sdkRol.getName().contains(readPermissionString)) - continue; - String[] roleParts = splitRole((sdkRol.getName())); - roleList.add(createRoleFromStringArr(roleParts)); - } catch (Exception e) { - LOG.error("Failed to parse permission", e); - - } - }*/ - - return roleList; - } - - public String[] splitRole(String roleAsString) { - return roleAsString.split(roleStringDelimiter); - } - - public boolean userPermissionIsReadOnly(List roles) { - - return (!(roles.size() > 0)); - } - - public Role createRoleFromStringArr(String[] roleParts) { - if (roleParts.length > 2) { - return new Role(EcompRole.READ, roleParts[0], roleParts[1], roleParts[2]); - } else { - return new Role(EcompRole.READ, roleParts[0], roleParts[1], null); - } - } - -} - diff --git a/vid-app-common/src/main/java/org/openecomp/vid/roles/RoleValidator.java b/vid-app-common/src/main/java/org/openecomp/vid/roles/RoleValidator.java deleted file mode 100644 index 9031524d3..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/roles/RoleValidator.java +++ /dev/null @@ -1,67 +0,0 @@ -package org.openecomp.vid.roles; - -import org.openecomp.vid.mso.rest.RequestDetails; - -import java.util.List; -import java.util.Map; - -/** - * Created by Oren on 7/12/17. - */ -public class RoleValidator { - - //Disable roles until AAF integration finishes - private boolean disableRoles = true; - private List userRoles; - - public RoleValidator(List roles) { - this.userRoles = roles; - } - - public boolean isSubscriberPermitted(String subscriberName) { - if(this.disableRoles) return true; - - for (Role role : userRoles) { - if (role.getSubscribeName().equals(subscriberName)) - return true; - } - return false; - } - - public boolean isServicePermitted(String subscriberName, String serviceType) { - if(this.disableRoles) return true; - - for (Role role : userRoles) { - if (role.getSubscribeName().equals(subscriberName) && role.getServiceType().equals(serviceType)) - return true; - } - return false; - } - - public boolean isMsoRequestValid(RequestDetails mso_request) { - if(this.disableRoles) return true; - - try { - String globalSubscriberIdRequested = (String) ((Map) ((Map) mso_request.getAdditionalProperties().get("requestDetails")).get("subscriberInfo")).get("globalSubscriberId"); - String serviceType = (String) ((Map) ((Map) mso_request.getAdditionalProperties().get("requestDetails")).get("requestParameters")).get("subscriptionServiceType"); - return isServicePermitted(globalSubscriberIdRequested, serviceType); - } catch (Exception e) { - //Until we'll get the exact information regarding the tenants and the global customer id, we'll return true on unknown requests to mso - return true; - } -// return false; - } - - public boolean isTenantPermitted(String globalCustomerId, String serviceType, String tenant) { - if(this.disableRoles) return true; - - for (Role role : userRoles) { - if (role.getSubscribeName().equals(globalCustomerId) - && role.getServiceType().equals(serviceType) - && (role.getTenant() == null || role.getTenant().equals(tenant))) { - return true; - } - } - return false; - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/scheduler/RestObject.java b/vid-app-common/src/main/java/org/openecomp/vid/scheduler/RestObject.java deleted file mode 100644 index 57b36830e..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/scheduler/RestObject.java +++ /dev/null @@ -1,44 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.scheduler; - - -public class RestObject { - - private T t; - - private int statusCode= 0; - - public String uuid; - - public void set(T t) { this.t = t; } - - public T get() { return t; } - - public void setStatusCode(int v) { this.statusCode = v; } - - public int getStatusCode() { return this.statusCode; } - - public void setUUID(String uuid) { this.uuid = uuid; } - - public String getUUID() { return this.uuid; } -} - diff --git a/vid-app-common/src/main/java/org/openecomp/vid/scheduler/RestObjects/GetTimeSlotsRestObject.java b/vid-app-common/src/main/java/org/openecomp/vid/scheduler/RestObjects/GetTimeSlotsRestObject.java deleted file mode 100644 index 614b557a0..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/scheduler/RestObjects/GetTimeSlotsRestObject.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.openecomp.vid.scheduler.RestObjects; - -public class GetTimeSlotsRestObject extends org.openecomp.vid.scheduler.RestObject { - - public String uuid; - - public void setUUID(String uuid) { this.uuid = uuid; } - - public String getUUID() { return this.uuid; } - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/scheduler/RestObjects/PostCreateNewVnfRestObject.java b/vid-app-common/src/main/java/org/openecomp/vid/scheduler/RestObjects/PostCreateNewVnfRestObject.java deleted file mode 100644 index 86cbab8a6..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/scheduler/RestObjects/PostCreateNewVnfRestObject.java +++ /dev/null @@ -1,10 +0,0 @@ -package org.openecomp.vid.scheduler.RestObjects; - -public class PostCreateNewVnfRestObject extends RestObject { - - public String uuid; - - public void setUUID(String uuid) { this.uuid = uuid; } - - public String getUUID() { return this.uuid; } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/scheduler/RestObjects/PostSubmitVnfChangeRestObject.java b/vid-app-common/src/main/java/org/openecomp/vid/scheduler/RestObjects/PostSubmitVnfChangeRestObject.java deleted file mode 100644 index 6fb56f67d..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/scheduler/RestObjects/PostSubmitVnfChangeRestObject.java +++ /dev/null @@ -1,10 +0,0 @@ -package org.openecomp.vid.scheduler.RestObjects; - -public class PostSubmitVnfChangeRestObject extends RestObject { - - public String uuid; - - public void setUUID(String uuid) { this.uuid = uuid; } - - public String getUUID() { return this.uuid; } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/scheduler/RestObjects/RestObject.java b/vid-app-common/src/main/java/org/openecomp/vid/scheduler/RestObjects/RestObject.java deleted file mode 100644 index 2d0eec74d..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/scheduler/RestObjects/RestObject.java +++ /dev/null @@ -1,39 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.scheduler.RestObjects; - - -public class RestObject { - - private T t; - - private int statusCode= 0; - - public void set(T t) { this.t = t; } - - public T get() { return t; } - - public void setStatusCode(int v) { this.statusCode = v; } - - public int getStatusCode() { return this.statusCode; } - -} - diff --git a/vid-app-common/src/main/java/org/openecomp/vid/scheduler/SchedulerProperties.java b/vid-app-common/src/main/java/org/openecomp/vid/scheduler/SchedulerProperties.java deleted file mode 100644 index 15855b7be..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/scheduler/SchedulerProperties.java +++ /dev/null @@ -1,24 +0,0 @@ -package org.openecomp.vid.scheduler; - -import org.openecomp.portalsdk.core.util.SystemProperties; - - -public class SchedulerProperties extends SystemProperties { - - public static final String SCHEDULER_USER_NAME_VAL = "scheduler.user.name"; - - public static final String SCHEDULER_PASSWORD_VAL = "scheduler.password"; - - public static final String SCHEDULER_SERVER_URL_VAL = "scheduler.server.url"; - - public static final String SCHEDULER_CREATE_NEW_VNF_CHANGE_INSTANCE_VAL = "scheduler.create.new.vnf.change.instance"; - - public static final String SCHEDULER_GET_TIME_SLOTS = "scheduler.get.time.slots"; - - public static final String SCHEDULER_SUBMIT_NEW_VNF_CHANGE = "scheduler.submit.new.vnf.change"; - - public static final String SCHEDULER_GET_SCHEDULES = "scheduler.get.schedules"; - - public static final String GET_VERSION_BY_INVARIANT_ID = "aai_get_version_by_invariant_id"; - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/scheduler/SchedulerResponseWrapper.java b/vid-app-common/src/main/java/org/openecomp/vid/scheduler/SchedulerResponseWrapper.java deleted file mode 100644 index 5f148c06b..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/scheduler/SchedulerResponseWrapper.java +++ /dev/null @@ -1,71 +0,0 @@ -package org.openecomp.vid.scheduler; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import org.apache.commons.lang.builder.ToStringBuilder; - -/** - * This wrapper encapsulates the Scheduler response - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "status", - "entity", - "uuid" -}) - -public class SchedulerResponseWrapper { - - @JsonProperty("status") - private int status; - - @JsonProperty("entity") - private String entity; - - @JsonProperty("uuid") - private String uuid; - - @JsonProperty("entity") - public String getEntity() { - return entity; - } - - @JsonProperty("status") - public int getStatus() { - return status; - } - - @JsonProperty("uuid") - public String getUuid() { - return uuid; - } - - @JsonProperty("status") - public void setStatus(int v) { - this.status = v; - } - - @JsonProperty("entity") - public void setEntity(String v) { - this.entity = v; - } - - @JsonProperty("uuid") - public void setUuid(String v) { - this.uuid = v; - } - - @Override - public String toString() { - return ToStringBuilder.reflectionToString(this); - } - - public String getResponse () { - - StringBuilder b = new StringBuilder ("{ \"status\": "); - b.append(getStatus()).append(", \"entity\": \" " ).append(this.getEntity()).append("\" ,\"uuid\": \"" ).append(this.getUuid()).append("\"}"); - return (b.toString()); - } - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/scheduler/SchedulerResponseWrappers/GetTimeSlotsWrapper.java b/vid-app-common/src/main/java/org/openecomp/vid/scheduler/SchedulerResponseWrappers/GetTimeSlotsWrapper.java deleted file mode 100644 index e5001d41f..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/scheduler/SchedulerResponseWrappers/GetTimeSlotsWrapper.java +++ /dev/null @@ -1,5 +0,0 @@ -package org.openecomp.vid.scheduler.SchedulerResponseWrappers; - -public class GetTimeSlotsWrapper extends SchedulerResponseWrapper { - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/scheduler/SchedulerResponseWrappers/PostCreateNewVnfWrapper.java b/vid-app-common/src/main/java/org/openecomp/vid/scheduler/SchedulerResponseWrappers/PostCreateNewVnfWrapper.java deleted file mode 100644 index f1baeaf6e..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/scheduler/SchedulerResponseWrappers/PostCreateNewVnfWrapper.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.openecomp.vid.scheduler.SchedulerResponseWrappers; - -import org.apache.commons.lang.builder.ToStringBuilder; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "uuid" -}) -public class PostCreateNewVnfWrapper extends SchedulerResponseWrapper { - - @JsonProperty("uuid") - private String uuid; - - @JsonProperty("uuid") - public String getUuid() { - return uuid; - } - - @JsonProperty("uuid") - public void setUuid(String v) { - this.uuid = v; - } - - @Override - public String toString() { - return ToStringBuilder.reflectionToString(this); - } - - public String getResponse () { - - StringBuilder b = new StringBuilder ("{ \"status\": "); - b.append(getStatus()).append(", \"entity\": \" " ).append(this.getEntity()).append("\" ,\"uuid\": \"" ).append(this.getUuid()).append("\"}"); - return (b.toString()); - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/scheduler/SchedulerResponseWrappers/PostSubmitVnfChangeTimeSlotsWrapper.java b/vid-app-common/src/main/java/org/openecomp/vid/scheduler/SchedulerResponseWrappers/PostSubmitVnfChangeTimeSlotsWrapper.java deleted file mode 100644 index 86e4c0a74..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/scheduler/SchedulerResponseWrappers/PostSubmitVnfChangeTimeSlotsWrapper.java +++ /dev/null @@ -1,38 +0,0 @@ -package org.openecomp.vid.scheduler.SchedulerResponseWrappers; - -import org.apache.commons.lang.builder.ToStringBuilder; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "uuid" -}) -public class PostSubmitVnfChangeTimeSlotsWrapper extends SchedulerResponseWrapper { - @JsonProperty("uuid") - private String uuid; - - @JsonProperty("uuid") - public String getUuid() { - return uuid; - } - - @JsonProperty("uuid") - public void setUuid(String v) { - this.uuid = v; - } - - @Override - public String toString() { - return ToStringBuilder.reflectionToString(this); - } - - public String getResponse () { - - StringBuilder b = new StringBuilder ("{ \"status\": "); - b.append(getStatus()).append(", \"entity\": \" " ).append(this.getEntity()).append("\" ,\"uuid\": \"" ).append(this.getUuid()).append("\"}"); - return (b.toString()); - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/scheduler/SchedulerResponseWrappers/SchedulerResponseWrapper.java b/vid-app-common/src/main/java/org/openecomp/vid/scheduler/SchedulerResponseWrappers/SchedulerResponseWrapper.java deleted file mode 100644 index 081ed3dc4..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/scheduler/SchedulerResponseWrappers/SchedulerResponseWrapper.java +++ /dev/null @@ -1,57 +0,0 @@ -package org.openecomp.vid.scheduler.SchedulerResponseWrappers; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import org.apache.commons.lang.builder.ToStringBuilder; - -/** - * This wrapper encapsulates the Scheduler response - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "status", - "entity" -}) - -public class SchedulerResponseWrapper { - - @JsonProperty("status") - private int status; - - @JsonProperty("entity") - private String entity; - - @JsonProperty("entity") - public String getEntity() { - return entity; - } - - @JsonProperty("status") - public int getStatus() { - return status; - } - - @JsonProperty("status") - public void setStatus(int v) { - this.status = v; - } - - @JsonProperty("entity") - public void setEntity(String v) { - this.entity = v; - } - - @Override - public String toString() { - return ToStringBuilder.reflectionToString(this); - } - - public String getResponse () { - - StringBuilder b = new StringBuilder ("{ \"status\": "); - - b.append(getStatus()).append(", \"entity\": " ).append(this.getEntity()).append("}"); - return (b.toString()); - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/scheduler/SchedulerRestInt.java b/vid-app-common/src/main/java/org/openecomp/vid/scheduler/SchedulerRestInt.java deleted file mode 100644 index 32b3a9c8c..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/scheduler/SchedulerRestInt.java +++ /dev/null @@ -1,42 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.scheduler; - -import java.text.DateFormat; -import java.text.SimpleDateFormat; - -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; - -public class SchedulerRestInt { - - /** The logger. */ - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(SchedulerRestInterface.class); - - /** The Constant dateFormat. */ - final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); - - /** The request date format. */ - public DateFormat requestDateFormat = new SimpleDateFormat("EEE, dd MMM YYYY HH:mm:ss z"); - - public SchedulerRestInt() { - requestDateFormat.setTimeZone(java.util.TimeZone.getTimeZone("GMT")); - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/scheduler/SchedulerRestInterface.java b/vid-app-common/src/main/java/org/openecomp/vid/scheduler/SchedulerRestInterface.java deleted file mode 100644 index 5f529f390..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/scheduler/SchedulerRestInterface.java +++ /dev/null @@ -1,208 +0,0 @@ -package org.openecomp.vid.scheduler; - -import java.util.Collections; -import javax.ws.rs.client.Client; -import javax.ws.rs.client.Entity; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.MultivaluedHashMap; -import javax.ws.rs.core.Response; - -import org.apache.commons.codec.binary.Base64; -import org.eclipse.jetty.util.security.Password; -import org.json.simple.JSONObject; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.util.SystemProperties; -import org.openecomp.vid.client.HttpBasicClient; -import org.openecomp.vid.client.HttpsBasicClient; -import org.openecomp.vid.scheduler.SchedulerProperties; -import org.openecomp.vid.scheduler.RestObjects.RestObject; -import org.springframework.stereotype.Service; - -@Service -public class SchedulerRestInterface implements SchedulerRestInterfaceIfc { - - private static Client client = null; - - private MultivaluedHashMap commonHeaders; - - /** The logger. */ - static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(SchedulerRestInterface.class); - - public SchedulerRestInterface() { - super(); - } - - public void initRestClient() - { - System.out.println( "\t <== Starting to initialize rest client "); - - final String username; - final String password; - - /*Setting user name based on properties*/ - String retrievedUsername = SystemProperties.getProperty(SchedulerProperties.SCHEDULER_USER_NAME_VAL); - if(retrievedUsername.isEmpty()) { - username = ""; - } else { - username = retrievedUsername; - } - - /*Setting password based on properties*/ - String retrievedPassword = SystemProperties.getProperty(SchedulerProperties.SCHEDULER_PASSWORD_VAL); - if(retrievedPassword.isEmpty()) { - password = ""; - } else { - if (retrievedPassword.contains("OBF:")) { - password = Password.deobfuscate(retrievedPassword); - } else { - password = retrievedPassword; - } - } - - String authString = username + ":" + password; - - byte[] authEncBytes = Base64.encodeBase64(authString.getBytes()); - String authStringEnc = new String(authEncBytes); - - commonHeaders = new MultivaluedHashMap (); - commonHeaders.put("Authorization", Collections.singletonList((Object) ("Basic " + authStringEnc))); - - try { - if ( !username.isEmpty() ) { - - client = HttpsBasicClient.getClient(); - } - else { - - client = HttpBasicClient.getClient(); - } - } catch (Exception e) { - System.out.println( " <== Unable to initialize rest client "); - } - - System.out.println( "\t<== Client Initialized \n"); - } - - @SuppressWarnings("unchecked") - public void Get (T t, String sourceId, String path, org.openecomp.vid.scheduler.RestObject restObject ) throws Exception { - - String methodName = "Get"; - String url = SystemProperties.getProperty(SchedulerProperties.SCHEDULER_SERVER_URL_VAL) + path; - - - System.out.println( "<== URL FOR GET : " + url + "\n"); - - initRestClient(); - - final Response cres = client.target(url) - .request() - .accept("application/json") - .headers(commonHeaders) - .get(); - - int status = cres.getStatus(); - restObject.setStatusCode (status); - - if (status == 200) { - t = (T) cres.readEntity(t.getClass()); - restObject.set(t); - - } else { - throw new Exception(methodName + " with status="+ status + ", url= " + url ); - } - - return; - } - - @SuppressWarnings("unchecked") - public void Post(T t, JSONObject requestDetails, String path, RestObject restObject) throws Exception { - - String methodName = "Post"; - String url = SystemProperties.getProperty(SchedulerProperties.SCHEDULER_SERVER_URL_VAL) + path; - - System.out.println( "<== URL FOR POST : " + url + "\n"); - - try { - - initRestClient(); - - // Change the content length - final Response cres = client.target(url) - .request() - .accept("application/json") - .headers(commonHeaders) - .post(Entity.entity(requestDetails, MediaType.APPLICATION_JSON)); - - try { - t = (T) cres.readEntity(t.getClass()); - restObject.set(t); - } - catch ( Exception e ) { - - System.out.println("<== " + methodName + " : No response entity, this is probably ok, e=" + e.getMessage()); - } - - int status = cres.getStatus(); - restObject.setStatusCode (status); - - if ( status >= 200 && status <= 299 ) { - - System.out.println( "<== " + methodName + " : REST api POST was successful!" + "\n"); - - } else { - System.out.println( "<== " + methodName + " : FAILED with http status : "+status+", url = " + url + "\n"); - } - - } catch (Exception e) - { - System.out.println( "<== " + methodName + " : with url="+url+ ", Exception: " + e.toString() + "\n"); - throw e; - } - } - - @Override - public void logRequest(JSONObject requestDetails) {} - - @SuppressWarnings("unchecked") - public void Delete(T t, JSONObject requestDetails, String sourceID, String path, RestObject restObject) { - - String url=""; - Response cres = null; - - try { - initRestClient(); - - url = SystemProperties.getProperty(SchedulerProperties.SCHEDULER_SERVER_URL_VAL) + path; - - cres = client.target(url) - .request() - .accept("application/json") - .headers(commonHeaders) - //.entity(r) - .build("DELETE", Entity.entity(requestDetails, MediaType.APPLICATION_JSON)).invoke(); - // .method("DELETE", Entity.entity(r, MediaType.APPLICATION_JSON)); - //.delete(Entity.entity(r, MediaType.APPLICATION_JSON)); - - int status = cres.getStatus(); - restObject.setStatusCode (status); - - try { - t = (T) cres.readEntity(t.getClass()); - restObject.set(t); - } - catch ( Exception e ) { - } - - } - catch (Exception e) - { - throw e; - } - } - - public T getInstance(Class clazz) throws IllegalAccessException, InstantiationException - { - return clazz.newInstance(); - } - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/scheduler/SchedulerRestInterfaceFactory.java b/vid-app-common/src/main/java/org/openecomp/vid/scheduler/SchedulerRestInterfaceFactory.java deleted file mode 100644 index bf7bd8891..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/scheduler/SchedulerRestInterfaceFactory.java +++ /dev/null @@ -1,15 +0,0 @@ - -package org.openecomp.vid.scheduler; - -public class SchedulerRestInterfaceFactory { - - - public static SchedulerRestInterfaceIfc getInstance () { - SchedulerRestInterfaceIfc obj = null; - - obj = new SchedulerRestInterface(); - - return ( obj ); - } - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/scheduler/SchedulerRestInterfaceIfc.java b/vid-app-common/src/main/java/org/openecomp/vid/scheduler/SchedulerRestInterfaceIfc.java deleted file mode 100644 index 839ab348d..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/scheduler/SchedulerRestInterfaceIfc.java +++ /dev/null @@ -1,21 +0,0 @@ - -package org.openecomp.vid.scheduler; - -import org.json.simple.JSONObject; -import org.openecomp.vid.scheduler.RestObjects.RestObject; -import org.springframework.stereotype.Service; - -@Service -public interface SchedulerRestInterfaceIfc { - - public void initRestClient(); - - public void Get (T t, String sourceId, String path, org.openecomp.vid.scheduler.RestObject restObject ) throws Exception; - - public void Delete(T t, JSONObject requestDetails, String sourceID, String path, RestObject restObject) - throws Exception; - - public void Post(T t, JSONObject r, String path, RestObject restObject) throws Exception; - - public void logRequest(JSONObject requestDetails); -} \ No newline at end of file diff --git a/vid-app-common/src/main/java/org/openecomp/vid/scheduler/SchedulerUtil.java b/vid-app-common/src/main/java/org/openecomp/vid/scheduler/SchedulerUtil.java deleted file mode 100644 index f82f474f6..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/scheduler/SchedulerUtil.java +++ /dev/null @@ -1,100 +0,0 @@ -package org.openecomp.vid.scheduler; - -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.Date; - -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.vid.scheduler.SchedulerResponseWrappers.GetTimeSlotsWrapper; -import org.openecomp.vid.scheduler.SchedulerResponseWrappers.PostCreateNewVnfWrapper; -import org.openecomp.vid.scheduler.SchedulerResponseWrappers.PostSubmitVnfChangeTimeSlotsWrapper; -import org.openecomp.vid.scheduler.SchedulerUtil; -import org.openecomp.vid.scheduler.RestObjects.GetTimeSlotsRestObject; -import org.openecomp.vid.scheduler.RestObjects.PostCreateNewVnfRestObject; -import org.openecomp.vid.scheduler.RestObjects.PostSubmitVnfChangeRestObject; - -import com.fasterxml.jackson.databind.ObjectMapper; - -public class SchedulerUtil { - - private static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(SchedulerUtil.class); - - final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); - - public static GetTimeSlotsWrapper getTimeSlotsWrapResponse (GetTimeSlotsRestObject rs) { - - String resp_str = ""; - int status = 0; - - if ( rs != null ) { - resp_str = rs.get(); - status = rs.getStatusCode(); - } - - GetTimeSlotsWrapper w = new GetTimeSlotsWrapper(); - - w.setEntity(resp_str); - w.setStatus (status); - - return (w); - } - - public static PostSubmitVnfChangeTimeSlotsWrapper postSubmitNewVnfWrapResponse (PostSubmitVnfChangeRestObject rs) { - - String resp_str = ""; - int status = 0; - String uuid = ""; - - if ( rs != null ) { - resp_str = rs.get(); - status = rs.getStatusCode(); - uuid = rs.getUUID(); - } - - PostSubmitVnfChangeTimeSlotsWrapper w = new PostSubmitVnfChangeTimeSlotsWrapper(); - - w.setEntity(resp_str); - w.setStatus (status); - w.setUuid(uuid); - - return (w); - } - - public static PostCreateNewVnfWrapper postCreateNewVnfWrapResponse (PostCreateNewVnfRestObject rs) { - - String resp_str = ""; - int status = 0; - String uuid = ""; - - if ( rs != null ) { - resp_str = rs.get(); - status = rs.getStatusCode(); - uuid = rs.getUUID(); - } - - PostCreateNewVnfWrapper w = new PostCreateNewVnfWrapper(); - - w.setEntity(resp_str); - w.setStatus (status); - w.setUuid(uuid); - - return (w); - } - - public static String convertPojoToString ( T t ) throws com.fasterxml.jackson.core.JsonProcessingException { - - String methodName = "convertPojoToString"; - ObjectMapper mapper = new ObjectMapper(); - String r_json_str = ""; - if ( t != null ) { - try { - r_json_str = mapper.writeValueAsString(t); - } - catch ( com.fasterxml.jackson.core.JsonProcessingException j ) { - logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " Unable to parse object as json"); - } - } - return (r_json_str); - } - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/scheduler/rest/RequestDetails.java b/vid-app-common/src/main/java/org/openecomp/vid/scheduler/rest/RequestDetails.java deleted file mode 100644 index 746fd9b24..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/scheduler/rest/RequestDetails.java +++ /dev/null @@ -1,106 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.vid.scheduler.rest; - -import java.util.HashMap; -import java.util.Map; -import java.util.List; -//import javax.annotation.Generated; - -import org.openecomp.vid.domain.mso.CloudConfiguration; -import org.openecomp.vid.domain.mso.ModelInfo; -import org.openecomp.vid.domain.mso.RequestInfo; -import org.openecomp.vid.domain.mso.RequestParameters; -import org.openecomp.vid.domain.mso.SubscriberInfo; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import org.apache.commons.lang.builder.EqualsBuilder; -import org.apache.commons.lang.builder.HashCodeBuilder; -import org.apache.commons.lang.builder.ToStringBuilder; - -/* - * "domain" : "ChangeManagement", - "scheduleId" : "3569b875-d40e-4adb-a288-a74f4b59ec1c", - "scheduleName" : "VnfUpgrade/DWF", - "userId" : "jf9860@att.com", - "domainData" : { - "WorkflowName" : "HEAT Stack Software Update for vNFs" - }, - "status" : "PendingOptimization", - "schedulingInfo" : { - "scheduleId" : "ChangeManagement.3569b875-d40e-4adb-a288-a74f4b59ec1c", - "normalDurationInSecs" : 60, - "AdditionalDurationInSecs" : 0, - "concurrencyLimit" : 10, - "policyId" : ["SNIRO.TimeLimitAndVerticalTopology"], - "groups" : [{ - "groupId" : " group1", - "node" : ["satmo415vbc", "satmo455vbc"], - "changeWindows" : [{ - "startTime" : "2017-02-15T01:00:00Z", - "finishTime" : "2017-02-15T02:00:00Z" - } - ] - }, { - "groupId" : " group2", - "node" : ["satmo555vbc"], - "changeWindows" : [{ - "startTime" : "2017-02-15T01:00:00Z", - "finishTime" : "2017-02-15T02:00:00Z" - }, { - "startTime" : "2017-02-15T05:00:00Z", - "finishTime" : "2017-02-15T05:30:00Z" - } - ] - } - ] -*/ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "domain", - "scheduleId", - "scheduleName", - "userId", - "domainData", - "status", - "schcedulingInfo" -}) -public class RequestDetails { - - @JsonProperty("domain") - private String domain; - - - - @JsonProperty("domain") - public String getDomain() { - return domain; - } - - @JsonProperty("domain") - public void setDomain(String domain) { - this.domain = domain; - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/services/AaiService.java b/vid-app-common/src/main/java/org/openecomp/vid/services/AaiService.java deleted file mode 100644 index d3bacadec..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/services/AaiService.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.openecomp.vid.services; - -import org.openecomp.vid.aai.AaiResponse; -import org.openecomp.vid.aai.SubscriberFilteredResults; -import org.openecomp.vid.aai.model.AaiGetTenatns.GetTenantsResponse; -import org.openecomp.vid.roles.RoleValidator; - -import javax.ws.rs.core.Response; -import java.util.List; - -/** - * Created by Oren on 7/4/17. - */ -public interface AaiService { - - - SubscriberFilteredResults getFullSubscriberList(RoleValidator roleValidator); - - AaiResponse getSubscriberData(String subscriberId, RoleValidator roleValidator); - - AaiResponse getServices(RoleValidator roleValidator); - - AaiResponse getAaiZones(); - - AaiResponse getAicZoneForPnf(String globalCustomerId , String serviceType , String serviceId); - - Response getVNFData(String globalSubscriberId, String serviceType); - - AaiResponse getTenants(String globalCustomerId, String serviceType, RoleValidator roleValidator); - - AaiResponse getVNFData(String globalSubscriberId, String serviceType, String serviceInstanceId); - - Response getVersionByInvariantId(List modelInvariantId); -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/services/AaiServiceImpl.java b/vid-app-common/src/main/java/org/openecomp/vid/services/AaiServiceImpl.java deleted file mode 100644 index cb0962869..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/services/AaiServiceImpl.java +++ /dev/null @@ -1,101 +0,0 @@ -package org.openecomp.vid.services; - -import org.ecomp.aai.model.AaiAICZones.AicZones; -import org.openecomp.portalsdk.core.util.SystemProperties; -import org.openecomp.vid.aai.*; -import org.openecomp.vid.aai.model.AaiGetServicesRequestModel.*; -import org.openecomp.vid.aai.model.AaiGetTenatns.GetTenantsResponse; -import org.openecomp.vid.model.*; -import org.openecomp.vid.roles.RoleValidator; -import org.openecomp.vid.scheduler.SchedulerProperties; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.ResponseEntity; - -import javax.ws.rs.core.Response; - -import java.util.List; - -/** - * Created by Oren on 7/4/17. - */ -public class AaiServiceImpl implements AaiService { - - - @Autowired - private AaiClientInterface aaiClient; - - - @Override - public SubscriberFilteredResults getFullSubscriberList(RoleValidator roleValidator) { - AaiResponse subscriberResponse = aaiClient.getAllSubscribers(); - SubscriberFilteredResults subscriberFilteredResults = - new SubscriberFilteredResults(roleValidator,subscriberResponse.getT(), - subscriberResponse.getErrorMessage(), - subscriberResponse.getHttpCode()); - - return subscriberFilteredResults; - } - - @Override - public AaiResponse getSubscriberData(String subscriberId, RoleValidator roleProvider) { - AaiResponse subscriberResponse = aaiClient.getSubscriberData(subscriberId); - String subscriberGlobalId = subscriberResponse.getT().globalCustomerId; - for (ServiceSubscription serviceSubscription : subscriberResponse.getT().serviceSubscriptions.serviceSubscription) { - String serviceType = serviceSubscription.serviceType; - serviceSubscription.isPermitted = roleProvider.isServicePermitted(subscriberGlobalId,serviceType); - } - return subscriberResponse; - - } - - @Override - public Response getVersionByInvariantId(List modelInvariantId) { - try { - return aaiClient.getVersionByInvariantId(modelInvariantId); - }catch (Exception e){ - e.printStackTrace(); - } - return null; - } - - @Override - public AaiResponse getServices(RoleValidator roleValidator) { - AaiResponse subscriberResponse = aaiClient.getServices(); - for (org.openecomp.vid.aai.model.AaiGetServicesRequestModel.Service service :subscriberResponse.getT().service){ - service.isPermitted = true; - } - return subscriberResponse; - } - - @Override - public AaiResponse getTenants(String globalCustomerId, String serviceType, RoleValidator roleValidator) { - AaiResponse aaiGetTenantsResponse = aaiClient.getTenants(globalCustomerId,serviceType); - GetTenantsResponse[] tenants = aaiGetTenantsResponse.getT(); - for (int i=0;i response = aaiClient.getAllAicZones(); - return response; - } - - @Override - public AaiResponse getAicZoneForPnf(String globalCustomerId , String serviceType , String serviceId) { - AaiResponse response = aaiClient.getAicZoneForPnf(globalCustomerId , serviceType , serviceId); - return response; - } -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/services/ChangeManagementService.java b/vid-app-common/src/main/java/org/openecomp/vid/services/ChangeManagementService.java deleted file mode 100644 index 3ac528282..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/services/ChangeManagementService.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.openecomp.vid.services; - -import org.openecomp.vid.changeManagement.ChangeManagementRequest; -import org.json.simple.JSONArray; -import org.openecomp.vid.mso.rest.Request; -import org.springframework.http.ResponseEntity; - -import java.util.Collection; - -public interface ChangeManagementService { - Collection getMSOChangeManagements(); - ResponseEntity doChangeManagement(ChangeManagementRequest request, String vnfName); - JSONArray getSchedulerChangeManagements(); -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/services/ChangeManagementServiceImpl.java b/vid-app-common/src/main/java/org/openecomp/vid/services/ChangeManagementServiceImpl.java deleted file mode 100644 index 7e69d8fec..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/services/ChangeManagementServiceImpl.java +++ /dev/null @@ -1,109 +0,0 @@ -package org.openecomp.vid.services; - -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.vid.changeManagement.ChangeManagementRequest; -import org.openecomp.vid.changeManagement.RequestDetails; -import org.openecomp.vid.mso.MsoBusinessLogic; -import org.openecomp.vid.mso.MsoResponseWrapper; -import org.openecomp.vid.controller.MsoController; -import org.openecomp.portalsdk.core.util.SystemProperties; -import org.openecomp.vid.scheduler.*; - -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.openecomp.vid.mso.rest.Request; -import org.springframework.stereotype.Service; -import org.json.simple.JSONArray; -import org.json.simple.parser.JSONParser; - -import java.util.Date; -import java.util.List; -import java.util.Collection; - - -@Service -public class ChangeManagementServiceImpl implements ChangeManagementService { - @Override - public Collection getMSOChangeManagements() { - Collection result = null; - MsoBusinessLogic msoBusinessLogic = new MsoBusinessLogic(); - try { - result = msoBusinessLogic.getOrchestrationRequestsForDashboard(); - } catch (Exception e) { - e.printStackTrace(); - } - - return result; - } - - private RequestDetails findRequestByVnfName(List requests, String vnfName){ - - if (requests == null) - return null; - - for(RequestDetails requestDetails: requests){ - if(requestDetails.getVnfName().equals(vnfName)){ - return requestDetails; - } - } - - return null; - } - - @Override - public ResponseEntity doChangeManagement(ChangeManagementRequest request, String vnfName) { - if (request == null) - return null; - ResponseEntity response = null; - RequestDetails currentRequestDetails = findRequestByVnfName(request.getRequestDetails(), vnfName); - MsoResponseWrapper msoResponseWrapperObject = null; - if(currentRequestDetails != null){ - MsoBusinessLogic msoBusinessLogicObject = new MsoBusinessLogic(); - String serviceInstanceId = currentRequestDetails.getRelatedInstList().get(0).getRelatedInstance().getInstanceId(); - String vnfInstanceId = currentRequestDetails.getVnfInstanceId(); - try { - if (request.getRequestType().equalsIgnoreCase("update")) { - - msoResponseWrapperObject = msoBusinessLogicObject.updateVnf(currentRequestDetails, serviceInstanceId, vnfInstanceId); - } - else if (request.getRequestType().equalsIgnoreCase("replace")) - { - msoResponseWrapperObject = msoBusinessLogicObject.replaceVnf(currentRequestDetails, serviceInstanceId, vnfInstanceId); -// throw new NotImplementedException(); - } - response = new ResponseEntity(msoResponseWrapperObject.getResponse(), HttpStatus.OK); - return response; - } catch (Exception e) { - e.printStackTrace(); - } - - } - - // AH:TODO: return ChangeManagementResponse - return null; - } - - @Override - public JSONArray getSchedulerChangeManagements() { - JSONArray result = null; - try { - String path = SystemProperties.getProperty(SchedulerProperties.SCHEDULER_GET_SCHEDULES); - org.openecomp.vid.scheduler.RestObject restObject = new org.openecomp.vid.scheduler.RestObject<>(); - SchedulerRestInterfaceIfc restClient = SchedulerRestInterfaceFactory.getInstance(); - - String str = new String(); - restObject.set(str); - restClient.Get(str, "", path, restObject); - String restCallResult = restObject.get(); - JSONParser parser = new JSONParser(); - Object parserResult = parser.parse(restCallResult); - result = (JSONArray) parserResult; - } catch (Exception e) { - e.printStackTrace(); - } - - return result; - } - - -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/services/VidService.java b/vid-app-common/src/main/java/org/openecomp/vid/services/VidService.java deleted file mode 100644 index 4fb0ff160..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/services/VidService.java +++ /dev/null @@ -1,17 +0,0 @@ -package org.openecomp.vid.services; - -import org.openecomp.vid.asdc.AsdcCatalogException; -import org.openecomp.vid.asdc.beans.Service; -import org.openecomp.vid.model.ServiceModel; - -import java.util.Collection; -import java.util.Map; - -public interface VidService { - - Collection getServices(Map requestParams) - throws AsdcCatalogException; - - ServiceModel getService(String uuid) throws AsdcCatalogException; - -} \ No newline at end of file diff --git a/vid-app-common/src/main/java/org/openecomp/vid/services/VidServiceImpl.java b/vid-app-common/src/main/java/org/openecomp/vid/services/VidServiceImpl.java deleted file mode 100644 index f647af456..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/services/VidServiceImpl.java +++ /dev/null @@ -1,77 +0,0 @@ -package org.openecomp.vid.services; - -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.sdc.tosca.parser.exceptions.SdcToscaParserException; -import org.openecomp.vid.asdc.AsdcCatalogException; -import org.openecomp.vid.asdc.AsdcClient; -import org.openecomp.vid.asdc.beans.Service; -import org.openecomp.vid.asdc.parser.ToscaParser; -import org.openecomp.vid.asdc.parser.ToscaParserImpl; -import org.openecomp.vid.asdc.parser.ToscaParserImpl2; -import org.openecomp.vid.model.ServiceModel; -import org.springframework.beans.factory.annotation.Autowired; - -import java.nio.file.Path; -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.*; - -/** - * The Class VidController. - */ - -public class VidServiceImpl implements VidService { - /** - * The Constant LOG. - */ - private static final EELFLoggerDelegate LOG = EELFLoggerDelegate.getLogger(VidServiceImpl.class); - /** - * The Constant dateFormat. - */ - private final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); - protected final AsdcClient asdcClient; - @Autowired - private ToscaParserImpl2 toscaParser; - - public VidServiceImpl(AsdcClient asdcClient) { - this.asdcClient = asdcClient; - } - - /* - * (non-Javadoc) - * - * @see org.openecomp.vid.controller.VidService#getServices(java.util.Map) - */ - @Override - public Collection getServices(Map requestParams) - throws AsdcCatalogException { - return asdcClient.getServices(requestParams); - } - - /* - * (non-Javadoc) - * - * @see org.openecomp.vid.controller.VidService#getService(java.lang.String) - */ - @Override - public ServiceModel getService(String uuid) throws AsdcCatalogException { - final Path serviceCsar = asdcClient.getServiceToscaModel(UUID.fromString(uuid)); - ToscaParser tosca = new ToscaParserImpl(); - serviceCsar.toFile().getAbsolutePath(); - ServiceModel serviceModel = null; - try { - final Service asdcServiceMetadata = asdcClient.getService(UUID.fromString(uuid)); - try { - serviceModel = toscaParser.makeServiceModel(serviceCsar, asdcServiceMetadata); - } - catch (SdcToscaParserException e){ - serviceModel = tosca.makeServiceModel(uuid, serviceCsar, asdcServiceMetadata); - } - } catch (Exception e) { - e.printStackTrace(); - } - return serviceModel; - } - - -} \ No newline at end of file diff --git a/vid-app-common/src/main/java/org/openecomp/vid/services/WorkflowService.java b/vid-app-common/src/main/java/org/openecomp/vid/services/WorkflowService.java deleted file mode 100644 index 7f43433de..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/services/WorkflowService.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.openecomp.vid.services; - -import org.openecomp.vid.model.Workflow; -import java.util.Collection; - -public interface WorkflowService { - Collection getWorkflowsForVNFs(Collection vnfNames); - Collection getAllWorkflows(); -} diff --git a/vid-app-common/src/main/java/org/openecomp/vid/services/WorkflowServiceImpl.java b/vid-app-common/src/main/java/org/openecomp/vid/services/WorkflowServiceImpl.java deleted file mode 100644 index deb506069..000000000 --- a/vid-app-common/src/main/java/org/openecomp/vid/services/WorkflowServiceImpl.java +++ /dev/null @@ -1,40 +0,0 @@ -package org.openecomp.vid.services; - -import org.openecomp.vid.model.Workflow; -import org.springframework.stereotype.Service; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.stream.Collectors; - -@Service -public class WorkflowServiceImpl implements WorkflowService { - //TODO: Add the list of workflows hard coded or from DB. - private ArrayList workflows = new ArrayList<>(Arrays.asList( - new Workflow(0, "Upgrade", new ArrayList<>(Arrays.asList("VNF1", "VNF2", "VNF3", "VNF4"))), - new Workflow(1, "Clean", new ArrayList<>(Arrays.asList("VNF1", "VNF2", "VNF3"))), - new Workflow(2, "Reinstall", new ArrayList<>(Arrays.asList("VNF1", "VNF2", "VNF4"))), - new Workflow(3, "Dump", new ArrayList<>(Arrays.asList("VNF1", "VNF3", "VNF4"))), - new Workflow(4, "Flush", new ArrayList<>(Arrays.asList("VNF2", "VNF3", "VNF4"))) - )); - - @Override - public Collection getWorkflowsForVNFs(Collection vnfNames) { - Collection result = workflows.stream() - .filter(workflow -> workflow.getVnfNames().containsAll(vnfNames)) - .map(workflow -> workflow.getWorkflowName()) - .distinct() - .collect(Collectors.toList()); - - return result; - } - - @Override - public Collection getAllWorkflows() { - return workflows.stream() - .map(workflow -> workflow.getWorkflowName()) - .distinct() - .collect(Collectors.toList()); - } -} diff --git a/vid-app-common/src/main/resources/2f80c596.zip b/vid-app-common/src/main/resources/2f80c596.zip new file mode 100644 index 0000000000000000000000000000000000000000..30935c6b93dc9aef714390f88e840554baf68a43 GIT binary patch literal 86923 zcmcG#Q&hv}iik@I|CcEUfV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#P+^E95bQJ%B+=ZpI5dIU&Oy#WIrzZ&?t iI^n!2NLK)23Ze?qSAhHroIrqo^rRq=6dQ0Z1N}cz52il= literal 0 HcmV?d00001 diff --git a/vid-app-common/src/main/resources/aai_config_instance_view_edit.json b/vid-app-common/src/main/resources/aai_config_instance_view_edit.json new file mode 100644 index 000000000..7920c6dfb --- /dev/null +++ b/vid-app-common/src/main/resources/aai_config_instance_view_edit.json @@ -0,0 +1,81 @@ +{ + "model-name":"Proxy-Config-Instance", + "configuration":{ + "configuration-id": "9533-config-LB1113", + "configuration-name": "configuration-name-9533", + "configuration-type": "configuration-type-9533", + "configuration-sub-type": "configuration-sub-type-9533", + "model-invariant-id": "model-invariant-id-9533", + "model-version-id": "model-version-id-9533", + "orchestration-status": "Active", + "operational-status": "", + "configuration-selflink": "", + "model-customization-id": "model-customization-id-9533", + "resource-version": "1504038855716" + }, + "extra-properties": { + }, + "inventory-response-items":{ + "inventory-response-item":[ + { + "model-name":"VidPcrf051517..pcrf_nimbus_pcm..module-4", + "l-interface": { + "interface-name": "9533lInterface-LB1113", + "interface-role": "8ni", + "v6-wan-link-ip": "Pnr", + "selflink": "Un56B", + "interface-id": "o74n", + "macaddr": "8an6", + "network-name": "kjOn", + "management-option": "0Rn7", + "interface-description": "XPnLr", + "is-port-mirrored": true, + "resource-version": "1504038598348", + "in-maint": false, + "is-ip-unnumbered": false, + "relationship-list": { + "relationship": [ + { + "related-to": "logical-link", + "related-link": "/aai/v11/network/logical-links/logical-link/logicallink-987654321-21-LB1113", + "relationship-data": [ + { + "relationship-key": "logical-link.link-name", + "relationship-value": "logicallink-987654321-21-LB1113" + } + ] + } + ] + }, + "l3-interface-ipv4-address-list": [ + { + "l3-interface-ipv4-address": "112.121.144.16", + "l3-interface-ipv4-prefix-length": 59, + "vlan-id-inner": 917, + "vlan-id-outer": 519, + "is-floating": true, + "resource-version": "1504038598353", + "neutron-network-id": "HX6m54p1akX", + "neutron-subnet-id": "nbmX5okGg" + } + ], + "l3-interface-ipv6-address-list": [ + { + "l3-interface-ipv6-address": "2001:232E:2333:2322:122C:CDD:2AE3:3E4", + "l3-interface-ipv6-prefix-length": 76, + "vlan-id-inner": 27, + "vlan-id-outer": 710, + "is-floating": true, + "resource-version": "1504038598364", + "neutron-network-id": "xBR0OOToQ", + "neutron-subnet-id": "4E0gZLH" + } + ] + }, + "extra-properties":{ + + } + } + ] + } +} \ No newline at end of file diff --git a/vid-app-common/src/main/resources/aai_get_node_template_instances.json b/vid-app-common/src/main/resources/aai_get_node_template_instances.json new file mode 100644 index 000000000..97c452aa3 --- /dev/null +++ b/vid-app-common/src/main/resources/aai_get_node_template_instances.json @@ -0,0 +1,101 @@ +{"results": [ + { + "id": "1976357096", + "node-type": "generic-vnf", + "url": "/aai/v11/network/generic-vnfs/generic-vnf/VNF-1-9887-jc689q", + "properties": { + "vnf-id": "0846287b-65bf-45a6-88f6-6a1af4149fac", + "vnf-name": "vnf9887-1jc689q", + "vnf-name2": "notused", + "vnf-type": "VRR", + "service-id": "VRRaaS", + "regional-resource-zone": "notusedforMobility", + "prov-status": "PREPROV", + "operational-status": "", + "license-key": "novalue", + "equipment-role": "VRR", + "orchestration-status": "Created", + "heat-stack-id": "1234", + "mso-catalog-key": "msokey", + "ipv4-oam-address": "135.60.77.25", + "ipv4-loopback0-address": "12.60.77.25", + "nm-lan-v6-address": "2001:1890:1F8:2075::1:4", + "management-v6-address": "2001:1890:1F8:2075::1:5", + "in-maint": false, + "is-closed-loop-disabled": false, + "resource-version": "1505337418309", + "model-invariant-id": "96129eb9-f0de-4e05-8af2-73146473f766", + "model-version-id": "5761e0a7-c6df-4d8a-9ebd-b8f445054dec", + "widget-model-id": "78789", + "widget-model-version": "7", + "nf-function": "nf-function in ASDC", + "nf-role": "nf-role in ASDC", + "nf-naming-code": "code in ASDC", + "selflink": "pathToController" + }, + "related-to": [ + { + "id": "1689710648", + "node-type": "service-instance", + "url": "/aai/v11/business/customers/customer/customer-9887-jc689q/service-subscriptions/service-subscription/VRR/service-instances/service-instance/SI-9887-jc689q" + }, + { + "id": "1362120784", + "node-type": "vserver", + "url": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/cloudOwner-id-9887-jc689q/cloudRegion-id-9887-jc689q/tenants/tenant/tenant-id-9887-jc689q/vservers/vserver/vserver-id-2-9887-jc689q" + }, + { + "id": "2017317104", + "node-type": "vserver", + "url": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/cloudOwner-id-9887-jc689q/cloudRegion-id-9887-jc689q/tenants/tenant/tenant-id-9887-jc689q/vservers/vserver/vserver-id-1-9887-jc689q" + } + ] + }, + { + "id": "2362269792", + "node-type": "generic-vnf", + "url": "/aai/v11/network/generic-vnfs/generic-vnf/VNF-2-9887-jc689q", + "properties": { + "vnf-id": "c187e9fe-40c3-4862-b73e-84ff056205f6", + "vnf-name": "vnf9887-2jc689q", + "vnf-name2": "notused", + "vnf-type": "VRR", + "service-id": "VRRaaS", + "regional-resource-zone": "notusedforMobility", + "prov-status": "PREPROV", + "operational-status": "", + "license-key": "novalue", + "equipment-role": "VRR", + "orchestration-status": "Created", + "heat-stack-id": "1234", + "mso-catalog-key": "msokey", + "ipv4-oam-address": "135.60.77.25", + "ipv4-loopback0-address": "12.60.77.25", + "nm-lan-v6-address": "2001:1890:1F8:2075::1:4", + "management-v6-address": "2001:1890:1F8:2075::1:5", + "in-maint": false, + "is-closed-loop-disabled": false, + "resource-version": "1505337418754", + "model-invariant-id": "96129eb9-f0de-4e05-8af2-73146473f766", + "model-version-id": "5761e0a7-c6df-4d8a-9ebd-b8f445054dec", + "widget-model-id": "78789", + "widget-model-version": "7", + "nf-function": "nf-function in ASDC", + "nf-role": "nf-role in ASDC", + "nf-naming-code": "code in ASDC", + "selflink": "pathToController" + }, + "related-to": [ + { + "id": "1689710648", + "node-type": "service-instance", + "url": "/aai/v11/business/customers/customer/customer-9887-jc689q/service-subscriptions/service-subscription/VRR/service-instances/service-instance/SI-9887-jc689q" + }, + { + "id": "1689706552", + "node-type": "vserver", + "url": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/cloudOwner-id-9887-jc689q/cloudRegion-id-9887-jc689q/tenants/tenant/tenant-id-9887-jc689q/vservers/vserver/vserver-id-3-9887-jc689q" + } + ] + } +]} \ No newline at end of file diff --git a/vid-app-common/src/main/resources/adiod.zip b/vid-app-common/src/main/resources/adiod.zip new file mode 100644 index 0000000000000000000000000000000000000000..415fa48337971f98115fbfbec898f756bd917f2c GIT binary patch literal 81489 zcmbSxV~{7Xw`JS5ZQDI?4>xFioeUirY)qXEVO?M1b*`t@!4k?LO|A<*0PqOW=`fdPY))W zWP<$g0{?h$2S0fGE>8>1SOjeAD$ayepxd>l>R=>2IUBDc3yudxX`Zlm@}1Oiyj_@l zbwN$mwzujjvmO&jD2~l+?J63Vs7rC^+Gx~xF2J|Sj@02Yvrp2VUjMSEc*~5CZ~um+ z97*{I=A*?*xm7;Z@^l6HUx$MyhwD%IxApG-@o-%KW<^c^SlC)PTiDq;F*=z#x>^{U z(hHeb*qNx=xU1Ql3cD)*_aGY=7rnEojlH#@vnhjzjrF#!Okx&S%g#%!fjaH+ake6F zZ>jCtGQKHq;Y|b*(L@w0aTr;n&e!D)avYf*8Ch3aMj8U9i56pz@J;E1hy)B;Mu)`ep+Sj@lHieHvK}Wm;yxpICDhJ1Y&8WoBkC(8QmxyDY zp>Ul*xNWw0Y#!tR1f_WCD*H&6)Zn!c&0_q-Gi^&jxKYK){N|@F*n;jYYxd z4fo$zGUXXx4=MSpMNUXPkvUVzAIre)pSy1qf#>4Z`a&jpyadV7Ad*cKZ4Q;fmml1RMKe5(!(LsmxhR(=MnRi=J0u# zl^?*rj0ARqV4A|%YSl%AT-)Z72=D6ITU-ipKC_BXpUdv0T|Ojpi$v}{t8sq+g^?=< zib%{dK}L{7Ez7|kv1sG{+`u2-lwpsQpMW;!fO_NT^c_(4oG~b=vD5|==?>%q833Hx zzy&FhXOor(obHEW=Yn6`XO$8)KE5q??l9UsxX;k`t8o#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;1(6P z$Px@H-hP&w5#Zms$?ZO8H?1FkkUA+n48Sq`&!)2Ik~|M ze-TdaKc&V0Bh%@=O1IMwtbgePzKZSt$5i^yQeWhAnQ;x?fbb@HbSlzQF?S9hUhsc6VQi+epO?Lh_4RmTxQZzgZUlTfF4H z;M;5S8zAHtsjvLkg73g0_a)z6A>AERW>){M] [-p ] [-c category_name] [-f FAMILY]" 1>&2; exit 1; } +while getopts ":o:p:c:f:" opt; do + case ${opt} in + o) + OPERATION=${OPTARG} + ;; + p) + FILE=${OPTARG} + ;; + c) + CATEGORY=${OPTARG} + ;; + f) + FAMILY=${OPTARG} + ;; + *) + usage + ;; + esac +done +shift $((OPTIND-1)) +if [ -z "${FILE}" ] || [ -z "${OPERATION}" ]; then + usage +fi +if [ ${OPERATION} != 'ADD' ] && [ ${OPERATION} != 'GET' ]; then + usage +fi +if [ ${OPERATION} = 'ADD' ]; then + if [ -z "${CATEGORY}" ] ; then + usage + fi + OPERATION='POST' +fi +if [ ${OPERATION} = 'GET' ]; then + if [ -z "${FAMILY}" ] ; then + usage + fi +fi +URL="http://127.0.0.1:8080/vid/maintenance/category_parameter" +if [ ${OPERATION} = 'GET' ]; then + FULLURL="${URL}?familyName=${FAMILY}" + echo "Sending request: ${FULLURL}" + echo -e "------------------------\nwget output:" + wget -nv -O "${FILE}" "${FULLURL}" + RC=$? + echo "---------------------------" + if [ $RC -eq 0 ]; then + echo "Result saved to ${FILE}" + else + echo "Failed to get category parameters list" + fi +else + BODY=$(cat ${FILE} | awk ' BEGIN { ; print " {\"options\" : [ "} { gsub(/ /, "", $0) ; printf "%s\"%s\"",separator,$1 ;separator = ", ";} END { printf " ]} "}') + FULLURL="${URL}/${CATEGORY}" + echo "Sending request: ${FULLURL} ${OPERATION} ${BODY}" + echo -e "------------------------\nwget output:" + wget --method="${OPERATION}" --body-data="${BODY}" --header=Content-Type:application/json --content-on-error -nv -O - "${FULLURL}" + RC=$? + echo "---------------------------" + if [ $RC -ne 0 ]; then + echo "Failed to ADD options to category ${CATEGORY}" + fi +fi diff --git a/vid-app-common/src/main/resources/scripts/update_category_option_name.sh b/vid-app-common/src/main/resources/scripts/update_category_option_name.sh new file mode 100644 index 000000000..5ff505800 --- /dev/null +++ b/vid-app-common/src/main/resources/scripts/update_category_option_name.sh @@ -0,0 +1,34 @@ +#!/bin/bash +usage() { echo -e "Usage: $0 [-c category_name] [-i option_id] [-n option_updated_name]" 1>&2; exit 1; } +while getopts ":c:i:n:" opt; do + case ${opt} in + i) + ID=${OPTARG} + ;; + n) + NAME=${OPTARG} + ;; + c) + CATEGORY=${OPTARG} + ;; + *) + usage + ;; + esac +done +shift $((OPTIND-1)) +if [ -z "${ID}" ] || [ -z "${NAME}" ] || [ -z "${CATEGORY}" ]; then + usage +fi +URL="http://127.0.0.1:8080/vid/maintenance/category_parameter/" +OPERATION="PUT" +FULLURL="${URL}${CATEGORY}" +BODY="{\"id\":\"${ID}\",\"name\":\"${NAME}\"}" +echo "Sending request: ${FULLURL} ${OPERATION} ${BODY}" +echo -e "------------------------\nwget output:" +wget --method="${OPERATION}" --body-data="${BODY}" --header=Content-Type:application/json --content-on-error -nv -O - "${FULLURL}" +RC=$? +echo "---------------------------" +if [ $RC -ne 0 ]; then + echo "Failed to update option name ${NAME} for option id ${ID} of category ${CATEGORY}" +fi \ No newline at end of file diff --git a/vid-app-common/src/main/resources/scripts/vnf_wf.sh b/vid-app-common/src/main/resources/scripts/vnf_wf.sh new file mode 100644 index 000000000..69cb595b5 --- /dev/null +++ b/vid-app-common/src/main/resources/scripts/vnf_wf.sh @@ -0,0 +1,49 @@ +#!/bin/bash +usage() { echo -e "Usage: $0 [-o ] [-p ]\nCSV File Format: VNF_UUID,VNF_invariantUUID,workflowName" 1>&2; exit 1; } +while getopts ":o:p:" opt; do + case ${opt} in + o) + OPERATION=${OPTARG} + ;; + p) + FILE=${OPTARG} + ;; + *) + usage + ;; + esac +done +shift $((OPTIND-1)) +if [ -z "${FILE}" ] || [ -z "${OPERATION}" ]; then + usage +fi +if [ ${OPERATION} != 'ADD' ] && [ ${OPERATION} != 'DELETE' ] && [ ${OPERATION} != 'GET' ]; then + usage +fi +if [ ${OPERATION} = 'ADD' ]; then + OPERATION='POST' +fi +URL="http://127.0.0.1:8080/vid/change-management/vnf_workflow_relation" +if [ ${OPERATION} = 'GET' ]; then + echo "Sending request for get all vnf_workflow_relation" + echo -e "------------------------\nwget output:" + wget -nv -O "${FILE}" "${URL}" + RC=$? + echo "---------------------------" + if [ $RC -eq 0 ]; then + echo "Result saved to ${FILE}" + else + echo "Failed to get vnf to workflows relations" + fi +else + BODY=$(cat ${FILE} | awk ' BEGIN { FS=","; print " {\"workflowsDetails\" : [ "} { gsub(/ /, "", $1) ; gsub(/ /, "", $2) ; gsub(/^[ \t]+/,"",$3); gsub(/[ \t]+$/,"",$3); printf "%s{\"vnfDetails\":{\"UUID\":\"%s\",\"invariantUUID\":\"%s\"},\"workflowName\":\"%s\"}",separator,$1,$2,$3 ;separator = ", ";} END { printf " ]} "}') + echo "Sending request: ${OPERATION} ${BODY}" + echo -e "------------------------\nwget output:" + wget --method="${OPERATION}" --body-data="${BODY}" --header=Content-Type:application/json --content-on-error -nv -O - "${URL}" + RC=$? + echo "---------------------------" + if [ $RC -ne 0 ]; then + echo "Failed to ADD/DELETE vnf to workflows relations" + fi +fi + diff --git a/vid-app-common/src/main/resources/sdcservices.json b/vid-app-common/src/main/resources/sdcservices.json index 81a08d931..1d936f630 100644 --- a/vid-app-common/src/main/resources/sdcservices.json +++ b/vid-app-common/src/main/resources/sdcservices.json @@ -4,7 +4,7 @@ "uuid": "48a52540-8772-4368-9cdb-1f124ea5c931", "invariantUUID": "f430728a-4530-42be-a577-1206b9484cef", "name": "4-27_vMME_Service", - "version": "0.1", + "version": "1.0", "toscaModelURL": "./service-vf-csar.zip", "category": "Mobility", "lifecycleState": "CERTIFIED", @@ -15,10 +15,10 @@ "resources": null }, { - "uuid": "68101369-6f08-4e99-9a28-fa6327d344f3", + "uuid": "cb49608f-5a24-4789-b0f7-2595473cb997", "invariantUUID": "0311f998-9268-4fd6-bbba-afff15087b72", "name": "4-27_vMME_Service", - "version": "0.1", + "version": "1.0", "toscaModelURL": "./service-vl-csar.zip", "category": "Mobility", "lifecycleState": "CERTIFIED", @@ -32,8 +32,78 @@ "uuid": "73e1322a-8a9a-49dc-9558-b0c5c5770e4a", "invariantUUID": "f430728a-4530-42be-a577-1206b9484cef", "name": "4-27_vMME_Service", - "version": "0.1", - "toscaModelURL": "./pnf.csar", + "version": "1.0", + "toscaModelURL": "./pnf.zip", + "category": "Mobility", + "lifecycleState": "CERTIFIED", + "lastUpdaterUserId": "rg276b", + "lastUpdaterFullName": null, + "distributionStatus": "DISTRIBUTED", + "artifacts": null, + "resources": null + }, + { + "uuid": "240376de-870e-48df-915a-31f140eedd2c", + "invariantUUID": "709d1be4-9a3f-4a29-8c4d-a20465e808a3", + "name": "Demo Service", + "version": "1.0", + "toscaModelURL": "./service-DemoService1-csar.csar", + "category": "Mobility", + "lifecycleState": "CERTIFIED", + "lastUpdaterUserId": "rg276b", + "lastUpdaterFullName": null, + "distributionStatus": "DISTRIBUTED", + "artifacts": null, + "resources": null + }, + { + "uuid": "32671332-a7ee-4df6-9609-db50ce5eaee7", + "invariantUUID": "598e3f9e-3244-4d8f-a8e0-0e5d7a29eda9", + "name": "ADIOD vMX vPE_BV Service 488", + "version": "1.0", + "toscaModelURL": "./adiod.zip", + "category": "Mobility", + "lifecycleState": "CERTIFIED", + "lastUpdaterUserId": "rg276b", + "lastUpdaterFullName": null, + "distributionStatus": "DISTRIBUTED", + "artifacts": null, + "resources": null + }, + { + "uuid": "55a48870-d99e-41a8-a3b4-a8d748333139", + "invariantUUID": "3d89efc0-19ca-4df7-9818-028e1fc6f708", + "name": "AMP PH SVC", + "version": "1.0", + "toscaModelURL": "./service-AmpPhSvc-csar.zip", + "category": "Mobility", + "lifecycleState": "CERTIFIED", + "lastUpdaterUserId": "rg276b", + "lastUpdaterFullName": null, + "distributionStatus": "DISTRIBUTED", + "artifacts": null, + "resources": null + }, + { + "uuid": "2f80c596-27e5-4ca9-b5bb-e03a7fd4c0fd", + "invariantUUID": "e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0", + "name": "action-data", + "version": "1.0", + "toscaModelURL": "./2f80c596.zip", + "category": "Mobility", + "lifecycleState": "CERTIFIED", + "lastUpdaterUserId": "rg276b", + "lastUpdaterFullName": null, + "distributionStatus": "DISTRIBUTED", + "artifacts": null, + "resources": null + }, + { + "uuid": "ee6d61be-4841-4f98-8f23-5de9da846ca7", + "invariantUUID": "b7d923c9-6175-41f1-91ba-4565c4953408", + "name": "Multiple pProbes", + "version": "1.0", + "toscaModelURL": "./service-Servicecontainermultiplepprobes-csar.csar", "category": "Mobility", "lifecycleState": "CERTIFIED", "lastUpdaterUserId": "rg276b", diff --git a/vid-app-common/src/main/resources/service-AmpPhSvc-csar.zip b/vid-app-common/src/main/resources/service-AmpPhSvc-csar.zip new file mode 100644 index 0000000000000000000000000000000000000000..6d5002c6cf8566e96bcc6902726f6aaa28266be3 GIT binary patch literal 68824 zcmb5V18`s?whfd9t>{jY4|Y~;jXYvy7E>*lx&e~0Miw)iARFSY18 zF)6hKFGEi=JvsARnQ@V27bcX}K}v37a)J&xjz*fC4w3=@D9S)WIf*}wv;CV%^xv!a zzg-LaU$3fyiii-s+`q+4ja-a={EzDYSX(Yu2qBOWN$jt4q`skG%hpn0tstoAL1P~i zyCtk8<>2-pYhl|)h~n$jSI#qd#>cUA#rQT5Za4`|hPmPX2>O(b5qy}- zK7{47jiCkp7VDdC^2*hi|_i03$nnvjM&zR~sWcH+`GT%cJa+>n^s!wnl5TwzjhH zw#+QEi|jX-OM^rujgu4Px>&fSA`xQ2F*iEU{G=!)Q9etd z#OMwM^=___xhg4i6p25OpYpdG$&r5>hE{+CF@4(yx0o1O6;6yRj zE6{r-No?+y(=tDP;}xdAT-1j*c=NpL*Y2xvb8#;OrbAm(l$X|da|o}+jAs&f!*ic8 z5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!X*Ljr%t@_gXTkI7{};UMK#EdOne+3%>H&v^J%{mW$iic0_QXA%C{ z+B|RL{bL}+PawCav=I`yHpQHE@etljmZtx5Nu*V&BU`FUQ=2Yff5!MD%<0YASv48J)G ze-t?U&cX9yuOC%|KVfh6uXFHkY6yR4=6UtdkNUEoAi43^nE5x=X1_D?yc)&uCl|o0 z;H|&N$p5T#>34>nCr^JA!Tf}doxjG=zb%RRot5XwjUU-|2e_` aaVS7u3KCf44FW;}{DTAfMGcQXzWqOJL)`)Z literal 0 HcmV?d00001 diff --git a/vid-app-common/src/main/resources/service-David-csar.csar b/vid-app-common/src/main/resources/service-David-csar.csar new file mode 100644 index 0000000000000000000000000000000000000000..fcf1c647bc7ee2b41ec14d4e03fd593dc06e4875 GIT binary patch literal 29894 zcmaI6V~j39)2=(VZQHhO+qP}2nKia;+vXbEw)u?B^S*m0C;NQK*`0J!KRR81D)(Jo zeJRO;f}sIHK|ui(F=NOA{T~bZKe4H+u?vH}xtlSphx01@J)(!l^0Pd>^s@WZwDbzR zEIrNa^jxzF(=zKmOc{{o-xc*yo!T%WAg(ec8LF zytM-k-X80Fq8(T17GdDn(|I-uDUi8|W zoxNeg9@tuPh3n(o>&0z2Q;+%flw}c(__XGC|L_MZ<$&O4+h+oZsdaur{m@~;55)M2 zrDWcvvb{^p#$&A#e`$87v3)#3=Oq?FWfdqW70=YIxH#&fy8eL%C4AwpN-gcKO?C3o z2ZQZVR1-B6gTZSR^Ofb5rRCeXADpJ8Vx@{Qy1(gcO1w|?WJjF;6q9ls{phWz^O0W4 zZ6pms>6*QqW{sHU8@kp&0T1fM_K>Gc_0>r<_DmS6)!*a`AXH?UB$hC}LuOw`v<@C< z;fwVvUZ!(>RX(6=^7heZ_${qzTqK@9DFrt4%9_8(kFhZlnkWJV3YE+~#swHj%^|{7 zRd$M~^qh)ThF47(JOzwvRf_mSyp7&Fnk!k)i`{)wB;WDJ+!(X+zeShl#I-;Ksaw42M82_J6o>lyL0k~cf9>Q| za1z4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_0L|IVDefOXCg_wv$skXxX|%L88Z&ap zd^(t=C;TT&hbIbzR`rMHdaJbi1;==Mn@xOlU+JvmFo=n^`hiX=6^pTCK<;p@^cS7o zi;;a#sS{!dQ`GK#Sb-5dMgzK~Dv8JvqNGs&lEYBrvs6a&slVV}o<>5lIP6N@%B^gp z)ElXCnc>u~)4J^0@P3~K9gSst)es@3!dcPc~J$@0~fQOBU6 zoh(5uIW@5I9O^2sn2aC!eFOzZ-G&5RM*7kce%VHf6&{MY#qpm)hV{^LOuVun5g3>oZsvrbUw}sj6;u zk{3ZGUTlmN`oSHG+LFa-nyoA3Reo32?X!D2vf6D`8}hP?Pj`GD6V>G&f6doTf^p`GFx0Cy*Y67taBl=>W5MgfvbFUxcH(CqVk=p6$d;gh^HaVJ-oRfq@bs z6Yf^w#zDjkglPwG$yo3x2gJOD4EWS6#2kbh(c=;n;4v?CnB#9b*EidRaLE~N+j>0M z0JRulUH;z0p13N6i(znU)9?teJWN5jQjM5}Q0$CbID-f8#ltNBSVlukMX0#MsiX0T zKoCsZ-rX7*AKu{7_;IPz#-%$aae}BvD8-YK~el3ZclTdDhlV9QS z>e5kWzfX)sY>7|+f|Kvyu@1aJ2tC{%`Ik2wDdr*OCJfHvBqVsWdmq95e*`7O76{`E zxF9bcF#+Fe;al$@J%TA8T$BP2{+|x>{)d8S@LaoZ90Mu)o&r}%&AQcd(JfR2I$ct}}EYJoHP1l-jh4#p=8 literal 0 HcmV?d00001 diff --git a/vid-app-common/src/main/resources/service-Servicecontainermultiplepprobes-csar.csar b/vid-app-common/src/main/resources/service-Servicecontainermultiplepprobes-csar.csar new file mode 100644 index 0000000000000000000000000000000000000000..81691fe1f76c021667249d4b8026e493e4a61d85 GIT binary patch literal 31331 zcmbrmbC51gkT*KEZQHhO+qP}nHqO|#ea5z}Gqz{$dEedd-u*UW_n+Gt9o=0OPi0nQ zWp?JTvmOO$U=S1l2nYxOW-AA2fd6tp{=GMLHgux1HFYtBc5_^Ty@PjiTY8eEm0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5KcW7?>HRm%pHzq6q`AMN zS>T^AhX10_{Tu1eH2B}th`$3{{GUkwBue~+^M6j7{|krUb0_h66a87k{wIb0&r|u` oX8rj9(*NuD|K7qn{{P>C$xDHLKKK9t;6GnCpG-wf=ilG{7sG5`MgRZ+ literal 0 HcmV?d00001 diff --git a/vid-app-common/src/main/resources/test.csv b/vid-app-common/src/main/resources/test.csv new file mode 100644 index 000000000..a0b09b77c --- /dev/null +++ b/vid-app-common/src/main/resources/test.csv @@ -0,0 +1,5 @@ +ee6d61be-4841-4f98-8f23-5de9da846ca7,95c75a48-6f86-498f-b1a6-e9179a83d9c7,Update +ee6d61be-4841-4f98-8f23-5de9da846ca7,95c75a48-6f86-498f-b1a6-e9179a83d9c7, VNF In Place Software Update +418f32e5-484a-4073-8fa9-fab7d497459f,709d1be4-9a3f-4a29-8c4d-a20465e808a3, VNF In Place Software Update +fa06db34-f8e3-42d9-8e51-a76816eb0f0d,0ebfb706-a846-4715-b0d0-fe0be09458d7, VNF In Place Software Update +fa06db34-f8e3-42d9-8e51-a76816eb0f0d, 87447b67-29e3-4244-8038-990a8c70259a,Replace \ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/external/upload-file/ng-file-upload.min.js b/vid-app-common/src/main/webapp/app/vid/external/upload-file/ng-file-upload.min.js new file mode 100644 index 000000000..4bfe94221 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/external/upload-file/ng-file-upload.min.js @@ -0,0 +1,3 @@ +/*! 12.2.13 */ +!window.XMLHttpRequest||window.FileAPI&&FileAPI.shouldLoad||(window.XMLHttpRequest.prototype.setRequestHeader=function(a){return function(b,c){if("__setXHR_"===b){var d=c(this);d instanceof Function&&d(this)}else a.apply(this,arguments)}}(window.XMLHttpRequest.prototype.setRequestHeader));var ngFileUpload=angular.module("ngFileUpload",[]);ngFileUpload.version="12.2.13",ngFileUpload.service("UploadBase",["$http","$q","$timeout",function(a,b,c){function d(d){function e(a){j.notify&&j.notify(a),k.progressFunc&&c(function(){k.progressFunc(a)})}function h(a){return null!=d._start&&g?{loaded:a.loaded+d._start,total:d._file&&d._file.size||a.total,type:a.type,config:d,lengthComputable:!0,target:a.target}:a}function i(){a(d).then(function(a){if(g&&d._chunkSize&&!d._finished&&d._file){var b=d._file&&d._file.size||0;e({loaded:Math.min(d._end,b),total:b,config:d,type:"progress"}),f.upload(d,!0)}else d._finished&&delete d._finished,j.resolve(a)},function(a){j.reject(a)},function(a){j.notify(a)})}d.method=d.method||"POST",d.headers=d.headers||{};var j=d._deferred=d._deferred||b.defer(),k=j.promise;return d.disableProgress||(d.headers.__setXHR_=function(){return function(a){a&&a.upload&&a.upload.addEventListener&&(d.__XHR=a,d.xhrFn&&d.xhrFn(a),a.upload.addEventListener("progress",function(a){a.config=d,e(h(a))},!1),a.upload.addEventListener("load",function(a){a.lengthComputable&&(a.config=d,e(h(a)))},!1))}}),g?d._chunkSize&&d._end&&!d._finished?(d._start=d._end,d._end+=d._chunkSize,i()):d.resumeSizeUrl?a.get(d.resumeSizeUrl).then(function(a){d._start=d.resumeSizeResponseReader?d.resumeSizeResponseReader(a.data):parseInt((null==a.data.size?a.data:a.data.size).toString()),d._chunkSize&&(d._end=d._start+d._chunkSize),i()},function(a){throw a}):d.resumeSize?d.resumeSize().then(function(a){d._start=a,d._chunkSize&&(d._end=d._start+d._chunkSize),i()},function(a){throw a}):(d._chunkSize&&(d._start=0,d._end=d._start+d._chunkSize),i()):i(),k.success=function(a){return k.then(function(b){a(b.data,b.status,b.headers,d)}),k},k.error=function(a){return k.then(null,function(b){a(b.data,b.status,b.headers,d)}),k},k.progress=function(a){return k.progressFunc=a,k.then(null,null,function(b){a(b)}),k},k.abort=k.pause=function(){return d.__XHR&&c(function(){d.__XHR.abort()}),k},k.xhr=function(a){return d.xhrFn=function(b){return function(){b&&b.apply(k,arguments),a.apply(k,arguments)}}(d.xhrFn),k},f.promisesCount++,k["finally"]&&k["finally"]instanceof Function&&k["finally"](function(){f.promisesCount--}),k}function e(a){var b={};for(var c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b}var f=this;f.promisesCount=0,this.isResumeSupported=function(){return window.Blob&&window.Blob.prototype.slice};var g=this.isResumeSupported();this.isUploadInProgress=function(){return f.promisesCount>0},this.rename=function(a,b){return a.ngfName=b,a},this.jsonBlob=function(a){null==a||angular.isString(a)||(a=JSON.stringify(a));var b=new window.Blob([a],{type:"application/json"});return b._ngfBlob=!0,b},this.json=function(a){return angular.toJson(a)},this.isFile=function(a){return null!=a&&(a instanceof window.Blob||a.flashId&&a.name&&a.size)},this.upload=function(a,b){function c(b,c){if(b._ngfBlob)return b;if(a._file=a._file||b,null!=a._start&&g){a._end&&a._end>=b.size&&(a._finished=!0,a._end=b.size);var d=b.slice(a._start,a._end||b.size);return d.name=b.name,d.ngfName=b.ngfName,a._chunkSize&&(c.append("_chunkSize",a._chunkSize),c.append("_currentChunkSize",a._end-a._start),c.append("_chunkNumber",Math.floor(a._start/a._chunkSize)),c.append("_totalSize",a._file.size)),d}return b}function h(b,d,e){if(void 0!==d)if(angular.isDate(d)&&(d=d.toISOString()),angular.isString(d))b.append(e,d);else if(f.isFile(d)){var g=c(d,b),i=e.split(",");i[1]&&(g.ngfName=i[1].replace(/^\s+|\s+$/g,""),e=i[0]),a._fileKey=a._fileKey||e,b.append(e,g,g.ngfName||g.name)}else if(angular.isObject(d)){if(d.$$ngfCircularDetection)throw"ngFileUpload: Circular reference in config.data. Make sure specified data for Upload.upload() has no circular reference: "+e;d.$$ngfCircularDetection=!0;try{for(var j in d)if(d.hasOwnProperty(j)&&"$$ngfCircularDetection"!==j){var k=null==a.objectKey?"[i]":a.objectKey;d.length&&parseInt(j)>-1&&(k=null==a.arrayKey?k:a.arrayKey),h(b,d[j],e+k.replace(/[ik]/g,j))}}finally{delete d.$$ngfCircularDetection}}else b.append(e,d)}function i(){a._chunkSize=f.translateScalars(a.resumeChunkSize),a._chunkSize=a._chunkSize?parseInt(a._chunkSize.toString()):null,a.headers=a.headers||{},a.headers["Content-Type"]=void 0,a.transformRequest=a.transformRequest?angular.isArray(a.transformRequest)?a.transformRequest:[a.transformRequest]:[],a.transformRequest.push(function(b){var c,d=new window.FormData;b=b||a.fields||{},a.file&&(b.file=a.file);for(c in b)if(b.hasOwnProperty(c)){var e=b[c];a.formDataAppender?a.formDataAppender(d,c,e):h(d,e,c)}return d})}return b||(a=e(a)),a._isDigested||(a._isDigested=!0,i()),d(a)},this.http=function(b){return b=e(b),b.transformRequest=b.transformRequest||function(b){return window.ArrayBuffer&&b instanceof window.ArrayBuffer||b instanceof window.Blob?b:a.defaults.transformRequest[0].apply(this,arguments)},b._chunkSize=f.translateScalars(b.resumeChunkSize),b._chunkSize=b._chunkSize?parseInt(b._chunkSize.toString()):null,d(b)},this.translateScalars=function(a){if(angular.isString(a)){if(a.search(/kb/i)===a.length-2)return parseFloat(1024*a.substring(0,a.length-2));if(a.search(/mb/i)===a.length-2)return parseFloat(1048576*a.substring(0,a.length-2));if(a.search(/gb/i)===a.length-2)return parseFloat(1073741824*a.substring(0,a.length-2));if(a.search(/b/i)===a.length-1)return parseFloat(a.substring(0,a.length-1));if(a.search(/s/i)===a.length-1)return parseFloat(a.substring(0,a.length-1));if(a.search(/m/i)===a.length-1)return parseFloat(60*a.substring(0,a.length-1));if(a.search(/h/i)===a.length-1)return parseFloat(3600*a.substring(0,a.length-1))}return a},this.urlToBlob=function(c){var d=b.defer();return a({url:c,method:"get",responseType:"arraybuffer"}).then(function(a){var b=new Uint8Array(a.data),e=a.headers("content-type")||"image/WebP",f=new window.Blob([b],{type:e}),g=c.match(/.*\/(.+?)(\?.*)?$/);g.length>1&&(f.name=g[1]),d.resolve(f)},function(a){d.reject(a)}),d.promise},this.setDefaults=function(a){this.defaults=a||{}},this.defaults={},this.version=ngFileUpload.version}]),ngFileUpload.service("Upload",["$parse","$timeout","$compile","$q","UploadExif",function(a,b,c,d,e){function f(a,b,c){var e=[i.emptyPromise()];return angular.forEach(a,function(d,f){0===d.type.indexOf("image/jpeg")&&i.attrGetter("ngfFixOrientation",b,c,{$file:d})&&e.push(i.happyPromise(i.applyExifRotation(d),d).then(function(b){a.splice(f,1,b)}))}),d.all(e)}function g(a,b,c,e){var f=i.attrGetter("ngfResize",b,c);if(!f||!i.isResizeSupported()||!a.length)return i.emptyPromise();if(f instanceof Function){var g=d.defer();return f(a).then(function(d){h(d,a,b,c,e).then(function(a){g.resolve(a)},function(a){g.reject(a)})},function(a){g.reject(a)})}return h(f,a,b,c,e)}function h(a,b,c,e,f){function g(d,g){if(0===d.type.indexOf("image")){if(a.pattern&&!i.validatePattern(d,a.pattern))return;a.resizeIf=function(a,b){return i.attrGetter("ngfResizeIf",c,e,{$width:a,$height:b,$file:d})};var j=i.resize(d,a);h.push(j),j.then(function(a){b.splice(g,1,a)},function(a){d.$error="resize",(d.$errorMessages=d.$errorMessages||{}).resize=!0,d.$errorParam=(a?(a.message?a.message:a)+": ":"")+(d&&d.name),f.$ngfValidations.push({name:"resize",valid:!1}),i.applyModelValidation(f,b)})}}for(var h=[i.emptyPromise()],j=0;j-1:!0},i.emptyPromise=function(){var a=d.defer(),c=arguments;return b(function(){a.resolve.apply(a,c)}),a.promise},i.rejectPromise=function(){var a=d.defer(),c=arguments;return b(function(){a.reject.apply(a,c)}),a.promise},i.happyPromise=function(a,c){var e=d.defer();return a.then(function(a){e.resolve(a)},function(a){b(function(){throw a}),e.resolve(c)}),e.promise},i.updateModel=function(c,d,e,h,j,k,l){function m(f,g,j,l,m){d.$$ngfPrevValidFiles=f,d.$$ngfPrevInvalidFiles=g;var n=f&&f.length?f[0]:null,o=g&&g.length?g[0]:null;c&&(i.applyModelValidation(c,f),c.$setViewValue(m?n:f)),h&&a(h)(e,{$files:f,$file:n,$newFiles:j,$duplicateFiles:l,$invalidFiles:g,$invalidFile:o,$event:k});var p=i.attrGetter("ngfModelInvalid",d);p&&b(function(){a(p).assign(e,m?o:g)}),b(function(){})}function n(){function a(a,b){return a.name===b.name&&(a.$ngfOrigSize||a.size)===(b.$ngfOrigSize||b.size)&&a.type===b.type}function b(b){var c;for(c=0;c-1&&(v.splice(d,1),u.push(c)),a()}}})}var q,r,s,t=[],u=[],v=[];r=d.$$ngfPrevValidFiles||[],s=d.$$ngfPrevInvalidFiles||[],c&&c.$modelValue&&(r=o(c.$modelValue));var w=i.attrGetter("ngfKeep",d,e);q=(j||[]).slice(0),("distinct"===w||i.attrGetter("ngfKeepDistinct",d,e)===!0)&&n(d,e);var x=!w&&!i.attrGetter("ngfMultiple",d,e)&&!i.attrGetter("multiple",d);if(!w||q.length){i.attrGetter("ngfBeforeModelChange",d,e,{$files:j,$file:j&&j.length?j[0]:null,$newFiles:q,$duplicateFiles:t,$event:k});var y=i.attrGetter("ngfValidateAfterResize",d,e),z=i.attrGetter("ngfModelOptions",d,e);i.validate(q,w?r.length:0,c,d,e).then(function(a){l?m(q,[],j,t,x):(z&&z.allowInvalid||y?v=q:(v=a.validFiles,u=a.invalidFiles),i.attrGetter("ngfFixOrientation",d,e)&&i.isExifSupported()?f(v,d,e).then(function(){p()}):p())})}},i}]),ngFileUpload.directive("ngfSelect",["$parse","$timeout","$compile","Upload",function(a,b,c,d){function e(a){var b=a.match(/Android[^\d]*(\d+)\.(\d+)/);if(b&&b.length>2){var c=d.defaults.androidFixMinorVersion||4;return parseInt(b[1])<4||parseInt(b[1])===c&&parseInt(b[2])'),c=angular.element("");return c.css("visibility","hidden").css("position","absolute").css("overflow","hidden").css("width","0px").css("height","0px").css("border","none").css("margin","0px").css("padding","0px").attr("tabindex","-1"),n(a,c),g.push({el:b,ref:c}),document.body.appendChild(c.append(a)[0]),a}function p(c){if(b.attr("disabled"))return!1;if(!t("ngfSelectDisabled",a)){var d=q(c);if(null!=d)return d;r(c);try{k()||document.body.contains(x[0])||(g.push({el:b,ref:x.parent()}),document.body.appendChild(x.parent()[0]),x.bind("change",m))}catch(f){}return e(navigator.userAgent)?setTimeout(function(){x[0].click()},0):x[0].click(),!1}}function q(a){var b=a.changedTouches||a.originalEvent&&a.originalEvent.changedTouches;if(b){if("touchstart"===a.type)return w=b[0].clientX,v=b[0].clientY,!0;if("touchend"===a.type){var c=b[0].clientX,d=b[0].clientY;if(Math.abs(c-w)>20||Math.abs(d-v)>20)return a.stopPropagation(),a.preventDefault(),!1}return!0}}function r(b){j.shouldUpdateOn("click",c,a)&&x.val()&&(x.val(null),j.updateModel(d,c,a,l(),null,b,!0))}function s(a){if(x&&!x.attr("__ngf_ie10_Fix_")){if(!x[0].parentNode)return void(x=null);a.preventDefault(),a.stopPropagation(),x.unbind("click");var b=x.clone();return x.replaceWith(b),x=b,x.attr("__ngf_ie10_Fix_","true"),x.bind("change",m),x.bind("click",s),x[0].click(),!1}x.removeAttr("__ngf_ie10_Fix_")}var t=function(a,b){return j.attrGetter(a,c,b)};j.registerModelChangeValidator(d,c,a);var u=[];t("ngfMultiple")&&u.push(a.$watch(t("ngfMultiple"),function(){x.attr("multiple",t("ngfMultiple",a))})),t("ngfCapture")&&u.push(a.$watch(t("ngfCapture"),function(){x.attr("capture",t("ngfCapture",a))})),t("ngfAccept")&&u.push(a.$watch(t("ngfAccept"),function(){x.attr("accept",t("ngfAccept",a))})),u.push(c.$observe("accept",function(){x.attr("accept",t("accept"))}));var v=0,w=0,x=b;k()||(x=o()),x.bind("change",m),k()?b.bind("click",r):b.bind("click touchstart touchend",p),-1!==navigator.appVersion.indexOf("MSIE 10")&&x.bind("click",s),d&&d.$formatters.push(function(a){return(null==a||0===a.length)&&x.val()&&x.val(null),a}),a.$on("$destroy",function(){k()||x.parent().remove(),angular.forEach(u,function(a){a()})}),h(function(){for(var a=0;a-1&&l.height&&l.height.indexOf("px")>-1&&(k={width:parseInt(l.width.slice(0,-2)),height:parseInt(l.height.slice(0,-2))})}return angular.isString(c)?(e.removeClass("ng-hide"),i?e.css("background-image","url('"+c+"')"):e.attr("src",c)):void(!c||!c.type||0!==c.type.search(a(e[0]))||i&&0!==c.type.indexOf("image")?e.addClass("ng-hide"):k&&b.isResizeSupported()?(k.resizeIf=function(a,e){return b.attrGetter("ngfResizeIf",f,d,{$width:a,$height:e,$file:c})},b.resize(c,k).then(function(a){j(a)},function(a){throw a})):j(c))});d.$on("$destroy",function(){c()})})}ngFileUpload.service("UploadDataUrl",["UploadBase","$timeout","$q",function(a,b,c){var d=a;return d.base64DataUrl=function(a){if(angular.isArray(a)){var b=c.defer(),e=0;return angular.forEach(a,function(c){d.dataUrl(c,!0)["finally"](function(){if(e++,e===a.length){var c=[];angular.forEach(a,function(a){c.push(a.$ngfDataUrl)}),b.resolve(c,a)}})}),b.promise}return d.dataUrl(a,!0)},d.dataUrl=function(a,e){if(!a)return d.emptyPromise(a,a);if(e&&null!=a.$ngfDataUrl||!e&&null!=a.$ngfBlobUrl)return d.emptyPromise(e?a.$ngfDataUrl:a.$ngfBlobUrl,a);var f=e?a.$$ngfDataUrlPromise:a.$$ngfBlobUrlPromise;if(f)return f;var g=c.defer();return b(function(){if(window.FileReader&&a&&(!window.FileAPI||-1===navigator.userAgent.indexOf("MSIE 8")||a.size<2e4)&&(!window.FileAPI||-1===navigator.userAgent.indexOf("MSIE 9")||a.size<4e6)){var c=window.URL||window.webkitURL;if(c&&c.createObjectURL&&!e){var f;try{f=c.createObjectURL(a)}catch(h){return void b(function(){a.$ngfBlobUrl="",g.reject()})}b(function(){if(a.$ngfBlobUrl=f,f){g.resolve(f,a),d.blobUrls=d.blobUrls||[],d.blobUrlsTotalSize=d.blobUrlsTotalSize||0,d.blobUrls.push({url:f,size:a.size}),d.blobUrlsTotalSize+=a.size||0;for(var b=d.defaults.blobUrlsMaxMemory||268435456,e=d.defaults.blobUrlsMaxQueueSize||200;(d.blobUrlsTotalSize>b||d.blobUrls.length>e)&&d.blobUrls.length>1;){var h=d.blobUrls.splice(0,1)[0];c.revokeObjectURL(h.url),d.blobUrlsTotalSize-=h.size}}})}else{var i=new FileReader;i.onload=function(c){b(function(){a.$ngfDataUrl=c.target.result,g.resolve(c.target.result,a),b(function(){delete a.$ngfDataUrl},1e3)})},i.onerror=function(){b(function(){a.$ngfDataUrl="",g.reject()})},i.readAsDataURL(a)}}else b(function(){a[e?"$ngfDataUrl":"$ngfBlobUrl"]="",g.reject()})}),f=e?a.$$ngfDataUrlPromise=g.promise:a.$$ngfBlobUrlPromise=g.promise,f["finally"](function(){delete a[e?"$$ngfDataUrlPromise":"$$ngfBlobUrlPromise"]}),f},d}]),ngFileUpload.directive("ngfSrc",["Upload","$timeout",function(a,c){return{restrict:"AE",link:function(d,e,f){b(a,c,d,e,f,"ngfSrc",a.attrGetter("ngfResize",f,d),!1)}}}]),ngFileUpload.directive("ngfBackground",["Upload","$timeout",function(a,c){return{restrict:"AE",link:function(d,e,f){b(a,c,d,e,f,"ngfBackground",a.attrGetter("ngfResize",f,d),!0)}}}]),ngFileUpload.directive("ngfThumbnail",["Upload","$timeout",function(a,c){return{restrict:"AE",link:function(d,e,f){var g=a.attrGetter("ngfSize",f,d);b(a,c,d,e,f,"ngfThumbnail",g,a.attrGetter("ngfAsBackground",f,d))}}}]),ngFileUpload.config(["$compileProvider",function(a){a.imgSrcSanitizationWhitelist&&a.imgSrcSanitizationWhitelist(/^\s*(https?|ftp|mailto|tel|webcal|local|file|data|blob):/),a.aHrefSanitizationWhitelist&&a.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|tel|webcal|local|file|data|blob):/)}]),ngFileUpload.filter("ngfDataUrl",["UploadDataUrl","$sce",function(a,b){return function(c,d,e){if(angular.isString(c))return b.trustAsResourceUrl(c);var f=c&&((d?c.$ngfDataUrl:c.$ngfBlobUrl)||c.$ngfDataUrl);return c&&!f?(!c.$ngfDataUrlFilterInProgress&&angular.isObject(c)&&(c.$ngfDataUrlFilterInProgress=!0,a.dataUrl(c,d)),""):(c&&delete c.$ngfDataUrlFilterInProgress,(c&&f?e?b.trustAsResourceUrl(f):f:c)||"")}}])}(),ngFileUpload.service("UploadValidate",["UploadDataUrl","$q","$timeout",function(a,b,c){function d(a){var b="",c=[];if(a.length>2&&"/"===a[0]&&"/"===a[a.length-1])b=a.substring(1,a.length-1);else{var e=a.split(",");if(e.length>1)for(var f=0;f|:\\-]","g"),"\\$&")+"$",b=b.replace(/\\\*/g,".*").replace(/\\\?/g,"."))}return{regexp:b,excludes:c}}function e(a,b){null==b||a.$dirty||(a.$setDirty?a.$setDirty():a.$dirty=!0)}var f=a;return f.validatePattern=function(a,b){if(!b)return!0;var c=d(b),e=!0;if(c.regexp&&c.regexp.length){var f=new RegExp(c.regexp,"i");e=null!=a.type&&f.test(a.type)||null!=a.name&&f.test(a.name)}for(var g=c.excludes.length;g--;){var h=new RegExp(c.excludes[g],"i");e=e&&(null==a.type||h.test(a.type))&&(null==a.name||h.test(a.name))}return e},f.ratioToFloat=function(a){var b=a.toString(),c=b.search(/[x:]/i);return b=c>-1?parseFloat(b.substring(0,c))/parseFloat(b.substring(c+1)):parseFloat(b)},f.registerModelChangeValidator=function(a,b,c){a&&a.$formatters.push(function(d){if(a.$dirty){var e=d;d&&!angular.isArray(d)&&(e=[d]),f.validate(e,0,a,b,c).then(function(){f.applyModelValidation(a,e)})}return d})},f.applyModelValidation=function(a,b){e(a,b),angular.forEach(a.$ngfValidations,function(b){a.$setValidity(b.name,b.valid)})},f.getValidationAttr=function(a,b,c,d,e){var g="ngf"+c[0].toUpperCase()+c.substr(1),h=f.attrGetter(g,a,b,{$file:e});if(null==h&&(h=f.attrGetter("ngfValidate",a,b,{$file:e}))){var i=(d||c).split(".");h=h[i[0]],i.length>1&&(h=h&&h[i[1]])}return h},f.validate=function(a,c,d,e,g){function h(b,c,h){if(a){for(var i=a.length,j=null;i--;){var n=a[i];if(n){var o=f.getValidationAttr(e,g,b,c,n);null!=o&&(h(n,o,i)||(-1===k.indexOf(b)?(n.$error=b,(n.$errorMessages=n.$errorMessages||{})[b]=!0,n.$errorParam=o,-1===m.indexOf(n)&&m.push(n),l||a.splice(i,1),j=!1):a.splice(i,1)))}}null!==j&&d.$ngfValidations.push({name:b,valid:j})}}function i(c,h,i,n,o){function p(b,d,e){function f(f){if(f())if(-1===k.indexOf(c)){if(d.$error=c,(d.$errorMessages=d.$errorMessages||{})[c]=!0,d.$errorParam=e,-1===m.indexOf(d)&&m.push(d),!l){var g=a.indexOf(d);g>-1&&a.splice(g,1)}b.resolve(!1)}else{var h=a.indexOf(d);h>-1&&a.splice(h,1),b.resolve(!0)}else b.resolve(!0)}null!=e?n(d,e).then(function(a){f(function(){return!o(a,e)})},function(){f(function(){return j("ngfValidateForce",{$file:d})})}):b.resolve(!0)}var q=[f.emptyPromise(!0)];a&&(a=void 0===a.length?[a]:a,angular.forEach(a,function(a){var d=b.defer();return q.push(d.promise),!i||null!=a.type&&0===a.type.search(i)?void("dimensions"===c&&null!=f.attrGetter("ngfDimensions",e)?f.imageDimensions(a).then(function(b){p(d,a,j("ngfDimensions",{$file:a,$width:b.width,$height:b.height}))},function(){d.resolve(!1)}):"duration"===c&&null!=f.attrGetter("ngfDuration",e)?f.mediaDuration(a).then(function(b){p(d,a,j("ngfDuration",{$file:a,$duration:b}))},function(){d.resolve(!1)}):p(d,a,f.getValidationAttr(e,g,c,h,a))):void d.resolve(!0)}));var r=b.defer();return b.all(q).then(function(a){for(var b=!0,e=0;e=f.translateScalars(b)}),h("maxSize","size.max",function(a,b){return a.size-.1<=f.translateScalars(b)});var n=0;if(h("maxTotalSize",null,function(b,c){return n+=b.size,n>f.translateScalars(c)?(a.splice(0,a.length),!1):!0}),h("validateFn",null,function(a,b){return b===!0||null===b||""===b}),!a.length)return f.emptyPromise({validFiles:[],invalidFiles:m});var o=b.defer(),p=[];return p.push(i("maxHeight","height.max",/image/,this.imageDimensions,function(a,b){return a.height<=b})),p.push(i("minHeight","height.min",/image/,this.imageDimensions,function(a,b){return a.height>=b})),p.push(i("maxWidth","width.max",/image/,this.imageDimensions,function(a,b){return a.width<=b})),p.push(i("minWidth","width.min",/image/,this.imageDimensions,function(a,b){return a.width>=b})),p.push(i("dimensions",null,/image/,function(a,b){return f.emptyPromise(b)},function(a){return a})),p.push(i("ratio",null,/image/,this.imageDimensions,function(a,b){for(var c=b.toString().split(","),d=!1,e=0;e-1e-4})),p.push(i("maxDuration","duration.max",/audio|video/,this.mediaDuration,function(a,b){return a<=f.translateScalars(b)})),p.push(i("minDuration","duration.min",/audio|video/,this.mediaDuration,function(a,b){return a>=f.translateScalars(b)})),p.push(i("duration",null,/audio|video/,function(a,b){return f.emptyPromise(b)},function(a){return a})),p.push(i("validateAsyncFn",null,null,function(a,b){return b},function(a){return a===!0||null===a||""===a})),b.all(p).then(function(){if(l)for(var b=0;bc+d}),o.resolve({validFiles:a,invalidFiles:m})}),o.promise},f.imageDimensions=function(a){if(a.$ngfWidth&&a.$ngfHeight){var d=b.defer();return c(function(){d.resolve({width:a.$ngfWidth,height:a.$ngfHeight})}),d.promise}if(a.$ngfDimensionPromise)return a.$ngfDimensionPromise;var e=b.defer();return c(function(){return 0!==a.type.indexOf("image")?void e.reject("not image"):void f.dataUrl(a).then(function(b){function d(){var b=h[0].naturalWidth||h[0].clientWidth,c=h[0].naturalHeight||h[0].clientHeight;h.remove(),a.$ngfWidth=b,a.$ngfHeight=c,e.resolve({width:b,height:c})}function f(){h.remove(),e.reject("load error")}function g(){c(function(){h[0].parentNode&&(h[0].clientWidth?d():i++>10?f():g())},1e3)}var h=angular.element("").attr("src",b).css("visibility","hidden").css("position","fixed").css("max-width","none !important").css("max-height","none !important");h.on("load",d),h.on("error",f);var i=0;g(),angular.element(document.getElementsByTagName("body")[0]).append(h)},function(){e.reject("load error")})}),a.$ngfDimensionPromise=e.promise,a.$ngfDimensionPromise["finally"](function(){delete a.$ngfDimensionPromise}),a.$ngfDimensionPromise},f.mediaDuration=function(a){if(a.$ngfDuration){var d=b.defer();return c(function(){d.resolve(a.$ngfDuration)}),d.promise}if(a.$ngfDurationPromise)return a.$ngfDurationPromise;var e=b.defer();return c(function(){return 0!==a.type.indexOf("audio")&&0!==a.type.indexOf("video")?void e.reject("not media"):void f.dataUrl(a).then(function(b){function d(){var b=h[0].duration;a.$ngfDuration=b,h.remove(),e.resolve(b)}function f(){h.remove(),e.reject("load error")}function g(){c(function(){h[0].parentNode&&(h[0].duration?d():i>10?f():g())},1e3)}var h=angular.element(0===a.type.indexOf("audio")?"

    ", - scope : { - control : "=", - callback : "&" - }, - link : function(scope, element, attrs) { - - var control = scope.control || {}; - - control.setList = function(parameterList) { - var html = ""; - for (var i = 0; i < parameterList.length; i++) { - html += getParameterHtml(parameterList[i], attrs.editable); - } - element.html(html); - element.find("input, select").bind("change", function() { - callback(this, scope); - }); - } - - control.updateList = function(parameterList) { - element.find("input, select").each( - function() { - for (var i = 0; i < parameterList.length; i++) { - if (parameterList[i].id === $(this).attr( - "parameter-id")) { - updateParameter(parameterList[i], this, - attrs.editable); - } - } - }); - element.find("input, select").bind("change", function() { - callback(this, scope); - }); - } - - control.getList = function(expectedId) { - var parameterList = new Array(); - element.find("input, select").each(function() { - var parameter = getParameter(this, expectedId); - if (parameter !== undefined) { - parameterList.push(parameter); - } - }); - return parameterList; - } - - control.getRequiredFields = function() { - var requiredFields = ""; - var count = 0; - element.find("input, select").each(function() { - if ($(this).attr("is-required") === "true") { - var requiredField = getRequiredField(this); - if (requiredField !== "") { - if (++count == 1) { - requiredFields = requiredField; - } - } - } - }); - if (--count <= 0) { - return requiredFields; - } else if (count == 1) { - return requiredFields + " and 1 other field"; - } else { - return requiredFields + " and " + count + " other fields"; - } - } - } - } -} - -appDS2.directive('parameterBlock', [ "$log", "PARAMETER", "UtilityService", - parameterBlockDirective ]); - - -appDS2.directive('onlyIntegers', function () { - return { - restrict: 'A', - link: function (scope, elm, attrs, ctrl) { - elm.on('keydown', function (event) { - if(event.shiftKey){event.preventDefault(); return false;} - //console.log(event.which); - if ([8, 13, 27, 37, 38, 39, 40].indexOf(event.which) > -1) { - // backspace, enter, escape, arrows - return true; - } else if (event.which >= 49 && event.which <= 57) { - // numbers - return true; - } else if (event.which >= 96 && event.which <= 105) { - // numpad number - return true; - } - // else if ([110, 190].indexOf(event.which) > -1) { - // // dot and numpad dot - // return true; - // } - else { - event.preventDefault(); - return false; - } - }); - } - } -}); - -appDS2.directive('onlyFloat', function () { - return { - restrict: 'A', - link: function (scope, elm, attrs, ctrl) { - elm.on('keydown', function (event) { - if ([110, 190].indexOf(event.which) > -1) { - // dot and numpad dot - event.preventDefault(); - return true; - } - else{ - return false; - } - }); - } - } -}); diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/directives/progressBarDirective.js b/vid-app-common/src/main/webapp/app/vid/scripts/directives/progressBarDirective.js index ed71436bb..76585f4bc 100755 --- a/vid-app-common/src/main/webapp/app/vid/scripts/directives/progressBarDirective.js +++ b/vid-app-common/src/main/webapp/app/vid/scripts/directives/progressBarDirective.js @@ -58,7 +58,7 @@ * called immediately after HTML is rendered. This is due to a timing-related * behavior. * - * 3) The progress bar displays values of "0" and "100" if precentProgress is, + * 3) The progress bar displays values of "0" and "100" if percentProgress is, * respectively, less than 0 or greater than 100. * * CUSTOM STYLING: diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/directives/search.js b/vid-app-common/src/main/webapp/app/vid/scripts/directives/search.js new file mode 100644 index 000000000..05ae1211c --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/directives/search.js @@ -0,0 +1,11 @@ +"use strict"; + +appDS2.directive('searchText', function() { + return { + restrict : "E", + templateUrl: 'app/vid/scripts/view-models/search.htm', + scope: { + searchString : '=' + } + } +}); \ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/directives/serviceMetadata.js b/vid-app-common/src/main/webapp/app/vid/scripts/directives/serviceMetadata.js new file mode 100644 index 000000000..1c15f7034 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/directives/serviceMetadata.js @@ -0,0 +1,34 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +"use strict"; + +appDS2.directive('serviceMetadata', function() { + return { + restrict : "E", + templateUrl: 'app/vid/scripts/view-models/serviceMetadata.htm', + scope: { + serviceMetadataFields : '=', + titleTxt: '@' + }, + link : function(scope, element, attrs) { + } + } +}); \ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/alert-change-management/alert-change-management.html b/vid-app-common/src/main/webapp/app/vid/scripts/modals/alert-change-management/alert-change-management.html index bdc95c98e..60596f499 100644 --- a/vid-app-common/src/main/webapp/app/vid/scripts/modals/alert-change-management/alert-change-management.html +++ b/vid-app-common/src/main/webapp/app/vid/scripts/modals/alert-change-management/alert-change-management.html @@ -1,4 +1,4 @@ - +