From a1b77452f1a8281ec5ee5f5b83ea03a30df52fc6 Mon Sep 17 00:00:00 2001 From: yufei_zhou Date: Wed, 27 Sep 2017 14:33:28 +0800 Subject: Add deployment part Modify pom file because verify failed Change-Id: I4a1123bf8811853d0db1a70c61af7fdf1c476119 Issue-ID: VFC-53 Signed-off-by: yufei_zhou --- nokia/vnfmdriver/pom.xml | 2 +- .../vfcadaptorservice/deployment/pom.xml | 126 + .../deployment/src/main/release/README.txt | 58 + .../deployment/src/main/release/bin/init_db.sh | 61 + .../deployment/src/main/release/bin/shutdown.sh | 60 + .../deployment/src/main/release/bin/startup.sh | 60 + .../src/main/release/conf/catalina.policy | 250 ++ .../src/main/release/conf/catalina.properties | 146 + .../deployment/src/main/release/conf/context.xml | 36 + .../src/main/release/conf/jaspic-providers.xml | 23 + .../src/main/release/conf/jaspic-providers.xsd | 53 + .../src/main/release/conf/logging.properties | 64 + .../deployment/src/main/release/conf/server.xml | 54 + .../deployment/src/main/release/conf/web.xml | 4692 ++++++++++++++++++++ .../src/main/release/db/mysql/db-schema.sql | 56 + nokia/vnfmdriver/vfcadaptorservice/pom.xml | 31 +- .../vfcadaptorservice/vfcadaptor/pom.xml | 272 +- .../adaptor/Cbam2DriverResponseConverter.java | 136 - .../adaptor/Driver2CbamRequestConverter.java | 120 - .../adaptor/InstantiateVnfContinueRunnable.java | 144 - .../adaptor/TerminateVnfContinueRunnable.java | 81 - .../vfcadaptor/adaptor/VnfmDriverMgmrIml.java | 216 - .../com/nokia/vfcadaptor/beans/ResourceType.java | 8 - .../vfcadaptor/beans/VnfmJobExecutionInfo.java | 91 - .../nokia/vfcadaptor/beans/VnfmResourceInfo.java | 81 - .../catalog/bo/CatalogQueryVnfRequest.java | 21 - .../catalog/bo/CatalogQueryVnfResponse.java | 78 - .../vfcadaptor/catalog/bo/entity/ImageInfo.java | 104 - .../catalog/bo/entity/VnfInstanceInfo.java | 49 - .../vfcadaptor/catalog/impl/CatalogMgmrImpl.java | 62 - .../vfcadaptor/catalog/inf/CatalogMgmrInf.java | 27 - .../vfcadaptor/cbam/bo/CBAMCreateVnfRequest.java | 57 - .../vfcadaptor/cbam/bo/CBAMCreateVnfResponse.java | 49 - .../vfcadaptor/cbam/bo/CBAMHealVnfRequest.java | 49 - .../vfcadaptor/cbam/bo/CBAMHealVnfResponse.java | 48 - .../cbam/bo/CBAMInstantiateVnfRequest.java | 82 - .../cbam/bo/CBAMInstantiateVnfResponse.java | 52 - .../cbam/bo/CBAMOperExecutVnfRequest.java | 22 - .../cbam/bo/CBAMOperExecutVnfResponse.java | 52 - .../vfcadaptor/cbam/bo/CBAMQueryVnfResponse.java | 49 - .../vfcadaptor/cbam/bo/CBAMScaleVnfRequest.java | 77 - .../vfcadaptor/cbam/bo/CBAMScaleVnfResponse.java | 48 - .../cbam/bo/CBAMTerminateVnfRequest.java | 144 - .../cbam/bo/CBAMTerminateVnfResponse.java | 51 - .../vfcadaptor/cbam/bo/entity/EndpointInfo.java | 35 - .../cbam/bo/entity/ExtManagedVirtualLinkData.java | 68 - .../cbam/bo/entity/ExtVirtualLinkData.java | 68 - .../nokia/vfcadaptor/cbam/bo/entity/Inputs.java | 66 - .../cbam/bo/entity/InstantiatedVnfInfo.java | 21 - .../vfcadaptor/cbam/bo/entity/NetworkAddress.java | 51 - .../cbam/bo/entity/OPENSTACK_V2_INFO.java | 58 - .../cbam/bo/entity/OPENSTACK_V3_INFO.java | 57 - .../vfcadaptor/cbam/bo/entity/OTHER_VIM_INFO.java | 45 - .../cbam/bo/entity/OpenStackAccessInfoV2.java | 70 - .../cbam/bo/entity/OpenStackAccessInfoV3.java | 77 - .../cbam/bo/entity/OperationExecution.java | 208 - .../vfcadaptor/cbam/bo/entity/ProblemDetails.java | 67 - .../cbam/bo/entity/VCloudAccessInfo.java | 57 - .../cbam/bo/entity/VMWARE_VCLOUD_INFO.java | 58 - .../cbam/bo/entity/VimComputeResourceFlavour.java | 53 - .../nokia/vfcadaptor/cbam/bo/entity/VimInfo.java | 49 - .../vfcadaptor/cbam/bo/entity/VimInfoType.java | 56 - .../cbam/bo/entity/VimSoftwareImage.java | 49 - .../vfcadaptor/cbam/bo/entity/VnfExtCpData.java | 60 - .../nokia/vfcadaptor/cbam/bo/entity/VnfInfo.java | 208 - .../vfcadaptor/cbam/bo/entity/VnfProperty.java | 21 - .../nokia/vfcadaptor/cbam/bo/entity/ZoneInfo.java | 61 - .../nokia/vfcadaptor/cbam/bo/entity/_links.java | 84 - .../vfcadaptor/cbam/controller/CbamController.java | 150 - .../nokia/vfcadaptor/cbam/impl/CbamMgmrImpl.java | 185 - .../com/nokia/vfcadaptor/cbam/inf/CbamMgmrInf.java | 54 - .../com/nokia/vfcadaptor/common/bo/AdaptorEnv.java | 98 - .../nokia/vfcadaptor/common/bo/KeyValuePair.java | 42 - .../nokia/vfcadaptor/constant/CommonConstants.java | 57 - .../com/nokia/vfcadaptor/constant/CommonEnum.java | 78 - .../vfcadaptor/exception/VnfmDriverException.java | 40 - .../vfcadaptor/http/client/HttpClientUtils.java | 90 - .../http/client/HttpRequestProcessor.java | 70 - .../vfcadaptor/nslcm/bo/NslcmGrantVnfRequest.java | 108 - .../vfcadaptor/nslcm/bo/NslcmGrantVnfResponse.java | 64 - .../nslcm/bo/NslcmNotifyLCMEventsRequest.java | 88 - .../com/nokia/vfcadaptor/nslcm/bo/VnfmInfo.java | 153 - .../vfcadaptor/nslcm/bo/entity/AccessInfo.java | 59 - .../nslcm/bo/entity/AffectedVirtualLink.java | 68 - .../nslcm/bo/entity/AffectedVirtualStorage.java | 56 - .../vfcadaptor/nslcm/bo/entity/AffectedVnfc.java | 57 - .../vfcadaptor/nslcm/bo/entity/GrantInfo.java | 83 - .../vfcadaptor/nslcm/bo/entity/InterfaceInfo.java | 59 - .../nslcm/bo/entity/ResourceDefinition.java | 59 - .../vfcadaptor/nslcm/bo/entity/ResourceHandle.java | 52 - .../vfcadaptor/nslcm/bo/entity/VimAssets.java | 35 - .../nslcm/bo/entity/VimComputeResourceFlavour.java | 58 - .../nokia/vfcadaptor/nslcm/bo/entity/VimInfo.java | 81 - .../nslcm/bo/entity/VimSoftwareImage.java | 59 - .../vfcadaptor/nslcm/bo/entity/VnfPackageInfo.java | 141 - .../nokia/vfcadaptor/nslcm/impl/NslcmMgmrImpl.java | 97 - .../nokia/vfcadaptor/nslcm/inf/NslcmMgmrInf.java | 34 - .../vfcadaptor/vnfmdriver/bo/HealVnfRequest.java | 55 - .../vfcadaptor/vnfmdriver/bo/HealVnfResponse.java | 40 - .../vnfmdriver/bo/InstantiateVnfRequest.java | 115 - .../vnfmdriver/bo/InstantiateVnfResponse.java | 43 - .../vnfmdriver/bo/OperStatusVnfRequest.java | 22 - .../vnfmdriver/bo/OperStatusVnfResponse.java | 50 - .../vfcadaptor/vnfmdriver/bo/QueryVnfRequest.java | 26 - .../vfcadaptor/vnfmdriver/bo/QueryVnfResponse.java | 36 - .../vfcadaptor/vnfmdriver/bo/ScaleVnfRequest.java | 85 - .../vfcadaptor/vnfmdriver/bo/ScaleVnfResponse.java | 39 - .../vnfmdriver/bo/TerminateVnfRequest.java | 71 - .../vnfmdriver/bo/TerminateVnfResponse.java | 31 - .../vnfmdriver/bo/entity/AccessInfo.java | 57 - .../vnfmdriver/bo/entity/AdditionalParam.java | 21 - .../vnfmdriver/bo/entity/Affectedvm.java | 58 - .../vnfmdriver/bo/entity/ExtVirtualLinkData.java | 58 - .../vnfmdriver/bo/entity/InterfaceInfo.java | 58 - .../vnfmdriver/bo/entity/ResponseDescriptor.java | 104 - .../vnfmdriver/bo/entity/ResponseHistoryList.java | 91 - .../vfcadaptor/vnfmdriver/bo/entity/VimInfo.java | 80 - .../vfcadaptor/vnfmdriver/bo/entity/VnfInfo.java | 125 - .../controller/VnfmDriverController.java | 195 - .../vnfmdriver/inf/VnfmDriverMgmrInf.java | 44 - .../nfvo/driver/vnfm/svnfm/ServletInitializer.java | 29 + .../driver/vnfm/svnfm/VfcadaptorApplication.java | 33 + .../adaptor/Cbam2DriverResponseConverter.java | 150 + .../svnfm/adaptor/Driver2CbamRequestConverter.java | 122 + .../adaptor/InstantiateVnfContinueRunnable.java | 150 + .../adaptor/TerminateVnfContinueRunnable.java | 136 + .../vnfm/svnfm/adaptor/VnfmDriverMgmrIml.java | 249 ++ .../svnfm/catalog/bo/CatalogQueryVnfRequest.java | 21 + .../svnfm/catalog/bo/CatalogQueryVnfResponse.java | 79 + .../vnfm/svnfm/catalog/bo/entity/ImageInfo.java | 104 + .../svnfm/catalog/bo/entity/VnfInstanceInfo.java | 49 + .../vnfm/svnfm/catalog/impl/CatalogMgmrImpl.java | 63 + .../vnfm/svnfm/catalog/inf/CatalogMgmrInf.java | 26 + .../vnfm/svnfm/cbam/bo/CBAMCreateVnfRequest.java | 57 + .../vnfm/svnfm/cbam/bo/CBAMCreateVnfResponse.java | 47 + .../vnfm/svnfm/cbam/bo/CBAMHealVnfRequest.java | 49 + .../vnfm/svnfm/cbam/bo/CBAMHealVnfResponse.java | 46 + .../svnfm/cbam/bo/CBAMInstantiateVnfRequest.java | 83 + .../svnfm/cbam/bo/CBAMInstantiateVnfResponse.java | 49 + .../svnfm/cbam/bo/CBAMOperExecutVnfRequest.java | 22 + .../svnfm/cbam/bo/CBAMOperExecutVnfResponse.java | 53 + .../cbam/bo/CBAMQueryOperExecutionResponse.java | 24 + .../vnfm/svnfm/cbam/bo/CBAMQueryVnfResponse.java | 47 + .../vnfm/svnfm/cbam/bo/CBAMScaleVnfRequest.java | 78 + .../vnfm/svnfm/cbam/bo/CBAMScaleVnfResponse.java | 46 + .../svnfm/cbam/bo/CBAMTerminateVnfRequest.java | 145 + .../svnfm/cbam/bo/CBAMTerminateVnfResponse.java | 44 + .../vnfm/svnfm/cbam/bo/entity/EndpointInfo.java | 35 + .../cbam/bo/entity/ExtManagedVirtualLinkData.java | 68 + .../svnfm/cbam/bo/entity/ExtVirtualLinkData.java | 68 + .../driver/vnfm/svnfm/cbam/bo/entity/Inputs.java | 82 + .../svnfm/cbam/bo/entity/InstantiatedVnfInfo.java | 21 + .../vnfm/svnfm/cbam/bo/entity/NetworkAddress.java | 51 + .../svnfm/cbam/bo/entity/OPENSTACK_V2_INFO.java | 58 + .../svnfm/cbam/bo/entity/OPENSTACK_V3_INFO.java | 57 + .../vnfm/svnfm/cbam/bo/entity/OTHER_VIM_INFO.java | 45 + .../cbam/bo/entity/OpenStackAccessInfoV2.java | 70 + .../cbam/bo/entity/OpenStackAccessInfoV3.java | 77 + .../svnfm/cbam/bo/entity/OperationExecution.java | 209 + .../vnfm/svnfm/cbam/bo/entity/ProblemDetails.java | 67 + .../svnfm/cbam/bo/entity/VCloudAccessInfo.java | 57 + .../svnfm/cbam/bo/entity/VMWARE_VCLOUD_INFO.java | 58 + .../cbam/bo/entity/VimComputeResourceFlavour.java | 53 + .../driver/vnfm/svnfm/cbam/bo/entity/VimInfo.java | 48 + .../vnfm/svnfm/cbam/bo/entity/VimInfoType.java | 56 + .../svnfm/cbam/bo/entity/VimSoftwareImage.java | 49 + .../vnfm/svnfm/cbam/bo/entity/VnfExtCpData.java | 60 + .../driver/vnfm/svnfm/cbam/bo/entity/VnfInfo.java | 209 + .../vnfm/svnfm/cbam/bo/entity/VnfProperty.java | 21 + .../driver/vnfm/svnfm/cbam/bo/entity/ZoneInfo.java | 61 + .../driver/vnfm/svnfm/cbam/bo/entity/_links.java | 84 + .../vnfm/svnfm/cbam/controller/CbamController.java | 188 + .../driver/vnfm/svnfm/cbam/impl/CbamMgmrImpl.java | 203 + .../driver/vnfm/svnfm/cbam/inf/CbamMgmrInf.java | 56 + .../driver/vnfm/svnfm/common/bo/AdaptorEnv.java | 76 + .../driver/vnfm/svnfm/common/bo/KeyValuePair.java | 42 + .../vnfm/svnfm/constant/CommonConstants.java | 60 + .../driver/vnfm/svnfm/constant/CommonEnum.java | 78 + .../driver/vnfm/svnfm/db/bean/ResourceType.java | 24 + .../vnfm/svnfm/db/bean/VnfmJobExecutionInfo.java | 103 + .../vnfm/svnfm/db/bean/VnfmResourceInfo.java | 85 + .../db/repository/VnfmJobExecutionRepository.java | 23 + .../db/repository/VnfmResourceRepository.java | 23 + .../vnfm/svnfm/exception/VnfmDriverException.java | 40 + .../vnfm/svnfm/http/client/HttpClientUtils.java | 93 + .../svnfm/http/client/HttpRequestProcessor.java | 69 + .../vnfm/svnfm/nslcm/bo/NslcmGrantVnfRequest.java | 99 + .../vnfm/svnfm/nslcm/bo/NslcmGrantVnfResponse.java | 65 + .../nslcm/bo/NslcmNotifyLCMEventsRequest.java | 89 + .../nfvo/driver/vnfm/svnfm/nslcm/bo/VnfmInfo.java | 153 + .../vnfm/svnfm/nslcm/bo/entity/AccessInfo.java | 59 + .../svnfm/nslcm/bo/entity/AffectedVirtualLink.java | 69 + .../nslcm/bo/entity/AffectedVirtualStorage.java | 56 + .../vnfm/svnfm/nslcm/bo/entity/AffectedVnfc.java | 58 + .../vnfm/svnfm/nslcm/bo/entity/GrantInfo.java | 83 + .../vnfm/svnfm/nslcm/bo/entity/InterfaceInfo.java | 59 + .../svnfm/nslcm/bo/entity/ResourceDefinition.java | 60 + .../vnfm/svnfm/nslcm/bo/entity/ResourceHandle.java | 53 + .../vnfm/svnfm/nslcm/bo/entity/VimAssets.java | 35 + .../nslcm/bo/entity/VimComputeResourceFlavour.java | 58 + .../driver/vnfm/svnfm/nslcm/bo/entity/VimInfo.java | 81 + .../svnfm/nslcm/bo/entity/VimSoftwareImage.java | 59 + .../vnfm/svnfm/nslcm/bo/entity/VnfPackageInfo.java | 142 + .../vnfm/svnfm/nslcm/impl/NslcmMgmrImpl.java | 98 + .../driver/vnfm/svnfm/nslcm/inf/NslcmMgmrInf.java | 33 + .../vnfm/svnfm/vnfmdriver/bo/HealVnfRequest.java | 56 + .../vnfm/svnfm/vnfmdriver/bo/HealVnfResponse.java | 40 + .../svnfm/vnfmdriver/bo/InstantiateVnfRequest.java | 112 + .../vnfmdriver/bo/InstantiateVnfResponse.java | 43 + .../svnfm/vnfmdriver/bo/OperStatusVnfRequest.java | 22 + .../svnfm/vnfmdriver/bo/OperStatusVnfResponse.java | 51 + .../vnfm/svnfm/vnfmdriver/bo/QueryVnfRequest.java | 26 + .../vnfm/svnfm/vnfmdriver/bo/QueryVnfResponse.java | 34 + .../vnfm/svnfm/vnfmdriver/bo/ScaleVnfRequest.java | 86 + .../vnfm/svnfm/vnfmdriver/bo/ScaleVnfResponse.java | 39 + .../svnfm/vnfmdriver/bo/TerminateVnfRequest.java | 72 + .../svnfm/vnfmdriver/bo/TerminateVnfResponse.java | 31 + .../svnfm/vnfmdriver/bo/entity/AccessInfo.java | 57 + .../vnfmdriver/bo/entity/AdditionalParam.java | 21 + .../svnfm/vnfmdriver/bo/entity/Affectedvm.java | 58 + .../vnfmdriver/bo/entity/ExtVirtualLinkData.java | 57 + .../svnfm/vnfmdriver/bo/entity/InterfaceInfo.java | 58 + .../vnfmdriver/bo/entity/ResponseDescriptor.java | 104 + .../vnfmdriver/bo/entity/ResponseHistoryList.java | 91 + .../vnfm/svnfm/vnfmdriver/bo/entity/VimInfo.java | 80 + .../vnfm/svnfm/vnfmdriver/bo/entity/VnfInfo.java | 126 + .../controller/VnfmDriverController.java | 196 + .../svnfm/vnfmdriver/inf/VnfmDriverMgmrInf.java | 44 + .../vfcadaptor/src/main/resources/ProxoolConf.xml | 53 - .../src/main/resources/application.properties | 45 + .../src/main/resources/config.properties | 27 - .../resources/hdm/vnfm_job_execution_map.hbm.xml | 31 - .../resources/hdm/vnfm_resource_record.hbm.xml | 30 - .../vfcadaptor/src/main/resources/log4j.properties | 33 - .../WEB-INF/applicationContext-hibernate.xml | 43 - .../src/main/webapp/WEB-INF/mvc-servlet.xml | 100 - .../vfcadaptor/src/main/webapp/WEB-INF/web.xml | 74 +- .../http/client/HttpRequestProcessorTest.java | 125 - .../controller/BaseControllerTestCase.java | 151 - .../VnfmDriverAdaptorControllerTest.java | 99 - .../controller/VnfmDriverControllerTest.java | 131 - .../vfcadaptor/VfcadaptorApplicationTests.java | 32 + 242 files changed, 13707 insertions(+), 8476 deletions(-) create mode 100644 nokia/vnfmdriver/vfcadaptorservice/deployment/pom.xml create mode 100644 nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/README.txt create mode 100755 nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/bin/init_db.sh create mode 100755 nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/bin/shutdown.sh create mode 100755 nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/bin/startup.sh create mode 100644 nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/conf/catalina.policy create mode 100644 nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/conf/catalina.properties create mode 100644 nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/conf/context.xml create mode 100644 nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/conf/jaspic-providers.xml create mode 100644 nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/conf/jaspic-providers.xsd create mode 100644 nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/conf/logging.properties create mode 100644 nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/conf/server.xml create mode 100644 nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/conf/web.xml create mode 100644 nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/db/mysql/db-schema.sql delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/adaptor/Cbam2DriverResponseConverter.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/adaptor/Driver2CbamRequestConverter.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/adaptor/InstantiateVnfContinueRunnable.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/adaptor/TerminateVnfContinueRunnable.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/adaptor/VnfmDriverMgmrIml.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/beans/ResourceType.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/beans/VnfmJobExecutionInfo.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/beans/VnfmResourceInfo.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/catalog/bo/CatalogQueryVnfRequest.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/catalog/bo/CatalogQueryVnfResponse.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/catalog/bo/entity/ImageInfo.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/catalog/bo/entity/VnfInstanceInfo.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/catalog/impl/CatalogMgmrImpl.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/catalog/inf/CatalogMgmrInf.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMCreateVnfRequest.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMCreateVnfResponse.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMHealVnfRequest.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMHealVnfResponse.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMInstantiateVnfRequest.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMInstantiateVnfResponse.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMOperExecutVnfRequest.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMOperExecutVnfResponse.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMQueryVnfResponse.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMScaleVnfRequest.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMScaleVnfResponse.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMTerminateVnfRequest.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMTerminateVnfResponse.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/EndpointInfo.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/ExtManagedVirtualLinkData.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/ExtVirtualLinkData.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/Inputs.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/InstantiatedVnfInfo.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/NetworkAddress.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/OPENSTACK_V2_INFO.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/OPENSTACK_V3_INFO.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/OTHER_VIM_INFO.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/OpenStackAccessInfoV2.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/OpenStackAccessInfoV3.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/OperationExecution.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/ProblemDetails.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/VCloudAccessInfo.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/VMWARE_VCLOUD_INFO.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/VimComputeResourceFlavour.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/VimInfo.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/VimInfoType.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/VimSoftwareImage.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/VnfExtCpData.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/VnfInfo.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/VnfProperty.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/ZoneInfo.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/_links.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/controller/CbamController.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/impl/CbamMgmrImpl.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/inf/CbamMgmrInf.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/common/bo/AdaptorEnv.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/common/bo/KeyValuePair.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/constant/CommonConstants.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/constant/CommonEnum.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/exception/VnfmDriverException.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/http/client/HttpClientUtils.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/http/client/HttpRequestProcessor.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/NslcmGrantVnfRequest.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/NslcmGrantVnfResponse.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/NslcmNotifyLCMEventsRequest.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/VnfmInfo.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/AccessInfo.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/AffectedVirtualLink.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/AffectedVirtualStorage.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/AffectedVnfc.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/GrantInfo.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/InterfaceInfo.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/ResourceDefinition.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/ResourceHandle.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/VimAssets.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/VimComputeResourceFlavour.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/VimInfo.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/VimSoftwareImage.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/VnfPackageInfo.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/impl/NslcmMgmrImpl.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/inf/NslcmMgmrInf.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/HealVnfRequest.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/HealVnfResponse.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/InstantiateVnfRequest.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/InstantiateVnfResponse.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/OperStatusVnfRequest.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/OperStatusVnfResponse.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/QueryVnfRequest.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/QueryVnfResponse.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/ScaleVnfRequest.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/ScaleVnfResponse.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/TerminateVnfRequest.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/TerminateVnfResponse.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/entity/AccessInfo.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/entity/AdditionalParam.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/entity/Affectedvm.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/entity/ExtVirtualLinkData.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/entity/InterfaceInfo.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/entity/ResponseDescriptor.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/entity/ResponseHistoryList.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/entity/VimInfo.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/entity/VnfInfo.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/controller/VnfmDriverController.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/inf/VnfmDriverMgmrInf.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/ServletInitializer.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/VfcadaptorApplication.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/adaptor/Cbam2DriverResponseConverter.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/adaptor/Driver2CbamRequestConverter.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/adaptor/InstantiateVnfContinueRunnable.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/adaptor/TerminateVnfContinueRunnable.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/adaptor/VnfmDriverMgmrIml.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/catalog/bo/CatalogQueryVnfRequest.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/catalog/bo/CatalogQueryVnfResponse.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/catalog/bo/entity/ImageInfo.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/catalog/bo/entity/VnfInstanceInfo.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/catalog/impl/CatalogMgmrImpl.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/catalog/inf/CatalogMgmrInf.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMCreateVnfRequest.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMCreateVnfResponse.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMHealVnfRequest.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMHealVnfResponse.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMInstantiateVnfRequest.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMInstantiateVnfResponse.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMOperExecutVnfRequest.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMOperExecutVnfResponse.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMQueryOperExecutionResponse.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMQueryVnfResponse.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMScaleVnfRequest.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMScaleVnfResponse.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMTerminateVnfRequest.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMTerminateVnfResponse.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/EndpointInfo.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/ExtManagedVirtualLinkData.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/ExtVirtualLinkData.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/Inputs.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/InstantiatedVnfInfo.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/NetworkAddress.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/OPENSTACK_V2_INFO.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/OPENSTACK_V3_INFO.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/OTHER_VIM_INFO.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/OpenStackAccessInfoV2.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/OpenStackAccessInfoV3.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/OperationExecution.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/ProblemDetails.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/VCloudAccessInfo.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/VMWARE_VCLOUD_INFO.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/VimComputeResourceFlavour.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/VimInfo.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/VimInfoType.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/VimSoftwareImage.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/VnfExtCpData.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/VnfInfo.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/VnfProperty.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/ZoneInfo.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/_links.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/controller/CbamController.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/impl/CbamMgmrImpl.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/inf/CbamMgmrInf.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/common/bo/AdaptorEnv.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/common/bo/KeyValuePair.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/constant/CommonConstants.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/constant/CommonEnum.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/db/bean/ResourceType.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/db/bean/VnfmJobExecutionInfo.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/db/bean/VnfmResourceInfo.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/db/repository/VnfmJobExecutionRepository.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/db/repository/VnfmResourceRepository.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/exception/VnfmDriverException.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/http/client/HttpClientUtils.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/http/client/HttpRequestProcessor.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/NslcmGrantVnfRequest.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/NslcmGrantVnfResponse.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/NslcmNotifyLCMEventsRequest.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/VnfmInfo.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/AccessInfo.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/AffectedVirtualLink.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/AffectedVirtualStorage.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/AffectedVnfc.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/GrantInfo.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/InterfaceInfo.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/ResourceDefinition.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/ResourceHandle.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/VimAssets.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/VimComputeResourceFlavour.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/VimInfo.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/VimSoftwareImage.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/VnfPackageInfo.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/impl/NslcmMgmrImpl.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/inf/NslcmMgmrInf.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/HealVnfRequest.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/HealVnfResponse.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/InstantiateVnfRequest.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/InstantiateVnfResponse.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/OperStatusVnfRequest.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/OperStatusVnfResponse.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/QueryVnfRequest.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/QueryVnfResponse.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/ScaleVnfRequest.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/ScaleVnfResponse.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/TerminateVnfRequest.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/TerminateVnfResponse.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/entity/AccessInfo.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/entity/AdditionalParam.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/entity/Affectedvm.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/entity/ExtVirtualLinkData.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/entity/InterfaceInfo.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/entity/ResponseDescriptor.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/entity/ResponseHistoryList.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/entity/VimInfo.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/entity/VnfInfo.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/controller/VnfmDriverController.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/inf/VnfmDriverMgmrInf.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/resources/ProxoolConf.xml create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/resources/application.properties delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/resources/config.properties delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/resources/hdm/vnfm_job_execution_map.hbm.xml delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/resources/hdm/vnfm_resource_record.hbm.xml delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/resources/log4j.properties delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/webapp/WEB-INF/applicationContext-hibernate.xml delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/webapp/WEB-INF/mvc-servlet.xml delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/test/java/com/nokia/vfcadaptor/http/client/HttpRequestProcessorTest.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/test/java/com/nokia/vfcadaptor/vnfmdriver/controller/BaseControllerTestCase.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/test/java/com/nokia/vfcadaptor/vnfmdriver/controller/VnfmDriverAdaptorControllerTest.java delete mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/test/java/com/nokia/vfcadaptor/vnfmdriver/controller/VnfmDriverControllerTest.java create mode 100644 nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vfcadaptor/VfcadaptorApplicationTests.java diff --git a/nokia/vnfmdriver/pom.xml b/nokia/vnfmdriver/pom.xml index ec9dff06..d39781bb 100644 --- a/nokia/vnfmdriver/pom.xml +++ b/nokia/vnfmdriver/pom.xml @@ -29,7 +29,7 @@ vfc/nfvo/drivers/vnfm/svnfm/nokia/vnfmdriver nfvo vnfmdriver - vfcadaptor + vfcadaptorservice diff --git a/nokia/vnfmdriver/vfcadaptorservice/deployment/pom.xml b/nokia/vnfmdriver/vfcadaptorservice/deployment/pom.xml new file mode 100644 index 00000000..f0c4df7f --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/deployment/pom.xml @@ -0,0 +1,126 @@ + + + + 4.0.0 + + org.onap.vfc.nfvo.driver.vnfm.svnfm + vfcadaptor-service + 1.0.0-SNAPSHOT + + + vfcadaptor-deployment + pom + + vfc/nfvo/driver/vnfm/svnfm/nokia/vnfmdriver/vfcadaptorservice/deployment + svnfm vnfm driver deployment + + + UTF-8 + + + + + + org.codehaus.gmaven + gmaven-plugin + 1.5 + + + vfcadaptor package + package + + execute + + + + System.out.println("******** Going to make release zip ********") + + deployFolder = + "${project.build.directory}/deployoutput" + deployUnzip = + "${project.build.directory}/deployunzip" + outfileName = + "${package.name}-${project.version}.zip" + ant.delete(dir: "${deployFolder}") + ant.mkdir(dir: + "${deployFolder}") + + ant.delete(dir: "${deployUnzip}") + ant.mkdir(dir: "${deployUnzip}") + + ant.mkdir(dir: + "${deployUnzip}/webapps/") + ant.mkdir(dir: "${deployUnzip}/webapps/ROOT") + ant.mkdir(dir: + "${deployUnzip}/logs") + + System.out.println("******** start copying from ${basedir}/src/main/release to ${deployUnzip}. ************") + + ant.copy(todir: "${deployUnzip}") { + fileset(dir: "${basedir}/src/main/release"){ + exclude(name: "**/.gitignore") + } + + } + + System.out.println("******** start copying from ${project.build.directory}/../../vfcadaptor/target/${package.name}-${project.version} to ${deployUnzip}/webapps/ROOT. ************") + ant.copy(todir: + "${deployUnzip}/webapps/ROOT") { + fileset(dir: + "${project.build.directory}/../../vfcadaptor/target/${package.name}-${project.version}") + } + + System.out.println("******** start zipping from ${deployUnzip} to ${deployFolder}/${outfileName}. ************") + ant.zip(destfile: + "${deployFolder}/${outfileName}") { + fileset(dir: "${deployUnzip}") + } + System.out.println("******** completed. ************") + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.0.0 + + + attach-artifacts + package + + attach-artifact + + + + + ${project.build.directory}/deployoutput/${package.name}-${project.version}.zip + zip + + + + + + + + + + + + diff --git a/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/README.txt b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/README.txt new file mode 100644 index 00000000..fa97d7e6 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/README.txt @@ -0,0 +1,58 @@ +Introduction: +============= + This document provides the required steps for installation + and configuration this service. + +Installation steps: +==================== + Install following software: + - Java 1.8 or lattest + - MySql Server 5.7 or lattest. + - Apache Tomcat Server 8.0 or lattest + + Set the following environment variables: + - JAVA_HOME: Set to JAVA JDK installed location + - CATALINIA_HOME: Set to Tomcat installed location + - CATALINIA_BASE: Set to the location, where this + service installer is unzipped, its optional + - PATH: Update it with the location of command 'mysql' + + - In command console, cd to 'bin' directory under the location, + where this service installer is unzipped and + run ./init_db.sh + CAUTION: Existing vnfm_db will be cleaned before + initializing the schema, so please take a back-up of it + before executing it next time. + +Configuration steps: +==================== + - Update the db credetials in 'application.properties' under webapps directory. + - Update the MSB address in 'application.properties' under webapps directory. + - Update the VNFM address in 'application.properties' under webapps directory. + - Update the Catalog address in 'application.properties' under webapps directory. + - Update the NSLCM address in 'application.properties' under webapps directory. + + +How to run? +=========== + - In command console, cd to 'bin' directory under the location, + where this service installer is unzipped and + run ./startup.sh + NOTE: It starts the tomcat at predefined http port. To change + default port, update the port in tomcat configuration file + 'conf/server.xml' + - Verify that 'Tomcat started.' is reported on the console. + - Once service is started, please verify below details: + - from MSB service, verify that "nokiavnfm" is reported from GET request on "/openoapi/microservices/v1/services" + - from this service, run one of the supported REST API mentioned in open-o NFVO wiki and verify that the + expected response is returned. +How to stop? +============= + - In command console, cd to 'bin' directory under the location, + where this service installer is unzipped and + run ./shutdown.sh + +Update: +========= +The latest information are available through the OPEN-O release notes at +https://wiki.open-o.org/view/OPEN-O_Sun_Release_Notes diff --git a/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/bin/init_db.sh b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/bin/init_db.sh new file mode 100755 index 00000000..63e7800d --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/bin/init_db.sh @@ -0,0 +1,61 @@ +#******************************************************************************* +# Copyright 2016, Nokia Corporation. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#******************************************************************************* +#!/bin/bash + +cd .. + +if [ -z "$1" ] +then + echo "usage: init_db.sh " + exit 1 +fi + +if [ -z "$2" ] +then + echo "usage: init_db.sh " + exit 1 +fi + +if [ -z "$3" ] +then + echo "usage: init_db.sh " + exit 1 +fi + +if [ -z "$4" ] +then + echo "usage: init_db.sh " + exit 1 +fi + +echo +echo "DB-INIT [vnfmdb] : START" + +mysql -u$1 -p$2 -h$3 -P$4 <$(cd `dirname $0`; pwd)/db/mysql/db-schema.sql + +if [ $? != 0 ] ; then + echo "DB-INIT [vnfm_db] : FAILED !" + exit 1 +fi + +echo "DB-INIT [vnfmdb] : PASSED" +echo +echo "*************************************************************" +echo "CAUTION: Existing vnfmdb will be cleaned before" +echo "initializing the schema, so please take a back-up of it" +echo "before executing it next time." +echo "*************************************************************" +exit 0 \ No newline at end of file diff --git a/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/bin/shutdown.sh b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/bin/shutdown.sh new file mode 100755 index 00000000..cd0c97dc --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/bin/shutdown.sh @@ -0,0 +1,60 @@ +#!/bin/sh + +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# ----------------------------------------------------------------------------- +# Stop script for the CATALINA Server +# ----------------------------------------------------------------------------- + +# Better OS/400 detection: see Bugzilla 31132 +os400=false +case "`uname`" in +OS400*) os400=true;; +esac + +# resolve links - $0 may be a softlink +PRG="$0" + +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`/"$link" + fi +done + +PRGDIR=`dirname "$PRG"` +EXECUTABLE=catalina.sh + +# Check that target executable exists +if $os400; then + # -x will Only work on the os400 if the files are: + # 1. owned by the user + # 2. owned by the PRIMARY group of the user + # this will not work if the user belongs in secondary groups + eval +else + if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then + echo "Cannot find $PRGDIR/$EXECUTABLE" + echo "The file is absent or does not have execute permission" + echo "This file is needed to run this program" + exit 1 + fi +fi + +exec "$PRGDIR"/"$EXECUTABLE" stop "$@" diff --git a/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/bin/startup.sh b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/bin/startup.sh new file mode 100755 index 00000000..7b102875 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/bin/startup.sh @@ -0,0 +1,60 @@ +#!/bin/sh + +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# ----------------------------------------------------------------------------- +# Start Script for the CATALINA Server +# ----------------------------------------------------------------------------- + +# Better OS/400 detection: see Bugzilla 31132 +os400=false +case "`uname`" in +OS400*) os400=true;; +esac + +# resolve links - $0 may be a softlink +PRG="$0" + +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`/"$link" + fi +done + +PRGDIR=`dirname "$PRG"` +EXECUTABLE=catalina.sh + +# Check that target executable exists +if $os400; then + # -x will Only work on the os400 if the files are: + # 1. owned by the user + # 2. owned by the PRIMARY group of the user + # this will not work if the user belongs in secondary groups + eval +else + if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then + echo "Cannot find $PRGDIR/$EXECUTABLE" + echo "The file is absent or does not have execute permission" + echo "This file is needed to run this program" + exit 1 + fi +fi + +exec "$PRGDIR"/"$EXECUTABLE" start "$@" diff --git a/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/conf/catalina.policy b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/conf/catalina.policy new file mode 100644 index 00000000..a48a027f --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/conf/catalina.policy @@ -0,0 +1,250 @@ +// Licensed to the Apache Software Foundation (ASF) under one or more +// contributor license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright ownership. +// The ASF licenses this file to You under the Apache License, Version 2.0 +// (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// ============================================================================ +// catalina.policy - Security Policy Permissions for Tomcat +// +// This file contains a default set of security policies to be enforced (by the +// JVM) when Catalina is executed with the "-security" option. In addition +// to the permissions granted here, the following additional permissions are +// granted to each web application: +// +// * Read access to the web application's document root directory +// * Read, write and delete access to the web application's working directory +// ============================================================================ + + +// ========== SYSTEM CODE PERMISSIONS ========================================= + + +// These permissions apply to javac +grant codeBase "file:${java.home}/lib/-" { + permission java.security.AllPermission; +}; + +// These permissions apply to all shared system extensions +grant codeBase "file:${java.home}/jre/lib/ext/-" { + permission java.security.AllPermission; +}; + +// These permissions apply to javac when ${java.home] points at $JAVA_HOME/jre +grant codeBase "file:${java.home}/../lib/-" { + permission java.security.AllPermission; +}; + +// These permissions apply to all shared system extensions when +// ${java.home} points at $JAVA_HOME/jre +grant codeBase "file:${java.home}/lib/ext/-" { + permission java.security.AllPermission; +}; + + +// ========== CATALINA CODE PERMISSIONS ======================================= + + +// These permissions apply to the daemon code +grant codeBase "file:${catalina.home}/bin/commons-daemon.jar" { + permission java.security.AllPermission; +}; + +// These permissions apply to the logging API +// Note: If tomcat-juli.jar is in ${catalina.base} and not in ${catalina.home}, +// update this section accordingly. +// grant codeBase "file:${catalina.base}/bin/tomcat-juli.jar" {..} +grant codeBase "file:${catalina.home}/bin/tomcat-juli.jar" { + permission java.io.FilePermission + "${java.home}${file.separator}lib${file.separator}logging.properties", "read"; + + permission java.io.FilePermission + "${catalina.base}${file.separator}conf${file.separator}logging.properties", "read"; + permission java.io.FilePermission + "${catalina.base}${file.separator}logs", "read, write"; + permission java.io.FilePermission + "${catalina.base}${file.separator}logs${file.separator}*", "read, write"; + + permission java.lang.RuntimePermission "shutdownHooks"; + permission java.lang.RuntimePermission "getClassLoader"; + permission java.lang.RuntimePermission "setContextClassLoader"; + + permission java.lang.management.ManagementPermission "monitor"; + + permission java.util.logging.LoggingPermission "control"; + + permission java.util.PropertyPermission "java.util.logging.config.class", "read"; + permission java.util.PropertyPermission "java.util.logging.config.file", "read"; + permission java.util.PropertyPermission "org.apache.juli.AsyncLoggerPollInterval", "read"; + permission java.util.PropertyPermission "org.apache.juli.AsyncMaxRecordCount", "read"; + permission java.util.PropertyPermission "org.apache.juli.AsyncOverflowDropType", "read"; + permission java.util.PropertyPermission "org.apache.juli.ClassLoaderLogManager.debug", "read"; + permission java.util.PropertyPermission "catalina.base", "read"; + + // Note: To enable per context logging configuration, permit read access to + // the appropriate file. Be sure that the logging configuration is + // secure before enabling such access. + // E.g. for the examples web application (uncomment and unwrap + // the following to be on a single line): + // permission java.io.FilePermission "${catalina.base}${file.separator} + // webapps${file.separator}examples${file.separator}WEB-INF + // ${file.separator}classes${file.separator}logging.properties", "read"; +}; + +// These permissions apply to the server startup code +grant codeBase "file:${catalina.home}/bin/bootstrap.jar" { + permission java.security.AllPermission; +}; + +// These permissions apply to the servlet API classes +// and those that are shared across all class loaders +// located in the "lib" directory +grant codeBase "file:${catalina.home}/lib/-" { + permission java.security.AllPermission; +}; + + +// If using a per instance lib directory, i.e. ${catalina.base}/lib, +// then the following permission will need to be uncommented +// grant codeBase "file:${catalina.base}/lib/-" { +// permission java.security.AllPermission; +// }; + + +// ========== WEB APPLICATION PERMISSIONS ===================================== + + +// These permissions are granted by default to all web applications +// In addition, a web application will be given a read FilePermission +// for all files and directories in its document root. +grant { + // Required for JNDI lookup of named JDBC DataSource's and + // javamail named MimePart DataSource used to send mail + permission java.util.PropertyPermission "java.home", "read"; + permission java.util.PropertyPermission "java.naming.*", "read"; + permission java.util.PropertyPermission "javax.sql.*", "read"; + + // OS Specific properties to allow read access + permission java.util.PropertyPermission "os.name", "read"; + permission java.util.PropertyPermission "os.version", "read"; + permission java.util.PropertyPermission "os.arch", "read"; + permission java.util.PropertyPermission "file.separator", "read"; + permission java.util.PropertyPermission "path.separator", "read"; + permission java.util.PropertyPermission "line.separator", "read"; + + // JVM properties to allow read access + permission java.util.PropertyPermission "java.version", "read"; + permission java.util.PropertyPermission "java.vendor", "read"; + permission java.util.PropertyPermission "java.vendor.url", "read"; + permission java.util.PropertyPermission "java.class.version", "read"; + permission java.util.PropertyPermission "java.specification.version", "read"; + permission java.util.PropertyPermission "java.specification.vendor", "read"; + permission java.util.PropertyPermission "java.specification.name", "read"; + + permission java.util.PropertyPermission "java.vm.specification.version", "read"; + permission java.util.PropertyPermission "java.vm.specification.vendor", "read"; + permission java.util.PropertyPermission "java.vm.specification.name", "read"; + permission java.util.PropertyPermission "java.vm.version", "read"; + permission java.util.PropertyPermission "java.vm.vendor", "read"; + permission java.util.PropertyPermission "java.vm.name", "read"; + + // Required for OpenJMX + permission java.lang.RuntimePermission "getAttribute"; + + // Allow read of JAXP compliant XML parser debug + permission java.util.PropertyPermission "jaxp.debug", "read"; + + // All JSPs need to be able to read this package + permission java.lang.RuntimePermission "accessClassInPackage.org.apache.tomcat"; + + // Precompiled JSPs need access to these packages. + permission java.lang.RuntimePermission "accessClassInPackage.org.apache.jasper.el"; + permission java.lang.RuntimePermission "accessClassInPackage.org.apache.jasper.runtime"; + permission java.lang.RuntimePermission + "accessClassInPackage.org.apache.jasper.runtime.*"; + + // Precompiled JSPs need access to these system properties. + permission java.util.PropertyPermission + "org.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER", "read"; + permission java.util.PropertyPermission + "org.apache.el.parser.COERCE_TO_ZERO", "read"; + + // The cookie code needs these. + permission java.util.PropertyPermission + "org.apache.catalina.STRICT_SERVLET_COMPLIANCE", "read"; + permission java.util.PropertyPermission + "org.apache.tomcat.util.http.ServerCookie.STRICT_NAMING", "read"; + permission java.util.PropertyPermission + "org.apache.tomcat.util.http.ServerCookie.FWD_SLASH_IS_SEPARATOR", "read"; + + // Applications using Comet need to be able to access this package + permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.comet"; + + // Applications using WebSocket need to be able to access these packages + permission java.lang.RuntimePermission "accessClassInPackage.org.apache.tomcat.websocket"; + permission java.lang.RuntimePermission "accessClassInPackage.org.apache.tomcat.websocket.server"; +}; + + +// The Manager application needs access to the following packages to support the +// session display functionality. These settings support the following +// configurations: +// - default CATALINA_HOME == CATALINA_BASE +// - CATALINA_HOME != CATALINA_BASE, per instance Manager in CATALINA_BASE +// - CATALINA_HOME != CATALINA_BASE, shared Manager in CATALINA_HOME +grant codeBase "file:${catalina.base}/webapps/manager/-" { + permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina"; + permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.ha.session"; + permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.manager"; + permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.manager.util"; + permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.util"; +}; +grant codeBase "file:${catalina.home}/webapps/manager/-" { + permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina"; + permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.ha.session"; + permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.manager"; + permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.manager.util"; + permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.util"; +}; + +// You can assign additional permissions to particular web applications by +// adding additional "grant" entries here, based on the code base for that +// application, /WEB-INF/classes/, or /WEB-INF/lib/ jar files. +// +// Different permissions can be granted to JSP pages, classes loaded from +// the /WEB-INF/classes/ directory, all jar files in the /WEB-INF/lib/ +// directory, or even to individual jar files in the /WEB-INF/lib/ directory. +// +// For instance, assume that the standard "examples" application +// included a JDBC driver that needed to establish a network connection to the +// corresponding database and used the scrape taglib to get the weather from +// the NOAA web server. You might create a "grant" entries like this: +// +// The permissions granted to the context root directory apply to JSP pages. +// grant codeBase "file:${catalina.base}/webapps/examples/-" { +// permission java.net.SocketPermission "dbhost.mycompany.com:5432", "connect"; +// permission java.net.SocketPermission "*.noaa.gov:80", "connect"; +// }; +// +// The permissions granted to the context WEB-INF/classes directory +// grant codeBase "file:${catalina.base}/webapps/examples/WEB-INF/classes/-" { +// }; +// +// The permission granted to your JDBC driver +// grant codeBase "jar:file:${catalina.base}/webapps/examples/WEB-INF/lib/driver.jar!/-" { +// permission java.net.SocketPermission "dbhost.mycompany.com:5432", "connect"; +// }; +// The permission granted to the scrape taglib +// grant codeBase "jar:file:${catalina.base}/webapps/examples/WEB-INF/lib/scrape.jar!/-" { +// permission java.net.SocketPermission "*.noaa.gov:80", "connect"; +// }; + diff --git a/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/conf/catalina.properties b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/conf/catalina.properties new file mode 100644 index 00000000..830b29a3 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/conf/catalina.properties @@ -0,0 +1,146 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# +# List of comma-separated packages that start with or equal this string +# will cause a security exception to be thrown when +# passed to checkPackageAccess unless the +# corresponding RuntimePermission ("accessClassInPackage."+package) has +# been granted. +package.access=sun.,org.apache.catalina.,org.apache.coyote.,org.apache.jasper.,org.apache.tomcat. +# +# List of comma-separated packages that start with or equal this string +# will cause a security exception to be thrown when +# passed to checkPackageDefinition unless the +# corresponding RuntimePermission ("defineClassInPackage."+package) has +# been granted. +# +# by default, no packages are restricted for definition, and none of +# the class loaders supplied with the JDK call checkPackageDefinition. +# +package.definition=sun.,java.,org.apache.catalina.,org.apache.coyote.,\ +org.apache.jasper.,org.apache.naming.,org.apache.tomcat. + +# +# +# List of comma-separated paths defining the contents of the "common" +# classloader. Prefixes should be used to define what is the repository type. +# Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute. +# If left as blank,the JVM system loader will be used as Catalina's "common" +# loader. +# Examples: +# "foo": Add this folder as a class repository +# "foo/*.jar": Add all the JARs of the specified folder as class +# repositories +# "foo/bar.jar": Add bar.jar as a class repository +# +# Note: Values are enclosed in double quotes ("...") in case either the +# ${catalina.base} path or the ${catalina.home} path contains a comma. +# Because double quotes are used for quoting, the double quote character +# may not appear in a path. +common.loader="${catalina.base}/lib","${catalina.base}/lib/*.jar","${catalina.home}/lib","${catalina.home}/lib/*.jar" + +# +# List of comma-separated paths defining the contents of the "server" +# classloader. Prefixes should be used to define what is the repository type. +# Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute. +# If left as blank, the "common" loader will be used as Catalina's "server" +# loader. +# Examples: +# "foo": Add this folder as a class repository +# "foo/*.jar": Add all the JARs of the specified folder as class +# repositories +# "foo/bar.jar": Add bar.jar as a class repository +# +# Note: Values may be enclosed in double quotes ("...") in case either the +# ${catalina.base} path or the ${catalina.home} path contains a comma. +# Because double quotes are used for quoting, the double quote character +# may not appear in a path. +server.loader= + +# +# List of comma-separated paths defining the contents of the "shared" +# classloader. Prefixes should be used to define what is the repository type. +# Path may be relative to the CATALINA_BASE path or absolute. If left as blank, +# the "common" loader will be used as Catalina's "shared" loader. +# Examples: +# "foo": Add this folder as a class repository +# "foo/*.jar": Add all the JARs of the specified folder as class +# repositories +# "foo/bar.jar": Add bar.jar as a class repository +# Please note that for single jars, e.g. bar.jar, you need the URL form +# starting with file:. +# +# Note: Values may be enclosed in double quotes ("...") in case either the +# ${catalina.base} path or the ${catalina.home} path contains a comma. +# Because double quotes are used for quoting, the double quote character +# may not appear in a path. +shared.loader= + +# Default list of JAR files that should not be scanned using the JarScanner +# functionality. This is typically used to scan JARs for configuration +# information. JARs that do not contain such information may be excluded from +# the scan to speed up the scanning process. This is the default list. JARs on +# this list are excluded from all scans. The list must be a comma separated list +# of JAR file names. +# The list of JARs to skip may be over-ridden at a Context level for individual +# scan types by configuring a JarScanner with a nested JarScanFilter. +# The JARs listed below include: +# - Tomcat Bootstrap JARs +# - Tomcat API JARs +# - Catalina JARs +# - Jasper JARs +# - Tomcat JARs +# - Common non-Tomcat JARs +# - Test JARs (JUnit, Cobertura and dependencies) +tomcat.util.scan.StandardJarScanFilter.jarsToSkip=\ +bootstrap.jar,commons-daemon.jar,tomcat-juli.jar,\ +annotations-api.jar,el-api.jar,jsp-api.jar,servlet-api.jar,websocket-api.jar,\ +catalina.jar,catalina-ant.jar,catalina-ha.jar,catalina-storeconfig.jar,\ +catalina-tribes.jar,\ +jasper.jar,jasper-el.jar,ecj-*.jar,\ +tomcat-api.jar,tomcat-util.jar,tomcat-util-scan.jar,tomcat-coyote.jar,\ +tomcat-dbcp.jar,tomcat-jni.jar,tomcat-websocket.jar,\ +tomcat-i18n-en.jar,tomcat-i18n-es.jar,tomcat-i18n-fr.jar,tomcat-i18n-ja.jar,\ +tomcat-juli-adapters.jar,catalina-jmx-remote.jar,catalina-ws.jar,\ +tomcat-jdbc.jar,\ +tools.jar,\ +commons-beanutils*.jar,commons-codec*.jar,commons-collections*.jar,\ +commons-dbcp*.jar,commons-digester*.jar,commons-fileupload*.jar,\ +commons-httpclient*.jar,commons-io*.jar,commons-lang*.jar,commons-logging*.jar,\ +commons-math*.jar,commons-pool*.jar,\ +jstl.jar,taglibs-standard-spec-*.jar,\ +geronimo-spec-jaxrpc*.jar,wsdl4j*.jar,\ +ant.jar,ant-junit*.jar,aspectj*.jar,jmx.jar,h2*.jar,hibernate*.jar,httpclient*.jar,\ +jmx-tools.jar,jta*.jar,log4j*.jar,mail*.jar,slf4j*.jar,\ +xercesImpl.jar,xmlParserAPIs.jar,xml-apis.jar,\ +junit.jar,junit-*.jar,ant-launcher.jar,\ +cobertura-*.jar,asm-*.jar,dom4j-*.jar,icu4j-*.jar,jaxen-*.jar,jdom-*.jar,\ +jetty-*.jar,oro-*.jar,servlet-api-*.jar,tagsoup-*.jar,xmlParserAPIs-*.jar,\ +xom-*.jar + +# Default list of JAR files that should be scanned that overrides the default +# jarsToSkip list above. This is typically used to include a specific JAR that +# has been excluded by a broad file name pattern in the jarsToSkip list. +# The list of JARs to scan may be over-ridden at a Context level for individual +# scan types by configuring a JarScanner with a nested JarScanFilter. +tomcat.util.scan.StandardJarScanFilter.jarsToScan=\ +log4j-core*.jar,log4j-taglib*.jar,log4javascript*.jar,slf4j-taglib*.jar + +# String cache configuration. +tomcat.util.buf.StringCache.byte.enabled=true +#tomcat.util.buf.StringCache.char.enabled=true +#tomcat.util.buf.StringCache.trainThreshold=500000 +#tomcat.util.buf.StringCache.cacheSize=5000 diff --git a/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/conf/context.xml b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/conf/context.xml new file mode 100644 index 00000000..98727cb7 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/conf/context.xml @@ -0,0 +1,36 @@ + + + + + + + + WEB-INF/web.xml + ${catalina.base}/conf/web.xml + + + + + + + diff --git a/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/conf/jaspic-providers.xml b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/conf/jaspic-providers.xml new file mode 100644 index 00000000..cdebf872 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/conf/jaspic-providers.xml @@ -0,0 +1,23 @@ + + + + + diff --git a/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/conf/jaspic-providers.xsd b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/conf/jaspic-providers.xsd new file mode 100644 index 00000000..73a87aa2 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/conf/jaspic-providers.xsd @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/conf/logging.properties b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/conf/logging.properties new file mode 100644 index 00000000..cb5ed661 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/conf/logging.properties @@ -0,0 +1,64 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +handlers = 1catalina.org.apache.juli.AsyncFileHandler, 2localhost.org.apache.juli.AsyncFileHandler, 3manager.org.apache.juli.AsyncFileHandler, 4host-manager.org.apache.juli.AsyncFileHandler, java.util.logging.ConsoleHandler + +.handlers = 1catalina.org.apache.juli.AsyncFileHandler, java.util.logging.ConsoleHandler + +############################################################ +# Handler specific properties. +# Describes specific configuration info for Handlers. +############################################################ + +1catalina.org.apache.juli.AsyncFileHandler.level = FINE +1catalina.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs +1catalina.org.apache.juli.AsyncFileHandler.prefix = catalina. + +2localhost.org.apache.juli.AsyncFileHandler.level = FINE +2localhost.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs +2localhost.org.apache.juli.AsyncFileHandler.prefix = localhost. + +3manager.org.apache.juli.AsyncFileHandler.level = FINE +3manager.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs +3manager.org.apache.juli.AsyncFileHandler.prefix = manager. + +4host-manager.org.apache.juli.AsyncFileHandler.level = FINE +4host-manager.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs +4host-manager.org.apache.juli.AsyncFileHandler.prefix = host-manager. + +java.util.logging.ConsoleHandler.level = FINE +java.util.logging.ConsoleHandler.formatter = org.apache.juli.OneLineFormatter + + +############################################################ +# Facility specific properties. +# Provides extra control for each logger. +############################################################ + +org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO +org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 2localhost.org.apache.juli.AsyncFileHandler + +org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level = INFO +org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers = 3manager.org.apache.juli.AsyncFileHandler + +org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].level = INFO +org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].handlers = 4host-manager.org.apache.juli.AsyncFileHandler + +# For example, set the org.apache.catalina.util.LifecycleBase logger to log +# each component that extends LifecycleBase changing state: +#org.apache.catalina.util.LifecycleBase.level = FINE + +# To see debug messages in TldLocationsCache, uncomment the following line: +#org.apache.jasper.compiler.TldLocationsCache.level = FINE diff --git a/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/conf/server.xml b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/conf/server.xml new file mode 100644 index 00000000..7b93b3b0 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/conf/server.xml @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/conf/web.xml b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/conf/web.xml new file mode 100644 index 00000000..c98ff28c --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/conf/web.xml @@ -0,0 +1,4692 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + default + org.apache.catalina.servlets.DefaultServlet + + debug + 0 + + + listings + false + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + jsp + org.apache.jasper.servlet.JspServlet + + fork + false + + + xpoweredBy + false + + 3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + default + / + + + + + jsp + *.jsp + *.jspx + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 30 + + + + + + + + + + + + + 123 + application/vnd.lotus-1-2-3 + + + 3dml + text/vnd.in3d.3dml + + + 3ds + image/x-3ds + + + 3g2 + video/3gpp2 + + + 3gp + video/3gpp + + + 7z + application/x-7z-compressed + + + aab + application/x-authorware-bin + + + aac + audio/x-aac + + + aam + application/x-authorware-map + + + aas + application/x-authorware-seg + + + abs + audio/x-mpeg + + + abw + application/x-abiword + + + ac + application/pkix-attr-cert + + + acc + application/vnd.americandynamics.acc + + + ace + application/x-ace-compressed + + + acu + application/vnd.acucobol + + + acutc + application/vnd.acucorp + + + adp + audio/adpcm + + + aep + application/vnd.audiograph + + + afm + application/x-font-type1 + + + afp + application/vnd.ibm.modcap + + + ahead + application/vnd.ahead.space + + + ai + application/postscript + + + aif + audio/x-aiff + + + aifc + audio/x-aiff + + + aiff + audio/x-aiff + + + aim + application/x-aim + + + air + application/vnd.adobe.air-application-installer-package+zip + + + ait + application/vnd.dvb.ait + + + ami + application/vnd.amiga.ami + + + anx + application/annodex + + + apk + application/vnd.android.package-archive + + + appcache + text/cache-manifest + + + application + application/x-ms-application + + + apr + application/vnd.lotus-approach + + + arc + application/x-freearc + + + art + image/x-jg + + + asc + application/pgp-signature + + + asf + video/x-ms-asf + + + asm + text/x-asm + + + aso + application/vnd.accpac.simply.aso + + + asx + video/x-ms-asf + + + atc + application/vnd.acucorp + + + atom + application/atom+xml + + + atomcat + application/atomcat+xml + + + atomsvc + application/atomsvc+xml + + + atx + application/vnd.antix.game-component + + + au + audio/basic + + + avi + video/x-msvideo + + + avx + video/x-rad-screenplay + + + aw + application/applixware + + + axa + audio/annodex + + + axv + video/annodex + + + azf + application/vnd.airzip.filesecure.azf + + + azs + application/vnd.airzip.filesecure.azs + + + azw + application/vnd.amazon.ebook + + + bat + application/x-msdownload + + + bcpio + application/x-bcpio + + + bdf + application/x-font-bdf + + + bdm + application/vnd.syncml.dm+wbxml + + + bed + application/vnd.realvnc.bed + + + bh2 + application/vnd.fujitsu.oasysprs + + + bin + application/octet-stream + + + blb + application/x-blorb + + + blorb + application/x-blorb + + + bmi + application/vnd.bmi + + + bmp + image/bmp + + + body + text/html + + + book + application/vnd.framemaker + + + box + application/vnd.previewsystems.box + + + boz + application/x-bzip2 + + + bpk + application/octet-stream + + + btif + image/prs.btif + + + bz + application/x-bzip + + + bz2 + application/x-bzip2 + + + c + text/x-c + + + c11amc + application/vnd.cluetrust.cartomobile-config + + + c11amz + application/vnd.cluetrust.cartomobile-config-pkg + + + c4d + application/vnd.clonk.c4group + + + c4f + application/vnd.clonk.c4group + + + c4g + application/vnd.clonk.c4group + + + c4p + application/vnd.clonk.c4group + + + c4u + application/vnd.clonk.c4group + + + cab + application/vnd.ms-cab-compressed + + + caf + audio/x-caf + + + cap + application/vnd.tcpdump.pcap + + + car + application/vnd.curl.car + + + cat + application/vnd.ms-pki.seccat + + + cb7 + application/x-cbr + + + cba + application/x-cbr + + + cbr + application/x-cbr + + + cbt + application/x-cbr + + + cbz + application/x-cbr + + + cc + text/x-c + + + cct + application/x-director + + + ccxml + application/ccxml+xml + + + cdbcmsg + application/vnd.contact.cmsg + + + cdf + application/x-cdf + + + cdkey + application/vnd.mediastation.cdkey + + + cdmia + application/cdmi-capability + + + cdmic + application/cdmi-container + + + cdmid + application/cdmi-domain + + + cdmio + application/cdmi-object + + + cdmiq + application/cdmi-queue + + + cdx + chemical/x-cdx + + + cdxml + application/vnd.chemdraw+xml + + + cdy + application/vnd.cinderella + + + cer + application/pkix-cert + + + cfs + application/x-cfs-compressed + + + cgm + image/cgm + + + chat + application/x-chat + + + chm + application/vnd.ms-htmlhelp + + + chrt + application/vnd.kde.kchart + + + cif + chemical/x-cif + + + cii + application/vnd.anser-web-certificate-issue-initiation + + + cil + application/vnd.ms-artgalry + + + cla + application/vnd.claymore + + + class + application/java + + + clkk + application/vnd.crick.clicker.keyboard + + + clkp + application/vnd.crick.clicker.palette + + + clkt + application/vnd.crick.clicker.template + + + clkw + application/vnd.crick.clicker.wordbank + + + clkx + application/vnd.crick.clicker + + + clp + application/x-msclip + + + cmc + application/vnd.cosmocaller + + + cmdf + chemical/x-cmdf + + + cml + chemical/x-cml + + + cmp + application/vnd.yellowriver-custom-menu + + + cmx + image/x-cmx + + + cod + application/vnd.rim.cod + + + com + application/x-msdownload + + + conf + text/plain + + + cpio + application/x-cpio + + + cpp + text/x-c + + + cpt + application/mac-compactpro + + + crd + application/x-mscardfile + + + crl + application/pkix-crl + + + crt + application/x-x509-ca-cert + + + cryptonote + application/vnd.rig.cryptonote + + + csh + application/x-csh + + + csml + chemical/x-csml + + + csp + application/vnd.commonspace + + + css + text/css + + + cst + application/x-director + + + csv + text/csv + + + cu + application/cu-seeme + + + curl + text/vnd.curl + + + cww + application/prs.cww + + + cxt + application/x-director + + + cxx + text/x-c + + + dae + model/vnd.collada+xml + + + daf + application/vnd.mobius.daf + + + dart + application/vnd.dart + + + dataless + application/vnd.fdsn.seed + + + davmount + application/davmount+xml + + + dbk + application/docbook+xml + + + dcr + application/x-director + + + dcurl + text/vnd.curl.dcurl + + + dd2 + application/vnd.oma.dd2+xml + + + ddd + application/vnd.fujixerox.ddd + + + deb + application/x-debian-package + + + def + text/plain + + + deploy + application/octet-stream + + + der + application/x-x509-ca-cert + + + dfac + application/vnd.dreamfactory + + + dgc + application/x-dgc-compressed + + + dib + image/bmp + + + dic + text/x-c + + + dir + application/x-director + + + dis + application/vnd.mobius.dis + + + dist + application/octet-stream + + + distz + application/octet-stream + + + djv + image/vnd.djvu + + + djvu + image/vnd.djvu + + + dll + application/x-msdownload + + + dmg + application/x-apple-diskimage + + + dmp + application/vnd.tcpdump.pcap + + + dms + application/octet-stream + + + dna + application/vnd.dna + + + doc + application/msword + + + docm + application/vnd.ms-word.document.macroenabled.12 + + + docx + application/vnd.openxmlformats-officedocument.wordprocessingml.document + + + dot + application/msword + + + dotm + application/vnd.ms-word.template.macroenabled.12 + + + dotx + application/vnd.openxmlformats-officedocument.wordprocessingml.template + + + dp + application/vnd.osgi.dp + + + dpg + application/vnd.dpgraph + + + dra + audio/vnd.dra + + + dsc + text/prs.lines.tag + + + dssc + application/dssc+der + + + dtb + application/x-dtbook+xml + + + dtd + application/xml-dtd + + + dts + audio/vnd.dts + + + dtshd + audio/vnd.dts.hd + + + dump + application/octet-stream + + + dv + video/x-dv + + + dvb + video/vnd.dvb.file + + + dvi + application/x-dvi + + + dwf + model/vnd.dwf + + + dwg + image/vnd.dwg + + + dxf + image/vnd.dxf + + + dxp + application/vnd.spotfire.dxp + + + dxr + application/x-director + + + ecelp4800 + audio/vnd.nuera.ecelp4800 + + + ecelp7470 + audio/vnd.nuera.ecelp7470 + + + ecelp9600 + audio/vnd.nuera.ecelp9600 + + + ecma + application/ecmascript + + + edm + application/vnd.novadigm.edm + + + edx + application/vnd.novadigm.edx + + + efif + application/vnd.picsel + + + ei6 + application/vnd.pg.osasli + + + elc + application/octet-stream + + + emf + application/x-msmetafile + + + eml + message/rfc822 + + + emma + application/emma+xml + + + emz + application/x-msmetafile + + + eol + audio/vnd.digital-winds + + + eot + application/vnd.ms-fontobject + + + eps + application/postscript + + + epub + application/epub+zip + + + es3 + application/vnd.eszigno3+xml + + + esa + application/vnd.osgi.subsystem + + + esf + application/vnd.epson.esf + + + et3 + application/vnd.eszigno3+xml + + + etx + text/x-setext + + + eva + application/x-eva + + + evy + application/x-envoy + + + exe + application/octet-stream + + + exi + application/exi + + + ext + application/vnd.novadigm.ext + + + ez + application/andrew-inset + + + ez2 + application/vnd.ezpix-album + + + ez3 + application/vnd.ezpix-package + + + f + text/x-fortran + + + f4v + video/x-f4v + + + f77 + text/x-fortran + + + f90 + text/x-fortran + + + fbs + image/vnd.fastbidsheet + + + fcdt + application/vnd.adobe.formscentral.fcdt + + + fcs + application/vnd.isac.fcs + + + fdf + application/vnd.fdf + + + fe_launch + application/vnd.denovo.fcselayout-link + + + fg5 + application/vnd.fujitsu.oasysgp + + + fgd + application/x-director + + + fh + image/x-freehand + + + fh4 + image/x-freehand + + + fh5 + image/x-freehand + + + fh7 + image/x-freehand + + + fhc + image/x-freehand + + + fig + application/x-xfig + + + flac + audio/flac + + + fli + video/x-fli + + + flo + application/vnd.micrografx.flo + + + flv + video/x-flv + + + flw + application/vnd.kde.kivio + + + flx + text/vnd.fmi.flexstor + + + fly + text/vnd.fly + + + fm + application/vnd.framemaker + + + fnc + application/vnd.frogans.fnc + + + for + text/x-fortran + + + fpx + image/vnd.fpx + + + frame + application/vnd.framemaker + + + fsc + application/vnd.fsc.weblaunch + + + fst + image/vnd.fst + + + ftc + application/vnd.fluxtime.clip + + + fti + application/vnd.anser-web-funds-transfer-initiation + + + fvt + video/vnd.fvt + + + fxp + application/vnd.adobe.fxp + + + fxpl + application/vnd.adobe.fxp + + + fzs + application/vnd.fuzzysheet + + + g2w + application/vnd.geoplan + + + g3 + image/g3fax + + + g3w + application/vnd.geospace + + + gac + application/vnd.groove-account + + + gam + application/x-tads + + + gbr + application/rpki-ghostbusters + + + gca + application/x-gca-compressed + + + gdl + model/vnd.gdl + + + geo + application/vnd.dynageo + + + gex + application/vnd.geometry-explorer + + + ggb + application/vnd.geogebra.file + + + ggt + application/vnd.geogebra.tool + + + ghf + application/vnd.groove-help + + + gif + image/gif + + + gim + application/vnd.groove-identity-message + + + gml + application/gml+xml + + + gmx + application/vnd.gmx + + + gnumeric + application/x-gnumeric + + + gph + application/vnd.flographit + + + gpx + application/gpx+xml + + + gqf + application/vnd.grafeq + + + gqs + application/vnd.grafeq + + + gram + application/srgs + + + gramps + application/x-gramps-xml + + + gre + application/vnd.geometry-explorer + + + grv + application/vnd.groove-injector + + + grxml + application/srgs+xml + + + gsf + application/x-font-ghostscript + + + gtar + application/x-gtar + + + gtm + application/vnd.groove-tool-message + + + gtw + model/vnd.gtw + + + gv + text/vnd.graphviz + + + gxf + application/gxf + + + gxt + application/vnd.geonext + + + gz + application/x-gzip + + + h + text/x-c + + + h261 + video/h261 + + + h263 + video/h263 + + + h264 + video/h264 + + + hal + application/vnd.hal+xml + + + hbci + application/vnd.hbci + + + hdf + application/x-hdf + + + hh + text/x-c + + + hlp + application/winhlp + + + hpgl + application/vnd.hp-hpgl + + + hpid + application/vnd.hp-hpid + + + hps + application/vnd.hp-hps + + + hqx + application/mac-binhex40 + + + htc + text/x-component + + + htke + application/vnd.kenameaapp + + + htm + text/html + + + html + text/html + + + hvd + application/vnd.yamaha.hv-dic + + + hvp + application/vnd.yamaha.hv-voice + + + hvs + application/vnd.yamaha.hv-script + + + i2g + application/vnd.intergeo + + + icc + application/vnd.iccprofile + + + ice + x-conference/x-cooltalk + + + icm + application/vnd.iccprofile + + + ico + image/x-icon + + + ics + text/calendar + + + ief + image/ief + + + ifb + text/calendar + + + ifm + application/vnd.shana.informed.formdata + + + iges + model/iges + + + igl + application/vnd.igloader + + + igm + application/vnd.insors.igm + + + igs + model/iges + + + igx + application/vnd.micrografx.igx + + + iif + application/vnd.shana.informed.interchange + + + imp + application/vnd.accpac.simply.imp + + + ims + application/vnd.ms-ims + + + in + text/plain + + + ink + application/inkml+xml + + + inkml + application/inkml+xml + + + install + application/x-install-instructions + + + iota + application/vnd.astraea-software.iota + + + ipfix + application/ipfix + + + ipk + application/vnd.shana.informed.package + + + irm + application/vnd.ibm.rights-management + + + irp + application/vnd.irepository.package+xml + + + iso + application/x-iso9660-image + + + itp + application/vnd.shana.informed.formtemplate + + + ivp + application/vnd.immervision-ivp + + + ivu + application/vnd.immervision-ivu + + + jad + text/vnd.sun.j2me.app-descriptor + + + jam + application/vnd.jam + + + jar + application/java-archive + + + java + text/x-java-source + + + jisp + application/vnd.jisp + + + jlt + application/vnd.hp-jlyt + + + jnlp + application/x-java-jnlp-file + + + joda + application/vnd.joost.joda-archive + + + jpe + image/jpeg + + + jpeg + image/jpeg + + + jpg + image/jpeg + + + jpgm + video/jpm + + + jpgv + video/jpeg + + + jpm + video/jpm + + + js + application/javascript + + + jsf + text/plain + + + json + application/json + + + jsonml + application/jsonml+json + + + jspf + text/plain + + + kar + audio/midi + + + karbon + application/vnd.kde.karbon + + + kfo + application/vnd.kde.kformula + + + kia + application/vnd.kidspiration + + + kml + application/vnd.google-earth.kml+xml + + + kmz + application/vnd.google-earth.kmz + + + kne + application/vnd.kinar + + + knp + application/vnd.kinar + + + kon + application/vnd.kde.kontour + + + kpr + application/vnd.kde.kpresenter + + + kpt + application/vnd.kde.kpresenter + + + kpxx + application/vnd.ds-keypoint + + + ksp + application/vnd.kde.kspread + + + ktr + application/vnd.kahootz + + + ktx + image/ktx + + + ktz + application/vnd.kahootz + + + kwd + application/vnd.kde.kword + + + kwt + application/vnd.kde.kword + + + lasxml + application/vnd.las.las+xml + + + latex + application/x-latex + + + lbd + application/vnd.llamagraphics.life-balance.desktop + + + lbe + application/vnd.llamagraphics.life-balance.exchange+xml + + + les + application/vnd.hhe.lesson-player + + + lha + application/x-lzh-compressed + + + link66 + application/vnd.route66.link66+xml + + + list + text/plain + + + list3820 + application/vnd.ibm.modcap + + + listafp + application/vnd.ibm.modcap + + + lnk + application/x-ms-shortcut + + + log + text/plain + + + lostxml + application/lost+xml + + + lrf + application/octet-stream + + + lrm + application/vnd.ms-lrm + + + ltf + application/vnd.frogans.ltf + + + lvp + audio/vnd.lucent.voice + + + lwp + application/vnd.lotus-wordpro + + + lzh + application/x-lzh-compressed + + + m13 + application/x-msmediaview + + + m14 + application/x-msmediaview + + + m1v + video/mpeg + + + m21 + application/mp21 + + + m2a + audio/mpeg + + + m2v + video/mpeg + + + m3a + audio/mpeg + + + m3u + audio/x-mpegurl + + + m3u8 + application/vnd.apple.mpegurl + + + m4a + audio/mp4 + + + m4b + audio/mp4 + + + m4r + audio/mp4 + + + m4u + video/vnd.mpegurl + + + m4v + video/mp4 + + + ma + application/mathematica + + + mac + image/x-macpaint + + + mads + application/mads+xml + + + mag + application/vnd.ecowin.chart + + + maker + application/vnd.framemaker + + + man + text/troff + + + mar + application/octet-stream + + + mathml + application/mathml+xml + + + mb + application/mathematica + + + mbk + application/vnd.mobius.mbk + + + mbox + application/mbox + + + mc1 + application/vnd.medcalcdata + + + mcd + application/vnd.mcd + + + mcurl + text/vnd.curl.mcurl + + + mdb + application/x-msaccess + + + mdi + image/vnd.ms-modi + + + me + text/troff + + + mesh + model/mesh + + + meta4 + application/metalink4+xml + + + metalink + application/metalink+xml + + + mets + application/mets+xml + + + mfm + application/vnd.mfmp + + + mft + application/rpki-manifest + + + mgp + application/vnd.osgeo.mapguide.package + + + mgz + application/vnd.proteus.magazine + + + mid + audio/midi + + + midi + audio/midi + + + mie + application/x-mie + + + mif + application/x-mif + + + mime + message/rfc822 + + + mj2 + video/mj2 + + + mjp2 + video/mj2 + + + mk3d + video/x-matroska + + + mka + audio/x-matroska + + + mks + video/x-matroska + + + mkv + video/x-matroska + + + mlp + application/vnd.dolby.mlp + + + mmd + application/vnd.chipnuts.karaoke-mmd + + + mmf + application/vnd.smaf + + + mmr + image/vnd.fujixerox.edmics-mmr + + + mng + video/x-mng + + + mny + application/x-msmoney + + + mobi + application/x-mobipocket-ebook + + + mods + application/mods+xml + + + mov + video/quicktime + + + movie + video/x-sgi-movie + + + mp1 + audio/mpeg + + + mp2 + audio/mpeg + + + mp21 + application/mp21 + + + mp2a + audio/mpeg + + + mp3 + audio/mpeg + + + mp4 + video/mp4 + + + mp4a + audio/mp4 + + + mp4s + application/mp4 + + + mp4v + video/mp4 + + + mpa + audio/mpeg + + + mpc + application/vnd.mophun.certificate + + + mpe + video/mpeg + + + mpeg + video/mpeg + + + mpega + audio/x-mpeg + + + mpg + video/mpeg + + + mpg4 + video/mp4 + + + mpga + audio/mpeg + + + mpkg + application/vnd.apple.installer+xml + + + mpm + application/vnd.blueice.multipass + + + mpn + application/vnd.mophun.application + + + mpp + application/vnd.ms-project + + + mpt + application/vnd.ms-project + + + mpv2 + video/mpeg2 + + + mpy + application/vnd.ibm.minipay + + + mqy + application/vnd.mobius.mqy + + + mrc + application/marc + + + mrcx + application/marcxml+xml + + + ms + text/troff + + + mscml + application/mediaservercontrol+xml + + + mseed + application/vnd.fdsn.mseed + + + mseq + application/vnd.mseq + + + msf + application/vnd.epson.msf + + + msh + model/mesh + + + msi + application/x-msdownload + + + msl + application/vnd.mobius.msl + + + msty + application/vnd.muvee.style + + + mts + model/vnd.mts + + + mus + application/vnd.musician + + + musicxml + application/vnd.recordare.musicxml+xml + + + mvb + application/x-msmediaview + + + mwf + application/vnd.mfer + + + mxf + application/mxf + + + mxl + application/vnd.recordare.musicxml + + + mxml + application/xv+xml + + + mxs + application/vnd.triscape.mxs + + + mxu + video/vnd.mpegurl + + + n-gage + application/vnd.nokia.n-gage.symbian.install + + + n3 + text/n3 + + + nb + application/mathematica + + + nbp + application/vnd.wolfram.player + + + nc + application/x-netcdf + + + ncx + application/x-dtbncx+xml + + + nfo + text/x-nfo + + + ngdat + application/vnd.nokia.n-gage.data + + + nitf + application/vnd.nitf + + + nlu + application/vnd.neurolanguage.nlu + + + nml + application/vnd.enliven + + + nnd + application/vnd.noblenet-directory + + + nns + application/vnd.noblenet-sealer + + + nnw + application/vnd.noblenet-web + + + npx + image/vnd.net-fpx + + + nsc + application/x-conference + + + nsf + application/vnd.lotus-notes + + + ntf + application/vnd.nitf + + + nzb + application/x-nzb + + + oa2 + application/vnd.fujitsu.oasys2 + + + oa3 + application/vnd.fujitsu.oasys3 + + + oas + application/vnd.fujitsu.oasys + + + obd + application/x-msbinder + + + obj + application/x-tgif + + + oda + application/oda + + + + odb + application/vnd.oasis.opendocument.database + + + + odc + application/vnd.oasis.opendocument.chart + + + + odf + application/vnd.oasis.opendocument.formula + + + odft + application/vnd.oasis.opendocument.formula-template + + + + odg + application/vnd.oasis.opendocument.graphics + + + + odi + application/vnd.oasis.opendocument.image + + + + odm + application/vnd.oasis.opendocument.text-master + + + + odp + application/vnd.oasis.opendocument.presentation + + + + ods + application/vnd.oasis.opendocument.spreadsheet + + + + odt + application/vnd.oasis.opendocument.text + + + oga + audio/ogg + + + ogg + audio/ogg + + + ogv + video/ogg + + + + ogx + application/ogg + + + omdoc + application/omdoc+xml + + + onepkg + application/onenote + + + onetmp + application/onenote + + + onetoc + application/onenote + + + onetoc2 + application/onenote + + + opf + application/oebps-package+xml + + + opml + text/x-opml + + + oprc + application/vnd.palm + + + org + application/vnd.lotus-organizer + + + osf + application/vnd.yamaha.openscoreformat + + + osfpvg + application/vnd.yamaha.openscoreformat.osfpvg+xml + + + otc + application/vnd.oasis.opendocument.chart-template + + + otf + application/x-font-otf + + + + otg + application/vnd.oasis.opendocument.graphics-template + + + + oth + application/vnd.oasis.opendocument.text-web + + + oti + application/vnd.oasis.opendocument.image-template + + + + otp + application/vnd.oasis.opendocument.presentation-template + + + + ots + application/vnd.oasis.opendocument.spreadsheet-template + + + + ott + application/vnd.oasis.opendocument.text-template + + + oxps + application/oxps + + + oxt + application/vnd.openofficeorg.extension + + + p + text/x-pascal + + + p10 + application/pkcs10 + + + p12 + application/x-pkcs12 + + + p7b + application/x-pkcs7-certificates + + + p7c + application/pkcs7-mime + + + p7m + application/pkcs7-mime + + + p7r + application/x-pkcs7-certreqresp + + + p7s + application/pkcs7-signature + + + p8 + application/pkcs8 + + + pas + text/x-pascal + + + paw + application/vnd.pawaafile + + + pbd + application/vnd.powerbuilder6 + + + pbm + image/x-portable-bitmap + + + pcap + application/vnd.tcpdump.pcap + + + pcf + application/x-font-pcf + + + pcl + application/vnd.hp-pcl + + + pclxl + application/vnd.hp-pclxl + + + pct + image/pict + + + pcurl + application/vnd.curl.pcurl + + + pcx + image/x-pcx + + + pdb + application/vnd.palm + + + pdf + application/pdf + + + pfa + application/x-font-type1 + + + pfb + application/x-font-type1 + + + pfm + application/x-font-type1 + + + pfr + application/font-tdpfr + + + pfx + application/x-pkcs12 + + + pgm + image/x-portable-graymap + + + pgn + application/x-chess-pgn + + + pgp + application/pgp-encrypted + + + pic + image/pict + + + pict + image/pict + + + pkg + application/octet-stream + + + pki + application/pkixcmp + + + pkipath + application/pkix-pkipath + + + plb + application/vnd.3gpp.pic-bw-large + + + plc + application/vnd.mobius.plc + + + plf + application/vnd.pocketlearn + + + pls + audio/x-scpls + + + pml + application/vnd.ctc-posml + + + png + image/png + + + pnm + image/x-portable-anymap + + + pnt + image/x-macpaint + + + portpkg + application/vnd.macports.portpkg + + + pot + application/vnd.ms-powerpoint + + + potm + application/vnd.ms-powerpoint.template.macroenabled.12 + + + potx + application/vnd.openxmlformats-officedocument.presentationml.template + + + ppam + application/vnd.ms-powerpoint.addin.macroenabled.12 + + + ppd + application/vnd.cups-ppd + + + ppm + image/x-portable-pixmap + + + pps + application/vnd.ms-powerpoint + + + ppsm + application/vnd.ms-powerpoint.slideshow.macroenabled.12 + + + ppsx + application/vnd.openxmlformats-officedocument.presentationml.slideshow + + + ppt + application/vnd.ms-powerpoint + + + pptm + application/vnd.ms-powerpoint.presentation.macroenabled.12 + + + pptx + application/vnd.openxmlformats-officedocument.presentationml.presentation + + + pqa + application/vnd.palm + + + prc + application/x-mobipocket-ebook + + + pre + application/vnd.lotus-freelance + + + prf + application/pics-rules + + + ps + application/postscript + + + psb + application/vnd.3gpp.pic-bw-small + + + psd + image/vnd.adobe.photoshop + + + psf + application/x-font-linux-psf + + + pskcxml + application/pskc+xml + + + ptid + application/vnd.pvi.ptid1 + + + pub + application/x-mspublisher + + + pvb + application/vnd.3gpp.pic-bw-var + + + pwn + application/vnd.3m.post-it-notes + + + pya + audio/vnd.ms-playready.media.pya + + + pyv + video/vnd.ms-playready.media.pyv + + + qam + application/vnd.epson.quickanime + + + qbo + application/vnd.intu.qbo + + + qfx + application/vnd.intu.qfx + + + qps + application/vnd.publishare-delta-tree + + + qt + video/quicktime + + + qti + image/x-quicktime + + + qtif + image/x-quicktime + + + qwd + application/vnd.quark.quarkxpress + + + qwt + application/vnd.quark.quarkxpress + + + qxb + application/vnd.quark.quarkxpress + + + qxd + application/vnd.quark.quarkxpress + + + qxl + application/vnd.quark.quarkxpress + + + qxt + application/vnd.quark.quarkxpress + + + ra + audio/x-pn-realaudio + + + ram + audio/x-pn-realaudio + + + rar + application/x-rar-compressed + + + ras + image/x-cmu-raster + + + rcprofile + application/vnd.ipunplugged.rcprofile + + + rdf + application/rdf+xml + + + rdz + application/vnd.data-vision.rdz + + + rep + application/vnd.businessobjects + + + res + application/x-dtbresource+xml + + + rgb + image/x-rgb + + + rif + application/reginfo+xml + + + rip + audio/vnd.rip + + + ris + application/x-research-info-systems + + + rl + application/resource-lists+xml + + + rlc + image/vnd.fujixerox.edmics-rlc + + + rld + application/resource-lists-diff+xml + + + rm + application/vnd.rn-realmedia + + + rmi + audio/midi + + + rmp + audio/x-pn-realaudio-plugin + + + rms + application/vnd.jcp.javame.midlet-rms + + + rmvb + application/vnd.rn-realmedia-vbr + + + rnc + application/relax-ng-compact-syntax + + + roa + application/rpki-roa + + + roff + text/troff + + + rp9 + application/vnd.cloanto.rp9 + + + rpss + application/vnd.nokia.radio-presets + + + rpst + application/vnd.nokia.radio-preset + + + rq + application/sparql-query + + + rs + application/rls-services+xml + + + rsd + application/rsd+xml + + + rss + application/rss+xml + + + rtf + application/rtf + + + rtx + text/richtext + + + s + text/x-asm + + + s3m + audio/s3m + + + saf + application/vnd.yamaha.smaf-audio + + + sbml + application/sbml+xml + + + sc + application/vnd.ibm.secure-container + + + scd + application/x-msschedule + + + scm + application/vnd.lotus-screencam + + + scq + application/scvp-cv-request + + + scs + application/scvp-cv-response + + + scurl + text/vnd.curl.scurl + + + sda + application/vnd.stardivision.draw + + + sdc + application/vnd.stardivision.calc + + + sdd + application/vnd.stardivision.impress + + + sdkd + application/vnd.solent.sdkm+xml + + + sdkm + application/vnd.solent.sdkm+xml + + + sdp + application/sdp + + + sdw + application/vnd.stardivision.writer + + + see + application/vnd.seemail + + + seed + application/vnd.fdsn.seed + + + sema + application/vnd.sema + + + semd + application/vnd.semd + + + semf + application/vnd.semf + + + ser + application/java-serialized-object + + + setpay + application/set-payment-initiation + + + setreg + application/set-registration-initiation + + + sfd-hdstx + application/vnd.hydrostatix.sof-data + + + sfs + application/vnd.spotfire.sfs + + + sfv + text/x-sfv + + + sgi + image/sgi + + + sgl + application/vnd.stardivision.writer-global + + + sgm + text/sgml + + + sgml + text/sgml + + + sh + application/x-sh + + + shar + application/x-shar + + + shf + application/shf+xml + + + + sid + image/x-mrsid-image + + + sig + application/pgp-signature + + + sil + audio/silk + + + silo + model/mesh + + + sis + application/vnd.symbian.install + + + sisx + application/vnd.symbian.install + + + sit + application/x-stuffit + + + sitx + application/x-stuffitx + + + skd + application/vnd.koan + + + skm + application/vnd.koan + + + skp + application/vnd.koan + + + skt + application/vnd.koan + + + sldm + application/vnd.ms-powerpoint.slide.macroenabled.12 + + + sldx + application/vnd.openxmlformats-officedocument.presentationml.slide + + + slt + application/vnd.epson.salt + + + sm + application/vnd.stepmania.stepchart + + + smf + application/vnd.stardivision.math + + + smi + application/smil+xml + + + smil + application/smil+xml + + + smv + video/x-smv + + + smzip + application/vnd.stepmania.package + + + snd + audio/basic + + + snf + application/x-font-snf + + + so + application/octet-stream + + + spc + application/x-pkcs7-certificates + + + spf + application/vnd.yamaha.smaf-phrase + + + spl + application/x-futuresplash + + + spot + text/vnd.in3d.spot + + + spp + application/scvp-vp-response + + + spq + application/scvp-vp-request + + + spx + audio/ogg + + + sql + application/x-sql + + + src + application/x-wais-source + + + srt + application/x-subrip + + + sru + application/sru+xml + + + srx + application/sparql-results+xml + + + ssdl + application/ssdl+xml + + + sse + application/vnd.kodak-descriptor + + + ssf + application/vnd.epson.ssf + + + ssml + application/ssml+xml + + + st + application/vnd.sailingtracker.track + + + stc + application/vnd.sun.xml.calc.template + + + std + application/vnd.sun.xml.draw.template + + + stf + application/vnd.wt.stf + + + sti + application/vnd.sun.xml.impress.template + + + stk + application/hyperstudio + + + stl + application/vnd.ms-pki.stl + + + str + application/vnd.pg.format + + + stw + application/vnd.sun.xml.writer.template + + + sub + text/vnd.dvb.subtitle + + + sus + application/vnd.sus-calendar + + + susp + application/vnd.sus-calendar + + + sv4cpio + application/x-sv4cpio + + + sv4crc + application/x-sv4crc + + + svc + application/vnd.dvb.service + + + svd + application/vnd.svd + + + svg + image/svg+xml + + + svgz + image/svg+xml + + + swa + application/x-director + + + swf + application/x-shockwave-flash + + + swi + application/vnd.aristanetworks.swi + + + sxc + application/vnd.sun.xml.calc + + + sxd + application/vnd.sun.xml.draw + + + sxg + application/vnd.sun.xml.writer.global + + + sxi + application/vnd.sun.xml.impress + + + sxm + application/vnd.sun.xml.math + + + sxw + application/vnd.sun.xml.writer + + + t + text/troff + + + t3 + application/x-t3vm-image + + + taglet + application/vnd.mynfc + + + tao + application/vnd.tao.intent-module-archive + + + tar + application/x-tar + + + tcap + application/vnd.3gpp2.tcap + + + tcl + application/x-tcl + + + teacher + application/vnd.smart.teacher + + + tei + application/tei+xml + + + teicorpus + application/tei+xml + + + tex + application/x-tex + + + texi + application/x-texinfo + + + texinfo + application/x-texinfo + + + text + text/plain + + + tfi + application/thraud+xml + + + tfm + application/x-tex-tfm + + + tga + image/x-tga + + + thmx + application/vnd.ms-officetheme + + + tif + image/tiff + + + tiff + image/tiff + + + tmo + application/vnd.tmobile-livetv + + + torrent + application/x-bittorrent + + + tpl + application/vnd.groove-tool-template + + + tpt + application/vnd.trid.tpt + + + tr + text/troff + + + tra + application/vnd.trueapp + + + trm + application/x-msterminal + + + tsd + application/timestamped-data + + + tsv + text/tab-separated-values + + + ttc + application/x-font-ttf + + + ttf + application/x-font-ttf + + + ttl + text/turtle + + + twd + application/vnd.simtech-mindmapper + + + twds + application/vnd.simtech-mindmapper + + + txd + application/vnd.genomatix.tuxedo + + + txf + application/vnd.mobius.txf + + + txt + text/plain + + + u32 + application/x-authorware-bin + + + udeb + application/x-debian-package + + + ufd + application/vnd.ufdl + + + ufdl + application/vnd.ufdl + + + ulw + audio/basic + + + ulx + application/x-glulx + + + umj + application/vnd.umajin + + + unityweb + application/vnd.unity + + + uoml + application/vnd.uoml+xml + + + uri + text/uri-list + + + uris + text/uri-list + + + urls + text/uri-list + + + ustar + application/x-ustar + + + utz + application/vnd.uiq.theme + + + uu + text/x-uuencode + + + uva + audio/vnd.dece.audio + + + uvd + application/vnd.dece.data + + + uvf + application/vnd.dece.data + + + uvg + image/vnd.dece.graphic + + + uvh + video/vnd.dece.hd + + + uvi + image/vnd.dece.graphic + + + uvm + video/vnd.dece.mobile + + + uvp + video/vnd.dece.pd + + + uvs + video/vnd.dece.sd + + + uvt + application/vnd.dece.ttml+xml + + + uvu + video/vnd.uvvu.mp4 + + + uvv + video/vnd.dece.video + + + uvva + audio/vnd.dece.audio + + + uvvd + application/vnd.dece.data + + + uvvf + application/vnd.dece.data + + + uvvg + image/vnd.dece.graphic + + + uvvh + video/vnd.dece.hd + + + uvvi + image/vnd.dece.graphic + + + uvvm + video/vnd.dece.mobile + + + uvvp + video/vnd.dece.pd + + + uvvs + video/vnd.dece.sd + + + uvvt + application/vnd.dece.ttml+xml + + + uvvu + video/vnd.uvvu.mp4 + + + uvvv + video/vnd.dece.video + + + uvvx + application/vnd.dece.unspecified + + + uvvz + application/vnd.dece.zip + + + uvx + application/vnd.dece.unspecified + + + uvz + application/vnd.dece.zip + + + vcard + text/vcard + + + vcd + application/x-cdlink + + + vcf + text/x-vcard + + + vcg + application/vnd.groove-vcard + + + vcs + text/x-vcalendar + + + vcx + application/vnd.vcx + + + vis + application/vnd.visionary + + + viv + video/vnd.vivo + + + vob + video/x-ms-vob + + + vor + application/vnd.stardivision.writer + + + vox + application/x-authorware-bin + + + vrml + model/vrml + + + vsd + application/vnd.visio + + + vsf + application/vnd.vsf + + + vss + application/vnd.visio + + + vst + application/vnd.visio + + + vsw + application/vnd.visio + + + vtu + model/vnd.vtu + + + vxml + application/voicexml+xml + + + w3d + application/x-director + + + wad + application/x-doom + + + wav + audio/x-wav + + + wax + audio/x-ms-wax + + + + wbmp + image/vnd.wap.wbmp + + + wbs + application/vnd.criticaltools.wbs+xml + + + wbxml + application/vnd.wap.wbxml + + + wcm + application/vnd.ms-works + + + wdb + application/vnd.ms-works + + + wdp + image/vnd.ms-photo + + + weba + audio/webm + + + webm + video/webm + + + webp + image/webp + + + wg + application/vnd.pmi.widget + + + wgt + application/widget + + + wks + application/vnd.ms-works + + + wm + video/x-ms-wm + + + wma + audio/x-ms-wma + + + wmd + application/x-ms-wmd + + + wmf + application/x-msmetafile + + + + wml + text/vnd.wap.wml + + + + wmlc + application/vnd.wap.wmlc + + + + wmls + text/vnd.wap.wmlscript + + + + wmlsc + application/vnd.wap.wmlscriptc + + + wmv + video/x-ms-wmv + + + wmx + video/x-ms-wmx + + + wmz + application/x-msmetafile + + + woff + application/x-font-woff + + + wpd + application/vnd.wordperfect + + + wpl + application/vnd.ms-wpl + + + wps + application/vnd.ms-works + + + wqd + application/vnd.wqd + + + wri + application/x-mswrite + + + wrl + model/vrml + + + wsdl + application/wsdl+xml + + + wspolicy + application/wspolicy+xml + + + wtb + application/vnd.webturbo + + + wvx + video/x-ms-wvx + + + x32 + application/x-authorware-bin + + + x3d + model/x3d+xml + + + x3db + model/x3d+binary + + + x3dbz + model/x3d+binary + + + x3dv + model/x3d+vrml + + + x3dvz + model/x3d+vrml + + + x3dz + model/x3d+xml + + + xaml + application/xaml+xml + + + xap + application/x-silverlight-app + + + xar + application/vnd.xara + + + xbap + application/x-ms-xbap + + + xbd + application/vnd.fujixerox.docuworks.binder + + + xbm + image/x-xbitmap + + + xdf + application/xcap-diff+xml + + + xdm + application/vnd.syncml.dm+xml + + + xdp + application/vnd.adobe.xdp+xml + + + xdssc + application/dssc+xml + + + xdw + application/vnd.fujixerox.docuworks + + + xenc + application/xenc+xml + + + xer + application/patch-ops-error+xml + + + xfdf + application/vnd.adobe.xfdf + + + xfdl + application/vnd.xfdl + + + xht + application/xhtml+xml + + + xhtml + application/xhtml+xml + + + xhvml + application/xv+xml + + + xif + image/vnd.xiff + + + xla + application/vnd.ms-excel + + + xlam + application/vnd.ms-excel.addin.macroenabled.12 + + + xlc + application/vnd.ms-excel + + + xlf + application/x-xliff+xml + + + xlm + application/vnd.ms-excel + + + xls + application/vnd.ms-excel + + + xlsb + application/vnd.ms-excel.sheet.binary.macroenabled.12 + + + xlsm + application/vnd.ms-excel.sheet.macroenabled.12 + + + xlsx + application/vnd.openxmlformats-officedocument.spreadsheetml.sheet + + + xlt + application/vnd.ms-excel + + + xltm + application/vnd.ms-excel.template.macroenabled.12 + + + xltx + application/vnd.openxmlformats-officedocument.spreadsheetml.template + + + xlw + application/vnd.ms-excel + + + xm + audio/xm + + + xml + application/xml + + + xo + application/vnd.olpc-sugar + + + xop + application/xop+xml + + + xpi + application/x-xpinstall + + + xpl + application/xproc+xml + + + xpm + image/x-xpixmap + + + xpr + application/vnd.is-xpr + + + xps + application/vnd.ms-xpsdocument + + + xpw + application/vnd.intercon.formnet + + + xpx + application/vnd.intercon.formnet + + + xsl + application/xml + + + xslt + application/xslt+xml + + + xsm + application/vnd.syncml+xml + + + xspf + application/xspf+xml + + + xul + application/vnd.mozilla.xul+xml + + + xvm + application/xv+xml + + + xvml + application/xv+xml + + + xwd + image/x-xwindowdump + + + xyz + chemical/x-xyz + + + xz + application/x-xz + + + yang + application/yang + + + yin + application/yin+xml + + + z + application/x-compress + + + Z + application/x-compress + + + z1 + application/x-zmachine + + + z2 + application/x-zmachine + + + z3 + application/x-zmachine + + + z4 + application/x-zmachine + + + z5 + application/x-zmachine + + + z6 + application/x-zmachine + + + z7 + application/x-zmachine + + + z8 + application/x-zmachine + + + zaz + application/vnd.zzazz.deck+xml + + + zip + application/zip + + + zir + application/vnd.zul + + + zirz + application/vnd.zul + + + zmm + application/vnd.handheld-entertainment+xml + + + + + + + + + + + + + + + + + + index.html + index.htm + index.jsp + + + diff --git a/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/db/mysql/db-schema.sql b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/db/mysql/db-schema.sql new file mode 100644 index 00000000..26252227 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/db/mysql/db-schema.sql @@ -0,0 +1,56 @@ +-- +-- +-- Copyright (c) 2016, Nokia Corporation. +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- + +/******************drop old database and user***************************/ +use mysql; +drop database IF EXISTS vnfm_db; +delete from user where User='vnfm'; +FLUSH PRIVILEGES; + +/******************create new database and user***************************/ +create database vnfm_db CHARACTER SET utf8; + +GRANT ALL PRIVILEGES ON vnfm_db.* TO 'vnfm'@'%' IDENTIFIED BY 'vnfm' WITH GRANT OPTION; +GRANT ALL PRIVILEGES ON mysql.* TO 'vnfm'@'%' IDENTIFIED BY 'vnfm' WITH GRANT OPTION; + +GRANT ALL PRIVILEGES ON vnfm_db.* TO 'vnfm'@'localhost' IDENTIFIED BY 'vnfm' WITH GRANT OPTION; +GRANT ALL PRIVILEGES ON mysql.* TO 'vnfm'@'localhost' IDENTIFIED BY 'vnfm' WITH GRANT OPTION; +FLUSH PRIVILEGES; + +use vnfm_db; +set Names 'utf8'; + +/******************drop old table and create new***************************/ + +DROP TABLE IF EXISTS vnfm_job_execution_record; +CREATE TABLE `vnfm_job_execution_record` ( + `jobId` int(11) auto_increment primary key, + `vnfInstanceId` varchar(60) DEFAULT NULL, + `vnfmExecutionId` varchar(60) DEFAULT NULL, + `vnfmInterfceName` varchar(60) DEFAULT NULL, + `status` varchar(24) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + + +DROP TABLE IF EXISTS vnfm_resource_record; +CREATE TABLE `vnfm_resource` ( + `id` int(11) auto_increment primary key, + `type` enum ('VDU','VL','CP','Storage') DEFAULT NULL, + `resourceDefinitionId` varchar(60) DEFAULT NULL, + `vdu` varchar(60) DEFAULT NULL, + `status` varchar(24) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=utf8; \ No newline at end of file diff --git a/nokia/vnfmdriver/vfcadaptorservice/pom.xml b/nokia/vnfmdriver/vfcadaptorservice/pom.xml index ceea2dfb..a5d3da7d 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/pom.xml +++ b/nokia/vnfmdriver/vfcadaptorservice/pom.xml @@ -15,24 +15,41 @@ --> 4.0.0 + - vnfmadapter + vnfmdriver org.onap.vfc.nfvo.driver.vnfm.svnfm 1.0.0-SNAPSHOT - vnfmadapter-service-root + + org.onap.vfc.nfvo.driver.vnfm.svnfm + vfcadaptor-service 1.0.0-SNAPSHOT - vfc/nfvo/drivers/vnfm/svnfm/nokia/vnfmdriver/vfcadaptorservice + vfc/nfvo/driver/vnfm/svnfm/nokia/vnfmdriver/vfcadaptorservice pom UTF-8 - vfcadaptor-service + vfcadaptor + + + + + org.springframework.boot + spring-boot-dependencies + 1.5.7.RELEASE + pom + import + + + + - adaptor - docker + vfcadaptor + deployment + - + diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/pom.xml b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/pom.xml index 85a1b18e..67503b3b 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/pom.xml +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/pom.xml @@ -14,176 +14,132 @@ limitations under the License. --> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + 4.0.0 -4.0.0 - - org.onap.vfc.nfvo.driver.vnfm.svnfm - vnfmadapter-service-root - 1.0.0-SNAPSHOT - + vfcadaptor + 1.0.0-SNAPSHOT + war - vfcadaptor - vfc/nfvo/drivers/vnfm/svnfm/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor - war - - - 4.3.11.RELEASE - - - - - junit - junit - 4.11 - test - - - com.fasterxml.jackson.core - jackson-annotations - 2.6.5 - - - com.fasterxml.jackson.core - jackson-databind - 2.6.5 - - - org.codehaus.jackson - jackson-mapper-asl - 1.9.13 - - - org.hamcrest - hamcrest-library - 1.3 - - - - com.google.code.gson - gson - 2.8.1 - - - - javax.servlet - javax.servlet-api - 4.0.0 - - - - org.springframework - spring-beans - ${springVersion} - - - org.springframework - spring-context - ${springVersion} - - - org.springframework - spring-core - ${springVersion} - - - org.springframework - spring-web - ${springVersion} - - - org.springframework - spring-webmvc - ${springVersion} - - - org.springframework - spring-expression - ${springVersion} - - - org.springframework - spring-aop - ${springVersion} - - - org.springframework - spring-jdbc - ${springVersion} - - - org.springframework - spring-test - ${springVersion} - test - - - org.springframework - spring-orm - ${springVersion} - - - - dom4j - dom4j - 1.6.1 - - - org.mockito - mockito-core - 2.10.0 - test - - - com.jayway.jsonpath - json-path - 2.4.0 - test - - - org.json - json - 20170516 - + vfc/nfvo/driver/vnfm/svnfm/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor + svnfm vnfm driver + + + org.onap.vfc.nfvo.driver.vnfm.svnfm + vfcadaptor-service + 1.0.0-SNAPSHOT + - - ch.qos.logback - logback-classic - 1.1.2 + + UTF-8 + UTF-8 + 1.8 + + + + + org.springframework.boot + spring-boot-starter-data-jpa + + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter + + + org.springframework.boot + spring-boot-starter-logging + + + + com.vaadin.external.google + android-json + + + + + + org.springframework.boot + spring-boot-starter-log4j2 - + + mysql + mysql-connector-java + + + org.springframework.boot + spring-boot-starter-tomcat + provided + + + org.apache.tomcat.embed + tomcat-embed-jasper + provided + + + org.springframework.boot + spring-boot-starter-test + test + + + + org.apache.httpcomponents httpclient + - log4j - log4j - 1.2.12 + com.google.code.gson + gson + - - javax.persistence - persistence-api - 1.0.2 + org.json + json + 20170516 - - org.hibernate - hibernate - 3.5.4-Final - pom - - - - - vfcadaptor - + + + + + + + org.springframework.boot + spring-boot-maven-plugin + 1.5.7.RELEASE + + + org.apache.maven.plugins + maven-compiler-plugin + 3.5 + + 1.8 + 1.8 + + + + diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/adaptor/Cbam2DriverResponseConverter.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/adaptor/Cbam2DriverResponseConverter.java deleted file mode 100644 index a6aca56d..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/adaptor/Cbam2DriverResponseConverter.java +++ /dev/null @@ -1,136 +0,0 @@ -/* -* Copyright 2016-2017 Nokia Corporation -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 com.nokia.vfcadaptor.adaptor; - -import java.util.ArrayList; -import java.util.List; - -import org.springframework.stereotype.Component; - -import com.nokia.vfcadaptor.cbam.bo.CBAMCreateVnfResponse; - -import com.nokia.vfcadaptor.cbam.bo.CBAMInstantiateVnfResponse; -import com.nokia.vfcadaptor.cbam.bo.CBAMOperExecutVnfResponse; -import com.nokia.vfcadaptor.cbam.bo.CBAMQueryVnfResponse; -import com.nokia.vfcadaptor.cbam.bo.CBAMScaleVnfResponse; -import com.nokia.vfcadaptor.cbam.bo.CBAMTerminateVnfResponse; -import com.nokia.vfcadaptor.cbam.bo.entity.OperationExecution; -import com.nokia.vfcadaptor.cbam.bo.CBAMHealVnfResponse; -import com.nokia.vfcadaptor.vnfmdriver.bo.HealVnfResponse; - -import com.nokia.vfcadaptor.vnfmdriver.bo.InstantiateVnfResponse; -import com.nokia.vfcadaptor.vnfmdriver.bo.OperStatusVnfResponse; -import com.nokia.vfcadaptor.vnfmdriver.bo.QueryVnfResponse; -import com.nokia.vfcadaptor.vnfmdriver.bo.ScaleVnfResponse; -import com.nokia.vfcadaptor.vnfmdriver.bo.TerminateVnfResponse; -import com.nokia.vfcadaptor.vnfmdriver.bo.entity.ResponseDescriptor; -import com.nokia.vfcadaptor.vnfmdriver.bo.entity.ResponseHistoryList; -import com.nokia.vfcadaptor.vnfmdriver.bo.entity.VnfInfo; - -@Component -public class Cbam2DriverResponseConverter { - - - public InstantiateVnfResponse createspConvert(CBAMCreateVnfResponse cbamResponse) { - - InstantiateVnfResponse response = new InstantiateVnfResponse(); - response.setJobId("1"); - response.setVnfInstanceId(cbamResponse.getVnfInfo().getId()); - - return response; - } - - public InstantiateVnfResponse instantspConvert(CBAMInstantiateVnfResponse cbamResponse) { - InstantiateVnfResponse response = new InstantiateVnfResponse(); - response.setJobId("1"); - response.setVnfInstanceId(cbamResponse.getProblemDetails().getInstance()); - return response; - } - - public TerminateVnfResponse terminaterspConvert(CBAMTerminateVnfResponse cbamResponse) { - - TerminateVnfResponse response = new TerminateVnfResponse(); - response.setJobId("1"); - return response; - } - - public QueryVnfResponse queryspConvert(CBAMQueryVnfResponse cbamResponse) { - QueryVnfResponse response = new QueryVnfResponse(); - VnfInfo vnf = new VnfInfo(); - vnf.setVnfdId(cbamResponse.getVnfInfo().getVnfdId()); - vnf.setVersion(cbamResponse.getVnfInfo().getVnfdVersion()); - vnf.setVnfInstanceId(cbamResponse.getVnfInfo().getId()); - vnf.setVnfInstanceName(cbamResponse.getVnfInfo().getName()); - vnf.setVnfInstanceDescription(cbamResponse.getVnfInfo().getDescription()); - vnf.setVnfPackageId(cbamResponse.getVnfInfo().getOnboardedVnfPkgInfoId()); - vnf.setVnfProvider(cbamResponse.getVnfInfo().getVnfProvider()); - vnf.setVnfStatus(cbamResponse.getVnfInfo().getInstantiationState()); - vnf.setVnfType(cbamResponse.getVnfInfo().getVnfSoftwareVersion()); - response.setVnfInfo(vnf); - return response; - } - - public OperStatusVnfResponse operspConvert(CBAMOperExecutVnfResponse cbamResponse) { - - OperStatusVnfResponse response = new OperStatusVnfResponse(); - List oper=cbamResponse.getOperationExecution(); - for(int i=0;i list=new ArrayList(); - ResponseHistoryList relist=new ResponseHistoryList(); - relist.setProgress(i); - relist.setStatus(er.getStatus()); - relist.setStatusDescription(""); - relist.setErrorCode(null); - relist.setResponseId(er.getResponseId()); - list.add(relist); - er.setResponseHistoryList(list); - response.setResponseDescriptor(er); - } - return response; - } - - public HealVnfResponse healspconvert(CBAMHealVnfResponse cbamResponse) { - HealVnfResponse response=new HealVnfResponse(); - response.setJobId("1"); - return response; - } - - public ScaleVnfResponse scalespconvert(CBAMScaleVnfResponse cbamResponse) { - ScaleVnfResponse response=new ScaleVnfResponse(); - response.setJobId("1"); - return response; - } -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/adaptor/Driver2CbamRequestConverter.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/adaptor/Driver2CbamRequestConverter.java deleted file mode 100644 index 5a51917d..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/adaptor/Driver2CbamRequestConverter.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.adaptor; - -import java.util.ArrayList; -import java.util.List; -import org.springframework.stereotype.Component; - -import com.nokia.vfcadaptor.cbam.bo.CBAMCreateVnfRequest; -import com.nokia.vfcadaptor.cbam.bo.CBAMHealVnfRequest; -import com.nokia.vfcadaptor.cbam.bo.CBAMInstantiateVnfRequest; -import com.nokia.vfcadaptor.cbam.bo.CBAMScaleVnfRequest; -import com.nokia.vfcadaptor.cbam.bo.CBAMTerminateVnfRequest; -import com.nokia.vfcadaptor.cbam.bo.entity.EndpointInfo; -import com.nokia.vfcadaptor.cbam.bo.entity.ExtVirtualLinkData; -import com.nokia.vfcadaptor.cbam.bo.entity.OPENSTACK_V3_INFO; -import com.nokia.vfcadaptor.cbam.bo.entity.OpenStackAccessInfoV3; -import com.nokia.vfcadaptor.cbam.bo.entity.VimInfo; -import com.nokia.vfcadaptor.cbam.bo.entity.VimInfoType; -import com.nokia.vfcadaptor.cbam.bo.entity.VnfExtCpData; -import com.nokia.vfcadaptor.constant.CommonEnum; -import com.nokia.vfcadaptor.nslcm.bo.NslcmGrantVnfResponse; -import com.nokia.vfcadaptor.nslcm.bo.entity.GrantInfo; -import com.nokia.vfcadaptor.nslcm.bo.entity.VimComputeResourceFlavour; -import com.nokia.vfcadaptor.vnfmdriver.bo.HealVnfRequest; -import com.nokia.vfcadaptor.vnfmdriver.bo.InstantiateVnfRequest; -import com.nokia.vfcadaptor.vnfmdriver.bo.ScaleVnfRequest; -import com.nokia.vfcadaptor.vnfmdriver.bo.TerminateVnfRequest; - -@Component -public class Driver2CbamRequestConverter { - - public CBAMCreateVnfRequest createrqConvert(InstantiateVnfRequest driverRequest) { - CBAMCreateVnfRequest request = new CBAMCreateVnfRequest(); - - request.setVnfdId("vnfd_001"); - request.setName(driverRequest.getVnfInstanceName()); - request.setDescription(driverRequest.getVnfInstanceDescription()); - return request; - } - - public CBAMInstantiateVnfRequest InstantiateCqonvert(InstantiateVnfRequest driverRequest, - NslcmGrantVnfResponse nslc, GrantInfo grant, VimComputeResourceFlavour vimco) { - CBAMInstantiateVnfRequest request = new CBAMInstantiateVnfRequest(); - List vims = new ArrayList(); - VimInfo vim = new VimInfo(); - VimInfoType type = new VimInfoType(); - EndpointInfo inter = new EndpointInfo(); - OPENSTACK_V3_INFO openstackV3 = new OPENSTACK_V3_INFO(); - - vim.setId(nslc.getVim().getVimId()); - openstackV3.setId(nslc.getVim().getVimId()); - inter.setEndpoint(nslc.getVim().getInterfaceEndpoint()); - openstackV3.setInterfaceInfo(inter); - openstackV3.setVimInfoType(type); - OpenStackAccessInfoV3 v3 = new OpenStackAccessInfoV3(); - v3.setUsername(nslc.getVim().getAccessInfo().getUsername()); - v3.setPassword(nslc.getVim().getAccessInfo().getPassword()); - openstackV3.setAccessInfo(v3); - type.setOPENSTACK_V3_INFO(openstackV3); - vim.setVimInfoType(type); - vims.add(vim); - List list = new ArrayList(); - ExtVirtualLinkData ext = new ExtVirtualLinkData(); - - ext.setResourceId(grant.getResourceDefinitionId()); - ext.setVimId(grant.getVimId()); - List cps = new ArrayList(); - VnfExtCpData cp = new VnfExtCpData(); - cp.setCpdId(vimco.getVduId()); - ext.setExtCps(cps); - request.setVims(vims); - request.setFlavourId(driverRequest.getFlavourId()); - request.setExtVirtualLinks(list); - // resquest.setVnfInstanceId(driverRequest.getExtVirtualLink().get(0).getVlInstanceId()); - return request; - } - - public CBAMTerminateVnfRequest terminaterqConvert(TerminateVnfRequest driverRequest) { - CBAMTerminateVnfRequest request = new CBAMTerminateVnfRequest(); - request.setTerminationType(driverRequest.getTerminationType()); - request.setGracefulTerminationTimeout(driverRequest.getGracefulTerminationTimeout()); - return request; - } - - public CBAMHealVnfRequest healconvert(HealVnfRequest driverRequest) { - CBAMHealVnfRequest request = new CBAMHealVnfRequest(); - request.setCause(""); - request.setAdditionalParams(""); - return request; - } - - public CBAMScaleVnfRequest scaleconvert(ScaleVnfRequest driverRequest) { - CBAMScaleVnfRequest request = new CBAMScaleVnfRequest(); - if (driverRequest.getType().equals("SCALE_OUT")) { - request.setType(CommonEnum.ScaleDirection.OUT); - } else { - request.setType(CommonEnum.ScaleDirection.IN); - } - request.setAspectId(driverRequest.getAspectId()); - request.setNumberOfSteps(driverRequest.getNumberOfSteps()); - request.setAdditionalParams(driverRequest.getAdditionalParam()); - return request; - } - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/adaptor/InstantiateVnfContinueRunnable.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/adaptor/InstantiateVnfContinueRunnable.java deleted file mode 100644 index 7efb9e9d..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/adaptor/InstantiateVnfContinueRunnable.java +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.adaptor; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -import org.apache.http.client.ClientProtocolException; -import org.apache.log4j.Logger; - -import com.nokia.vfcadaptor.catalog.inf.CatalogMgmrInf; -import com.nokia.vfcadaptor.cbam.bo.CBAMInstantiateVnfRequest; -import com.nokia.vfcadaptor.cbam.bo.CBAMInstantiateVnfResponse; -import com.nokia.vfcadaptor.cbam.inf.CbamMgmrInf; -import com.nokia.vfcadaptor.constant.CommonConstants; -import com.nokia.vfcadaptor.constant.CommonEnum; -import com.nokia.vfcadaptor.constant.CommonEnum.LifecycleOperation; -import com.nokia.vfcadaptor.nslcm.bo.NslcmGrantVnfRequest; -import com.nokia.vfcadaptor.nslcm.bo.NslcmGrantVnfResponse; -import com.nokia.vfcadaptor.nslcm.bo.NslcmNotifyLCMEventsRequest; -import com.nokia.vfcadaptor.nslcm.bo.entity.ResourceDefinition; -import com.nokia.vfcadaptor.nslcm.bo.entity.VnfPackageInfo; -import com.nokia.vfcadaptor.nslcm.inf.NslcmMgmrInf; -import com.nokia.vfcadaptor.vnfmdriver.bo.InstantiateVnfRequest; - -public class InstantiateVnfContinueRunnable implements Runnable { - private Logger logger = Logger.getLogger(InstantiateVnfContinueRunnable.class); - - private CbamMgmrInf cbamMgmr; - private CatalogMgmrInf catalogMgmr; - private NslcmMgmrInf nslcmMgmr; - - private InstantiateVnfRequest driverRequest; - private String vnfInstanceId; - private String jobId; - - private Driver2CbamRequestConverter requestConverter; - - public InstantiateVnfContinueRunnable(InstantiateVnfRequest driverRequest, String vnfInstanceId, String jobId, - NslcmMgmrInf nslcmMgmr, CatalogMgmrInf catalogMgmr, CbamMgmrInf cbamMgmr, Driver2CbamRequestConverter requestConverter) - { - this.driverRequest = driverRequest; - this.vnfInstanceId = vnfInstanceId; - this.jobId = jobId; - this.nslcmMgmr = nslcmMgmr; - this.catalogMgmr = catalogMgmr; - this.cbamMgmr = cbamMgmr; - this.requestConverter = requestConverter; - } - - public void run() { - try { - NslcmGrantVnfRequest grantRequest = buildNslcmGrantVnfRequest(); - NslcmGrantVnfResponse grantResponse = nslcmMgmr.grantVnf(grantRequest); - handleNslcmGrantResponse(grantResponse); - - //step 2: query vnfPackage uri - VnfPackageInfo vnfPackageInfo = catalogMgmr.queryVnfPackage(driverRequest.getVnfPackageId()); - - //step 5: instantiate vnf - CBAMInstantiateVnfRequest instantiateReq = requestConverter.InstantiateCqonvert(driverRequest, grantResponse, null, null); - CBAMInstantiateVnfResponse cbamInstantiateResponse = cbamMgmr.instantiateVnf(instantiateReq, vnfInstanceId); - handleCbamInstantiateResponse(cbamInstantiateResponse); - - NslcmNotifyLCMEventsRequest nslcmNotifyReq = buildNslcmNotifyLCMEventsRequest(cbamInstantiateResponse); - nslcmMgmr.notifyVnf(nslcmNotifyReq, vnfInstanceId); - - } catch (ClientProtocolException e) { - logger.error("InstantiateVnfContinueRunnable run error ClientProtocolException", e); - } catch (IOException e) { - logger.error("InstantiateVnfContinueRunnable run error IOException", e); - } - - } - - private NslcmNotifyLCMEventsRequest buildNslcmNotifyLCMEventsRequest(CBAMInstantiateVnfResponse cbamInstantiateResponse) { - NslcmNotifyLCMEventsRequest request = new NslcmNotifyLCMEventsRequest(); - if(CommonEnum.OperationStatus.STARTED == cbamInstantiateResponse.getOperationExecution().getStatus()) - { - request.setStatus(CommonEnum.status.start); - } - else - { - request.setStatus(CommonEnum.status.result); - - //TODO the following are for the result -// request.setAffectedVnfc(affectedVnfc); -// request.setAffectedVI(affectedVI); -// request.setAffectedVirtualStorage(affectedVirtualStorage); - } - - request.setVnfInstanceId(vnfInstanceId); - request.setOperation(CommonConstants.NSLCM_OPERATION_INSTANTIATE); - request.setJobId(jobId); - return request; - } - - private NslcmGrantVnfRequest buildNslcmGrantVnfRequest() { - NslcmGrantVnfRequest request = new NslcmGrantVnfRequest(); - - request.setVnfInstanceId(vnfInstanceId); - request.setVnfDescriptorId(driverRequest.getVnfDescriptorId()); - request.setLifecycleOperation(LifecycleOperation.Instantiate); - request.setJobId(jobId); - - ResourceDefinition resource = getFreeVnfResource(); - List resourceList = new ArrayList(); - resourceList.add(resource); - request.setAddResource(resourceList); - - return request; - } - - private ResourceDefinition getFreeVnfResource() { - // TODO Auto-generated method stub - return null; - } - - private void handleCbamInstantiateResponse(CBAMInstantiateVnfResponse cbamInstantiateResponse) { - // TODO - //update job id record according to the executionId - } - - private void handleNslcmGrantResponse(NslcmGrantVnfResponse grantResponse) { - // TODO Auto-generated method stub - - } - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/adaptor/TerminateVnfContinueRunnable.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/adaptor/TerminateVnfContinueRunnable.java deleted file mode 100644 index de192c54..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/adaptor/TerminateVnfContinueRunnable.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.adaptor; - -import java.io.IOException; - -import org.apache.http.client.ClientProtocolException; -import org.apache.log4j.Logger; - -import com.nokia.vfcadaptor.catalog.inf.CatalogMgmrInf; -import com.nokia.vfcadaptor.cbam.bo.CBAMInstantiateVnfResponse; -import com.nokia.vfcadaptor.cbam.bo.CBAMTerminateVnfRequest; -import com.nokia.vfcadaptor.cbam.bo.CBAMTerminateVnfResponse; -import com.nokia.vfcadaptor.cbam.inf.CbamMgmrInf; -import com.nokia.vfcadaptor.nslcm.bo.NslcmGrantVnfRequest; -import com.nokia.vfcadaptor.nslcm.bo.NslcmGrantVnfResponse; -import com.nokia.vfcadaptor.nslcm.inf.NslcmMgmrInf; -import com.nokia.vfcadaptor.vnfmdriver.bo.InstantiateVnfRequest; -import com.nokia.vfcadaptor.vnfmdriver.bo.TerminateVnfRequest; -import com.nokia.vfcadaptor.vnfmdriver.bo.TerminateVnfResponse; - -public class TerminateVnfContinueRunnable implements Runnable { - private Logger logger = Logger.getLogger(TerminateVnfContinueRunnable.class); - - private CbamMgmrInf cbamMgmr; - private NslcmMgmrInf nslcmMgmr; - - private TerminateVnfRequest driverRequest; - private String vnfInstanceId; - - private Driver2CbamRequestConverter requestConverter; - - public TerminateVnfContinueRunnable(TerminateVnfRequest driverRequest, String vnfInstanceId, - NslcmMgmrInf nslcmMgmr, CbamMgmrInf cbamMgmr, Driver2CbamRequestConverter requestConverter) - { - this.driverRequest = driverRequest; - this.vnfInstanceId = vnfInstanceId; - this.nslcmMgmr = nslcmMgmr; - this.cbamMgmr = cbamMgmr; - this.requestConverter = requestConverter; - } - - public void run() { - try { - NslcmGrantVnfRequest grantRequest = new NslcmGrantVnfRequest(); - NslcmGrantVnfResponse grantResponse = nslcmMgmr.grantVnf(grantRequest); - handleNslcmGrantResponse(grantResponse); - - CBAMTerminateVnfRequest cbamRequest = requestConverter.terminaterqConvert(driverRequest); - CBAMTerminateVnfResponse cbamResponse = cbamMgmr.terminateVnf(cbamRequest, vnfInstanceId); - - cbamMgmr.deleteVnf(vnfInstanceId); - - } catch (ClientProtocolException e) { - logger.error("TerminateVnfContinueRunnable run error ClientProtocolException", e); - } catch (IOException e) { - logger.error("TerminateVnfContinueRunnable run error IOException", e); - } - - } - - private void handleNslcmGrantResponse(NslcmGrantVnfResponse grantResponse) { - // TODO Auto-generated method stub - - } - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/adaptor/VnfmDriverMgmrIml.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/adaptor/VnfmDriverMgmrIml.java deleted file mode 100644 index 6c332441..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/adaptor/VnfmDriverMgmrIml.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.adaptor; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -import org.apache.http.HttpStatus; -import org.apache.http.client.ClientProtocolException; -import org.apache.log4j.Logger; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; - -import com.nokia.vfcadaptor.catalog.inf.CatalogMgmrInf; -import com.nokia.vfcadaptor.cbam.bo.CBAMCreateVnfRequest; -import com.nokia.vfcadaptor.cbam.bo.CBAMCreateVnfResponse; -import com.nokia.vfcadaptor.cbam.bo.CBAMHealVnfRequest; -import com.nokia.vfcadaptor.cbam.bo.CBAMHealVnfResponse; -import com.nokia.vfcadaptor.cbam.bo.CBAMQueryVnfResponse; -import com.nokia.vfcadaptor.cbam.bo.CBAMScaleVnfRequest; -import com.nokia.vfcadaptor.cbam.bo.CBAMScaleVnfResponse; -import com.nokia.vfcadaptor.cbam.bo.CBAMTerminateVnfRequest; -import com.nokia.vfcadaptor.cbam.bo.CBAMTerminateVnfResponse; -import com.nokia.vfcadaptor.cbam.inf.CbamMgmrInf; -import com.nokia.vfcadaptor.constant.CommonConstants; -import com.nokia.vfcadaptor.exception.VnfmDriverException; -import com.nokia.vfcadaptor.nslcm.bo.NslcmGrantVnfRequest; -import com.nokia.vfcadaptor.nslcm.bo.NslcmGrantVnfResponse; -import com.nokia.vfcadaptor.nslcm.bo.VnfmInfo; -import com.nokia.vfcadaptor.nslcm.inf.NslcmMgmrInf; -import com.nokia.vfcadaptor.vnfmdriver.bo.HealVnfRequest; -import com.nokia.vfcadaptor.vnfmdriver.bo.HealVnfResponse; -import com.nokia.vfcadaptor.vnfmdriver.bo.InstantiateVnfRequest; -import com.nokia.vfcadaptor.vnfmdriver.bo.InstantiateVnfResponse; -import com.nokia.vfcadaptor.vnfmdriver.bo.OperStatusVnfResponse; -import com.nokia.vfcadaptor.vnfmdriver.bo.QueryVnfResponse; -import com.nokia.vfcadaptor.vnfmdriver.bo.ScaleVnfRequest; -import com.nokia.vfcadaptor.vnfmdriver.bo.ScaleVnfResponse; -import com.nokia.vfcadaptor.vnfmdriver.bo.TerminateVnfRequest; -import com.nokia.vfcadaptor.vnfmdriver.bo.TerminateVnfResponse; -import com.nokia.vfcadaptor.vnfmdriver.bo.entity.ResponseDescriptor; -import com.nokia.vfcadaptor.vnfmdriver.bo.entity.ResponseHistoryList; -import com.nokia.vfcadaptor.vnfmdriver.inf.VnfmDriverMgmrInf; - -@Component -public class VnfmDriverMgmrIml implements VnfmDriverMgmrInf{ - private Logger logger = Logger.getLogger(VnfmDriverMgmrIml.class); - - @Autowired - Driver2CbamRequestConverter requestConverter; - - @Autowired - Cbam2DriverResponseConverter responseConverter; - - @Autowired - private CbamMgmrInf cbamMgmr; - - @Autowired - private CatalogMgmrInf catalogMgmr; - - @Autowired - private NslcmMgmrInf nslcmMgmr; - - public InstantiateVnfResponse instantiateVnf(InstantiateVnfRequest driverRequest, String vnfmId) throws VnfmDriverException { - InstantiateVnfResponse driverResponse; - try { - //step 1: query vnfm info - VnfmInfo vnfmInfo = nslcmMgmr.queryVnfm(vnfmId); - - if(vnfmInfo == null || vnfmId.equalsIgnoreCase(vnfmInfo.getVnfmId())) - { - throw new VnfmDriverException(HttpStatus.SC_INTERNAL_SERVER_ERROR, CommonConstants.HTTP_ERROR_DESC_500); - } - - //step 3: create vnf - CBAMCreateVnfRequest cbamRequest = requestConverter.createrqConvert(driverRequest); - CBAMCreateVnfResponse cbamResponse = cbamMgmr.createVnf(cbamRequest); - driverResponse = responseConverter.createspConvert(cbamResponse); - - String vnfInstanceId = driverResponse.getVnfInstanceId(); - String jobId = driverResponse.getJobId(); - continueInstantiateVnf(driverRequest, vnfInstanceId, jobId); - - - } catch (Exception e) { - throw new VnfmDriverException(HttpStatus.SC_INTERNAL_SERVER_ERROR, CommonConstants.HTTP_ERROR_DESC_500); - } - - return driverResponse; - } - - public void continueInstantiateVnf(InstantiateVnfRequest driverRequest, String vnfInstanceId, String jobId) { - InstantiateVnfContinueRunnable runnable = new InstantiateVnfContinueRunnable(driverRequest, vnfInstanceId, jobId, - nslcmMgmr, catalogMgmr, cbamMgmr, requestConverter); - - Thread thread = new Thread(runnable); - - thread.run(); - } - - public TerminateVnfResponse terminateVnf(TerminateVnfRequest driverRequest, String vnfmId, String vnfInstanceId) { - TerminateVnfResponse driverResponse; - try { - nslcmMgmr.queryVnfm(vnfmId); - driverResponse = generateTerminateVnfResponse(vnfInstanceId); - continueTerminateVnf(driverRequest, vnfInstanceId); - - } catch (Exception e) { - throw new VnfmDriverException(HttpStatus.SC_INTERNAL_SERVER_ERROR, CommonConstants.HTTP_ERROR_DESC_500); - } - - return driverResponse; - } - - private TerminateVnfResponse generateTerminateVnfResponse(String vnfInstanceId) { - TerminateVnfResponse response = new TerminateVnfResponse(); - //TODO - response.setJobId(""); - return response; - } - - public void continueTerminateVnf(TerminateVnfRequest driverRequest, String vnfInstanceId) { - TerminateVnfContinueRunnable runnable = new TerminateVnfContinueRunnable(driverRequest, vnfInstanceId, - nslcmMgmr, cbamMgmr, requestConverter); - - Thread thread = new Thread(runnable); - - thread.run(); - } - - - public QueryVnfResponse queryVnf(String vnfmId, String vnfInstanceId) { - QueryVnfResponse driverResponse; - try { - nslcmMgmr.queryVnfm(vnfmId); - CBAMQueryVnfResponse cbamResponse = cbamMgmr.queryVnf(vnfInstanceId); - driverResponse = responseConverter.queryspConvert(cbamResponse); - } catch (Exception e) { - throw new VnfmDriverException(HttpStatus.SC_INTERNAL_SERVER_ERROR, CommonConstants.HTTP_ERROR_DESC_500); - } - - return driverResponse; - } - - public OperStatusVnfResponse getOperStatus(String vnfmId, String jobId) { - OperStatusVnfResponse response = new OperStatusVnfResponse(); - - List list=new ArrayList(); - ResponseHistoryList relist=new ResponseHistoryList(); - relist.setErrorCode(41); - relist.setProgress(40); - relist.setResponseId(1); - relist.setStatus("proccessing"); - relist.setStatusDescription("OMC VMs are decommissioned in VIM"); - ResponseDescriptor res=new ResponseDescriptor(); - res.setErrorCode(41); - res.setProgress(40); - res.setResponseId(1); - res.setStatus("proccessing"); - res.setStatusDescription("OMC VMs are decommissioned in VIM"); - for(int i=0; i<2;i++) { - relist.setProgress(4+i); - list.add(relist); - } - res.setResponseHistoryList(list); - - response.setJobId("Jobid="+jobId); - response.setResponseDescriptor(res); - - return response; - } - - public ScaleVnfResponse scaleVnf(ScaleVnfRequest driverRequest, String vnfmId, String vnfInstanceId) throws VnfmDriverException { - ScaleVnfResponse driverResponse; - try { - nslcmMgmr.queryVnfm(vnfmId); - CBAMScaleVnfRequest cbamRequest = requestConverter.scaleconvert(driverRequest); - CBAMScaleVnfResponse cbamResponse = cbamMgmr.scaleVnf(cbamRequest, vnfInstanceId); - driverResponse = responseConverter.scalespconvert(cbamResponse); - } catch (Exception e) { - throw new VnfmDriverException(HttpStatus.SC_INTERNAL_SERVER_ERROR, CommonConstants.HTTP_ERROR_DESC_500); - } - - return driverResponse; - } - - public HealVnfResponse healVnf(HealVnfRequest driverRequest, String vnfmId, String vnfInstanceId) throws VnfmDriverException { - HealVnfResponse driverResponse; - try { - nslcmMgmr.queryVnfm(vnfmId); - CBAMHealVnfRequest cbamRequest = requestConverter.healconvert(driverRequest); - CBAMHealVnfResponse cbamResponse = cbamMgmr.healVnf(cbamRequest, vnfInstanceId); - driverResponse = responseConverter.healspconvert(cbamResponse); - } catch (Exception e) { - throw new VnfmDriverException(HttpStatus.SC_INTERNAL_SERVER_ERROR, CommonConstants.HTTP_ERROR_DESC_500); - } - - return driverResponse; - } - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/beans/ResourceType.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/beans/ResourceType.java deleted file mode 100644 index 0ce26da0..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/beans/ResourceType.java +++ /dev/null @@ -1,8 +0,0 @@ -package com.nokia.vfcadaptor.beans; - -public enum ResourceType { - VDU, - VL, - CP, - Storage -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/beans/VnfmJobExecutionInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/beans/VnfmJobExecutionInfo.java deleted file mode 100644 index ad95b1ff..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/beans/VnfmJobExecutionInfo.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.beans; - -import java.io.Serializable; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.Table; - - -@Entity -@Table(name = "vnfm_job_execution_record") -public class VnfmJobExecutionInfo implements Serializable{ - private static final long serialVersionUID = -2880159539002942812L; - - @Id - @GeneratedValue(strategy=GenerationType.AUTO) - private long jobId; - - @Column(name = "vnfmExecutionId") - private String vnfmExecutionId; - - @Column(name = "vnfInstanceId") - private String vnfInstanceId; - - @Column(name = "vnfmInterfceName") - private String vnfmInterfceName; - - @Column(name = "status") - private String status; - - public long getJobId() { - return jobId; - } - - public void setJobId(long jobId) { - this.jobId = jobId; - } - - public String getVnfmExecutionId() { - return vnfmExecutionId; - } - - public void setVnfmExecutionId(String vnfmExecutionId) { - this.vnfmExecutionId = vnfmExecutionId; - } - - public String getVnfInstanceId() { - return vnfInstanceId; - } - - public void setVnfInstanceId(String vnfInstanceId) { - this.vnfInstanceId = vnfInstanceId; - } - - public String getVnfmInterfceName() { - return vnfmInterfceName; - } - - public void setVnfmInterfceName(String vnfmInterfceName) { - this.vnfmInterfceName = vnfmInterfceName; - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status; - } - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/beans/VnfmResourceInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/beans/VnfmResourceInfo.java deleted file mode 100644 index d969428f..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/beans/VnfmResourceInfo.java +++ /dev/null @@ -1,81 +0,0 @@ -/* -* Copyright 2016-2017, Nokia Corporation -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 com.nokia.vfcadaptor.beans; - -import javax.persistence.Column; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; - -public class VnfmResourceInfo { - @Id - @GeneratedValue(strategy = GenerationType.AUTO) - private int id; - - @Column(name = "type") - private ResourceType type; - - @Column(name = "resourceDefinitionId") - private String resourceDefinitionId; - - @Column(name = "vdu") - private String vdu; - - @Column(name = "status") - private String status; - - public int getId() { - return id; - } - - public void setId(int id) { - this.id = id; - } - - public ResourceType getType() { - return type; - } - - public void setType(ResourceType type) { - this.type = type; - } - - public String getResourceDefinitionId() { - return resourceDefinitionId; - } - - public void setResourceDefinitionId(String resourceDefinitionId) { - this.resourceDefinitionId = resourceDefinitionId; - } - - public String getVdu() { - return vdu; - } - - public void setVdu(String vdu) { - this.vdu = vdu; - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status; - } - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/catalog/bo/CatalogQueryVnfRequest.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/catalog/bo/CatalogQueryVnfRequest.java deleted file mode 100644 index 8b47ac9e..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/catalog/bo/CatalogQueryVnfRequest.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.catalog.bo; - -public class CatalogQueryVnfRequest { - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/catalog/bo/CatalogQueryVnfResponse.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/catalog/bo/CatalogQueryVnfResponse.java deleted file mode 100644 index 761f54b0..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/catalog/bo/CatalogQueryVnfResponse.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.catalog.bo; - -import java.util.List; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.nokia.vfcadaptor.catalog.bo.entity.ImageInfo; -import com.nokia.vfcadaptor.catalog.bo.entity.VnfInstanceInfo; -import com.nokia.vfcadaptor.nslcm.bo.entity.VnfPackageInfo; - -public class CatalogQueryVnfResponse { - @JsonProperty("csarId") - private String csarId; - - @JsonProperty("packageInfo") - private VnfPackageInfo packageInfo; - - @JsonProperty("imageInfo") - private List imageInfo; - - @JsonProperty("vnfInstanceInfo") - private List vnfInstanceInfo; - - public String getCsarId() { - return csarId; - } - - public void setCsarId(String csarId) { - this.csarId = csarId; - } - - - - public VnfPackageInfo getPackageInfo() { - return packageInfo; - } - - public void setPackageInfo(VnfPackageInfo packageInfo) { - this.packageInfo = packageInfo; - } - - public List getImageInfo() { - return imageInfo; - } - - public void setImageInfo(List imageInfo) { - this.imageInfo = imageInfo; - } - - public List getVnfInstanceInfo() { - return vnfInstanceInfo; - } - - public void setVnfInstanceInfo(List vnfInstanceInfo) { - this.vnfInstanceInfo = vnfInstanceInfo; - } - - - - - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/catalog/bo/entity/ImageInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/catalog/bo/entity/ImageInfo.java deleted file mode 100644 index 568179bd..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/catalog/bo/entity/ImageInfo.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.catalog.bo.entity; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class ImageInfo { - - @JsonProperty("index") - private String index; - - @JsonProperty("fileName") - private String fileName; - - @JsonProperty("imageId") - private String imageId; - - @JsonProperty("vimId") - private String vimId; - - @JsonProperty("vimUser") - private String vimUser; - - @JsonProperty("tenant") - private String tenant; - - @JsonProperty("status") - private String status; - - public String getIndex() { - return index; - } - - public void setIndex(String index) { - this.index = index; - } - - public String getFileName() { - return fileName; - } - - public void setFileName(String fileName) { - this.fileName = fileName; - } - - public String getImageId() { - return imageId; - } - - public void setImageId(String imageId) { - this.imageId = imageId; - } - - public String getVimId() { - return vimId; - } - - public void setVimId(String vimId) { - this.vimId = vimId; - } - - public String getVimUser() { - return vimUser; - } - - public void setVimUser(String vimUser) { - this.vimUser = vimUser; - } - - public String getTenant() { - return tenant; - } - - public void setTenant(String tenant) { - this.tenant = tenant; - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status; - } - - - - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/catalog/bo/entity/VnfInstanceInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/catalog/bo/entity/VnfInstanceInfo.java deleted file mode 100644 index d3c81fdf..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/catalog/bo/entity/VnfInstanceInfo.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.catalog.bo.entity; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class VnfInstanceInfo { - - @JsonProperty("vnfInstanceId") - private String vnfInstanceId; - - @JsonProperty("vnfInstanceName") - private String vnfInstanceName; - - public String getVnfInstanceId() { - return vnfInstanceId; - } - - public void setVnfInstanceId(String vnfInstanceId) { - this.vnfInstanceId = vnfInstanceId; - } - - public String getVnfInstanceName() { - return vnfInstanceName; - } - - public void setVnfInstanceName(String vnfInstanceName) { - this.vnfInstanceName = vnfInstanceName; - } - - - - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/catalog/impl/CatalogMgmrImpl.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/catalog/impl/CatalogMgmrImpl.java deleted file mode 100644 index c3553800..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/catalog/impl/CatalogMgmrImpl.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.catalog.impl; - -import java.io.IOException; - -import org.apache.http.client.ClientProtocolException; -import org.apache.http.impl.client.HttpClientBuilder; -import org.apache.log4j.Logger; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import org.springframework.web.bind.annotation.RequestMethod; - -import com.google.gson.Gson; -import com.nokia.vfcadaptor.catalog.bo.CatalogQueryVnfResponse; -import com.nokia.vfcadaptor.catalog.inf.CatalogMgmrInf; -import com.nokia.vfcadaptor.common.bo.AdaptorEnv; -import com.nokia.vfcadaptor.constant.CommonConstants; -import com.nokia.vfcadaptor.http.client.HttpRequestProcessor; -import com.nokia.vfcadaptor.nslcm.bo.entity.VnfPackageInfo; - -@Component -public class CatalogMgmrImpl implements CatalogMgmrInf{ - private Logger logger = Logger.getLogger(CatalogMgmrImpl.class); - - private Gson gson = new Gson(); - - @Autowired - private AdaptorEnv adaptorEnv; - - @Autowired - private HttpClientBuilder httpClientBuilder; - - public VnfPackageInfo queryVnfPackage(String vnfPackageId) throws ClientProtocolException, IOException { - String url="http://" + adaptorEnv.getCatalogIp() + ":" + adaptorEnv.getCatalogPort() + String.format(CommonConstants.RetrieveVnfPackagePath, vnfPackageId); - HttpRequestProcessor processor = new HttpRequestProcessor(httpClientBuilder, RequestMethod.GET); - - String responseStr = processor.process(url); - - logger.info("CbamMgmrImpl -> queryVnfPackage, responseStr is " + responseStr); - - CatalogQueryVnfResponse resp = gson.fromJson(responseStr, CatalogQueryVnfResponse.class); - - return resp.getPackageInfo(); - } - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/catalog/inf/CatalogMgmrInf.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/catalog/inf/CatalogMgmrInf.java deleted file mode 100644 index bf7ae78c..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/catalog/inf/CatalogMgmrInf.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.catalog.inf; - -import java.io.IOException; - -import org.apache.http.client.ClientProtocolException; - -import com.nokia.vfcadaptor.nslcm.bo.entity.VnfPackageInfo; - -public interface CatalogMgmrInf { - public VnfPackageInfo queryVnfPackage(String vnfPackageId) throws ClientProtocolException, IOException; -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMCreateVnfRequest.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMCreateVnfRequest.java deleted file mode 100644 index 03578d66..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMCreateVnfRequest.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.cbam.bo; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class CBAMCreateVnfRequest { - @JsonProperty("vnfdId") - private String vnfdId; - - @JsonProperty("name") - private String name; - - @JsonProperty("description") - private String description; - - public String getVnfdId() { - return vnfdId; - } - - public void setVnfdId(String vnfdId) { - this.vnfdId = vnfdId; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMCreateVnfResponse.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMCreateVnfResponse.java deleted file mode 100644 index b4099da8..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMCreateVnfResponse.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.cbam.bo; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.nokia.vfcadaptor.cbam.bo.entity.ProblemDetails; -import com.nokia.vfcadaptor.cbam.bo.entity.VnfInfo; - -public class CBAMCreateVnfResponse { - @JsonProperty("vnfdId") - private VnfInfo vnfInfo; - - @JsonProperty("problemDetails") - private ProblemDetails problemDetails; - - public VnfInfo getVnfInfo() { - return vnfInfo; - } - - public void setVnfInfo(VnfInfo vnfInfo) { - this.vnfInfo = vnfInfo; - } - - public ProblemDetails getProblemDetails() { - return problemDetails; - } - - public void setProblemDetails(ProblemDetails problemDetails) { - this.problemDetails = problemDetails; - } - - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMHealVnfRequest.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMHealVnfRequest.java deleted file mode 100644 index 2918e3ce..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMHealVnfRequest.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.cbam.bo; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class CBAMHealVnfRequest { - - @JsonProperty("cause") - private String cause; - - @JsonProperty("additionalParams") - private Object additionalParams; - - - public String getCause() { - return cause; - } - - public void setCause(String cause) { - this.cause = cause; - } - - public Object getAdditionalParams() { - return additionalParams; - } - - public void setAdditionalParams(Object additionalParams) { - this.additionalParams = additionalParams; - } - - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMHealVnfResponse.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMHealVnfResponse.java deleted file mode 100644 index 4d9a4191..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMHealVnfResponse.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.cbam.bo; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.nokia.vfcadaptor.cbam.bo.entity.OperationExecution; -import com.nokia.vfcadaptor.cbam.bo.entity.ProblemDetails; - -public class CBAMHealVnfResponse { - @JsonProperty("operationExecution") - private OperationExecution operationExecution; - - @JsonProperty("problemDetails") - private ProblemDetails problemDetails; - - public OperationExecution getOperationExecution() { - return operationExecution; - } - - public void setOperationExecution(OperationExecution operationExecution) { - this.operationExecution = operationExecution; - } - - public ProblemDetails getProblemDetails() { - return problemDetails; - } - - public void setProblemDetails(ProblemDetails problemDetails) { - this.problemDetails = problemDetails; - } - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMInstantiateVnfRequest.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMInstantiateVnfRequest.java deleted file mode 100644 index 36628528..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMInstantiateVnfRequest.java +++ /dev/null @@ -1,82 +0,0 @@ - -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.cbam.bo; - -import java.util.List; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.nokia.vfcadaptor.cbam.bo.entity.ExtManagedVirtualLinkData; -import com.nokia.vfcadaptor.cbam.bo.entity.ExtVirtualLinkData; -import com.nokia.vfcadaptor.cbam.bo.entity.VimInfo; - -public class CBAMInstantiateVnfRequest { - - @JsonProperty("flavourId") - private String flavourId; - - @JsonProperty("vims") - private List vims; - - @JsonProperty("extVirtualLinks") - private List extVirtualLinks; - - @JsonProperty("extManagedVirtualLinks") - private List extManagedVirtualLinks; - - public String getFlavourId() { - return flavourId; - } - - public void setFlavourId(String flavourId) { - this.flavourId = flavourId; - } - - - - public List getVims() { - return vims; - } - - public void setVims(List vims) { - this.vims = vims; - } - - public List getExtVirtualLinks() { - return extVirtualLinks; - } - - public void setExtVirtualLinks(List extVirtualLinks) { - this.extVirtualLinks = extVirtualLinks; - } - - public List getExtManagedVirtualLinks() { - return extManagedVirtualLinks; - } - - public void setExtManagedVirtualLinks(List extManagedVirtualLinks) { - this.extManagedVirtualLinks = extManagedVirtualLinks; - } - - - - - - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMInstantiateVnfResponse.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMInstantiateVnfResponse.java deleted file mode 100644 index 276586e8..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMInstantiateVnfResponse.java +++ /dev/null @@ -1,52 +0,0 @@ - -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.cbam.bo; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.nokia.vfcadaptor.cbam.bo.entity.OperationExecution; -import com.nokia.vfcadaptor.cbam.bo.entity.ProblemDetails; - -public class CBAMInstantiateVnfResponse { - @JsonProperty("operationExecution") - private OperationExecution operationExecution; - - @JsonProperty("problemDetails") - private ProblemDetails problemDetails; - - public OperationExecution getOperationExecution() { - return operationExecution; - } - - public void setOperationExecution(OperationExecution operationExecution) { - this.operationExecution = operationExecution; - } - - public ProblemDetails getProblemDetails() { - return problemDetails; - } - - public void setProblemDetails(ProblemDetails problemDetails) { - this.problemDetails = problemDetails; - } - - - - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMOperExecutVnfRequest.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMOperExecutVnfRequest.java deleted file mode 100644 index 211448c1..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMOperExecutVnfRequest.java +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.cbam.bo; - -public class CBAMOperExecutVnfRequest { - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMOperExecutVnfResponse.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMOperExecutVnfResponse.java deleted file mode 100644 index c0f00b1e..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMOperExecutVnfResponse.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.cbam.bo; - -import java.util.List; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.nokia.vfcadaptor.cbam.bo.entity.OperationExecution; -import com.nokia.vfcadaptor.cbam.bo.entity.ProblemDetails; - -public class CBAMOperExecutVnfResponse { - - @JsonProperty("operationExecution") - private List operationExecution; - - @JsonProperty("problemDetails") - private ProblemDetails problemDetails; - - - public List getOperationExecution() { - return operationExecution; - } - - public void setOperationExecution(List operationExecution) { - this.operationExecution = operationExecution; - } - - public ProblemDetails getProblemDetails() { - return problemDetails; - } - - public void setProblemDetails(ProblemDetails problemDetails) { - this.problemDetails = problemDetails; - } - - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMQueryVnfResponse.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMQueryVnfResponse.java deleted file mode 100644 index 61e23134..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMQueryVnfResponse.java +++ /dev/null @@ -1,49 +0,0 @@ - -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.cbam.bo; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.nokia.vfcadaptor.cbam.bo.entity.ProblemDetails; -import com.nokia.vfcadaptor.cbam.bo.entity.VnfInfo; - -public class CBAMQueryVnfResponse { - @JsonProperty("vnfInfo") - private VnfInfo vnfInfo; - - @JsonProperty("problemDetails") - private ProblemDetails problemDetails; - - public VnfInfo getVnfInfo() { - return vnfInfo; - } - - public void setVnfInfo(VnfInfo vnfInfo) { - this.vnfInfo = vnfInfo; - } - - public ProblemDetails getProblemDetails() { - return problemDetails; - } - - public void setProblemDetails(ProblemDetails problemDetails) { - this.problemDetails = problemDetails; - } - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMScaleVnfRequest.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMScaleVnfRequest.java deleted file mode 100644 index 1c2abf2c..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMScaleVnfRequest.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.cbam.bo; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.nokia.vfcadaptor.constant.CommonEnum; - -public class CBAMScaleVnfRequest { - @JsonProperty("type") - private CommonEnum.ScaleDirection type; - - @JsonProperty("aspectId") - private String aspectId; - - @JsonProperty("numberOfSteps") - private Integer numberOfSteps; - - - @JsonProperty("additionalParams") - private Object additionalParams; - - - public CommonEnum.ScaleDirection getType() { - return type; - } - - - public void setType(CommonEnum.ScaleDirection type) { - this.type = type; - } - - - - public String getAspectId() { - return aspectId; - } - - - public void setAspectId(String aspectId) { - this.aspectId = aspectId; - } - - public Integer getNumberOfSteps() { - return numberOfSteps; - } - - - public void setNumberOfSteps(Integer numberOfSteps) { - this.numberOfSteps = numberOfSteps; - } - - - public Object getAdditionalParams() { - return additionalParams; - } - - - - public void setAdditionalParams(Object additionalParams) { - this.additionalParams = additionalParams; - } - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMScaleVnfResponse.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMScaleVnfResponse.java deleted file mode 100644 index c001f3af..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMScaleVnfResponse.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.cbam.bo; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.nokia.vfcadaptor.cbam.bo.entity.OperationExecution; -import com.nokia.vfcadaptor.cbam.bo.entity.ProblemDetails; - -public class CBAMScaleVnfResponse { - @JsonProperty("operationExecution") - private OperationExecution operationExecution; - - @JsonProperty("problemDetails") - private ProblemDetails problemDetails; - - public OperationExecution getOperationExecution() { - return operationExecution; - } - - public void setOperationExecution(OperationExecution operationExecution) { - this.operationExecution = operationExecution; - } - - public ProblemDetails getProblemDetails() { - return problemDetails; - } - - public void setProblemDetails(ProblemDetails problemDetails) { - this.problemDetails = problemDetails; - } - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMTerminateVnfRequest.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMTerminateVnfRequest.java deleted file mode 100644 index 7761f057..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMTerminateVnfRequest.java +++ /dev/null @@ -1,144 +0,0 @@ - -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.cbam.bo; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.nokia.vfcadaptor.constant.CommonEnum; - -public class CBAMTerminateVnfRequest { - - @JsonProperty("name") - private String name; - - @JsonProperty("description") - private String description; - - @JsonProperty("terminationType") - private CommonEnum.TerminationType terminationType; - - @JsonProperty("gracefulTerminationTimeout") - private Integer gracefulTerminationTimeout; - - @JsonProperty("additionalParams") - private Object additionalParams; - - - - public String getName() { - return name; - } - - - - - - - - public void setName(String name) { - this.name = name; - } - - - - - - - - public String getDescription() { - return description; - } - - - - - - - - public void setDescription(String description) { - this.description = description; - } - - - - - public CommonEnum.TerminationType getTerminationType() { - return terminationType; - } - - - - - - - - public void setTerminationType(CommonEnum.TerminationType terminationType) { - this.terminationType = terminationType; - } - - - - - - - - public Integer getGracefulTerminationTimeout() { - return gracefulTerminationTimeout; - } - - - - - - - - public void setGracefulTerminationTimeout(Integer gracefulTerminationTimeout) { - this.gracefulTerminationTimeout = gracefulTerminationTimeout; - } - - - - - - - - public Object getAdditionalParams() { - return additionalParams; - } - - - - - - - - public void setAdditionalParams(Object additionalParams) { - this.additionalParams = additionalParams; - } - - - - - - - - public enum TerminationType{ - GRACEFUL, FORCEFUL - - } - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMTerminateVnfResponse.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMTerminateVnfResponse.java deleted file mode 100644 index 8629d543..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMTerminateVnfResponse.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.cbam.bo; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.nokia.vfcadaptor.cbam.bo.entity.OperationExecution; -import com.nokia.vfcadaptor.cbam.bo.entity.ProblemDetails; - -public class CBAMTerminateVnfResponse { - @JsonProperty("operationExecution") - private OperationExecution operationExecution; - - @JsonProperty("problemDetails") - private ProblemDetails problemDetails; - - public OperationExecution getOperationExecution() { - return operationExecution; - } - - public void setOperationExecution(OperationExecution operationExecution) { - this.operationExecution = operationExecution; - } - - public ProblemDetails getProblemDetails() { - return problemDetails; - } - - public void setProblemDetails(ProblemDetails problemDetails) { - this.problemDetails = problemDetails; - } - - - - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/EndpointInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/EndpointInfo.java deleted file mode 100644 index 863920ac..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/EndpointInfo.java +++ /dev/null @@ -1,35 +0,0 @@ -/* -* Copyright 2016-2017 Nokia Corporation -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 com.nokia.vfcadaptor.cbam.bo.entity; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class EndpointInfo { - @JsonProperty("endpoint") - private String endpoint; - - public String getEndpoint() { - return endpoint; - } - - public void setEndpoint(String endpoint) { - this.endpoint = endpoint; - } - - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/ExtManagedVirtualLinkData.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/ExtManagedVirtualLinkData.java deleted file mode 100644 index 4a7ee81f..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/ExtManagedVirtualLinkData.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.cbam.bo.entity; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class ExtManagedVirtualLinkData { - @JsonProperty("extManagedVirtualLinkId") - private String extManagedVirtualLinkId; - - @JsonProperty("resourceId") - private String resourceId; - - @JsonProperty("virtualLinkDescId") - private String virtualLinkDescId; - - @JsonProperty("vimId") - private String vimId; - - public String getExtManagedVirtualLinkId() { - return extManagedVirtualLinkId; - } - - public void setExtManagedVirtualLinkId(String extManagedVirtualLinkId) { - this.extManagedVirtualLinkId = extManagedVirtualLinkId; - } - - public String getResourceId() { - return resourceId; - } - - public void setResourceId(String resourceId) { - this.resourceId = resourceId; - } - - public String getVirtualLinkDescId() { - return virtualLinkDescId; - } - - public void setVirtualLinkDescId(String virtualLinkDescId) { - this.virtualLinkDescId = virtualLinkDescId; - } - - public String getVimId() { - return vimId; - } - - public void setVimId(String vimId) { - this.vimId = vimId; - } - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/ExtVirtualLinkData.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/ExtVirtualLinkData.java deleted file mode 100644 index 3a7e4127..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/ExtVirtualLinkData.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.cbam.bo.entity; - -import java.util.ArrayList; -import java.util.List; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class ExtVirtualLinkData { - @JsonProperty("flavourId") - private String resourceId; - @JsonProperty("flavourId") - private String vimId; - @JsonProperty("flavourId") - private String extVirtualLinkId; - - @JsonProperty("extVirtualLink") - private List extCps=new ArrayList(); - - public String getResourceId() { - return resourceId; - } - - public void setResourceId(String resourceId) { - this.resourceId = resourceId; - } - - public String getVimId() { - return vimId; - } - - public void setVimId(String vimId) { - this.vimId = vimId; - } - - public String getExtVirtualLinkId() { - return extVirtualLinkId; - } - - public void setExtVirtualLinkId(String extVirtualLinkId) { - this.extVirtualLinkId = extVirtualLinkId; - } - - public List getExtCps() { - return extCps; - } - - public void setExtCps(List extCps) { - this.extCps = extCps; - } - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/Inputs.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/Inputs.java deleted file mode 100644 index d17d6cdc..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/Inputs.java +++ /dev/null @@ -1,66 +0,0 @@ -package com.nokia.vfcadaptor.cbam.bo.entity; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class Inputs { - - @JsonProperty("key_name") - private String key_name; - - @JsonProperty("value") - private String value; - - @JsonProperty("type") - private String type; - - @JsonProperty("default1") - private String default1; - - @JsonProperty("description") - private String description; - - public String getKey_name() { - return key_name; - } - - public void setKey_name(String key_name) { - this.key_name = key_name; - } - - public String getValue() { - return value; - } - - public void setValue(String value) { - this.value = value; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public String getDefault1() { - return default1; - } - - public void setDefault1(String default1) { - this.default1 = default1; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/InstantiatedVnfInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/InstantiatedVnfInfo.java deleted file mode 100644 index 1479e963..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/InstantiatedVnfInfo.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.cbam.bo.entity; - -public class InstantiatedVnfInfo { - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/NetworkAddress.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/NetworkAddress.java deleted file mode 100644 index b4ebb7f6..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/NetworkAddress.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.cbam.bo.entity; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class NetworkAddress { - @JsonProperty("subnetId") - private String subnetId; - @JsonProperty("ip") - private String ip; - @JsonProperty("mac") - private String mac; - public String getSubnetId() { - return subnetId; - } - public void setSubnetId(String subnetId) { - this.subnetId = subnetId; - } - public String getIp() { - return ip; - } - public void setIp(String ip) { - this.ip = ip; - } - public String getMac() { - return mac; - } - public void setMac(String mac) { - this.mac = mac; - } - - - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/OPENSTACK_V2_INFO.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/OPENSTACK_V2_INFO.java deleted file mode 100644 index 2cca3090..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/OPENSTACK_V2_INFO.java +++ /dev/null @@ -1,58 +0,0 @@ -/* -* Copyright 2016-2017 Nokia Corporation -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 com.nokia.vfcadaptor.cbam.bo.entity; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class OPENSTACK_V2_INFO { - - @JsonProperty("vimInfoType") - private VimInfoType vimInfoType; - @JsonProperty("interfaceInfo") - private EndpointInfo interfaceInfo; - @JsonProperty("id") - private String id; - @JsonProperty("accessInfo") - private OpenStackAccessInfoV2 accessInfo; - public VimInfoType getVimInfoType() { - return vimInfoType; - } - public void setVimInfoType(VimInfoType vimInfoType) { - this.vimInfoType = vimInfoType; - } - public EndpointInfo getInterfaceInfo() { - return interfaceInfo; - } - public void setInterfaceInfo(EndpointInfo interfaceInfo) { - this.interfaceInfo = interfaceInfo; - } - public String getId() { - return id; - } - public void setId(String id) { - this.id = id; - } - public OpenStackAccessInfoV2 getAccessInfo() { - return accessInfo; - } - public void setAccessInfo(OpenStackAccessInfoV2 accessInfo) { - this.accessInfo = accessInfo; - } - - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/OPENSTACK_V3_INFO.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/OPENSTACK_V3_INFO.java deleted file mode 100644 index 11cdfdfc..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/OPENSTACK_V3_INFO.java +++ /dev/null @@ -1,57 +0,0 @@ -/* -* Copyright 2016-2017 Nokia Corporation -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 com.nokia.vfcadaptor.cbam.bo.entity; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class OPENSTACK_V3_INFO { - - @JsonProperty("vimInfoType") - private VimInfoType vimInfoType; - @JsonProperty("interfaceInfo") - private EndpointInfo interfaceInfo; - @JsonProperty("id") - private String id; - @JsonProperty("accessInfo") - private OpenStackAccessInfoV3 accessInfo; - public VimInfoType getVimInfoType() { - return vimInfoType; - } - public void setVimInfoType(VimInfoType vimInfoType) { - this.vimInfoType = vimInfoType; - } - public EndpointInfo getInterfaceInfo() { - return interfaceInfo; - } - public void setInterfaceInfo(EndpointInfo interfaceInfo) { - this.interfaceInfo = interfaceInfo; - } - public String getId() { - return id; - } - public void setId(String id) { - this.id = id; - } - public OpenStackAccessInfoV3 getAccessInfo() { - return accessInfo; - } - public void setAccessInfo(OpenStackAccessInfoV3 accessInfo) { - this.accessInfo = accessInfo; - } - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/OTHER_VIM_INFO.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/OTHER_VIM_INFO.java deleted file mode 100644 index 0578ba16..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/OTHER_VIM_INFO.java +++ /dev/null @@ -1,45 +0,0 @@ -/* -* Copyright 2016-2017 Nokia Corporation -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 com.nokia.vfcadaptor.cbam.bo.entity; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class OTHER_VIM_INFO { - @JsonProperty("vimInfoType") - private VimInfoType vimInfoType; - - @JsonProperty("id") - private String id; - - public VimInfoType getVimInfoType() { - return vimInfoType; - } - - public void setVimInfoType(VimInfoType vimInfoType) { - this.vimInfoType = vimInfoType; - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/OpenStackAccessInfoV2.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/OpenStackAccessInfoV2.java deleted file mode 100644 index bc67a619..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/OpenStackAccessInfoV2.java +++ /dev/null @@ -1,70 +0,0 @@ -package com.nokia.vfcadaptor.cbam.bo.entity; - -/* -* Copyright 2016-2017 Nokia Corporation -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -import com.fasterxml.jackson.annotation.JsonProperty; - -public class OpenStackAccessInfoV2 { - - @JsonProperty("username") - private String username; - - @JsonProperty("password") - private String password; - - @JsonProperty("region") - private String region; - - @JsonProperty("tenant") - private String tenant; - - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public String getPassword() { - return password; - } - - public void setPassword(String password) { - this.password = password; - } - - public String getRegion() { - return region; - } - - public void setRegion(String region) { - this.region = region; - } - - public String getTenant() { - return tenant; - } - - public void setTenant(String tenant) { - this.tenant = tenant; - } - - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/OpenStackAccessInfoV3.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/OpenStackAccessInfoV3.java deleted file mode 100644 index 4cf5b6f9..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/OpenStackAccessInfoV3.java +++ /dev/null @@ -1,77 +0,0 @@ -/* -* Copyright 2016-2017 Nokia Corporation -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 com.nokia.vfcadaptor.cbam.bo.entity; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class OpenStackAccessInfoV3 { - @JsonProperty("username") - private String username; - - @JsonProperty("password") - private String password; - - @JsonProperty("region") - private String region; - - @JsonProperty("project") - private String project; - - @JsonProperty("domain") - private String domain; - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public String getPassword() { - return password; - } - - public void setPassword(String password) { - this.password = password; - } - - public String getRegion() { - return region; - } - - public void setRegion(String region) { - this.region = region; - } - - public String getProject() { - return project; - } - - public void setProject(String project) { - this.project = project; - } - - public String getDomain() { - return domain; - } - - public void setDomain(String domain) { - this.domain = domain; - } - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/OperationExecution.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/OperationExecution.java deleted file mode 100644 index efb8f8a4..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/OperationExecution.java +++ /dev/null @@ -1,208 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.cbam.bo.entity; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.nokia.vfcadaptor.constant.CommonEnum; - -public class OperationExecution { - - @JsonProperty("id") - private String id; - - @JsonProperty("vnfInstanceId") - private String vnfInstanceId; - - @JsonProperty("operationType") - private OperationType operationType; - - @JsonProperty("operationName") - private String operationName; - - @JsonProperty("status") - private CommonEnum.OperationStatus status; - - @JsonProperty("isCancelPending") - private boolean isCancelPending; - - @JsonProperty("CancelMode") - private CancelMode CancelMode; - - @JsonProperty("error") - private ProblemDetails error; - - @JsonProperty("startTime") - private String startTime; - - @JsonProperty("finishTime") - private String finishTime; - - @JsonProperty("grantId") - private String grantId; - - @JsonProperty("operationParams") - private Object operationParams; - - @JsonProperty("additionalData") - private Object additionalData; - - @JsonProperty("metadata") - private Object metadata; - - @JsonProperty("_links") - private _links _links; - - - - - - public enum OperationType{ - INSTANTIATE, SCALE, SCALE_TO_LEVEL, MODIFY_INFO, CHANGE_FLAVOUR, OPERATE, - HEAL, UPGRADE, TERMINATE, OTHER - } - - - - public enum CancelMode{ - GRACEFUL, FORCEFUL - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getVnfInstanceId() { - return vnfInstanceId; - } - - public void setVnfInstanceId(String vnfInstanceId) { - this.vnfInstanceId = vnfInstanceId; - } - - public OperationType getOperationType() { - return operationType; - } - - public void setOperationType(OperationType operationType) { - this.operationType = operationType; - } - - public String getOperationName() { - return operationName; - } - - public void setOperationName(String operationName) { - this.operationName = operationName; - } - - - - public CommonEnum.OperationStatus getStatus() { - return status; - } - - public void setStatus(CommonEnum.OperationStatus status) { - this.status = status; - } - - public boolean isCancelPending() { - return isCancelPending; - } - - public void setCancelPending(boolean isCancelPending) { - this.isCancelPending = isCancelPending; - } - - public CancelMode getCancelMode() { - return CancelMode; - } - - public void setCancelMode(CancelMode cancelMode) { - CancelMode = cancelMode; - } - - public ProblemDetails getError() { - return error; - } - - public void setError(ProblemDetails error) { - this.error = error; - } - - public String getStartTime() { - return startTime; - } - - public void setStartTime(String startTime) { - this.startTime = startTime; - } - - public String getFinishTime() { - return finishTime; - } - - public void setFinishTime(String finishTime) { - this.finishTime = finishTime; - } - - public String getGrantId() { - return grantId; - } - - public void setGrantId(String grantId) { - this.grantId = grantId; - } - - public Object getOperationParams() { - return operationParams; - } - - public void setOperationParams(Object operationParams) { - this.operationParams = operationParams; - } - - public Object getAdditionalData() { - return additionalData; - } - - public void setAdditionalData(Object additionalData) { - this.additionalData = additionalData; - } - - public Object getMetadata() { - return metadata; - } - - public void setMetadata(Object metadata) { - this.metadata = metadata; - } - - public _links get_links() { - return _links; - } - - public void set_links(_links _links) { - this._links = _links; - } - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/ProblemDetails.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/ProblemDetails.java deleted file mode 100644 index ead7e11a..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/ProblemDetails.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.cbam.bo.entity; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class ProblemDetails { - @JsonProperty("type") - private String type; - @JsonProperty("title") - private String title; - @JsonProperty("status") - private Integer status; - @JsonProperty("detail") - private String detail; - @JsonProperty("instance") - private String instance; - public String getType() { - return type; - } - public void setType(String type) { - this.type = type; - } - public String getTitle() { - return title; - } - public void setTitle(String title) { - this.title = title; - } - public Integer getStatus() { - return status; - } - public void setStatus(Integer status) { - this.status = status; - } - public String getDetail() { - return detail; - } - public void setDetail(String detail) { - this.detail = detail; - } - public String getInstance() { - return instance; - } - public void setInstance(String instance) { - this.instance = instance; - } - - - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/VCloudAccessInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/VCloudAccessInfo.java deleted file mode 100644 index 32a3abbe..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/VCloudAccessInfo.java +++ /dev/null @@ -1,57 +0,0 @@ -/* -* Copyright 2016-2017 Nokia Corporation -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 com.nokia.vfcadaptor.cbam.bo.entity; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class VCloudAccessInfo { - @JsonProperty("username") - private String username; - - @JsonProperty("password") - private String password; - - @JsonProperty("organization") - private String organization; - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public String getPassword() { - return password; - } - - public void setPassword(String password) { - this.password = password; - } - - public String getOrganization() { - return organization; - } - - public void setOrganization(String organization) { - this.organization = organization; - } - - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/VMWARE_VCLOUD_INFO.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/VMWARE_VCLOUD_INFO.java deleted file mode 100644 index 866a31f4..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/VMWARE_VCLOUD_INFO.java +++ /dev/null @@ -1,58 +0,0 @@ -/* -* Copyright 2016-2017 Nokia Corporation -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 com.nokia.vfcadaptor.cbam.bo.entity; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class VMWARE_VCLOUD_INFO { - - @JsonProperty("vimInfoType") - private VimInfoType vimInfoType; - @JsonProperty("interfaceInfo") - private EndpointInfo interfaceInfo; - @JsonProperty("id") - private String id; - @JsonProperty("accessInfo") - private VCloudAccessInfo accessInfo; - public VimInfoType getVimInfoType() { - return vimInfoType; - } - public void setVimInfoType(VimInfoType vimInfoType) { - this.vimInfoType = vimInfoType; - } - public EndpointInfo getInterfaceInfo() { - return interfaceInfo; - } - public void setInterfaceInfo(EndpointInfo interfaceInfo) { - this.interfaceInfo = interfaceInfo; - } - public String getId() { - return id; - } - public void setId(String id) { - this.id = id; - } - public VCloudAccessInfo getAccessInfo() { - return accessInfo; - } - public void setAccessInfo(VCloudAccessInfo accessInfo) { - this.accessInfo = accessInfo; - } - - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/VimComputeResourceFlavour.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/VimComputeResourceFlavour.java deleted file mode 100644 index 2add1c6f..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/VimComputeResourceFlavour.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.cbam.bo.entity; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class VimComputeResourceFlavour { - @JsonProperty("vimId") - private String vimId; - @JsonProperty("resourceId") - private String resourceId; - @JsonProperty("vnfdVirtualComputeDescId") - private String vnfdVirtualComputeDescId; - - public String getVimId() { - return vimId; - } - public void setVimId(String vimId) { - this.vimId = vimId; - } - public String getResourceId() { - return resourceId; - } - public void setResourceId(String resourceId) { - this.resourceId = resourceId; - } - public String getVnfdVirtualComputeDescId() { - return vnfdVirtualComputeDescId; - } - public void setVnfdVirtualComputeDescId(String vnfdVirtualComputeDescId) { - this.vnfdVirtualComputeDescId = vnfdVirtualComputeDescId; - } - - - - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/VimInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/VimInfo.java deleted file mode 100644 index c68d3b3b..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/VimInfo.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.cbam.bo.entity; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.nokia.vfcadaptor.constant.CommonEnum; - -public class VimInfo { - @JsonProperty("id") - private String id; - @JsonProperty("vimInfoType") - private VimInfoType vimInfoType; - - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public VimInfoType getVimInfoType() { - return vimInfoType; - } - - public void setVimInfoType(VimInfoType vimInfoType) { - this.vimInfoType = vimInfoType; - } - - - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/VimInfoType.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/VimInfoType.java deleted file mode 100644 index 9e4aa88f..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/VimInfoType.java +++ /dev/null @@ -1,56 +0,0 @@ -/* -* Copyright 2016-2017 Nokia Corporation -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 com.nokia.vfcadaptor.cbam.bo.entity; - -public class VimInfoType { - - public OPENSTACK_V2_INFO OPENSTACK_V2_INFO; - public OPENSTACK_V3_INFO OPENSTACK_V3_INFO; - public VMWARE_VCLOUD_INFO VMWARE_VCLOUD_INFO; - public OTHER_VIM_INFO OTHER_VIM_INFO; - public OPENSTACK_V2_INFO getOPENSTACK_V2_INFO() { - return OPENSTACK_V2_INFO; - } - public void setOPENSTACK_V2_INFO(OPENSTACK_V2_INFO oPENSTACK_V2_INFO) { - OPENSTACK_V2_INFO = oPENSTACK_V2_INFO; - } - public OPENSTACK_V3_INFO getOPENSTACK_V3_INFO() { - return OPENSTACK_V3_INFO; - } - public void setOPENSTACK_V3_INFO(OPENSTACK_V3_INFO oPENSTACK_V3_INFO) { - OPENSTACK_V3_INFO = oPENSTACK_V3_INFO; - } - public VMWARE_VCLOUD_INFO getVMWARE_VCLOUD_INFO() { - return VMWARE_VCLOUD_INFO; - } - public void setVMWARE_VCLOUD_INFO(VMWARE_VCLOUD_INFO vMWARE_VCLOUD_INFO) { - VMWARE_VCLOUD_INFO = vMWARE_VCLOUD_INFO; - } - public OTHER_VIM_INFO getOTHER_VIM_INFO() { - return OTHER_VIM_INFO; - } - public void setOTHER_VIM_INFO(OTHER_VIM_INFO oTHER_VIM_INFO) { - OTHER_VIM_INFO = oTHER_VIM_INFO; - } - - - - - - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/VimSoftwareImage.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/VimSoftwareImage.java deleted file mode 100644 index 53ea38b8..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/VimSoftwareImage.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.cbam.bo.entity; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class VimSoftwareImage { - @JsonProperty("vimId") - private String vimId; - @JsonProperty("vnfdSoftwareImageId") - private String vnfdSoftwareImageId; - @JsonProperty("resourceId") - private String resourceId; - public String getVimId() { - return vimId; - } - public void setVimId(String vimId) { - this.vimId = vimId; - } - public String getVnfdSoftwareImageId() { - return vnfdSoftwareImageId; - } - public void setVnfdSoftwareImageId(String vnfdSoftwareImageId) { - this.vnfdSoftwareImageId = vnfdSoftwareImageId; - } - public String getResourceId() { - return resourceId; - } - public void setResourceId(String resourceId) { - this.resourceId = resourceId; - } - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/VnfExtCpData.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/VnfExtCpData.java deleted file mode 100644 index 85c4fbeb..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/VnfExtCpData.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.cbam.bo.entity; - -import java.util.ArrayList; -import java.util.List; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class VnfExtCpData { - @JsonProperty("cpdId") - private String cpdId; - - @JsonProperty("addresses") - private List addresses=new ArrayList(); - - @JsonProperty("numDynamicAddresses") - private Integer numDynamicAddresses; - - public String getCpdId() { - return cpdId; - } - - public void setCpdId(String cpdId) { - this.cpdId = cpdId; - } - - public List getAddresses() { - return addresses; - } - - public void setAddresses(List addresses) { - this.addresses = addresses; - } - - public Integer getNumDynamicAddresses() { - return numDynamicAddresses; - } - - public void setNumDynamicAddresses(Integer numDynamicAddresses) { - this.numDynamicAddresses = numDynamicAddresses; - } - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/VnfInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/VnfInfo.java deleted file mode 100644 index 32cbcb26..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/VnfInfo.java +++ /dev/null @@ -1,208 +0,0 @@ - -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.cbam.bo.entity; - -import java.util.ArrayList; -import java.util.List; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.nokia.vfcadaptor.constant.CommonEnum; - -public class VnfInfo { - - @JsonProperty("id") - private String id; - - @JsonProperty("name") - private String name; - - @JsonProperty("description") - private String description; - - @JsonProperty("vnfdId") - private String vnfdId; - - @JsonProperty("vnfProvider") - private String vnfProvider; - - @JsonProperty("vnfProductName") - private String vnfProductName; - - @JsonProperty("vnfSoftwareVersion") - private String vnfSoftwareVersion; - - @JsonProperty("vnfdVersion") - private String vnfdVersion; - - @JsonProperty("onboardedVnfPkgInfoId") - private String onboardedVnfPkgInfoId; - - @JsonProperty("instantiationState") - private CommonEnum.InstantiationState instantiationState; - - @JsonProperty("operationExecution") - private List operationExecution=new ArrayList(); - - @JsonProperty("instantiatedVnfInfo") - private InstantiatedVnfInfo instantiatedVnfInfo; - - @JsonProperty("vnfConfigurableProperties") - private List vnfConfigurableProperties=new ArrayList(); - - @JsonProperty("extensions") - private List extensions=new ArrayList(); - - @JsonProperty("metadata") - private Object metadata; - - @JsonProperty("link") - private _links link;//todo - - - 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; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public String getVnfdId() { - return vnfdId; - } - - public void setVnfdId(String vnfdId) { - this.vnfdId = vnfdId; - } - - public String getVnfProvider() { - return vnfProvider; - } - - public void setVnfProvider(String vnfProvider) { - this.vnfProvider = vnfProvider; - } - - public String getVnfProductName() { - return vnfProductName; - } - - public void setVnfProductName(String vnfProductName) { - this.vnfProductName = vnfProductName; - } - - public String getVnfSoftwareVersion() { - return vnfSoftwareVersion; - } - - public void setVnfSoftwareVersion(String vnfSoftwareVersion) { - this.vnfSoftwareVersion = vnfSoftwareVersion; - } - - public String getVnfdVersion() { - return vnfdVersion; - } - - public void setVnfdVersion(String vnfdVersion) { - this.vnfdVersion = vnfdVersion; - } - - public String getOnboardedVnfPkgInfoId() { - return onboardedVnfPkgInfoId; - } - - public void setOnboardedVnfPkgInfoId(String onboardedVnfPkgInfoId) { - this.onboardedVnfPkgInfoId = onboardedVnfPkgInfoId; - } - - - - public CommonEnum.InstantiationState getInstantiationState() { - return instantiationState; - } - - public void setInstantiationState(CommonEnum.InstantiationState instantiationState) { - this.instantiationState = instantiationState; - } - - public List getOperationExecution() { - return operationExecution; - } - - public void setOperationExecution(List operationExecution) { - this.operationExecution = operationExecution; - } - - public InstantiatedVnfInfo getInstantiatedVnfInfo() { - return instantiatedVnfInfo; - } - - public void setInstantiatedVnfInfo(InstantiatedVnfInfo instantiatedVnfInfo) { - this.instantiatedVnfInfo = instantiatedVnfInfo; - } - - public List getVnfConfigurableProperties() { - return vnfConfigurableProperties; - } - - public void setVnfConfigurableProperties(List vnfConfigurableProperties) { - this.vnfConfigurableProperties = vnfConfigurableProperties; - } - - public List getExtensions() { - return extensions; - } - - public void setExtensions(List extensions) { - this.extensions = extensions; - } - - public Object getMetadata() { - return metadata; - } - - public void setMetadata(Object metadata) { - this.metadata = metadata; - } - - public _links getLink() { - return link; - } - - public void setLink(_links link) { - this.link = link; - } - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/VnfProperty.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/VnfProperty.java deleted file mode 100644 index 8941c393..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/VnfProperty.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.cbam.bo.entity; - -public class VnfProperty { - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/ZoneInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/ZoneInfo.java deleted file mode 100644 index 21c830c0..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/ZoneInfo.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.cbam.bo.entity; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class ZoneInfo { - - @JsonProperty("vimId") - private String vimId; - - @JsonProperty("resourceId") - private String resourceId; - - @JsonProperty("id") - private String id; - - public String getVimId() { - return vimId; - } - - public void setVimId(String vimId) { - this.vimId = vimId; - } - - public String getResourceId() { - return resourceId; - } - - public void setResourceId(String resourceId) { - this.resourceId = resourceId; - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - - - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/_links.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/_links.java deleted file mode 100644 index f7b2a4d4..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/_links.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.cbam.bo.entity; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class _links { - @JsonProperty("cancel") - private String cancel; - @JsonProperty("operationParams") - private String operationParams; - @JsonProperty("endNotification") - private String endNotification; - @JsonProperty("self") - private String self; - @JsonProperty("additionalData") - private String additionalData; - @JsonProperty("list") - private String list; - @JsonProperty("vnf") - private String vnf; - public String getCancel() { - return cancel; - } - public void setCancel(String cancel) { - this.cancel = cancel; - } - public String getOperationParams() { - return operationParams; - } - public void setOperationParams(String operationParams) { - this.operationParams = operationParams; - } - public String getEndNotification() { - return endNotification; - } - public void setEndNotification(String endNotification) { - this.endNotification = endNotification; - } - public String getSelf() { - return self; - } - public void setSelf(String self) { - this.self = self; - } - public String getAdditionalData() { - return additionalData; - } - public void setAdditionalData(String additionalData) { - this.additionalData = additionalData; - } - public String getList() { - return list; - } - public void setList(String list) { - this.list = list; - } - public String getVnf() { - return vnf; - } - public void setVnf(String vnf) { - this.vnf = vnf; - } - - - - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/controller/CbamController.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/controller/CbamController.java deleted file mode 100644 index d0a9158e..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/controller/CbamController.java +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.cbam.controller; - -import org.springframework.http.MediaType; -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.bind.annotation.ResponseBody; - -import com.nokia.vfcadaptor.cbam.bo.CBAMCreateVnfResponse; -import com.nokia.vfcadaptor.cbam.bo.CBAMHealVnfRequest; -import com.nokia.vfcadaptor.cbam.bo.CBAMHealVnfResponse; -import com.nokia.vfcadaptor.cbam.bo.CBAMInstantiateVnfRequest; -import com.nokia.vfcadaptor.cbam.bo.CBAMInstantiateVnfResponse; -import com.nokia.vfcadaptor.cbam.bo.CBAMOperExecutVnfRequest; -import com.nokia.vfcadaptor.cbam.bo.CBAMOperExecutVnfResponse; -import com.nokia.vfcadaptor.cbam.bo.CBAMQueryVnfResponse; -import com.nokia.vfcadaptor.cbam.bo.CBAMScaleVnfRequest; -import com.nokia.vfcadaptor.cbam.bo.CBAMScaleVnfResponse; -import com.nokia.vfcadaptor.cbam.bo.CBAMTerminateVnfRequest; -import com.nokia.vfcadaptor.cbam.bo.CBAMTerminateVnfResponse; -import com.nokia.vfcadaptor.cbam.bo.entity.OperationExecution; -import com.nokia.vfcadaptor.cbam.bo.entity.ProblemDetails; -import com.nokia.vfcadaptor.cbam.bo.entity.VnfInfo; - -@Controller -@RequestMapping(value = "/vnfm/lcm/v3") -public class CbamController { - - @RequestMapping(value = "/vnfs", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) - @ResponseBody - public CBAMCreateVnfResponse createVnf(CBAMInstantiateVnfRequest request) - { - CBAMCreateVnfResponse response = new CBAMCreateVnfResponse(); - VnfInfo op=new VnfInfo(); - op.setName("VNF_001"); - ProblemDetails pr=new ProblemDetails(); - pr.setStatus(200); - response.setVnfInfo(op); - response.setProblemDetails(pr); - return response; - } - @RequestMapping(value = "/vnfs/{vnfInstanceId}/instantiate", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) - @ResponseBody - public CBAMInstantiateVnfResponse initiateVnf(CBAMInstantiateVnfRequest request, @PathVariable("vnfInstanceId") String vnfInstanceId) - { - CBAMInstantiateVnfResponse response = new CBAMInstantiateVnfResponse(); -// response.setJobid("11234"); - - return response; - } - - @RequestMapping(value = "/vnfs/{vnfInstanceId}/terminate", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) - @ResponseBody - public CBAMTerminateVnfResponse terminateVnf(CBAMTerminateVnfRequest request, @PathVariable("vnfInstanceId") String vnfInstanceId) - { - CBAMTerminateVnfResponse response = new CBAMTerminateVnfResponse(); - OperationExecution op=new OperationExecution(); - op.setGrantId("89"); - ProblemDetails pr=new ProblemDetails(); - pr.setStatus(200); - response.setOperationExecution(op); - response.setProblemDetails(pr); - return response; - } - - @RequestMapping(value = "/vnfs/{vnfInstanceId}/scale", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) - @ResponseBody - public CBAMScaleVnfResponse scaleVnf(CBAMScaleVnfRequest request, @PathVariable("vnfInstanceId") String vnfInstanceId) - { - CBAMScaleVnfResponse response = new CBAMScaleVnfResponse(); - OperationExecution op=new OperationExecution(); - op.setGrantId("89"); - ProblemDetails pr=new ProblemDetails(); - pr.setStatus(200); - response.setOperationExecution(op); - response.setProblemDetails(pr); - return response; - } - - @RequestMapping(value = "/vnfs/{vnfInstanceId}/heal", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) - @ResponseBody - public CBAMHealVnfResponse healVnf(CBAMHealVnfRequest request, @PathVariable("vnfInstanceId") String vnfInstanceId) - { - CBAMHealVnfResponse response = new CBAMHealVnfResponse(); - OperationExecution op=new OperationExecution(); - op.setGrantId("89"); - ProblemDetails pr=new ProblemDetails(); - pr.setStatus(200); - response.setOperationExecution(op); - response.setProblemDetails(pr); - return response; - } - - - @RequestMapping(value = "/vnfs/{vnfInstanceId}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) - @ResponseBody - public CBAMQueryVnfResponse queryVnf(@PathVariable("vnfInstanceId") String vnfInstanceId) - { - CBAMQueryVnfResponse response = new CBAMQueryVnfResponse(); - VnfInfo op=new VnfInfo(); - op.setName("VNF_001"); - ProblemDetails pr=new ProblemDetails(); - pr.setStatus(200); - response.setVnfInfo(op); - response.setProblemDetails(pr); - return response; - } - - - @RequestMapping(value = "/operation_executions/{operationExecutionId}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) - @ResponseBody - public CBAMOperExecutVnfResponse operVnf(@PathVariable("operationExecutionId") String operationExecutionId) - { - CBAMOperExecutVnfResponse response = new CBAMOperExecutVnfResponse(); - ProblemDetails pr=new ProblemDetails(); - pr.setStatus(200); - response.setProblemDetails(pr); - return response; - } - - @RequestMapping(value = "/operation_executions/{operationExecutionId}/cancel", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE,consumes = MediaType.APPLICATION_JSON_VALUE) - @ResponseBody - public CBAMOperExecutVnfResponse operCancelVnf(CBAMOperExecutVnfRequest request,@PathVariable("operationExecutionId") String operationExecutionId) - { - CBAMOperExecutVnfResponse response = new CBAMOperExecutVnfResponse(); - ProblemDetails pr=new ProblemDetails(); - pr.setStatus(200); - response.setProblemDetails(pr); - return response; - } - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/impl/CbamMgmrImpl.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/impl/CbamMgmrImpl.java deleted file mode 100644 index 50e265cd..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/impl/CbamMgmrImpl.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.cbam.impl; - -import java.io.IOException; - -import org.apache.http.client.ClientProtocolException; -import org.apache.http.impl.client.HttpClientBuilder; -import org.apache.log4j.Logger; -import org.json.JSONObject; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.MediaType; -import org.springframework.stereotype.Component; -import org.springframework.web.bind.annotation.RequestMethod; - -import com.google.gson.Gson; -import com.nokia.vfcadaptor.cbam.bo.CBAMCreateVnfRequest; -import com.nokia.vfcadaptor.cbam.bo.CBAMCreateVnfResponse; -import com.nokia.vfcadaptor.cbam.bo.CBAMHealVnfRequest; -import com.nokia.vfcadaptor.cbam.bo.CBAMHealVnfResponse; -import com.nokia.vfcadaptor.cbam.bo.CBAMInstantiateVnfRequest; -import com.nokia.vfcadaptor.cbam.bo.CBAMInstantiateVnfResponse; -import com.nokia.vfcadaptor.cbam.bo.CBAMQueryVnfResponse; -import com.nokia.vfcadaptor.cbam.bo.CBAMScaleVnfRequest; -import com.nokia.vfcadaptor.cbam.bo.CBAMScaleVnfResponse; -import com.nokia.vfcadaptor.cbam.bo.CBAMTerminateVnfRequest; -import com.nokia.vfcadaptor.cbam.bo.CBAMTerminateVnfResponse; -import com.nokia.vfcadaptor.cbam.inf.CbamMgmrInf; -import com.nokia.vfcadaptor.common.bo.AdaptorEnv; -import com.nokia.vfcadaptor.constant.CommonConstants; -import com.nokia.vfcadaptor.http.client.HttpRequestProcessor; - -@Component -public class CbamMgmrImpl implements CbamMgmrInf { - private Logger logger = Logger.getLogger(CbamMgmrImpl.class); - - private Gson gson = new Gson(); - - @Autowired - private AdaptorEnv adaptorEnv; - - @Autowired - private HttpClientBuilder httpClientBuilder; - - private String retrieveToken() throws ClientProtocolException, IOException { - String result = null; - String url="https://" + adaptorEnv.getCbamIp() + CommonConstants.RetrieveCbamTokenPath; - HttpRequestProcessor processor = new HttpRequestProcessor(httpClientBuilder, RequestMethod.POST); - processor.addHdeader(CommonConstants.ACCEPT, "*/*"); - processor.addHdeader(CommonConstants.CONTENT_TYPE, MediaType.APPLICATION_FORM_URLENCODED_VALUE); - - String bodyPostStr = String.format(CommonConstants.RetrieveCbamTokenPostStr, adaptorEnv.getGrantType(), adaptorEnv.getClientId(), adaptorEnv.getClientSecret()); - processor.addPostEntity(bodyPostStr); - - String responseStr = processor.process(url); - - logger.info("CbamMgmrImpl -> retrieveToken, responseStr is " + responseStr); - - JSONObject tokenJsonObject = new JSONObject(responseStr); - - result = tokenJsonObject.getString(CommonConstants.CBAM_TOKEN_KEY); - - return result; - } - - public CBAMCreateVnfResponse createVnf(CBAMCreateVnfRequest cbamRequest) throws ClientProtocolException, IOException { - String httpPath = CommonConstants.CbamCreateVnfPath; - RequestMethod method = RequestMethod.POST; - - String responseStr = operateCbamHttpTask(cbamRequest, httpPath, method); - - logger.info("CbamMgmrImpl -> createVnf, responseStr is " + responseStr); - - CBAMCreateVnfResponse response = gson.fromJson(responseStr, CBAMCreateVnfResponse.class); - - return response; - } - - /* (non-Javadoc) - * @see com.nokia.vfcadaptor.cbam.impl.CbamMgmrInf#instantiateVnf(com.nokia.vfcadaptor.cbam.bo.CBAMInstantiateVnfRequest, java.lang.String) - */ - public CBAMInstantiateVnfResponse instantiateVnf(CBAMInstantiateVnfRequest cbamRequest, String vnfInstanceId) throws ClientProtocolException, IOException { - String httpPath = String.format(CommonConstants.CbamInstantiateVnfPath, vnfInstanceId); - RequestMethod method = RequestMethod.POST; - - String responseStr = operateCbamHttpTask(cbamRequest, httpPath, method); - - logger.info("CbamMgmrImpl -> instantiateVnf, responseStr is " + responseStr); - - CBAMInstantiateVnfResponse response = gson.fromJson(responseStr, CBAMInstantiateVnfResponse.class); - - return response; - } - - public CBAMTerminateVnfResponse terminateVnf(CBAMTerminateVnfRequest cbamRequest, String vnfInstanceId) throws ClientProtocolException, IOException { - String httpPath = String.format(CommonConstants.CbamTerminateVnfPath, vnfInstanceId); - RequestMethod method = RequestMethod.POST; - - String responseStr = operateCbamHttpTask(cbamRequest, httpPath, method); - - logger.info("CbamMgmrImpl -> terminateVnf, responseStr is " + responseStr); - - CBAMTerminateVnfResponse response = gson.fromJson(responseStr, CBAMTerminateVnfResponse.class); - - return response; - } - - public void deleteVnf(String vnfInstanceId) throws ClientProtocolException, IOException { - String httpPath = String.format(CommonConstants.CbamDeleteVnfPath, vnfInstanceId); - RequestMethod method = RequestMethod.DELETE; - - operateCbamHttpTask(null, httpPath, method); - - logger.info("CbamMgmrImpl -> deleteVnf."); - } - - /* (non-Javadoc) - * @see com.nokia.vfcadaptor.cbam.impl.CbamMgmrInf#scaleVnf(com.nokia.vfcadaptor.cbam.bo.CBAMScaleVnfRequest, java.lang.String) - */ - public CBAMScaleVnfResponse scaleVnf(CBAMScaleVnfRequest cbamRequest, String vnfInstanceId) throws ClientProtocolException, IOException { - String httpPath = String.format(CommonConstants.CbamScaleVnfPath, vnfInstanceId); - RequestMethod method = RequestMethod.POST; - - String responseStr = operateCbamHttpTask(cbamRequest, httpPath, method); - - CBAMScaleVnfResponse response = gson.fromJson(responseStr, CBAMScaleVnfResponse.class); - - return response; - } - - public CBAMHealVnfResponse healVnf(CBAMHealVnfRequest cbamRequest, String vnfInstanceId) throws ClientProtocolException, IOException { - String httpPath = String.format(CommonConstants.CbamHealVnfPath, vnfInstanceId); - RequestMethod method = RequestMethod.POST; - - String responseStr = operateCbamHttpTask(cbamRequest, httpPath, method); - - logger.info("CbamMgmrImpl -> healVnf, responseStr is " + responseStr); - - CBAMHealVnfResponse response = gson.fromJson(responseStr, CBAMHealVnfResponse.class); - - return response; - } - - public CBAMQueryVnfResponse queryVnf(String vnfInstanceId) throws ClientProtocolException, IOException { - String httpPath = String.format(CommonConstants.CbamQueryVnfPath, vnfInstanceId); - RequestMethod method = RequestMethod.GET; - - String responseStr = operateCbamHttpTask(null, httpPath, method); - - logger.info("CbamMgmrImpl -> queryVnf, responseStr is " + responseStr); - - CBAMQueryVnfResponse response = gson.fromJson(responseStr, CBAMQueryVnfResponse.class); - - return response; - } - - public String operateCbamHttpTask(Object httpBodyObj, String httpPath, RequestMethod method) throws ClientProtocolException, IOException { - String token = retrieveToken(); - String url="https://" + adaptorEnv.getCbamIp() + httpPath; - HttpRequestProcessor processor = new HttpRequestProcessor(httpClientBuilder, method); - processor.addHdeader(CommonConstants.AUTHORIZATION, "bearer " + token); - processor.addHdeader(CommonConstants.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE); - - processor.addPostEntity(gson.toJson(httpBodyObj)); - - String responseStr = processor.process(url); - - return responseStr; - } - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/inf/CbamMgmrInf.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/inf/CbamMgmrInf.java deleted file mode 100644 index fe0f424c..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/inf/CbamMgmrInf.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.cbam.inf; - -import java.io.IOException; - -import org.apache.http.client.ClientProtocolException; - -import com.nokia.vfcadaptor.cbam.bo.CBAMCreateVnfRequest; -import com.nokia.vfcadaptor.cbam.bo.CBAMCreateVnfResponse; -import com.nokia.vfcadaptor.cbam.bo.CBAMHealVnfRequest; -import com.nokia.vfcadaptor.cbam.bo.CBAMHealVnfResponse; -import com.nokia.vfcadaptor.cbam.bo.CBAMInstantiateVnfRequest; -import com.nokia.vfcadaptor.cbam.bo.CBAMInstantiateVnfResponse; -import com.nokia.vfcadaptor.cbam.bo.CBAMQueryVnfResponse; -import com.nokia.vfcadaptor.cbam.bo.CBAMScaleVnfRequest; -import com.nokia.vfcadaptor.cbam.bo.CBAMScaleVnfResponse; -import com.nokia.vfcadaptor.cbam.bo.CBAMTerminateVnfRequest; -import com.nokia.vfcadaptor.cbam.bo.CBAMTerminateVnfResponse; - -public interface CbamMgmrInf { - - public CBAMCreateVnfResponse createVnf(CBAMCreateVnfRequest cbamRequest) throws ClientProtocolException, IOException; - - public CBAMInstantiateVnfResponse instantiateVnf(CBAMInstantiateVnfRequest cbamRequest, String vnfInstanceId) - throws ClientProtocolException, IOException; - - public CBAMTerminateVnfResponse terminateVnf(CBAMTerminateVnfRequest cbamRequest, String vnfInstanceId) - throws ClientProtocolException, IOException; - - public CBAMScaleVnfResponse scaleVnf(CBAMScaleVnfRequest cbamRequest, String vnfInstanceId) - throws ClientProtocolException, IOException; - - public CBAMHealVnfResponse healVnf(CBAMHealVnfRequest cbamRequest, String vnfInstanceId) - throws ClientProtocolException, IOException; - - public CBAMQueryVnfResponse queryVnf(String vnfInstanceId) throws ClientProtocolException, IOException; - - public void deleteVnf(String vnfInstanceId) throws ClientProtocolException, IOException; -} \ No newline at end of file diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/common/bo/AdaptorEnv.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/common/bo/AdaptorEnv.java deleted file mode 100644 index 6400d7f3..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/common/bo/AdaptorEnv.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.common.bo; - -public class AdaptorEnv { - private String nslcmIp; - private String nslcmPort; - - //for retrieving token - private String cbamIp; - - private String grantType; - private String clientId; - private String clientSecret; - - private String catalogIp; - private String catalogPort; - - public String getCbamIp() { - return cbamIp; - } - - public void setCbamIp(String cbamIp) { - this.cbamIp = cbamIp; - } - - public String getGrantType() { - return grantType; - } - - public void setGrantType(String grantType) { - this.grantType = grantType; - } - - public String getClientId() { - return clientId; - } - - public void setClientId(String clientId) { - this.clientId = clientId; - } - - public String getClientSecret() { - return clientSecret; - } - - public void setClientSecret(String clientSecret) { - this.clientSecret = clientSecret; - } - - public String getCatalogIp() { - return catalogIp; - } - - public void setCatalogIp(String catalogIp) { - this.catalogIp = catalogIp; - } - - public String getCatalogPort() { - return catalogPort; - } - - public void setCatalogPort(String catalogPort) { - this.catalogPort = catalogPort; - } - - public String getNslcmIp() { - return nslcmIp; - } - - public void setNslcmIp(String nslcmIp) { - this.nslcmIp = nslcmIp; - } - - public String getNslcmPort() { - return nslcmPort; - } - - public void setNslcmPort(String nslcmPort) { - this.nslcmPort = nslcmPort; - } - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/common/bo/KeyValuePair.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/common/bo/KeyValuePair.java deleted file mode 100644 index c883d932..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/common/bo/KeyValuePair.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.common.bo; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class KeyValuePair { - @JsonProperty("key") - private String key; - - @JsonProperty("value") - private String value; - - public String getKey() { - return key; - } - public void setKey(String key) { - this.key = key; - } - public String getValue() { - return value; - } - public void setValue(String value) { - this.value = value; - } - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/constant/CommonConstants.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/constant/CommonConstants.java deleted file mode 100644 index c4a9d4a8..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/constant/CommonConstants.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.constant; - -public class CommonConstants { - public static final String HTTP_ERROR_DESC_500 = "Internal Server Error"; - - - public static final String CONTENT_TYPE = "Content-Type"; - public static final String ACCEPT = "Accept"; - - public static final String AUTH = "auth"; - public static final String AUTHORIZATION = "Authorization"; - public static final String UTF_8 = "utf-8"; - - //Nslcm path - public static final String RetrieveNvfmListPath = "/nslcm/vl/vnfms/%s"; - public static final String NslcmGrantPath = "/nslcm/v1/ns/grantvnf"; - public static final String NslcmNotifyPath = "/nslcm/v1/vnfs/%s/Notify"; - - //Catalog path - public static final String RetrieveVnfPackagePath = "/catalog/v1/vnfpackages/%s"; - - //CBAM -- Nokia VNFM path - public static final String CBAM_TOKEN_KEY = "access_token"; - public static final String RetrieveCbamTokenPath="/auth/realms/cbam/protocol/openid-connect/token"; - public static final String RetrieveCbamTokenPostStr="grant_type=%s&client_id=%s&client_secret=%s"; - public static final String CbamCreateVnfPath="/vnfs"; - public static final String CbamInstantiateVnfPath="/vnfs/%s/instantiate"; - public static final String CbamQueryVnfPath="/vnfs/%s"; - public static final String CbamDeleteVnfPath="/vnfs/%s"; - public static final String CbamTerminateVnfPath="/vnfs/%s/terminate"; - public static final String CbamGetOperStatusPath="/operation_executions/%s"; - public static final String CbamScaleVnfPath = "/vnfs/%s/scale"; - public static final String CbamHealVnfPath="/vnfs/%s/heal"; - - public static final String NSLCM_OPERATION_INSTANTIATE = "Instantiate"; - public static final String NSLCM_OPERATION_SCALE_OUT = "Scaleout"; - public static final String NSLCM_OPERATION_SCALE_IN = "Scalein"; - public static final String NSLCM_OPERATION_SCALE_UP = "Scaleup"; - public static final String NSLCM_OPERATION_SCALE_DOWN = "Scaledown"; - public static final String NSLCM_OPERATION_SCALE_TERMINATE = "Terminal"; -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/constant/CommonEnum.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/constant/CommonEnum.java deleted file mode 100644 index dcf1b4b3..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/constant/CommonEnum.java +++ /dev/null @@ -1,78 +0,0 @@ -/* -* Copyright 2016-2017 Nokia Corporation -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 com.nokia.vfcadaptor.constant; - -public class CommonEnum { - - // Termination - public enum TerminationType { - GRACEFUL, FORCEFUL - } - - // Instantiation - - public enum InstantiationState { - NOT_INSTANTIATED, INSTANTIATED - } - // operation status - - public enum OperationStatus { - STARTED, FINISHED, FAILED, OTHER - } - - // scale - public enum ScaleDirection { - OUT, IN - } - - public enum ScaleType { - SCALE_OUT, SCALE_IN - } - - public enum Deletionpending { - TRUR, fALSE - } - - // GrantVnf - public enum LifecycleOperation { - Instantiate, Scaleout, Scalein, Scaleup, Scaledown, Terminal - } - - public enum type { - VDU, VL, CP, Strorage - } - - // NotifyLcmEvents - public enum status { - start, result - } - - public enum changeType { - vl_added, vl_removed, vl_modified - - } - - public enum resourceType - - { - vm, volume, network, port - } - - public enum AffectchangeType{ - added,removed, modified - } - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/exception/VnfmDriverException.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/exception/VnfmDriverException.java deleted file mode 100644 index 9ce9f09d..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/exception/VnfmDriverException.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.exception; - -public class VnfmDriverException extends RuntimeException{ - private static final long serialVersionUID = 14325435432545L; - - private int httpStatus; - - public VnfmDriverException(int httpStatus, String message) - { - super(message); - this.httpStatus = httpStatus; - } - - public int getHttpStatus() { - return httpStatus; - } - - public void setHttpStatus(int httpStatus) { - this.httpStatus = httpStatus; - } - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/http/client/HttpClientUtils.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/http/client/HttpClientUtils.java deleted file mode 100644 index f00b5664..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/http/client/HttpClientUtils.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.http.client; - -import java.security.cert.CertificateException; -import java.security.cert.X509Certificate; - -import javax.net.ssl.HostnameVerifier; -import javax.net.ssl.SSLContext; - -import org.apache.http.client.methods.HttpDelete; -import org.apache.http.client.methods.HttpGet; -import org.apache.http.client.methods.HttpPost; -import org.apache.http.client.methods.HttpRequestBase; -import org.apache.http.config.Registry; -import org.apache.http.config.RegistryBuilder; -import org.apache.http.conn.socket.ConnectionSocketFactory; -import org.apache.http.conn.socket.PlainConnectionSocketFactory; -import org.apache.http.conn.ssl.NoopHostnameVerifier; -import org.apache.http.conn.ssl.SSLConnectionSocketFactory; -import org.apache.http.impl.client.HttpClientBuilder; -import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; -import org.apache.http.ssl.SSLContextBuilder; -import org.apache.http.ssl.TrustStrategy; -import org.apache.log4j.Logger; -import org.springframework.web.bind.annotation.RequestMethod; - -public class HttpClientUtils { - private final static Logger logger = Logger.getLogger(HttpClientUtils.class); - - public static HttpClientBuilder createHttpClientBuilder() { - HttpClientBuilder httpClientBuilder = HttpClientBuilder.create(); - - SSLContext sslContext = null; - try { - sslContext = new SSLContextBuilder().loadTrustMaterial(null, new TrustStrategy() { - public boolean isTrusted(X509Certificate[] arg0, String arg1) throws CertificateException { - return true; - } - }).build(); - } catch (Exception e) { - logger.error("Error to createHttpClientBuilder", e); - } - httpClientBuilder.setSSLContext(sslContext); - - HostnameVerifier hostnameVerifier = NoopHostnameVerifier.INSTANCE; - - SSLConnectionSocketFactory sslSocketFactory = new SSLConnectionSocketFactory(sslContext, hostnameVerifier); - Registry socketFactoryRegistry = RegistryBuilder.create() - .register("http", PlainConnectionSocketFactory.getSocketFactory()) - .register("https", sslSocketFactory) - .build(); - - PoolingHttpClientConnectionManager connMgr = new PoolingHttpClientConnectionManager( socketFactoryRegistry); - connMgr.setMaxTotal(200); - connMgr.setDefaultMaxPerRoute(50); - httpClientBuilder.setConnectionManager(connMgr); - return httpClientBuilder; - } - - public static HttpRequestBase getHttpRequest(RequestMethod requestMethod) { - HttpRequestBase base = null; - switch(requestMethod) { - case GET: - base = new HttpGet(); - break; - case DELETE: - base = new HttpDelete(); - break; - default: - base = new HttpPost(); - break; - } - return base; - } -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/http/client/HttpRequestProcessor.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/http/client/HttpRequestProcessor.java deleted file mode 100644 index 0e8903a8..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/http/client/HttpRequestProcessor.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.http.client; - -import java.io.IOException; -import java.net.URI; - -import org.apache.http.HttpEntity; -import org.apache.http.HttpResponse; -import org.apache.http.client.ClientProtocolException; -import org.apache.http.client.methods.HttpPost; -import org.apache.http.client.methods.HttpRequestBase; -import org.apache.http.entity.StringEntity; -import org.apache.http.impl.client.CloseableHttpClient; -import org.apache.http.impl.client.HttpClientBuilder; -import org.apache.http.util.EntityUtils; -import org.springframework.web.bind.annotation.RequestMethod; - -import com.nokia.vfcadaptor.constant.CommonConstants; - -public class HttpRequestProcessor { - private CloseableHttpClient httpClient; - private HttpRequestBase httpRequest; - - public HttpRequestProcessor(HttpClientBuilder httpClientBuilder, RequestMethod requestMethod) - { - httpClient = httpClientBuilder.build(); - httpRequest = HttpClientUtils.getHttpRequest(requestMethod); - } - - public String process(String url) throws ClientProtocolException, IOException - { - httpRequest.setURI(URI.create(url)); - - HttpResponse response = httpClient.execute(httpRequest); - HttpEntity resEntity = response.getEntity(); - String responseContent = ""; - if (resEntity != null) { - responseContent = EntityUtils.toString(resEntity, CommonConstants.UTF_8); - EntityUtils.consume(resEntity); - } - httpClient.close(); - - return responseContent; - } - - public void addHdeader(String key, String value) { - httpRequest.setHeader(key, value); - - } - - public void addPostEntity(String bodyStr) { - ((HttpPost)httpRequest).setEntity(new StringEntity(bodyStr, CommonConstants.UTF_8)); - - } -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/NslcmGrantVnfRequest.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/NslcmGrantVnfRequest.java deleted file mode 100644 index b6d1f92f..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/NslcmGrantVnfRequest.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.nslcm.bo; - -import java.util.List; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.nokia.vfcadaptor.common.bo.KeyValuePair; -import com.nokia.vfcadaptor.constant.CommonEnum; -import com.nokia.vfcadaptor.nslcm.bo.entity.ResourceDefinition; - -public class NslcmGrantVnfRequest { - - @JsonProperty("vnfInstanceId") - private String vnfInstanceId; - - @JsonProperty("vnfDescriptorId") - private String vnfDescriptorId; - - @JsonProperty("lifecycleOperation") - private CommonEnum.LifecycleOperation lifecycleOperation; - - @JsonProperty("jobId") - private String jobId; - - @JsonProperty("addResource") - private List addResource; - - @JsonProperty("removeResource") - private List removeResource; - - @JsonProperty("additionalParam") - private List additionalParam; - - public String getVnfInstanceId() { - return vnfInstanceId; - } - - public void setVnfInstanceId(String vnfInstanceId) { - this.vnfInstanceId = vnfInstanceId; - } - - public String getVnfDescriptorId() { - return vnfDescriptorId; - } - - public void setVnfDescriptorId(String vnfDescriptorId) { - this.vnfDescriptorId = vnfDescriptorId; - } - - public CommonEnum.LifecycleOperation getLifecycleOperation() { - return lifecycleOperation; - } - - public void setLifecycleOperation(CommonEnum.LifecycleOperation lifecycleOperation) { - this.lifecycleOperation = lifecycleOperation; - } - - public String getJobId() { - return jobId; - } - - public void setJobId(String jobId) { - this.jobId = jobId; - } - - public List getAdditionalParam() { - return additionalParam; - } - - public void setAdditionalParam(List additionalParam) { - this.additionalParam = additionalParam; - } - - public List getAddResource() { - return addResource; - } - - public void setAddResource(List addResource) { - this.addResource = addResource; - } - - public List getRemoveResource() { - return removeResource; - } - - public void setRemoveResource(List removeResource) { - this.removeResource = removeResource; - } - - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/NslcmGrantVnfResponse.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/NslcmGrantVnfResponse.java deleted file mode 100644 index f4169c63..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/NslcmGrantVnfResponse.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.nslcm.bo; - -import java.util.List; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.nokia.vfcadaptor.nslcm.bo.entity.ResourceDefinition; -import com.nokia.vfcadaptor.nslcm.bo.entity.VimAssets; -import com.nokia.vfcadaptor.nslcm.bo.entity.VimInfo; - -public class NslcmGrantVnfResponse { - - @JsonProperty("vim") - private VimInfo vim; - @JsonProperty("vimAssets") - private VimAssets vimAssets; - - @JsonProperty("additionalParam") - private List additionalParam; - - public VimInfo getVim() { - return vim; - } - - public void setVim(VimInfo vim) { - this.vim = vim; - } - - public VimAssets getVimAssets() { - return vimAssets; - } - - public void setVimAssets(VimAssets vimAssets) { - this.vimAssets = vimAssets; - } - - public List getAdditionalParam() { - return additionalParam; - } - - public void setAdditionalParam(List additionalParam) { - this.additionalParam = additionalParam; - } - - - - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/NslcmNotifyLCMEventsRequest.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/NslcmNotifyLCMEventsRequest.java deleted file mode 100644 index 9552cd81..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/NslcmNotifyLCMEventsRequest.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.nslcm.bo; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.nokia.vfcadaptor.constant.CommonEnum; -import com.nokia.vfcadaptor.nslcm.bo.entity.AffectedVirtualLink; -import com.nokia.vfcadaptor.nslcm.bo.entity.AffectedVirtualStorage; -import com.nokia.vfcadaptor.nslcm.bo.entity.AffectedVnfc; - -public class NslcmNotifyLCMEventsRequest { - - @JsonProperty("status") - private CommonEnum.status status; - - @JsonProperty("vnfInstanceId") - private String vnfInstanceId; - @JsonProperty("operation") - private String operation; - @JsonProperty("jobId") - private String jobId; - @JsonProperty("affectedVnfc") - private AffectedVnfc affectedVnfc; - @JsonProperty("affectedVl") - private AffectedVirtualLink affectedVl; - @JsonProperty("affectedVirtualStorage") - private AffectedVirtualStorage affectedVirtualStorage; - public CommonEnum.status getStatus() { - return status; - } - public void setStatus(CommonEnum.status status) { - this.status = status; - } - public String getVnfInstanceId() { - return vnfInstanceId; - } - public void setVnfInstanceId(String vnfInstanceId) { - this.vnfInstanceId = vnfInstanceId; - } - public String getOperation() { - return operation; - } - public void setOperation(String operation) { - this.operation = operation; - } - public String getJobId() { - return jobId; - } - public void setJobId(String jobId) { - this.jobId = jobId; - } - public AffectedVnfc getAffectedVnfc() { - return affectedVnfc; - } - public void setAffectedVnfc(AffectedVnfc affectedVnfc) { - this.affectedVnfc = affectedVnfc; - } - public AffectedVirtualLink getAffectedVl() { - return affectedVl; - } - public void setAffectedVl(AffectedVirtualLink affectedVl) { - this.affectedVl = affectedVl; - } - public AffectedVirtualStorage getAffectedVirtualStorage() { - return affectedVirtualStorage; - } - public void setAffectedVirtualStorage(AffectedVirtualStorage affectedVirtualStorage) { - this.affectedVirtualStorage = affectedVirtualStorage; - } - - - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/VnfmInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/VnfmInfo.java deleted file mode 100644 index 1d0d295e..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/VnfmInfo.java +++ /dev/null @@ -1,153 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.nslcm.bo; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class VnfmInfo { - @JsonProperty("vnfmId") - private String vnfmId; - - @JsonProperty("name") - private String name; - - @JsonProperty("type") - private String type; - - @JsonProperty("url") - private String url; - - @JsonProperty("userName") - private String userName; - - @JsonProperty("password") - private String password; - - @JsonProperty("vimId") - private String vimId; - - @JsonProperty("vendor") - private String vendor; - - @JsonProperty("version") - private String version; - - @JsonProperty("description") - private String description; - - @JsonProperty("certificateUrl") - private String certificateUrl; - - @JsonProperty("createTime") - private String createTime; - - public String getVnfmId() { - return vnfmId; - } - - public void setVnfmId(String vnfmId) { - this.vnfmId = vnfmId; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public String getUrl() { - return url; - } - - public void setUrl(String url) { - this.url = url; - } - - public String getUserName() { - return userName; - } - - public void setUserName(String userName) { - this.userName = userName; - } - - public String getPassword() { - return password; - } - - public void setPassword(String password) { - this.password = password; - } - - public String getVimId() { - return vimId; - } - - public void setVimId(String vimId) { - this.vimId = vimId; - } - - public String getVendor() { - return vendor; - } - - public void setVendor(String vendor) { - this.vendor = vendor; - } - - public String getVersion() { - return version; - } - - public void setVersion(String version) { - this.version = version; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public String getCertificateUrl() { - return certificateUrl; - } - - public void setCertificateUrl(String certificateUrl) { - this.certificateUrl = certificateUrl; - } - - public String getCreateTime() { - return createTime; - } - - public void setCreateTime(String createTime) { - this.createTime = createTime; - } -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/AccessInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/AccessInfo.java deleted file mode 100644 index 2d550227..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/AccessInfo.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.nslcm.bo.entity; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class AccessInfo { - - @JsonProperty("tenant") - private String tenant; - - @JsonProperty("username") - private String username; - - @JsonProperty("password") - private String password; - - public String getTenant() { - return tenant; - } - - public void setTenant(String tenant) { - this.tenant = tenant; - } - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public String getPassword() { - return password; - } - - public void setPassword(String password) { - this.password = password; - } - - - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/AffectedVirtualLink.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/AffectedVirtualLink.java deleted file mode 100644 index 28020ed0..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/AffectedVirtualLink.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.nslcm.bo.entity; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.nokia.vfcadaptor.constant.CommonEnum; - -public class AffectedVirtualLink { - @JsonProperty("vlInstanceId") - private String vlInstanceId; - @JsonProperty("vldid") - private String vldid; - @JsonProperty("changeType") - private CommonEnum.changeType changeType; - - @JsonProperty("networkResource") - private ResourceHandle networkResource; - - public String getVlInstanceId() { - return vlInstanceId; - } - - public void setVlInstanceId(String vlInstanceId) { - this.vlInstanceId = vlInstanceId; - } - - public String getVldid() { - return vldid; - } - - public void setVldid(String vldid) { - this.vldid = vldid; - } - - public CommonEnum.changeType getChangeType() { - return changeType; - } - - public void setChangeType(CommonEnum.changeType changeType) { - this.changeType = changeType; - } - - public ResourceHandle getNetworkResource() { - return networkResource; - } - - public void setNetworkResource(ResourceHandle networkResource) { - this.networkResource = networkResource; - } - - - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/AffectedVirtualStorage.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/AffectedVirtualStorage.java deleted file mode 100644 index 5080d4e0..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/AffectedVirtualStorage.java +++ /dev/null @@ -1,56 +0,0 @@ -/* -* Copyright 2016-2017 Nokia Corporation -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 com.nokia.vfcadaptor.nslcm.bo.entity; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class AffectedVirtualStorage { - @JsonProperty("vsInstanceId") - private String vsInstanceId; - @JsonProperty("vsdId") - private String vsdId; - - @JsonProperty("changeType") - private String changeType; - @JsonProperty("storageResource") - private String storageResource; - public String getVsInstanceId() { - return vsInstanceId; - } - public void setVsInstanceId(String vsInstanceId) { - this.vsInstanceId = vsInstanceId; - } - public String getVsdId() { - return vsdId; - } - public void setVsdId(String vsdId) { - this.vsdId = vsdId; - } - public String getChangeType() { - return changeType; - } - public void setChangeType(String changeType) { - this.changeType = changeType; - } - public String getStorageResource() { - return storageResource; - } - public void setStorageResource(String storageResource) { - this.storageResource = storageResource; - } - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/AffectedVnfc.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/AffectedVnfc.java deleted file mode 100644 index 5f1fea01..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/AffectedVnfc.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.nslcm.bo.entity; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.nokia.vfcadaptor.constant.CommonEnum; - -public class AffectedVnfc { - @JsonProperty("vnfcInstanceId") - private String vnfcInstanceId; - @JsonProperty("vduId") - private String vduId; - @JsonProperty("changeType") - private CommonEnum.AffectchangeType changeType; - @JsonProperty("storageResource") - private ResourceHandle storageResource; - public String getVnfcInstanceId() { - return vnfcInstanceId; - } - public void setVnfcInstanceId(String vnfcInstanceId) { - this.vnfcInstanceId = vnfcInstanceId; - } - public String getVduId() { - return vduId; - } - public void setVduId(String vduId) { - this.vduId = vduId; - } - public CommonEnum.AffectchangeType getChangeType() { - return changeType; - } - public void setChangeType(CommonEnum.AffectchangeType changeType) { - this.changeType = changeType; - } - public ResourceHandle getStorageResource() { - return storageResource; - } - public void setStorageResource(ResourceHandle storageResource) { - this.storageResource = storageResource; - } - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/GrantInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/GrantInfo.java deleted file mode 100644 index 47b41f97..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/GrantInfo.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.nslcm.bo.entity; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class GrantInfo { - - @JsonProperty("resourceDefinitionId") - private String resourceDefinitionId; - - @JsonProperty("reservationId") - private String reservationId; - - @JsonProperty("vimId") - private String vimId; - - @JsonProperty("resourceProviderId") - private String resourceProviderId; - - @JsonProperty("zoneId") - private String zoneId; - - public String getResourceDefinitionId() { - return resourceDefinitionId; - } - - public void setResourceDefinitionId(String resourceDefinitionId) { - this.resourceDefinitionId = resourceDefinitionId; - } - - public String getReservationId() { - return reservationId; - } - - public void setReservationId(String reservationId) { - this.reservationId = reservationId; - } - - public String getVimId() { - return vimId; - } - - public void setVimId(String vimId) { - this.vimId = vimId; - } - - public String getResourceProviderId() { - return resourceProviderId; - } - - public void setResourceProviderId(String resourceProviderId) { - this.resourceProviderId = resourceProviderId; - } - - public String getZoneId() { - return zoneId; - } - - public void setZoneId(String zoneId) { - this.zoneId = zoneId; - } - - - - - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/InterfaceInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/InterfaceInfo.java deleted file mode 100644 index b0a348ee..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/InterfaceInfo.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.nslcm.bo.entity; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class InterfaceInfo { - - @JsonProperty("vimType") - private String vimType; - - @JsonProperty("apiVersion") - private String apiVersion; - - @JsonProperty("protocolType") - private String protocolType; - - public String getVimType() { - return vimType; - } - - public void setVimType(String vimType) { - this.vimType = vimType; - } - - public String getApiVersion() { - return apiVersion; - } - - public void setApiVersion(String apiVersion) { - this.apiVersion = apiVersion; - } - - public String getProtocolType() { - return protocolType; - } - - public void setProtocolType(String protocolType) { - this.protocolType = protocolType; - } - - - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/ResourceDefinition.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/ResourceDefinition.java deleted file mode 100644 index 9b18b007..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/ResourceDefinition.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.nslcm.bo.entity; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.nokia.vfcadaptor.constant.CommonEnum; - -public class ResourceDefinition { - - @JsonProperty("type") - private CommonEnum.type type; - - @JsonProperty("resourceDefinitionId") - private String resourceDefinitionId; - - @JsonProperty("vdu") - private String vdu; - - public CommonEnum.type getType() { - return type; - } - - public void setType(CommonEnum.type type) { - this.type = type; - } - - public String getResourceDefinitionId() { - return resourceDefinitionId; - } - - public void setResourceDefinitionId(String resourceDefinitionId) { - this.resourceDefinitionId = resourceDefinitionId; - } - - public String getVdu() { - return vdu; - } - - public void setVdu(String vdu) { - this.vdu = vdu; - } - - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/ResourceHandle.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/ResourceHandle.java deleted file mode 100644 index ce7f9ccb..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/ResourceHandle.java +++ /dev/null @@ -1,52 +0,0 @@ -/* -* Copyright 2016-2017 Nokia Corporation -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 com.nokia.vfcadaptor.nslcm.bo.entity; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.nokia.vfcadaptor.constant.CommonEnum; - -public class ResourceHandle { - - @JsonProperty("resourceType") - private CommonEnum.resourceType resourceType; - @JsonProperty("resourceId") - private String resourceId; - @JsonProperty("resourceName") - private String resourceName; - public CommonEnum.resourceType getResourceType() { - return resourceType; - } - public void setResourceType(CommonEnum.resourceType resourceType) { - this.resourceType = resourceType; - } - public String getResourceId() { - return resourceId; - } - public void setResourceId(String resourceId) { - this.resourceId = resourceId; - } - public String getResourceName() { - return resourceName; - } - public void setResourceName(String resourceName) { - this.resourceName = resourceName; - } - - - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/VimAssets.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/VimAssets.java deleted file mode 100644 index 65ce3cfd..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/VimAssets.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.nslcm.bo.entity; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class VimAssets { - - @JsonProperty("softwareImage") - private VimSoftwareImage softwareImage; - - public VimSoftwareImage getSoftwareImage() { - return softwareImage; - } - - public void setSoftwareImage(VimSoftwareImage softwareImage) { - this.softwareImage = softwareImage; - } - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/VimComputeResourceFlavour.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/VimComputeResourceFlavour.java deleted file mode 100644 index ae27dd99..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/VimComputeResourceFlavour.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.nslcm.bo.entity; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class VimComputeResourceFlavour { - - @JsonProperty("vimId") - private String vimId; - - @JsonProperty("vduId") - private String vduId; - - @JsonProperty("vimFlavourId") - private String vimFlavourId; - - public String getVimId() { - return vimId; - } - - public void setVimId(String vimId) { - this.vimId = vimId; - } - - public String getVduId() { - return vduId; - } - - public void setVduId(String vduId) { - this.vduId = vduId; - } - - public String getVimFlavourId() { - return vimFlavourId; - } - - public void setVimFlavourId(String vimFlavourId) { - this.vimFlavourId = vimFlavourId; - } - - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/VimInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/VimInfo.java deleted file mode 100644 index ef734a23..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/VimInfo.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.nslcm.bo.entity; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class VimInfo { - - @JsonProperty("vimInfoId") - private String vimInfoId; - - @JsonProperty("vimId") - private String vimId; - @JsonProperty("interfaceInfo") - private InterfaceInfo interfaceInfo; - @JsonProperty("accessInfo") - private AccessInfo accessInfo; - - @JsonProperty("interfaceEndpoint") - private String interfaceEndpoint; - - public String getVimInfoId() { - return vimInfoId; - } - - public void setVimInfoId(String vimInfoId) { - this.vimInfoId = vimInfoId; - } - - public String getVimId() { - return vimId; - } - - public void setVimId(String vimId) { - this.vimId = vimId; - } - - public InterfaceInfo getInterfaceInfo() { - return interfaceInfo; - } - - public void setInterfaceInfo(InterfaceInfo interfaceInfo) { - this.interfaceInfo = interfaceInfo; - } - - public AccessInfo getAccessInfo() { - return accessInfo; - } - - public void setAccessInfo(AccessInfo accessInfo) { - this.accessInfo = accessInfo; - } - - public String getInterfaceEndpoint() { - return interfaceEndpoint; - } - - public void setInterfaceEndpoint(String interfaceEndpoint) { - this.interfaceEndpoint = interfaceEndpoint; - } - - - - - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/VimSoftwareImage.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/VimSoftwareImage.java deleted file mode 100644 index 5aba7761..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/VimSoftwareImage.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.nslcm.bo.entity; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class VimSoftwareImage { - - @JsonProperty("vimId") - private String vimId; - - @JsonProperty("imageName") - private String imageName; - - @JsonProperty("vimImageId") - private String vimImageId; - - public String getVimId() { - return vimId; - } - - public void setVimId(String vimId) { - this.vimId = vimId; - } - - public String getImageName() { - return imageName; - } - - public void setImageName(String imageName) { - this.imageName = imageName; - } - - public String getVimImageId() { - return vimImageId; - } - - public void setVimImageId(String vimImageId) { - this.vimImageId = vimImageId; - } - - - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/VnfPackageInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/VnfPackageInfo.java deleted file mode 100644 index 1793b148..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/VnfPackageInfo.java +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.nslcm.bo.entity; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.nokia.vfcadaptor.constant.CommonEnum; - -public class VnfPackageInfo { - - @JsonProperty("name") - private String name; - - @JsonProperty("provider") - private String provider; - - @JsonProperty("version") - private String version; - - @JsonProperty("onBoardState") - private String onBoardState; - - @JsonProperty("deletionPending") - private CommonEnum.Deletionpending deletionPending; - - @JsonProperty("downloadUri") - private String downloadUri; - - @JsonProperty("vnfdId") - private String vnfdId; - - @JsonProperty("vnfdProvider") - private String vnfdProvider; - - @JsonProperty("vnfdVersion") - private String vnfdVersion; - - @JsonProperty("vnfVersion") - private String vnfVersion; - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getProvider() { - return provider; - } - - public void setProvider(String provider) { - this.provider = provider; - } - - public String getVersion() { - return version; - } - - public void setVersion(String version) { - this.version = version; - } - - public String getOnBoardState() { - return onBoardState; - } - - public void setOnBoardState(String onBoardState) { - this.onBoardState = onBoardState; - } - - public CommonEnum.Deletionpending getDeletionPending() { - return deletionPending; - } - - public void setDeletionPending(CommonEnum.Deletionpending deletionPending) { - this.deletionPending = deletionPending; - } - - public String getDownloadUri() { - return downloadUri; - } - - public void setDownloadUri(String downloadUri) { - this.downloadUri = downloadUri; - } - - public String getVnfdId() { - return vnfdId; - } - - public void setVnfdId(String vnfdId) { - this.vnfdId = vnfdId; - } - - public String getVnfdProvider() { - return vnfdProvider; - } - - public void setVnfdProvider(String vnfdProvider) { - this.vnfdProvider = vnfdProvider; - } - - public String getVnfdVersion() { - return vnfdVersion; - } - - public void setVnfdVersion(String vnfdVersion) { - this.vnfdVersion = vnfdVersion; - } - - public String getVnfVersion() { - return vnfVersion; - } - - public void setVnfVersion(String vnfVersion) { - this.vnfVersion = vnfVersion; - } - - - - - - - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/impl/NslcmMgmrImpl.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/impl/NslcmMgmrImpl.java deleted file mode 100644 index e5b8180b..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/impl/NslcmMgmrImpl.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.nslcm.impl; - -import java.io.IOException; - -import org.apache.http.client.ClientProtocolException; -import org.apache.http.impl.client.HttpClientBuilder; -import org.apache.log4j.Logger; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.MediaType; -import org.springframework.stereotype.Component; -import org.springframework.web.bind.annotation.RequestMethod; - -import com.google.gson.Gson; -import com.nokia.vfcadaptor.common.bo.AdaptorEnv; -import com.nokia.vfcadaptor.constant.CommonConstants; -import com.nokia.vfcadaptor.http.client.HttpRequestProcessor; -import com.nokia.vfcadaptor.nslcm.bo.NslcmGrantVnfRequest; -import com.nokia.vfcadaptor.nslcm.bo.NslcmGrantVnfResponse; -import com.nokia.vfcadaptor.nslcm.bo.NslcmNotifyLCMEventsRequest; -import com.nokia.vfcadaptor.nslcm.bo.VnfmInfo; -import com.nokia.vfcadaptor.nslcm.inf.NslcmMgmrInf; - -@Component -public class NslcmMgmrImpl implements NslcmMgmrInf{ - private Logger logger = Logger.getLogger(NslcmMgmrImpl.class); - - @Autowired - private AdaptorEnv adaptorEnv; - - @Autowired - private HttpClientBuilder httpClientBuilder; - - private Gson gson = new Gson(); - - public VnfmInfo queryVnfm(String vnfmId) throws ClientProtocolException, IOException - { - String httpPath = String.format(CommonConstants.RetrieveNvfmListPath, vnfmId); - RequestMethod method = RequestMethod.GET; - - String responseStr = operateNslcmHttpTask(null, httpPath, method); - - logger.info("NslcmMgmrImpl->queryVnfm, the vnfmInfo is " + responseStr); - - VnfmInfo response = gson.fromJson(responseStr, VnfmInfo.class); - - return response; - } - - public NslcmGrantVnfResponse grantVnf(NslcmGrantVnfRequest driverRequest) throws ClientProtocolException, IOException { - String httpPath = CommonConstants.NslcmGrantPath; - RequestMethod method = RequestMethod.POST; - - String responseStr = operateNslcmHttpTask(driverRequest, httpPath, method); - - logger.info("NslcmMgmrImpl->grantVnf, the NslcmGrantVnfResponse is " + responseStr); - - NslcmGrantVnfResponse response = gson.fromJson(responseStr, NslcmGrantVnfResponse.class); - - return response; - } - - public void notifyVnf(NslcmNotifyLCMEventsRequest driverRequest, String vnfInstanceId) throws ClientProtocolException, IOException { - String httpPath = String.format(CommonConstants.NslcmNotifyPath, vnfInstanceId); - RequestMethod method = RequestMethod.POST; - - operateNslcmHttpTask(driverRequest, httpPath, method); - } - - public String operateNslcmHttpTask(Object httpBodyObj, String httpPath, RequestMethod method) throws ClientProtocolException, IOException { - String url="http://" + adaptorEnv.getNslcmIp() + ":" + adaptorEnv.getNslcmPort() + httpPath; - HttpRequestProcessor processor = new HttpRequestProcessor(httpClientBuilder, method); - processor.addHdeader(CommonConstants.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE); - - processor.addPostEntity(gson.toJson(httpBodyObj)); - - String responseStr = processor.process(url); - - return responseStr; - } - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/inf/NslcmMgmrInf.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/inf/NslcmMgmrInf.java deleted file mode 100644 index 98e27858..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/inf/NslcmMgmrInf.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.nslcm.inf; - -import java.io.IOException; - -import org.apache.http.client.ClientProtocolException; - -import com.nokia.vfcadaptor.nslcm.bo.NslcmGrantVnfRequest; -import com.nokia.vfcadaptor.nslcm.bo.NslcmGrantVnfResponse; -import com.nokia.vfcadaptor.nslcm.bo.NslcmNotifyLCMEventsRequest; -import com.nokia.vfcadaptor.nslcm.bo.VnfmInfo; - -public interface NslcmMgmrInf { - public VnfmInfo queryVnfm(String vnfmId) throws ClientProtocolException, IOException; - - public NslcmGrantVnfResponse grantVnf(NslcmGrantVnfRequest driverRequest) throws ClientProtocolException, IOException; - - public void notifyVnf(NslcmNotifyLCMEventsRequest driverRequest, String vnfInstanceId) throws ClientProtocolException, IOException; -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/HealVnfRequest.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/HealVnfRequest.java deleted file mode 100644 index 45dc5ed6..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/HealVnfRequest.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.vnfmdriver.bo; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.nokia.vfcadaptor.vnfmdriver.bo.entity.Affectedvm; - - -public class HealVnfRequest { - @JsonProperty("action") - private String action; - - @JsonProperty("affectedvm") - private Affectedvm affectedvm; - - public String getAction() { - return action; - } - - public void setAction(String action) { - this.action = action; - } - - public Affectedvm getAffectedvm() { - return affectedvm; - } - - public void setAffectedvm(Affectedvm affectedvm) { - this.affectedvm = affectedvm; - } - - - - - - - - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/HealVnfResponse.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/HealVnfResponse.java deleted file mode 100644 index f2ec9e78..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/HealVnfResponse.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.vnfmdriver.bo; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class HealVnfResponse { - @JsonProperty("jobId") - private String jobId; - - public String getJobId() { - return jobId; - } - - public void setJobId(String jobId) { - this.jobId = jobId; - } - - - - - - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/InstantiateVnfRequest.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/InstantiateVnfRequest.java deleted file mode 100644 index 267288d3..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/InstantiateVnfRequest.java +++ /dev/null @@ -1,115 +0,0 @@ -/* -* Copyright 2016-2017 Nokia Corporation -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT 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 com.nokia.vfcadaptor.vnfmdriver.bo; - - -import java.util.ArrayList; -import java.util.List; - -import com.fasterxml.jackson.annotation.JsonBackReference; -import com.fasterxml.jackson.annotation.JsonIdentityInfo; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.ObjectIdGenerators; -import com.nokia.vfcadaptor.vnfmdriver.bo.entity.AdditionalParam; -import com.nokia.vfcadaptor.vnfmdriver.bo.entity.ExtVirtualLinkData; - -//@JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class,property = "@id") -// -- zhouyufei added property id cause problem -- 415 Unsupported Media Type (UTF-8 is not supported) -public class InstantiateVnfRequest { - @JsonProperty("vnfInstanceName") - private String vnfInstanceName; - - @JsonProperty("vnfPackageId") - private String vnfPackageId; - - @JsonProperty("vnfDescriptorId") - private String vnfDescriptorId; - - @JsonProperty("flavourId") - private String flavourId; - - @JsonProperty("vnfInstanceDescription") - private String vnfInstanceDescription; - - @JsonProperty("extVirtualLink") -// @JsonBackReference -- zhouyufei deprecated, and mustn't initiate by new ArrayList; -// private List extVirtualLink = new ArrayList(); - private List extVirtualLink; - - @JsonProperty("additionalParam") - private AdditionalParam additionalParam; - - - - public String getVnfInstanceName() { - return vnfInstanceName; - } - - public void setVnfInstanceName(String vnfInstanceName) { - this.vnfInstanceName = vnfInstanceName; - } - - public String getVnfPackageId() { - return vnfPackageId; - } - - public void setVnfPackageId(String vnfPackageId) { - this.vnfPackageId = vnfPackageId; - } - - public String getVnfDescriptorId() { - return vnfDescriptorId; - } - - public void setVnfDescriptorId(String vnfDescriptorId) { - this.vnfDescriptorId = vnfDescriptorId; - } - - public String getFlavourId() { - return flavourId; - } - - public void setFlavourId(String flavourId) { - this.flavourId = flavourId; - } - - public String getVnfInstanceDescription() { - return vnfInstanceDescription; - } - - public void setVnfInstanceDescription(String vnfInstanceDescription) { - this.vnfInstanceDescription = vnfInstanceDescription; - } - - public AdditionalParam getAdditionalParam() { - return additionalParam; - } - - public void setAdditionalParam(AdditionalParam additionalParam) { - this.additionalParam = additionalParam; - } - - public List getExtVirtualLink() { - return extVirtualLink; - } - - public void setExtVirtualLink(List extVirtualLink) { - this.extVirtualLink = extVirtualLink; - } - -} - - diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/InstantiateVnfResponse.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/InstantiateVnfResponse.java deleted file mode 100644 index c84cde2c..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/InstantiateVnfResponse.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.vnfmdriver.bo; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class InstantiateVnfResponse { - @JsonProperty("jobId") - private String jobId; - - @JsonProperty("vnfInstanceId") - private String vnfInstanceId; - - public String getJobId() { - return jobId; - } - - public void setJobId(String jobId) { - this.jobId = jobId; - } - - public String getVnfInstanceId() { - return vnfInstanceId; - } - - public void setVnfInstanceId(String vnfInstanceId) { - this.vnfInstanceId = vnfInstanceId; - } -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/OperStatusVnfRequest.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/OperStatusVnfRequest.java deleted file mode 100644 index aa663c80..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/OperStatusVnfRequest.java +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.vnfmdriver.bo; - - -public class OperStatusVnfRequest { - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/OperStatusVnfResponse.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/OperStatusVnfResponse.java deleted file mode 100644 index 2d84b21b..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/OperStatusVnfResponse.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.vnfmdriver.bo; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.nokia.vfcadaptor.vnfmdriver.bo.entity.ResponseDescriptor; - -public class OperStatusVnfResponse { - @JsonProperty("jobId") - private String jobId; - - @JsonProperty("responseDescriptor")//Including:vnfStatus��statusDescription��errorCode��progress��responseHistoryList��responseId - private ResponseDescriptor responseDescriptor; - - public String getJobId() { - return jobId; - } - - public void setJobId(String jobId) { - this.jobId = jobId; - } - - public ResponseDescriptor getResponseDescriptor() { - return responseDescriptor; - } - - public void setResponseDescriptor(ResponseDescriptor responseDescriptor) { - this.responseDescriptor = responseDescriptor; - } - - - - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/QueryVnfRequest.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/QueryVnfRequest.java deleted file mode 100644 index c693adfb..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/QueryVnfRequest.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.vnfmdriver.bo; - - - -public class QueryVnfRequest { - - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/QueryVnfResponse.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/QueryVnfResponse.java deleted file mode 100644 index 7e3b462d..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/QueryVnfResponse.java +++ /dev/null @@ -1,36 +0,0 @@ - -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.vnfmdriver.bo; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.nokia.vfcadaptor.vnfmdriver.bo.entity.VnfInfo; - -public class QueryVnfResponse { - @JsonProperty("vnfInfo") - private VnfInfo vnfInfo; - - - public VnfInfo getVnfInfo() { - return vnfInfo; - } - - public void setVnfInfo(VnfInfo vnfInfo) { - this.vnfInfo = vnfInfo; - } - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/ScaleVnfRequest.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/ScaleVnfRequest.java deleted file mode 100644 index 396d2aaf..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/ScaleVnfRequest.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.vnfmdriver.bo; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.nokia.vfcadaptor.constant.CommonEnum; -import com.nokia.vfcadaptor.vnfmdriver.bo.entity.AdditionalParam; - -public class ScaleVnfRequest { - @JsonProperty("vnfInstanceId") - private String vnfInstanceId; - - @JsonProperty("type") - private CommonEnum.ScaleType type; - - @JsonProperty("aspectId") - private String aspectId; - - @JsonProperty("numberOfSteps") - private Integer numberOfSteps; - - @JsonProperty("additionalParam") - private AdditionalParam additionalParam; - - - public String getAspectId() { - return aspectId; - } - - public void setAspectId(String aspectId) { - this.aspectId = aspectId; - } - - public Integer getNumberOfSteps() { - return numberOfSteps; - } - - public void setNumberOfSteps(Integer numberOfSteps) { - this.numberOfSteps = numberOfSteps; - } - - public AdditionalParam getAdditionalParam() { - return additionalParam; - } - - public void setAdditionalParam(AdditionalParam additionalParam) { - this.additionalParam = additionalParam; - } - - public String getVnfInstanceId() { - return vnfInstanceId; - } - - public void setVnfInstanceId(String vnfInstanceId) { - this.vnfInstanceId = vnfInstanceId; - } - - public CommonEnum.ScaleType getType() { - return type; - } - - public void setType(CommonEnum.ScaleType type) { - this.type = type; - } - - - - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/ScaleVnfResponse.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/ScaleVnfResponse.java deleted file mode 100644 index 4b05b9b9..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/ScaleVnfResponse.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.vnfmdriver.bo; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class ScaleVnfResponse { - @JsonProperty("jobId") - private String jobId; - - public String getJobId() { - return jobId; - } - - public void setJobId(String jobId) { - this.jobId = jobId; - } - - - - - - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/TerminateVnfRequest.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/TerminateVnfRequest.java deleted file mode 100644 index 24963392..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/TerminateVnfRequest.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.vnfmdriver.bo; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.nokia.vfcadaptor.constant.CommonEnum; - -public class TerminateVnfRequest { - - @JsonProperty("vnfInstanceId") - private String vnfInstanceId; - - @JsonProperty("terminationType") - private CommonEnum.TerminationType terminationType; - - @JsonProperty("gracefulTerminationTimeout") - private Integer gracefulTerminationTimeout; - - public enum TerminationType{ - - GRACEFUL, FORCEFUL; - } - - - - - - - - public CommonEnum.TerminationType getTerminationType() { - return terminationType; - } - - public void setTerminationType(CommonEnum.TerminationType terminationType) { - this.terminationType = terminationType; - } - - - public Integer getGracefulTerminationTimeout() { - return gracefulTerminationTimeout; - } - - public void setGracefulTerminationTimeout(Integer gracefulTerminationTimeout) { - this.gracefulTerminationTimeout = gracefulTerminationTimeout; - } - - public String getVnfInstanceId() { - return vnfInstanceId; - } - - public void setVnfInstanceId(String vnfInstanceId) { - this.vnfInstanceId = vnfInstanceId; - } - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/TerminateVnfResponse.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/TerminateVnfResponse.java deleted file mode 100644 index 143fdf58..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/TerminateVnfResponse.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.vnfmdriver.bo; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class TerminateVnfResponse { - @JsonProperty("jobId") - private String jobId; - - public String getJobId() { - return jobId; - } - - public void setJobId(String jobId) { - this.jobId = jobId; - } -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/entity/AccessInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/entity/AccessInfo.java deleted file mode 100644 index 83cbde44..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/entity/AccessInfo.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.vnfmdriver.bo.entity; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class AccessInfo { - @JsonProperty("tenant") - private String tenant; - - @JsonProperty("username") - private String username; - - @JsonProperty("password") - private String password; - - public String getTenant() { - return tenant; - } - - public void setTenant(String tenant) { - this.tenant = tenant; - } - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public String getPassword() { - return password; - } - - public void setPassword(String password) { - this.password = password; - } - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/entity/AdditionalParam.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/entity/AdditionalParam.java deleted file mode 100644 index 3e3c25f8..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/entity/AdditionalParam.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.vnfmdriver.bo.entity; - -public class AdditionalParam { - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/entity/Affectedvm.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/entity/Affectedvm.java deleted file mode 100644 index 898404d9..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/entity/Affectedvm.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.vnfmdriver.bo.entity; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class Affectedvm { - @JsonProperty("vimid") - private String vimid; - - @JsonProperty("vduid") - private String vduid; - - @JsonProperty("vmname") - private String vmname; - - public String getVimid() { - return vimid; - } - - public void setVimid(String vimid) { - this.vimid = vimid; - } - - public String getVduid() { - return vduid; - } - - public void setVduid(String vduid) { - this.vduid = vduid; - } - - public String getVmname() { - return vmname; - } - - public void setVmname(String vmname) { - this.vmname = vmname; - } - - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/entity/ExtVirtualLinkData.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/entity/ExtVirtualLinkData.java deleted file mode 100644 index 7c52c5b1..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/entity/ExtVirtualLinkData.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.vnfmdriver.bo.entity; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; - - -public class ExtVirtualLinkData { - @JsonProperty("vlInstanceId") - private String vlInstanceId; - @JsonProperty("vim") - private VimInfo vim; - @JsonProperty("networkId") - private String networkId; - @JsonProperty("cpdId") - private String cpdId; - public String getVlInstanceId() { - return vlInstanceId; - } - public void setVlInstanceId(String vlInstanceId) { - this.vlInstanceId = vlInstanceId; - } - public VimInfo getVim() { - return vim; - } - public void setVim(VimInfo vim) { - this.vim = vim; - } - public String getNetworkId() { - return networkId; - } - public void setNetworkId(String networkId) { - this.networkId = networkId; - } - public String getCpdId() { - return cpdId; - } - public void setCpdId(String cpdId) { - this.cpdId = cpdId; - } - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/entity/InterfaceInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/entity/InterfaceInfo.java deleted file mode 100644 index b9464127..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/entity/InterfaceInfo.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.vnfmdriver.bo.entity; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class InterfaceInfo { - - @JsonProperty("vimInfoId") - private String vimType; - - @JsonProperty("apiVersion") - private String apiVersion; - - @JsonProperty("protocolType") - private String protocolType; - - public String getVimType() { - return vimType; - } - - public void setVimType(String vimType) { - this.vimType = vimType; - } - - public String getApiVersion() { - return apiVersion; - } - - public void setApiVersion(String apiVersion) { - this.apiVersion = apiVersion; - } - - public String getProtocolType() { - return protocolType; - } - - public void setProtocolType(String protocolType) { - this.protocolType = protocolType; - } - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/entity/ResponseDescriptor.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/entity/ResponseDescriptor.java deleted file mode 100644 index 197d466f..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/entity/ResponseDescriptor.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.vnfmdriver.bo.entity; - -import java.util.List; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class ResponseDescriptor { - - - @JsonProperty("status") - private String status;//started;processing;finished;error - - @JsonProperty("progress") - private Integer progress;//progress (1-100) - - @JsonProperty("statusDescription") - private String statusDescription; - - @JsonProperty("errorCode") - private Integer errorCode; - - @JsonProperty("responseId") - private Integer responseId; - - @JsonProperty("responseHistoryList") - private List responseHistoryList; - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status; - } - - - - public Integer getProgress() { - return progress; - } - - - public void setProgress(Integer progr) { - if(progr>0 && progr<100) { - progress = progr; - } - } - - public String getStatusDescription() { - return statusDescription; - } - - public void setStatusDescription(String statusDescription) { - this.statusDescription = statusDescription; - } - - public Integer getErrorCode() { - return errorCode; - } - - public void setErrorCode(Integer errorCode) { - this.errorCode = errorCode; - } - - public Integer getResponseId() { - return responseId; - } - - public void setResponseId(Integer responseId) { - this.responseId = responseId; - } - - public List getResponseHistoryList() { - return responseHistoryList; - } - - public void setResponseHistoryList(List responseHistoryList) { - this.responseHistoryList = responseHistoryList; - } - - - - - - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/entity/ResponseHistoryList.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/entity/ResponseHistoryList.java deleted file mode 100644 index 5863985d..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/entity/ResponseHistoryList.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.vnfmdriver.bo.entity; - - - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class ResponseHistoryList { - - - @JsonProperty("status") - private String status;//started;processing;finished;error - - @JsonProperty("progress") - private Integer progress;//progress (1-100) - - @JsonProperty("statusDescription") - private String statusDescription; - - @JsonProperty("errorCode") - private Integer errorCode; - - @JsonProperty("responseId") - private Integer responseId; - - - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status; - } - - - public Integer getProgress() { - return progress; - } - - public void setProgress(Integer progress) { - this.progress = progress; - } - - public String getStatusDescription() { - return statusDescription; - } - - public void setStatusDescription(String statusDescription) { - this.statusDescription = statusDescription; - } - - public Integer getErrorCode() { - return errorCode; - } - - public void setErrorCode(Integer errorCode) { - this.errorCode = errorCode; - } - - public Integer getResponseId() { - return responseId; - } - - public void setResponseId(Integer responseId) { - this.responseId = responseId; - } - - - - - - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/entity/VimInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/entity/VimInfo.java deleted file mode 100644 index ea9a687f..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/entity/VimInfo.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.vnfmdriver.bo.entity; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class VimInfo { - @JsonProperty("vimInfoId") - private String vimInfoId; - - @JsonProperty("vimId") - private String vimId; - - @JsonProperty("interfaceInfo") - private InterfaceInfo interfaceInfo; - - @JsonProperty("accessInfo") - private AccessInfo accessInfo; - - @JsonProperty("interfaceEndpoint") - private String interfaceEndpoint; - - public String getVimInfoId() { - return vimInfoId; - } - - public void setVimInfoId(String vimInfoId) { - this.vimInfoId = vimInfoId; - } - - public String getVimId() { - return vimId; - } - - public void setVimId(String vimId) { - this.vimId = vimId; - } - - public InterfaceInfo getInterfaceInfo() { - return interfaceInfo; - } - - public void setInterfaceInfo(InterfaceInfo interfaceInfo) { - this.interfaceInfo = interfaceInfo; - } - - public AccessInfo getAccessInfo() { - return accessInfo; - } - - public void setAccessInfo(AccessInfo accessInfo) { - this.accessInfo = accessInfo; - } - - public String getInterfaceEndpoint() { - return interfaceEndpoint; - } - - public void setInterfaceEndpoint(String interfaceEndpoint) { - this.interfaceEndpoint = interfaceEndpoint; - } - - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/entity/VnfInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/entity/VnfInfo.java deleted file mode 100644 index 543f805d..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/entity/VnfInfo.java +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.vnfmdriver.bo.entity; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.nokia.vfcadaptor.constant.CommonEnum; - -public class VnfInfo { - @JsonProperty("vnfInstanceId") - private String vnfInstanceId; - - @JsonProperty("vnfInstanceName") - private String vnfInstanceName; - - @JsonProperty("vnfInstanceDescription") - private String vnfInstanceDescription; - - @JsonProperty("vnfdId") - private String vnfdId; - - @JsonProperty("vnfPackageId") - private String vnfPackageId; - - @JsonProperty("version") - private String version; - - @JsonProperty("vnfProvider") - private String vnfProvider; - - @JsonProperty("vnfType") - private String vnfType; - - @JsonProperty("vnfStatus") - private CommonEnum.InstantiationState vnfStatus; - - public String getVnfInstanceId() { - return vnfInstanceId; - } - - public void setVnfInstanceId(String vnfInstanceId) { - this.vnfInstanceId = vnfInstanceId; - } - - public String getVnfInstanceName() { - return vnfInstanceName; - } - - public void setVnfInstanceName(String vnfInstanceName) { - this.vnfInstanceName = vnfInstanceName; - } - - public String getVnfInstanceDescription() { - return vnfInstanceDescription; - } - - public void setVnfInstanceDescription(String vnfInstanceDescription) { - this.vnfInstanceDescription = vnfInstanceDescription; - } - - public String getVnfdId() { - return vnfdId; - } - - public void setVnfdId(String vnfdId) { - this.vnfdId = vnfdId; - } - - public String getVnfPackageId() { - return vnfPackageId; - } - - public void setVnfPackageId(String vnfPackageId) { - this.vnfPackageId = vnfPackageId; - } - - public String getVersion() { - return version; - } - - public void setVersion(String version) { - this.version = version; - } - - public String getVnfProvider() { - return vnfProvider; - } - - public void setVnfProvider(String vnfProvider) { - this.vnfProvider = vnfProvider; - } - - public String getVnfType() { - return vnfType; - } - - public void setVnfType(String vnfType) { - this.vnfType = vnfType; - } - - public CommonEnum.InstantiationState getVnfStatus() { - return vnfStatus; - } - - public void setVnfStatus(CommonEnum.InstantiationState vnfStatus) { - this.vnfStatus = vnfStatus; - } - - - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/controller/VnfmDriverController.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/controller/VnfmDriverController.java deleted file mode 100644 index ba2641b5..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/controller/VnfmDriverController.java +++ /dev/null @@ -1,195 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.vnfmdriver.controller; - -import java.io.IOException; - -import javax.servlet.http.HttpServletResponse; - -import org.apache.http.HttpStatus; -import org.apache.log4j.Logger; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.MediaType; -import org.springframework.stereotype.Controller; -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.ResponseBody; - -import com.google.gson.Gson; -import com.nokia.vfcadaptor.exception.VnfmDriverException; -import com.nokia.vfcadaptor.vnfmdriver.bo.HealVnfRequest; -import com.nokia.vfcadaptor.vnfmdriver.bo.HealVnfResponse; -import com.nokia.vfcadaptor.vnfmdriver.bo.InstantiateVnfRequest; -import com.nokia.vfcadaptor.vnfmdriver.bo.InstantiateVnfResponse; -import com.nokia.vfcadaptor.vnfmdriver.bo.OperStatusVnfResponse; -import com.nokia.vfcadaptor.vnfmdriver.bo.QueryVnfResponse; -import com.nokia.vfcadaptor.vnfmdriver.bo.ScaleVnfRequest; -import com.nokia.vfcadaptor.vnfmdriver.bo.ScaleVnfResponse; -import com.nokia.vfcadaptor.vnfmdriver.bo.TerminateVnfRequest; -import com.nokia.vfcadaptor.vnfmdriver.bo.TerminateVnfResponse; -import com.nokia.vfcadaptor.vnfmdriver.inf.VnfmDriverMgmrInf; - -@Controller -@RequestMapping(value = "/nokiavnfm/v1") -public class VnfmDriverController { - private Logger logger = Logger.getLogger(VnfmDriverController.class); - - @Autowired - private VnfmDriverMgmrInf vnfmDriverMgmr; - - private Gson gson = new Gson(); - - @RequestMapping(value = "/{vnfmId}/vnfs", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) - @ResponseBody - public InstantiateVnfResponse instantiateVnf(@RequestBody InstantiateVnfRequest request, @PathVariable("vnfmId") String vnfmId, HttpServletResponse httpResponse) - { - String jsonString = gson.toJson(request); - logger.info("instantiateVnf request: vnfmId = " + vnfmId + ", bodyMessage is " + jsonString); - - InstantiateVnfResponse response = vnfmDriverMgmr.instantiateVnf(request, vnfmId); - - httpResponse.setStatus(HttpStatus.SC_CREATED); - - return response; - } - - @RequestMapping(value = "/{vnfmId}/vnfs/{vnfInstanceId}/terminate", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) - @ResponseBody - public TerminateVnfResponse terminateVnf(@RequestBody TerminateVnfRequest request, @PathVariable("vnfmId") String vnfmId, @PathVariable("vnfInstanceId") String vnfInstanceId, HttpServletResponse httpResponse) - { - String jsonString = gson.toJson(request); - logger.info("terminateVnf request: vnfmId = " + vnfmId + ", vnfInstanceId = " + vnfInstanceId + ", bodyMessage is " + jsonString); - - try { - TerminateVnfResponse response = vnfmDriverMgmr.terminateVnf(request, vnfmId, vnfInstanceId); - httpResponse.setStatus(HttpStatus.SC_CREATED); - return response; - } - catch(VnfmDriverException e) - { - try { - httpResponse.setStatus(HttpStatus.SC_BAD_REQUEST); - httpResponse.sendError(e.getHttpStatus(), e.getMessage()); - } catch (IOException e1) { - - } - } - - return null; - } - - - @RequestMapping(value = "/{vnfmId}/vnfs/{vnfInstanceId}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) - @ResponseBody - public QueryVnfResponse queryVnf(@PathVariable("vnfmId") String vnfmId, @PathVariable("vnfInstanceId") String vnfInstanceId, HttpServletResponse httpResponse) - { - logger.info("queryVnf request: vnfmId = " + vnfmId + ", vnfInstanceId = " + vnfInstanceId); - - try { - QueryVnfResponse response = vnfmDriverMgmr.queryVnf(vnfmId, vnfInstanceId); - httpResponse.setStatus(HttpStatus.SC_CREATED); - return response; - } - catch(VnfmDriverException e) - { - try { - httpResponse.setStatus(HttpStatus.SC_BAD_REQUEST); - httpResponse.sendError(e.getHttpStatus(), e.getMessage()); - } catch (IOException e1) { - - } - } - - return null; - } - @RequestMapping(value = "/{vnfmId}/jobs/{jobId}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) - @ResponseBody - public OperStatusVnfResponse getOperStatus(@PathVariable("vnfmId") String vnfmId,@PathVariable("jobId") String jobId, HttpServletResponse httpResponse) - { - logger.info("getOperStatus request: vnfmId = " + vnfmId + ", jobId = " + jobId); - - try { - OperStatusVnfResponse response = vnfmDriverMgmr.getOperStatus(vnfmId, jobId); - httpResponse.setStatus(HttpStatus.SC_CREATED); - return response; - } - catch(VnfmDriverException e) - { - try { - httpResponse.sendError(e.getHttpStatus(), e.getMessage()); - } catch (IOException e1) { - - } - } - - return null; - } - - - @RequestMapping(value = "/{vnfmId}/vnfs/{vnfInstanceId}/scale", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) - @ResponseBody - public ScaleVnfResponse scaleVnf(@RequestBody ScaleVnfRequest request, @PathVariable("vnfmId") String vnfmId, @PathVariable("vnfInstanceId") String vnfInstanceId, HttpServletResponse httpResponse) - { - String jsonString = gson.toJson(request); - logger.info("scaleVnf request: vnfmId = " + vnfmId + ", vnfInstanceId = " + vnfInstanceId + ", bodyMessage is " + jsonString); - - try { - ScaleVnfResponse response = vnfmDriverMgmr.scaleVnf(request, vnfmId, vnfInstanceId); - httpResponse.setStatus(HttpStatus.SC_CREATED); - return response; - } - catch(VnfmDriverException e) - { - try { - httpResponse.sendError(e.getHttpStatus(), e.getMessage()); - } catch (IOException e1) { - - } - } - - return null; - } - - - @RequestMapping(value = "/{vnfmId}/vnfs/{vnfInstanceId}/heal", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) - @ResponseBody - public HealVnfResponse healVnf(@RequestBody HealVnfRequest request, @PathVariable("vnfmId") String vnfmId, @PathVariable("vnfInstanceId") String vnfInstanceId, HttpServletResponse httpResponse) - { - String jsonString = gson.toJson(request); - logger.info("healVnf request: vnfmId = " + vnfmId + ", vnfInstanceId = " + vnfInstanceId + ", bodyMessage is " + jsonString); - - try { - HealVnfResponse response = vnfmDriverMgmr.healVnf(request, vnfmId, vnfInstanceId); - httpResponse.setStatus(HttpStatus.SC_CREATED); - return response; - } - catch(VnfmDriverException e) - { - try { - httpResponse.sendError(e.getHttpStatus(), e.getMessage()); - } catch (IOException e1) { - - } - } - - return null; - } - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/inf/VnfmDriverMgmrInf.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/inf/VnfmDriverMgmrInf.java deleted file mode 100644 index 833712a0..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/inf/VnfmDriverMgmrInf.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.vnfmdriver.inf; - -import com.nokia.vfcadaptor.exception.VnfmDriverException; -import com.nokia.vfcadaptor.vnfmdriver.bo.HealVnfRequest; -import com.nokia.vfcadaptor.vnfmdriver.bo.HealVnfResponse; -import com.nokia.vfcadaptor.vnfmdriver.bo.InstantiateVnfRequest; -import com.nokia.vfcadaptor.vnfmdriver.bo.InstantiateVnfResponse; -import com.nokia.vfcadaptor.vnfmdriver.bo.OperStatusVnfResponse; -import com.nokia.vfcadaptor.vnfmdriver.bo.QueryVnfResponse; -import com.nokia.vfcadaptor.vnfmdriver.bo.ScaleVnfRequest; -import com.nokia.vfcadaptor.vnfmdriver.bo.ScaleVnfResponse; -import com.nokia.vfcadaptor.vnfmdriver.bo.TerminateVnfRequest; -import com.nokia.vfcadaptor.vnfmdriver.bo.TerminateVnfResponse; - -public interface VnfmDriverMgmrInf { - - public InstantiateVnfResponse instantiateVnf(InstantiateVnfRequest request, String vnfmId) throws VnfmDriverException; - - public TerminateVnfResponse terminateVnf(TerminateVnfRequest request, String vnfmId, String vnfInstanceId) throws VnfmDriverException; - - public QueryVnfResponse queryVnf(String vnfmId, String vnfInstanceId) throws VnfmDriverException; - - public OperStatusVnfResponse getOperStatus(String vnfmId, String jobId) throws VnfmDriverException; - - public ScaleVnfResponse scaleVnf(ScaleVnfRequest request, String vnfmId, String vnfInstanceId) throws VnfmDriverException; - - public HealVnfResponse healVnf(HealVnfRequest request, String vnfmId, String vnfInstanceId) throws VnfmDriverException; -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/ServletInitializer.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/ServletInitializer.java new file mode 100644 index 00000000..b51f7cf4 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/ServletInitializer.java @@ -0,0 +1,29 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm; + +import org.springframework.boot.builder.SpringApplicationBuilder; +import org.springframework.boot.web.support.SpringBootServletInitializer; + +public class ServletInitializer extends SpringBootServletInitializer { + + @Override + protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { + return application.sources(VfcadaptorApplication.class); + } + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/VfcadaptorApplication.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/VfcadaptorApplication.java new file mode 100644 index 00000000..09aa8193 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/VfcadaptorApplication.java @@ -0,0 +1,33 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.Configuration; + +@Configuration +@SpringBootApplication +//@ComponentScan(basePackages= {"org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.controller"}) +@ComponentScan +public class VfcadaptorApplication { + + public static void main(String[] args) { + SpringApplication.run(VfcadaptorApplication.class, args); + } +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/adaptor/Cbam2DriverResponseConverter.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/adaptor/Cbam2DriverResponseConverter.java new file mode 100644 index 00000000..33d34d0f --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/adaptor/Cbam2DriverResponseConverter.java @@ -0,0 +1,150 @@ +/* +* Copyright 2016-2017 Nokia Corporation +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.adaptor; + +import java.util.ArrayList; +import java.util.List; + +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMCreateVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMHealVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMInstantiateVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMQueryVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMScaleVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMTerminateVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity.OperationExecution; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.constant.CommonConstants; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.db.bean.VnfmJobExecutionInfo; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.db.repository.VnfmJobExecutionRepository; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.HealVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.InstantiateVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.OperStatusVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.QueryVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.ScaleVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.TerminateVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.entity.ResponseDescriptor; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.entity.ResponseHistoryList; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.entity.VnfInfo; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +@Component +public class Cbam2DriverResponseConverter { + + @Autowired + private VnfmJobExecutionRepository jobDbManager; + + public InstantiateVnfResponse createRspConvert(CBAMCreateVnfResponse cbamResponse) { + + VnfmJobExecutionInfo jobInfo = new VnfmJobExecutionInfo(); + jobInfo.setVnfInstanceId(cbamResponse.getId()); + jobInfo.setVnfmInterfceName(CommonConstants.NSLCM_OPERATION_INSTANTIATE); + jobInfo.setStatus(CommonConstants.CBAM_OPERATION_STATUS_START); + + VnfmJobExecutionInfo jobInfo1 = (VnfmJobExecutionInfo) jobDbManager.save(jobInfo); + Long jobId = jobInfo1.getJobId(); + + InstantiateVnfResponse response = new InstantiateVnfResponse(); + response.setJobId(jobId.longValue() + ""); + response.setVnfInstanceId(cbamResponse.getId()); + + return response; + } + + public InstantiateVnfResponse instantiateRspConvert(CBAMInstantiateVnfResponse cbamResponse) { + InstantiateVnfResponse response = new InstantiateVnfResponse(); + + VnfmJobExecutionInfo jobInfo = jobDbManager.findOne(Long.getLong(cbamResponse.getId())); + + response.setJobId("1"); + + response.setVnfInstanceId(""); + return response; + } + + public TerminateVnfResponse terminateRspConvert(CBAMTerminateVnfResponse cbamResponse) { + VnfmJobExecutionInfo jobInfo = new VnfmJobExecutionInfo(); + jobInfo.setVnfInstanceId(cbamResponse.getId()); + jobInfo.setVnfmInterfceName(CommonConstants.NSLCM_OPERATION_TERMINATE); + jobInfo.setStatus(CommonConstants.CBAM_OPERATION_STATUS_START); + + VnfmJobExecutionInfo jobInfo1 = (VnfmJobExecutionInfo) jobDbManager.save(jobInfo); + Long jobId = jobInfo1.getJobId(); + TerminateVnfResponse response = new TerminateVnfResponse(); + response.setJobId(jobId.longValue() + ""); + return response; + } + + public QueryVnfResponse queryRspConvert(CBAMQueryVnfResponse cbamResponse) { + QueryVnfResponse response = new QueryVnfResponse(); + VnfInfo vnf = new VnfInfo(); + vnf.setVnfdId(cbamResponse.getVnfdId()); + vnf.setVersion(cbamResponse.getVnfdVersion()); + vnf.setVnfInstanceId(cbamResponse.getId()); + vnf.setVnfInstanceName(cbamResponse.getName()); + vnf.setVnfInstanceDescription(cbamResponse.getDescription()); + vnf.setVnfPackageId(cbamResponse.getOnboardedVnfPkgInfoId()); + vnf.setVnfProvider(cbamResponse.getVnfProvider()); + vnf.setVnfStatus(cbamResponse.getInstantiationState()); + vnf.setVnfType(cbamResponse.getVnfSoftwareVersion()); + return response; + } + + public OperStatusVnfResponse operRspConvert(OperationExecution oper) { + + OperStatusVnfResponse response = new OperStatusVnfResponse(); + + response.setJobId(oper.getId()); + ResponseDescriptor er = new ResponseDescriptor(); + // TODO er.setProgress(i); + if (oper.getStatus().equals("STARTED")) { + er.setStatus("started"); + } else if (oper.getStatus().equals("FINISHED")) { + er.setStatus("finished"); + } else if (oper.getStatus().equals("FAILED")) { + er.setStatus("error"); + } else if (oper.getStatus().equals("OTHER")) { + er.setStatus("processing"); + } else { + er.setStatus("error"); + } + er.setStatusDescription(""); + er.setErrorCode(null); + er.setResponseId(oper.getGrantId().hashCode()); + List list = new ArrayList(); + ResponseHistoryList relist = new ResponseHistoryList(); + // TODO relist.setProgress(i); + relist.setStatus(er.getStatus()); + relist.setStatusDescription(""); + relist.setErrorCode(null); + relist.setResponseId(er.getResponseId()); + list.add(relist); + er.setResponseHistoryList(list); + response.setResponseDescriptor(er); + return response; + } + + public HealVnfResponse healRspConvert(CBAMHealVnfResponse cbamResponse) { + HealVnfResponse response = new HealVnfResponse(); + response.setJobId("1"); + return response; + } + + public ScaleVnfResponse scaleRspConvert(CBAMScaleVnfResponse cbamResponse) { + ScaleVnfResponse response = new ScaleVnfResponse(); + response.setJobId("1"); + return response; + } +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/adaptor/Driver2CbamRequestConverter.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/adaptor/Driver2CbamRequestConverter.java new file mode 100644 index 00000000..a6dcc0af --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/adaptor/Driver2CbamRequestConverter.java @@ -0,0 +1,122 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.adaptor; + +import java.util.ArrayList; +import java.util.List; + +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMCreateVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMHealVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMInstantiateVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMScaleVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMTerminateVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity.EndpointInfo; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity.ExtVirtualLinkData; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity.OPENSTACK_V3_INFO; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity.OpenStackAccessInfoV3; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity.VimInfo; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity.VimInfoType; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity.VnfExtCpData; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.constant.CommonEnum; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.NslcmGrantVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.entity.GrantInfo; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.entity.VimComputeResourceFlavour; + +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.HealVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.InstantiateVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.ScaleVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.TerminateVnfRequest; + +import org.springframework.stereotype.Component; + +@Component +public class Driver2CbamRequestConverter { + + public CBAMCreateVnfRequest createReqConvert(InstantiateVnfRequest driverRequest) { + CBAMCreateVnfRequest request = new CBAMCreateVnfRequest(); + + request.setVnfdId("vnfd_001"); + request.setName(driverRequest.getVnfInstanceName()); + request.setDescription(driverRequest.getVnfInstanceDescription()); + return request; + } + + public CBAMInstantiateVnfRequest InstantiateReqConvert(InstantiateVnfRequest driverRequest, + NslcmGrantVnfResponse nslc, GrantInfo grant, VimComputeResourceFlavour vimco) { + CBAMInstantiateVnfRequest request = new CBAMInstantiateVnfRequest(); + List vims = new ArrayList(); + VimInfo vim = new VimInfo(); + VimInfoType type = new VimInfoType(); + EndpointInfo inter = new EndpointInfo(); + OPENSTACK_V3_INFO openstackV3 = new OPENSTACK_V3_INFO(); + + vim.setId(nslc.getVim().getVimId()); + openstackV3.setId(nslc.getVim().getVimId()); + inter.setEndpoint(nslc.getVim().getInterfaceEndpoint()); + openstackV3.setInterfaceInfo(inter); + openstackV3.setVimInfoType(type); + OpenStackAccessInfoV3 v3 = new OpenStackAccessInfoV3(); + v3.setUsername(nslc.getVim().getAccessInfo().getUsername()); + v3.setPassword(nslc.getVim().getAccessInfo().getPassword()); + openstackV3.setAccessInfo(v3); + type.setOPENSTACK_V3_INFO(openstackV3); + vim.setVimInfoType(type); + vims.add(vim); + List list = new ArrayList(); + ExtVirtualLinkData ext = new ExtVirtualLinkData(); + + ext.setResourceId(grant.getResourceDefinitionId()); + ext.setVimId(grant.getVimId()); + List cps = new ArrayList(); + VnfExtCpData cp = new VnfExtCpData(); + cp.setCpdId(vimco.getVduId()); + ext.setExtCps(cps); + request.setVims(vims); + request.setFlavourId(driverRequest.getFlavourId()); + request.setExtVirtualLinks(list); + // resquest.setVnfInstanceId(driverRequest.getExtVirtualLink().get(0).getVlInstanceId()); + return request; + } + + public CBAMTerminateVnfRequest terminateReqConvert(TerminateVnfRequest driverRequest) { + CBAMTerminateVnfRequest request = new CBAMTerminateVnfRequest(); + request.setTerminationType(driverRequest.getTerminationType()); + request.setGracefulTerminationTimeout(driverRequest.getGracefulTerminationTimeout()); + return request; + } + + public CBAMHealVnfRequest healReqConvert(HealVnfRequest driverRequest) { + CBAMHealVnfRequest request = new CBAMHealVnfRequest(); + request.setCause(""); + request.setAdditionalParams(""); + return request; + } + + public CBAMScaleVnfRequest scaleReqconvert(ScaleVnfRequest driverRequest) { + CBAMScaleVnfRequest request = new CBAMScaleVnfRequest(); + if (driverRequest.getType().equals("SCALE_OUT")) { + request.setType(CommonEnum.ScaleDirection.OUT); + } else { + request.setType(CommonEnum.ScaleDirection.IN); + } + request.setAspectId(driverRequest.getAspectId()); + request.setNumberOfSteps(driverRequest.getNumberOfSteps()); + request.setAdditionalParams(driverRequest.getAdditionalParam()); + return request; + } + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/adaptor/InstantiateVnfContinueRunnable.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/adaptor/InstantiateVnfContinueRunnable.java new file mode 100644 index 00000000..954ab6b1 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/adaptor/InstantiateVnfContinueRunnable.java @@ -0,0 +1,150 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.adaptor; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import org.apache.http.client.ClientProtocolException; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.catalog.inf.CatalogMgmrInf; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMInstantiateVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMInstantiateVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.inf.CbamMgmrInf; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.constant.CommonConstants; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.constant.CommonEnum; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.constant.CommonEnum.LifecycleOperation; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.db.bean.VnfmJobExecutionInfo; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.db.repository.VnfmJobExecutionRepository; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.NslcmGrantVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.NslcmGrantVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.NslcmNotifyLCMEventsRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.entity.ResourceDefinition; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.entity.VnfPackageInfo; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.inf.NslcmMgmrInf; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.InstantiateVnfRequest; + + +public class InstantiateVnfContinueRunnable implements Runnable { + private static final Logger logger = LogManager.getLogger("InstantiateVnfContinueRunnable"); + private CbamMgmrInf cbamMgmr; + private CatalogMgmrInf catalogMgmr; + private NslcmMgmrInf nslcmMgmr; + + private InstantiateVnfRequest driverRequest; + private String vnfInstanceId; + private String jobId; + + private VnfmJobExecutionRepository jobDbMgmr; + + private Driver2CbamRequestConverter requestConverter; + + public InstantiateVnfContinueRunnable(InstantiateVnfRequest driverRequest, String vnfInstanceId, String jobId, + NslcmMgmrInf nslcmMgmr, CatalogMgmrInf catalogMgmr, CbamMgmrInf cbamMgmr, Driver2CbamRequestConverter requestConverter, VnfmJobExecutionRepository dbManager) + { + this.driverRequest = driverRequest; + this.vnfInstanceId = vnfInstanceId; + this.jobId = jobId; + this.nslcmMgmr = nslcmMgmr; + this.catalogMgmr = catalogMgmr; + this.cbamMgmr = cbamMgmr; + this.requestConverter = requestConverter; + this.jobDbMgmr = dbManager; + } + + public void run() { + try { + NslcmGrantVnfRequest grantRequest = buildNslcmGrantVnfRequest(); + NslcmGrantVnfResponse grantResponse = nslcmMgmr.grantVnf(grantRequest); + handleNslcmGrantResponse(grantResponse); + + //step 2: query vnfPackage uri + VnfPackageInfo vnfPackageInfo = catalogMgmr.queryVnfPackage(driverRequest.getVnfPackageId()); + + //step 5: instantiate vnf + CBAMInstantiateVnfRequest instantiateReq = requestConverter.InstantiateReqConvert(driverRequest, grantResponse, null, null); + CBAMInstantiateVnfResponse cbamInstantiateResponse = cbamMgmr.instantiateVnf(instantiateReq, vnfInstanceId); + handleCbamInstantiateResponse(cbamInstantiateResponse, jobId); + + NslcmNotifyLCMEventsRequest nslcmNotifyReq = buildNslcmNotifyLCMEventsRequest(cbamInstantiateResponse); + nslcmMgmr.notifyVnf(nslcmNotifyReq, vnfInstanceId); + + } catch (ClientProtocolException e) { + logger.error("InstantiateVnfContinueRunnable run error ClientProtocolException", e); + } catch (IOException e) { + logger.error("InstantiateVnfContinueRunnable run error IOException", e); + } + + } + + private NslcmNotifyLCMEventsRequest buildNslcmNotifyLCMEventsRequest(CBAMInstantiateVnfResponse cbamInstantiateResponse) { + NslcmNotifyLCMEventsRequest request = new NslcmNotifyLCMEventsRequest(); + if(CommonEnum.OperationStatus.STARTED == cbamInstantiateResponse.getStatus()) + { + request.setStatus(CommonEnum.status.start); + } + else + { + request.setStatus(CommonEnum.status.result); + + //TODO the following are for the result +// request.setAffectedVnfc(affectedVnfc); +// request.setAffectedVI(affectedVI); +// request.setAffectedVirtualStorage(affectedVirtualStorage); + } + + request.setVnfInstanceId(vnfInstanceId); + request.setOperation(CommonConstants.NSLCM_OPERATION_INSTANTIATE); + request.setJobId(jobId); + return request; + } + + private NslcmGrantVnfRequest buildNslcmGrantVnfRequest() { + NslcmGrantVnfRequest request = new NslcmGrantVnfRequest(); + + request.setVnfInstanceId(vnfInstanceId); + request.setLifecycleOperation(LifecycleOperation.Instantiate); + request.setJobId(jobId); + + ResourceDefinition resource = getFreeVnfResource(); + List resourceList = new ArrayList(); + resourceList.add(resource); + request.setAddResource(resourceList); + + return request; + } + + private ResourceDefinition getFreeVnfResource() { + // TODO Auto-generated method stub + return null; + } + + private void handleCbamInstantiateResponse(CBAMInstantiateVnfResponse cbamInstantiateResponse, String jobId) { + VnfmJobExecutionInfo jobInfo = jobDbMgmr.findOne(Long.getLong(jobId)); + + jobInfo.setVnfmExecutionId(cbamInstantiateResponse.getId()); + jobDbMgmr.save(jobInfo); + } + + private void handleNslcmGrantResponse(NslcmGrantVnfResponse grantResponse) { + // TODO Auto-generated method stub + + } + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/adaptor/TerminateVnfContinueRunnable.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/adaptor/TerminateVnfContinueRunnable.java new file mode 100644 index 00000000..ba7663d9 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/adaptor/TerminateVnfContinueRunnable.java @@ -0,0 +1,136 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.adaptor; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import org.apache.http.client.ClientProtocolException; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMTerminateVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMTerminateVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.inf.CbamMgmrInf; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.constant.CommonConstants; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.constant.CommonEnum; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.constant.CommonEnum.LifecycleOperation; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.db.repository.VnfmJobExecutionRepository; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.NslcmGrantVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.NslcmGrantVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.NslcmNotifyLCMEventsRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.entity.ResourceDefinition; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.inf.NslcmMgmrInf; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.TerminateVnfRequest; + + + +public class TerminateVnfContinueRunnable implements Runnable { + private static final Logger logger = LogManager.getLogger("TerminateVnfContinueRunnable"); + + private CbamMgmrInf cbamMgmr; + private NslcmMgmrInf nslcmMgmr; + + private TerminateVnfRequest driverRequest; + private String vnfInstanceId; + private String jobId; + private VnfmJobExecutionRepository jobDbManager; + + private Driver2CbamRequestConverter requestConverter; + + public TerminateVnfContinueRunnable(TerminateVnfRequest driverRequest, String vnfInstanceId, String jobId, + NslcmMgmrInf nslcmMgmr, CbamMgmrInf cbamMgmr, Driver2CbamRequestConverter requestConverter, VnfmJobExecutionRepository dbManager) + { + this.driverRequest = driverRequest; + this.vnfInstanceId = vnfInstanceId; + this.nslcmMgmr = nslcmMgmr; + this.cbamMgmr = cbamMgmr; + this.requestConverter = requestConverter; + this.jobId = jobId; + this.jobDbManager = dbManager; + } + + public void run() { + try { + NslcmGrantVnfRequest grantRequest = buildNslcmGrantVnfRequest(); + NslcmGrantVnfResponse grantResponse = nslcmMgmr.grantVnf(grantRequest); + handleNslcmGrantResponse(grantResponse); + + CBAMTerminateVnfRequest cbamRequest = requestConverter.terminateReqConvert(driverRequest); + CBAMTerminateVnfResponse cbamResponse = cbamMgmr.terminateVnf(cbamRequest, vnfInstanceId); + + cbamMgmr.deleteVnf(vnfInstanceId); + + NslcmNotifyLCMEventsRequest nslcmNotifyReq = buildNslcmNotifyLCMEventsRequest(cbamResponse); + nslcmMgmr.notifyVnf(nslcmNotifyReq, vnfInstanceId); + + } catch (ClientProtocolException e) { + logger.error("TerminateVnfContinueRunnable run error ClientProtocolException", e); + } catch (IOException e) { + logger.error("TerminateVnfContinueRunnable run error IOException", e); + } + + } + + private NslcmGrantVnfRequest buildNslcmGrantVnfRequest() { + NslcmGrantVnfRequest request = new NslcmGrantVnfRequest(); + + request.setVnfInstanceId(vnfInstanceId); + request.setLifecycleOperation(LifecycleOperation.Instantiate); + request.setJobId(jobId); + + ResourceDefinition resource = getFreeVnfResource(); + List resourceList = new ArrayList(); + resourceList.add(resource); + request.setRemoveResource(resourceList); + + return request; + } + + private ResourceDefinition getFreeVnfResource() { + // TODO Auto-generated method stub + return null; + } + + private NslcmNotifyLCMEventsRequest buildNslcmNotifyLCMEventsRequest(CBAMTerminateVnfResponse cbamResponse) { + NslcmNotifyLCMEventsRequest request = new NslcmNotifyLCMEventsRequest(); + if(CommonEnum.OperationStatus.STARTED == cbamResponse.getStatus()) + { + request.setStatus(CommonEnum.status.start); + } + else + { + request.setStatus(CommonEnum.status.result); + + //TODO the following are for the result +// request.setAffectedVnfc(affectedVnfc); +// request.setAffectedVI(affectedVI); +// request.setAffectedVirtualStorage(affectedVirtualStorage); + } + + request.setVnfInstanceId(vnfInstanceId); + request.setOperation(CommonConstants.NSLCM_OPERATION_TERMINATE); + request.setJobId(jobId); + return request; + } + + private void handleNslcmGrantResponse(NslcmGrantVnfResponse grantResponse) { + // TODO Auto-generated method stub + + } + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/adaptor/VnfmDriverMgmrIml.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/adaptor/VnfmDriverMgmrIml.java new file mode 100644 index 00000000..fa274fee --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/adaptor/VnfmDriverMgmrIml.java @@ -0,0 +1,249 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.adaptor; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import org.apache.http.HttpStatus; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.catalog.inf.CatalogMgmrInf; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMCreateVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMCreateVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMHealVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMHealVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMOperExecutVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMQueryOperExecutionResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMQueryVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMScaleVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMScaleVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.inf.CbamMgmrInf; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.constant.CommonConstants; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.db.bean.VnfmJobExecutionInfo; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.db.repository.VnfmJobExecutionRepository; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.exception.VnfmDriverException; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.VnfmInfo; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.inf.NslcmMgmrInf; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.HealVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.HealVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.InstantiateVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.InstantiateVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.OperStatusVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.QueryVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.ScaleVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.ScaleVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.TerminateVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.TerminateVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.entity.ResponseDescriptor; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.entity.ResponseHistoryList; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.inf.VnfmDriverMgmrInf; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + + +@Component +public class VnfmDriverMgmrIml implements VnfmDriverMgmrInf{ + private static final Logger logger = LogManager.getLogger("VnfmDriverMgmrIml"); + + @Autowired + Driver2CbamRequestConverter requestConverter; + + @Autowired + Cbam2DriverResponseConverter responseConverter; + + @Autowired + private CbamMgmrInf cbamMgmr; + + @Autowired + private CatalogMgmrInf catalogMgmr; + + @Autowired + private NslcmMgmrInf nslcmMgmr; + + @Autowired + private VnfmJobExecutionRepository jobDbManager; + + public InstantiateVnfResponse instantiateVnf(InstantiateVnfRequest driverRequest, String vnfmId) throws VnfmDriverException { + InstantiateVnfResponse driverResponse; + try { + //step 1: query vnfm info + VnfmInfo vnfmInfo = nslcmMgmr.queryVnfm(vnfmId); + + if(vnfmInfo == null || vnfmId.equalsIgnoreCase(vnfmInfo.getVnfmId())) + { + throw new VnfmDriverException(HttpStatus.SC_INTERNAL_SERVER_ERROR, CommonConstants.HTTP_ERROR_DESC_500); + } + + //step 3: create vnf + CBAMCreateVnfRequest cbamRequest = requestConverter.createReqConvert(driverRequest); + CBAMCreateVnfResponse cbamResponse = cbamMgmr.createVnf(cbamRequest); + driverResponse = responseConverter.createRspConvert(cbamResponse); + + String vnfInstanceId = driverResponse.getVnfInstanceId(); + String jobId = driverResponse.getJobId(); + continueInstantiateVnf(driverRequest, vnfInstanceId, jobId); + + + } catch (Exception e) { + throw new VnfmDriverException(HttpStatus.SC_INTERNAL_SERVER_ERROR, CommonConstants.HTTP_ERROR_DESC_500); + } + + return driverResponse; + } + + public void continueInstantiateVnf(InstantiateVnfRequest driverRequest, String vnfInstanceId, String jobId) { + InstantiateVnfContinueRunnable runnable = new InstantiateVnfContinueRunnable(driverRequest, vnfInstanceId, jobId, + nslcmMgmr, catalogMgmr, cbamMgmr, requestConverter, jobDbManager); + + Thread thread = new Thread(runnable); + + thread.run(); + } + + public TerminateVnfResponse terminateVnf(TerminateVnfRequest driverRequest, String vnfmId, String vnfInstanceId) { + TerminateVnfResponse driverResponse; + try { + VnfmInfo vnfmInfo = nslcmMgmr.queryVnfm(vnfmId); + + if(vnfmInfo == null || vnfmId.equalsIgnoreCase(vnfmInfo.getVnfmId())) + { + throw new VnfmDriverException(HttpStatus.SC_INTERNAL_SERVER_ERROR, CommonConstants.HTTP_ERROR_DESC_500); + } + driverResponse = generateTerminateVnfResponse(vnfInstanceId); + String jobId = driverResponse.getJobId(); + continueTerminateVnf(driverRequest, vnfInstanceId, jobId); + + } catch (Exception e) { + throw new VnfmDriverException(HttpStatus.SC_INTERNAL_SERVER_ERROR, CommonConstants.HTTP_ERROR_DESC_500); + } + + return driverResponse; + } + + private TerminateVnfResponse generateTerminateVnfResponse(String vnfInstanceId) { + VnfmJobExecutionInfo jobInfo = new VnfmJobExecutionInfo(); + jobInfo.setVnfInstanceId(vnfInstanceId); + jobInfo.setVnfmInterfceName(CommonConstants.NSLCM_OPERATION_TERMINATE); + jobInfo.setStatus(CommonConstants.CBAM_OPERATION_STATUS_START); + + VnfmJobExecutionInfo jobInfo1= jobDbManager.save(jobInfo); + Long jobId = jobInfo1.getJobId(); + + TerminateVnfResponse response = new TerminateVnfResponse(); + response.setJobId("" + jobId); + return response; + } + + public void continueTerminateVnf(TerminateVnfRequest driverRequest, String vnfInstanceId, String jobId) { + TerminateVnfContinueRunnable runnable = new TerminateVnfContinueRunnable(driverRequest, vnfInstanceId, jobId, + nslcmMgmr, cbamMgmr, requestConverter, jobDbManager); + + Thread thread = new Thread(runnable); + + thread.run(); + } + + + public QueryVnfResponse queryVnf(String vnfmId, String vnfInstanceId) { + QueryVnfResponse driverResponse; + try { + nslcmMgmr.queryVnfm(vnfmId); + VnfmInfo vnfmInfo = nslcmMgmr.queryVnfm(vnfmId); + + if(vnfmInfo == null || vnfmId.equalsIgnoreCase(vnfmInfo.getVnfmId())) + { + throw new VnfmDriverException(HttpStatus.SC_INTERNAL_SERVER_ERROR, CommonConstants.HTTP_ERROR_DESC_500); + } + CBAMQueryVnfResponse cbamResponse = cbamMgmr.queryVnf(vnfInstanceId); + driverResponse = responseConverter.queryRspConvert(cbamResponse); + } catch (Exception e) { + throw new VnfmDriverException(HttpStatus.SC_INTERNAL_SERVER_ERROR, CommonConstants.HTTP_ERROR_DESC_500); + } + + return driverResponse; + } + + public OperStatusVnfResponse getOperStatus(String vnfmId, String jobId) throws VnfmDriverException { + VnfmInfo vnfmInfo; + try { + vnfmInfo = nslcmMgmr.queryVnfm(vnfmId); + } catch (Exception e) { + throw new VnfmDriverException(HttpStatus.SC_INTERNAL_SERVER_ERROR, CommonConstants.HTTP_ERROR_DESC_500); + } + + if(vnfmInfo == null || vnfmId.equalsIgnoreCase(vnfmInfo.getVnfmId())) + { + throw new VnfmDriverException(HttpStatus.SC_INTERNAL_SERVER_ERROR, CommonConstants.HTTP_ERROR_DESC_500); + } + + VnfmJobExecutionInfo jobInfo = jobDbManager.findOne(Long.getLong(jobId)); + String execId = jobInfo.getVnfmExecutionId(); + + CBAMQueryOperExecutionResponse cbamResponse; + + try { + cbamResponse = cbamMgmr.queryOperExecution(execId); + } catch (Exception e) { + throw new VnfmDriverException(HttpStatus.SC_INTERNAL_SERVER_ERROR, CommonConstants.HTTP_ERROR_DESC_500); + } + + OperStatusVnfResponse response = responseConverter.operRspConvert(cbamResponse); + + return response; + } + + public ScaleVnfResponse scaleVnf(ScaleVnfRequest driverRequest, String vnfmId, String vnfInstanceId) throws VnfmDriverException { + ScaleVnfResponse driverResponse; + try { + VnfmInfo vnfmInfo = nslcmMgmr.queryVnfm(vnfmId); + + if(vnfmInfo == null || vnfmId.equalsIgnoreCase(vnfmInfo.getVnfmId())) + { + throw new VnfmDriverException(HttpStatus.SC_INTERNAL_SERVER_ERROR, CommonConstants.HTTP_ERROR_DESC_500); + } + CBAMScaleVnfRequest cbamRequest = requestConverter.scaleReqconvert(driverRequest); + CBAMScaleVnfResponse cbamResponse = cbamMgmr.scaleVnf(cbamRequest, vnfInstanceId); + driverResponse = responseConverter.scaleRspConvert(cbamResponse); + } catch (Exception e) { + throw new VnfmDriverException(HttpStatus.SC_INTERNAL_SERVER_ERROR, CommonConstants.HTTP_ERROR_DESC_500); + } + + return driverResponse; + } + + public HealVnfResponse healVnf(HealVnfRequest driverRequest, String vnfmId, String vnfInstanceId) throws VnfmDriverException { + HealVnfResponse driverResponse; + try { + VnfmInfo vnfmInfo = nslcmMgmr.queryVnfm(vnfmId); + + if(vnfmInfo == null || vnfmId.equalsIgnoreCase(vnfmInfo.getVnfmId())) + { + throw new VnfmDriverException(HttpStatus.SC_INTERNAL_SERVER_ERROR, CommonConstants.HTTP_ERROR_DESC_500); + } + CBAMHealVnfRequest cbamRequest = requestConverter.healReqConvert(driverRequest); + CBAMHealVnfResponse cbamResponse = cbamMgmr.healVnf(cbamRequest, vnfInstanceId); + driverResponse = responseConverter.healRspConvert(cbamResponse); + } catch (Exception e) { + throw new VnfmDriverException(HttpStatus.SC_INTERNAL_SERVER_ERROR, CommonConstants.HTTP_ERROR_DESC_500); + } + + return driverResponse; + } + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/catalog/bo/CatalogQueryVnfRequest.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/catalog/bo/CatalogQueryVnfRequest.java new file mode 100644 index 00000000..82946b11 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/catalog/bo/CatalogQueryVnfRequest.java @@ -0,0 +1,21 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.catalog.bo; + +public class CatalogQueryVnfRequest { + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/catalog/bo/CatalogQueryVnfResponse.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/catalog/bo/CatalogQueryVnfResponse.java new file mode 100644 index 00000000..f5d44ca7 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/catalog/bo/CatalogQueryVnfResponse.java @@ -0,0 +1,79 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.catalog.bo; + +import java.util.List; + +import org.onap.vfc.nfvo.driver.vnfm.svnfm.catalog.bo.entity.ImageInfo; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.catalog.bo.entity.VnfInstanceInfo; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.entity.VnfPackageInfo; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class CatalogQueryVnfResponse { + @JsonProperty("csarId") + private String csarId; + + @JsonProperty("packageInfo") + private VnfPackageInfo packageInfo; + + @JsonProperty("imageInfo") + private List imageInfo; + + @JsonProperty("vnfInstanceInfo") + private List vnfInstanceInfo; + + public String getCsarId() { + return csarId; + } + + public void setCsarId(String csarId) { + this.csarId = csarId; + } + + + + public VnfPackageInfo getPackageInfo() { + return packageInfo; + } + + public void setPackageInfo(VnfPackageInfo packageInfo) { + this.packageInfo = packageInfo; + } + + public List getImageInfo() { + return imageInfo; + } + + public void setImageInfo(List imageInfo) { + this.imageInfo = imageInfo; + } + + public List getVnfInstanceInfo() { + return vnfInstanceInfo; + } + + public void setVnfInstanceInfo(List vnfInstanceInfo) { + this.vnfInstanceInfo = vnfInstanceInfo; + } + + + + + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/catalog/bo/entity/ImageInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/catalog/bo/entity/ImageInfo.java new file mode 100644 index 00000000..fe7f5f8a --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/catalog/bo/entity/ImageInfo.java @@ -0,0 +1,104 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.catalog.bo.entity; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class ImageInfo { + + @JsonProperty("index") + private String index; + + @JsonProperty("fileName") + private String fileName; + + @JsonProperty("imageId") + private String imageId; + + @JsonProperty("vimId") + private String vimId; + + @JsonProperty("vimUser") + private String vimUser; + + @JsonProperty("tenant") + private String tenant; + + @JsonProperty("status") + private String status; + + public String getIndex() { + return index; + } + + public void setIndex(String index) { + this.index = index; + } + + public String getFileName() { + return fileName; + } + + public void setFileName(String fileName) { + this.fileName = fileName; + } + + public String getImageId() { + return imageId; + } + + public void setImageId(String imageId) { + this.imageId = imageId; + } + + public String getVimId() { + return vimId; + } + + public void setVimId(String vimId) { + this.vimId = vimId; + } + + public String getVimUser() { + return vimUser; + } + + public void setVimUser(String vimUser) { + this.vimUser = vimUser; + } + + public String getTenant() { + return tenant; + } + + public void setTenant(String tenant) { + this.tenant = tenant; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + + + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/catalog/bo/entity/VnfInstanceInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/catalog/bo/entity/VnfInstanceInfo.java new file mode 100644 index 00000000..6ce4b07b --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/catalog/bo/entity/VnfInstanceInfo.java @@ -0,0 +1,49 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.catalog.bo.entity; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class VnfInstanceInfo { + + @JsonProperty("vnfInstanceId") + private String vnfInstanceId; + + @JsonProperty("vnfInstanceName") + private String vnfInstanceName; + + public String getVnfInstanceId() { + return vnfInstanceId; + } + + public void setVnfInstanceId(String vnfInstanceId) { + this.vnfInstanceId = vnfInstanceId; + } + + public String getVnfInstanceName() { + return vnfInstanceName; + } + + public void setVnfInstanceName(String vnfInstanceName) { + this.vnfInstanceName = vnfInstanceName; + } + + + + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/catalog/impl/CatalogMgmrImpl.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/catalog/impl/CatalogMgmrImpl.java new file mode 100644 index 00000000..186a1720 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/catalog/impl/CatalogMgmrImpl.java @@ -0,0 +1,63 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.catalog.impl; + +import java.io.IOException; + +import org.apache.http.client.ClientProtocolException; +import org.apache.http.impl.client.HttpClientBuilder; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.catalog.bo.CatalogQueryVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.catalog.inf.CatalogMgmrInf; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.common.bo.AdaptorEnv; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.constant.CommonConstants; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.http.client.HttpRequestProcessor; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.entity.VnfPackageInfo; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; +import org.springframework.web.bind.annotation.RequestMethod; + +import com.google.gson.Gson; + +@Component +public class CatalogMgmrImpl implements CatalogMgmrInf{ + private static final Logger logger = LogManager.getLogger("CatalogMgmrImpl"); + + private Gson gson = new Gson(); + + @Autowired + private AdaptorEnv adaptorEnv; + + @Autowired + private HttpClientBuilder httpClientBuilder; + + public VnfPackageInfo queryVnfPackage(String vnfPackageId) throws ClientProtocolException, IOException { + String url=adaptorEnv.getCatalogApiUriFront() + String.format(CommonConstants.RetrieveVnfPackagePath, vnfPackageId); + HttpRequestProcessor processor = new HttpRequestProcessor(httpClientBuilder, RequestMethod.GET); + + String responseStr = processor.process(url); + + logger.info("CbamMgmrImpl -> queryVnfPackage, responseStr is " + responseStr); + + CatalogQueryVnfResponse resp = gson.fromJson(responseStr, CatalogQueryVnfResponse.class); + + return resp.getPackageInfo(); + } + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/catalog/inf/CatalogMgmrInf.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/catalog/inf/CatalogMgmrInf.java new file mode 100644 index 00000000..5984aaaf --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/catalog/inf/CatalogMgmrInf.java @@ -0,0 +1,26 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.catalog.inf; + +import java.io.IOException; + +import org.apache.http.client.ClientProtocolException; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.entity.VnfPackageInfo; + +public interface CatalogMgmrInf { + public VnfPackageInfo queryVnfPackage(String vnfPackageId) throws ClientProtocolException, IOException; +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMCreateVnfRequest.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMCreateVnfRequest.java new file mode 100644 index 00000000..d1c6a7bd --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMCreateVnfRequest.java @@ -0,0 +1,57 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.cbam.bo; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class CBAMCreateVnfRequest { + @JsonProperty("vnfdId") + private String vnfdId; + + @JsonProperty("name") + private String name; + + @JsonProperty("description") + private String description; + + public String getVnfdId() { + return vnfdId; + } + + public void setVnfdId(String vnfdId) { + this.vnfdId = vnfdId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMCreateVnfResponse.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMCreateVnfResponse.java new file mode 100644 index 00000000..a920fbca --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMCreateVnfResponse.java @@ -0,0 +1,47 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.cbam.bo; + +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity.VnfInfo; + +public class CBAMCreateVnfResponse extends VnfInfo{ +// @JsonProperty("vnfdId") +// private VnfInfo vnfInfo; +// +// @JsonProperty("problemDetails") +// private ProblemDetails problemDetails; +// +// public VnfInfo getVnfInfo() { +// return vnfInfo; +// } +// +// public void setVnfInfo(VnfInfo vnfInfo) { +// this.vnfInfo = vnfInfo; +// } +// +// public ProblemDetails getProblemDetails() { +// return problemDetails; +// } +// +// public void setProblemDetails(ProblemDetails problemDetails) { +// this.problemDetails = problemDetails; +// } +// + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMHealVnfRequest.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMHealVnfRequest.java new file mode 100644 index 00000000..152a124a --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMHealVnfRequest.java @@ -0,0 +1,49 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.cbam.bo; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class CBAMHealVnfRequest { + + @JsonProperty("cause") + private String cause; + + @JsonProperty("additionalParams") + private Object additionalParams; + + + public String getCause() { + return cause; + } + + public void setCause(String cause) { + this.cause = cause; + } + + public Object getAdditionalParams() { + return additionalParams; + } + + public void setAdditionalParams(Object additionalParams) { + this.additionalParams = additionalParams; + } + + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMHealVnfResponse.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMHealVnfResponse.java new file mode 100644 index 00000000..b3c1dee8 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMHealVnfResponse.java @@ -0,0 +1,46 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.cbam.bo; + +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity.OperationExecution; + +public class CBAMHealVnfResponse extends OperationExecution { + /*@JsonProperty("operationExecution") + private OperationExecution operationExecution; + + @JsonProperty("problemDetails") + private ProblemDetails problemDetails; + + public OperationExecution getOperationExecution() { + return operationExecution; + } + + public void setOperationExecution(OperationExecution operationExecution) { + this.operationExecution = operationExecution; + } + + public ProblemDetails getProblemDetails() { + return problemDetails; + } + + public void setProblemDetails(ProblemDetails problemDetails) { + this.problemDetails = problemDetails; + } + */ + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMInstantiateVnfRequest.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMInstantiateVnfRequest.java new file mode 100644 index 00000000..db79d190 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMInstantiateVnfRequest.java @@ -0,0 +1,83 @@ + +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.cbam.bo; + +import java.util.List; + +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity.ExtManagedVirtualLinkData; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity.ExtVirtualLinkData; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity.VimInfo; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class CBAMInstantiateVnfRequest { + + @JsonProperty("flavourId") + private String flavourId; + + @JsonProperty("vims") + private List vims; + + @JsonProperty("extVirtualLinks") + private List extVirtualLinks; + + @JsonProperty("extManagedVirtualLinks") + private List extManagedVirtualLinks; + + public String getFlavourId() { + return flavourId; + } + + public void setFlavourId(String flavourId) { + this.flavourId = flavourId; + } + + + + public List getVims() { + return vims; + } + + public void setVims(List vims) { + this.vims = vims; + } + + public List getExtVirtualLinks() { + return extVirtualLinks; + } + + public void setExtVirtualLinks(List extVirtualLinks) { + this.extVirtualLinks = extVirtualLinks; + } + + public List getExtManagedVirtualLinks() { + return extManagedVirtualLinks; + } + + public void setExtManagedVirtualLinks(List extManagedVirtualLinks) { + this.extManagedVirtualLinks = extManagedVirtualLinks; + } + + + + + + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMInstantiateVnfResponse.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMInstantiateVnfResponse.java new file mode 100644 index 00000000..f1b4ac82 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMInstantiateVnfResponse.java @@ -0,0 +1,49 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.cbam.bo; + +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity.OperationExecution; + +public class CBAMInstantiateVnfResponse extends OperationExecution{ +/* @JsonProperty("operationExecution") + private OperationExecution operationExecution; + + @JsonProperty("problemDetails") + private ProblemDetails problemDetails; + + public OperationExecution getOperationExecution() { + return operationExecution; + } + + public void setOperationExecution(OperationExecution operationExecution) { + this.operationExecution = operationExecution; + } + + public ProblemDetails getProblemDetails() { + return problemDetails; + } + + public void setProblemDetails(ProblemDetails problemDetails) { + this.problemDetails = problemDetails; + } +*/ + + + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMOperExecutVnfRequest.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMOperExecutVnfRequest.java new file mode 100644 index 00000000..0c748cfd --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMOperExecutVnfRequest.java @@ -0,0 +1,22 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.cbam.bo; + +public class CBAMOperExecutVnfRequest { + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMOperExecutVnfResponse.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMOperExecutVnfResponse.java new file mode 100644 index 00000000..f0ae5b84 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMOperExecutVnfResponse.java @@ -0,0 +1,53 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.cbam.bo; + +import java.util.List; + +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity.OperationExecution; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity.ProblemDetails; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class CBAMOperExecutVnfResponse { + + @JsonProperty("operationExecution") + private List operationExecution; + + @JsonProperty("problemDetails") + private ProblemDetails problemDetails; + + + public List getOperationExecution() { + return operationExecution; + } + + public void setOperationExecution(List operationExecution) { + this.operationExecution = operationExecution; + } + + public ProblemDetails getProblemDetails() { + return problemDetails; + } + + public void setProblemDetails(ProblemDetails problemDetails) { + this.problemDetails = problemDetails; + } + + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMQueryOperExecutionResponse.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMQueryOperExecutionResponse.java new file mode 100644 index 00000000..8a11ea82 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMQueryOperExecutionResponse.java @@ -0,0 +1,24 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.cbam.bo; + +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity.OperationExecution; + +public class CBAMQueryOperExecutionResponse extends OperationExecution{ + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMQueryVnfResponse.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMQueryVnfResponse.java new file mode 100644 index 00000000..ce00715e --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMQueryVnfResponse.java @@ -0,0 +1,47 @@ + +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.cbam.bo; + +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity.VnfInfo; + +public class CBAMQueryVnfResponse extends VnfInfo { + /*@JsonProperty("vnfInfo") + private VnfInfo vnfInfo; + + @JsonProperty("problemDetails") + private ProblemDetails problemDetails; + + public VnfInfo getVnfInfo() { + return vnfInfo; + } + + public void setVnfInfo(VnfInfo vnfInfo) { + this.vnfInfo = vnfInfo; + } + + public ProblemDetails getProblemDetails() { + return problemDetails; + } + + public void setProblemDetails(ProblemDetails problemDetails) { + this.problemDetails = problemDetails; + }*/ + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMScaleVnfRequest.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMScaleVnfRequest.java new file mode 100644 index 00000000..399b3800 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMScaleVnfRequest.java @@ -0,0 +1,78 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.cbam.bo; + +import org.onap.vfc.nfvo.driver.vnfm.svnfm.constant.CommonEnum; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class CBAMScaleVnfRequest { + @JsonProperty("type") + private CommonEnum.ScaleDirection type; + + @JsonProperty("aspectId") + private String aspectId; + + @JsonProperty("numberOfSteps") + private Integer numberOfSteps; + + + @JsonProperty("additionalParams") + private Object additionalParams; + + + public CommonEnum.ScaleDirection getType() { + return type; + } + + + public void setType(CommonEnum.ScaleDirection type) { + this.type = type; + } + + + + public String getAspectId() { + return aspectId; + } + + + public void setAspectId(String aspectId) { + this.aspectId = aspectId; + } + + public Integer getNumberOfSteps() { + return numberOfSteps; + } + + + public void setNumberOfSteps(Integer numberOfSteps) { + this.numberOfSteps = numberOfSteps; + } + + + public Object getAdditionalParams() { + return additionalParams; + } + + + + public void setAdditionalParams(Object additionalParams) { + this.additionalParams = additionalParams; + } + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMScaleVnfResponse.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMScaleVnfResponse.java new file mode 100644 index 00000000..ce524648 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMScaleVnfResponse.java @@ -0,0 +1,46 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.cbam.bo; + +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity.OperationExecution; + +public class CBAMScaleVnfResponse extends OperationExecution { + /*@JsonProperty("operationExecution") + private OperationExecution operationExecution; + + @JsonProperty("problemDetails") + private ProblemDetails problemDetails; + + public OperationExecution getOperationExecution() { + return operationExecution; + } + + public void setOperationExecution(OperationExecution operationExecution) { + this.operationExecution = operationExecution; + } + + public ProblemDetails getProblemDetails() { + return problemDetails; + } + + public void setProblemDetails(ProblemDetails problemDetails) { + this.problemDetails = problemDetails; + }*/ + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMTerminateVnfRequest.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMTerminateVnfRequest.java new file mode 100644 index 00000000..8552a160 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMTerminateVnfRequest.java @@ -0,0 +1,145 @@ + +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.cbam.bo; + +import org.onap.vfc.nfvo.driver.vnfm.svnfm.constant.CommonEnum; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class CBAMTerminateVnfRequest { + + @JsonProperty("name") + private String name; + + @JsonProperty("description") + private String description; + + @JsonProperty("terminationType") + private CommonEnum.TerminationType terminationType; + + @JsonProperty("gracefulTerminationTimeout") + private Integer gracefulTerminationTimeout; + + @JsonProperty("additionalParams") + private Object additionalParams; + + + + public String getName() { + return name; + } + + + + + + + + public void setName(String name) { + this.name = name; + } + + + + + + + + public String getDescription() { + return description; + } + + + + + + + + public void setDescription(String description) { + this.description = description; + } + + + + + public CommonEnum.TerminationType getTerminationType() { + return terminationType; + } + + + + + + + + public void setTerminationType(CommonEnum.TerminationType terminationType) { + this.terminationType = terminationType; + } + + + + + + + + public Integer getGracefulTerminationTimeout() { + return gracefulTerminationTimeout; + } + + + + + + + + public void setGracefulTerminationTimeout(Integer gracefulTerminationTimeout) { + this.gracefulTerminationTimeout = gracefulTerminationTimeout; + } + + + + + + + + public Object getAdditionalParams() { + return additionalParams; + } + + + + + + + + public void setAdditionalParams(Object additionalParams) { + this.additionalParams = additionalParams; + } + + + + + + + + public enum TerminationType{ + GRACEFUL, FORCEFUL + + } + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMTerminateVnfResponse.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMTerminateVnfResponse.java new file mode 100644 index 00000000..0ee100e9 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMTerminateVnfResponse.java @@ -0,0 +1,44 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.cbam.bo; + +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity.OperationExecution; + +public class CBAMTerminateVnfResponse extends OperationExecution{ +// @JsonProperty("operationExecution") +// private OperationExecution operationExecution; +// +// @JsonProperty("problemDetails") +// private ProblemDetails problemDetails; +// +// public OperationExecution getOperationExecution() { +// return operationExecution; +// } +// +// public void setOperationExecution(OperationExecution operationExecution) { +// this.operationExecution = operationExecution; +// } +// +// public ProblemDetails getProblemDetails() { +// return problemDetails; +// } +// +// public void setProblemDetails(ProblemDetails problemDetails) { +// this.problemDetails = problemDetails; +// } + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/EndpointInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/EndpointInfo.java new file mode 100644 index 00000000..30500a7c --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/EndpointInfo.java @@ -0,0 +1,35 @@ +/* +* Copyright 2016-2017 Nokia Corporation +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class EndpointInfo { + @JsonProperty("endpoint") + private String endpoint; + + public String getEndpoint() { + return endpoint; + } + + public void setEndpoint(String endpoint) { + this.endpoint = endpoint; + } + + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/ExtManagedVirtualLinkData.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/ExtManagedVirtualLinkData.java new file mode 100644 index 00000000..b20dbe51 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/ExtManagedVirtualLinkData.java @@ -0,0 +1,68 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class ExtManagedVirtualLinkData { + @JsonProperty("extManagedVirtualLinkId") + private String extManagedVirtualLinkId; + + @JsonProperty("resourceId") + private String resourceId; + + @JsonProperty("virtualLinkDescId") + private String virtualLinkDescId; + + @JsonProperty("vimId") + private String vimId; + + public String getExtManagedVirtualLinkId() { + return extManagedVirtualLinkId; + } + + public void setExtManagedVirtualLinkId(String extManagedVirtualLinkId) { + this.extManagedVirtualLinkId = extManagedVirtualLinkId; + } + + public String getResourceId() { + return resourceId; + } + + public void setResourceId(String resourceId) { + this.resourceId = resourceId; + } + + public String getVirtualLinkDescId() { + return virtualLinkDescId; + } + + public void setVirtualLinkDescId(String virtualLinkDescId) { + this.virtualLinkDescId = virtualLinkDescId; + } + + public String getVimId() { + return vimId; + } + + public void setVimId(String vimId) { + this.vimId = vimId; + } + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/ExtVirtualLinkData.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/ExtVirtualLinkData.java new file mode 100644 index 00000000..d981a77d --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/ExtVirtualLinkData.java @@ -0,0 +1,68 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity; + +import java.util.ArrayList; +import java.util.List; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class ExtVirtualLinkData { + @JsonProperty("flavourId") + private String resourceId; + @JsonProperty("flavourId") + private String vimId; + @JsonProperty("flavourId") + private String extVirtualLinkId; + + @JsonProperty("extVirtualLink") + private List extCps=new ArrayList(); + + public String getResourceId() { + return resourceId; + } + + public void setResourceId(String resourceId) { + this.resourceId = resourceId; + } + + public String getVimId() { + return vimId; + } + + public void setVimId(String vimId) { + this.vimId = vimId; + } + + public String getExtVirtualLinkId() { + return extVirtualLinkId; + } + + public void setExtVirtualLinkId(String extVirtualLinkId) { + this.extVirtualLinkId = extVirtualLinkId; + } + + public List getExtCps() { + return extCps; + } + + public void setExtCps(List extCps) { + this.extCps = extCps; + } + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/Inputs.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/Inputs.java new file mode 100644 index 00000000..29b6b473 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/Inputs.java @@ -0,0 +1,82 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class Inputs { + + @JsonProperty("key_name") + private String key_name; + + @JsonProperty("value") + private String value; + + @JsonProperty("type") + private String type; + + @JsonProperty("default1") + private String default1; + + @JsonProperty("description") + private String description; + + public String getKey_name() { + return key_name; + } + + public void setKey_name(String key_name) { + this.key_name = key_name; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getDefault1() { + return default1; + } + + public void setDefault1(String default1) { + this.default1 = default1; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/InstantiatedVnfInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/InstantiatedVnfInfo.java new file mode 100644 index 00000000..94fb6973 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/InstantiatedVnfInfo.java @@ -0,0 +1,21 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity; + +public class InstantiatedVnfInfo { + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/NetworkAddress.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/NetworkAddress.java new file mode 100644 index 00000000..5a0649bf --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/NetworkAddress.java @@ -0,0 +1,51 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class NetworkAddress { + @JsonProperty("subnetId") + private String subnetId; + @JsonProperty("ip") + private String ip; + @JsonProperty("mac") + private String mac; + public String getSubnetId() { + return subnetId; + } + public void setSubnetId(String subnetId) { + this.subnetId = subnetId; + } + public String getIp() { + return ip; + } + public void setIp(String ip) { + this.ip = ip; + } + public String getMac() { + return mac; + } + public void setMac(String mac) { + this.mac = mac; + } + + + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/OPENSTACK_V2_INFO.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/OPENSTACK_V2_INFO.java new file mode 100644 index 00000000..9fad8cb3 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/OPENSTACK_V2_INFO.java @@ -0,0 +1,58 @@ +/* +* Copyright 2016-2017 Nokia Corporation +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class OPENSTACK_V2_INFO { + + @JsonProperty("vimInfoType") + private VimInfoType vimInfoType; + @JsonProperty("interfaceInfo") + private EndpointInfo interfaceInfo; + @JsonProperty("id") + private String id; + @JsonProperty("accessInfo") + private OpenStackAccessInfoV2 accessInfo; + public VimInfoType getVimInfoType() { + return vimInfoType; + } + public void setVimInfoType(VimInfoType vimInfoType) { + this.vimInfoType = vimInfoType; + } + public EndpointInfo getInterfaceInfo() { + return interfaceInfo; + } + public void setInterfaceInfo(EndpointInfo interfaceInfo) { + this.interfaceInfo = interfaceInfo; + } + public String getId() { + return id; + } + public void setId(String id) { + this.id = id; + } + public OpenStackAccessInfoV2 getAccessInfo() { + return accessInfo; + } + public void setAccessInfo(OpenStackAccessInfoV2 accessInfo) { + this.accessInfo = accessInfo; + } + + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/OPENSTACK_V3_INFO.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/OPENSTACK_V3_INFO.java new file mode 100644 index 00000000..d5cc23a8 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/OPENSTACK_V3_INFO.java @@ -0,0 +1,57 @@ +/* +* Copyright 2016-2017 Nokia Corporation +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class OPENSTACK_V3_INFO { + + @JsonProperty("vimInfoType") + private VimInfoType vimInfoType; + @JsonProperty("interfaceInfo") + private EndpointInfo interfaceInfo; + @JsonProperty("id") + private String id; + @JsonProperty("accessInfo") + private OpenStackAccessInfoV3 accessInfo; + public VimInfoType getVimInfoType() { + return vimInfoType; + } + public void setVimInfoType(VimInfoType vimInfoType) { + this.vimInfoType = vimInfoType; + } + public EndpointInfo getInterfaceInfo() { + return interfaceInfo; + } + public void setInterfaceInfo(EndpointInfo interfaceInfo) { + this.interfaceInfo = interfaceInfo; + } + public String getId() { + return id; + } + public void setId(String id) { + this.id = id; + } + public OpenStackAccessInfoV3 getAccessInfo() { + return accessInfo; + } + public void setAccessInfo(OpenStackAccessInfoV3 accessInfo) { + this.accessInfo = accessInfo; + } + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/OTHER_VIM_INFO.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/OTHER_VIM_INFO.java new file mode 100644 index 00000000..76651247 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/OTHER_VIM_INFO.java @@ -0,0 +1,45 @@ +/* +* Copyright 2016-2017 Nokia Corporation +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class OTHER_VIM_INFO { + @JsonProperty("vimInfoType") + private VimInfoType vimInfoType; + + @JsonProperty("id") + private String id; + + public VimInfoType getVimInfoType() { + return vimInfoType; + } + + public void setVimInfoType(VimInfoType vimInfoType) { + this.vimInfoType = vimInfoType; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/OpenStackAccessInfoV2.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/OpenStackAccessInfoV2.java new file mode 100644 index 00000000..d4d5b7c1 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/OpenStackAccessInfoV2.java @@ -0,0 +1,70 @@ +package org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity; + +/* +* Copyright 2016-2017 Nokia Corporation +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +import com.fasterxml.jackson.annotation.JsonProperty; + +public class OpenStackAccessInfoV2 { + + @JsonProperty("username") + private String username; + + @JsonProperty("password") + private String password; + + @JsonProperty("region") + private String region; + + @JsonProperty("tenant") + private String tenant; + + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getRegion() { + return region; + } + + public void setRegion(String region) { + this.region = region; + } + + public String getTenant() { + return tenant; + } + + public void setTenant(String tenant) { + this.tenant = tenant; + } + + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/OpenStackAccessInfoV3.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/OpenStackAccessInfoV3.java new file mode 100644 index 00000000..3a9fc360 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/OpenStackAccessInfoV3.java @@ -0,0 +1,77 @@ +/* +* Copyright 2016-2017 Nokia Corporation +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class OpenStackAccessInfoV3 { + @JsonProperty("username") + private String username; + + @JsonProperty("password") + private String password; + + @JsonProperty("region") + private String region; + + @JsonProperty("project") + private String project; + + @JsonProperty("domain") + private String domain; + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getRegion() { + return region; + } + + public void setRegion(String region) { + this.region = region; + } + + public String getProject() { + return project; + } + + public void setProject(String project) { + this.project = project; + } + + public String getDomain() { + return domain; + } + + public void setDomain(String domain) { + this.domain = domain; + } + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/OperationExecution.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/OperationExecution.java new file mode 100644 index 00000000..e6dfbc87 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/OperationExecution.java @@ -0,0 +1,209 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity; + +import org.onap.vfc.nfvo.driver.vnfm.svnfm.constant.CommonEnum; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class OperationExecution { + + @JsonProperty("id") + private String id; + + @JsonProperty("vnfInstanceId") + private String vnfInstanceId; + + @JsonProperty("operationType") + private OperationType operationType; + + @JsonProperty("operationName") + private String operationName; + + @JsonProperty("status") + private CommonEnum.OperationStatus status; + + @JsonProperty("isCancelPending") + private boolean isCancelPending; + + @JsonProperty("CancelMode") + private CancelMode CancelMode; + + @JsonProperty("error") + private ProblemDetails error; + + @JsonProperty("startTime") + private String startTime; + + @JsonProperty("finishTime") + private String finishTime; + + @JsonProperty("grantId") + private String grantId; + + @JsonProperty("operationParams") + private Object operationParams; + + @JsonProperty("additionalData") + private Object additionalData; + + @JsonProperty("metadata") + private Object metadata; + + @JsonProperty("_links") + private _links _links; + + + + + + public enum OperationType{ + INSTANTIATE, SCALE, SCALE_TO_LEVEL, MODIFY_INFO, CHANGE_FLAVOUR, OPERATE, + HEAL, UPGRADE, TERMINATE, OTHER + } + + + + public enum CancelMode{ + GRACEFUL, FORCEFUL + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getVnfInstanceId() { + return vnfInstanceId; + } + + public void setVnfInstanceId(String vnfInstanceId) { + this.vnfInstanceId = vnfInstanceId; + } + + public OperationType getOperationType() { + return operationType; + } + + public void setOperationType(OperationType operationType) { + this.operationType = operationType; + } + + public String getOperationName() { + return operationName; + } + + public void setOperationName(String operationName) { + this.operationName = operationName; + } + + + + public CommonEnum.OperationStatus getStatus() { + return status; + } + + public void setStatus(CommonEnum.OperationStatus status) { + this.status = status; + } + + public boolean isCancelPending() { + return isCancelPending; + } + + public void setCancelPending(boolean isCancelPending) { + this.isCancelPending = isCancelPending; + } + + public CancelMode getCancelMode() { + return CancelMode; + } + + public void setCancelMode(CancelMode cancelMode) { + CancelMode = cancelMode; + } + + public ProblemDetails getError() { + return error; + } + + public void setError(ProblemDetails error) { + this.error = error; + } + + public String getStartTime() { + return startTime; + } + + public void setStartTime(String startTime) { + this.startTime = startTime; + } + + public String getFinishTime() { + return finishTime; + } + + public void setFinishTime(String finishTime) { + this.finishTime = finishTime; + } + + public String getGrantId() { + return grantId; + } + + public void setGrantId(String grantId) { + this.grantId = grantId; + } + + public Object getOperationParams() { + return operationParams; + } + + public void setOperationParams(Object operationParams) { + this.operationParams = operationParams; + } + + public Object getAdditionalData() { + return additionalData; + } + + public void setAdditionalData(Object additionalData) { + this.additionalData = additionalData; + } + + public Object getMetadata() { + return metadata; + } + + public void setMetadata(Object metadata) { + this.metadata = metadata; + } + + public _links get_links() { + return _links; + } + + public void set_links(_links _links) { + this._links = _links; + } + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/ProblemDetails.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/ProblemDetails.java new file mode 100644 index 00000000..73dea4b4 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/ProblemDetails.java @@ -0,0 +1,67 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class ProblemDetails { + @JsonProperty("type") + private String type; + @JsonProperty("title") + private String title; + @JsonProperty("status") + private Integer status; + @JsonProperty("detail") + private String detail; + @JsonProperty("instance") + private String instance; + public String getType() { + return type; + } + public void setType(String type) { + this.type = type; + } + public String getTitle() { + return title; + } + public void setTitle(String title) { + this.title = title; + } + public Integer getStatus() { + return status; + } + public void setStatus(Integer status) { + this.status = status; + } + public String getDetail() { + return detail; + } + public void setDetail(String detail) { + this.detail = detail; + } + public String getInstance() { + return instance; + } + public void setInstance(String instance) { + this.instance = instance; + } + + + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/VCloudAccessInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/VCloudAccessInfo.java new file mode 100644 index 00000000..d67dfd15 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/VCloudAccessInfo.java @@ -0,0 +1,57 @@ +/* +* Copyright 2016-2017 Nokia Corporation +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class VCloudAccessInfo { + @JsonProperty("username") + private String username; + + @JsonProperty("password") + private String password; + + @JsonProperty("organization") + private String organization; + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getOrganization() { + return organization; + } + + public void setOrganization(String organization) { + this.organization = organization; + } + + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/VMWARE_VCLOUD_INFO.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/VMWARE_VCLOUD_INFO.java new file mode 100644 index 00000000..2e417fec --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/VMWARE_VCLOUD_INFO.java @@ -0,0 +1,58 @@ +/* +* Copyright 2016-2017 Nokia Corporation +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class VMWARE_VCLOUD_INFO { + + @JsonProperty("vimInfoType") + private VimInfoType vimInfoType; + @JsonProperty("interfaceInfo") + private EndpointInfo interfaceInfo; + @JsonProperty("id") + private String id; + @JsonProperty("accessInfo") + private VCloudAccessInfo accessInfo; + public VimInfoType getVimInfoType() { + return vimInfoType; + } + public void setVimInfoType(VimInfoType vimInfoType) { + this.vimInfoType = vimInfoType; + } + public EndpointInfo getInterfaceInfo() { + return interfaceInfo; + } + public void setInterfaceInfo(EndpointInfo interfaceInfo) { + this.interfaceInfo = interfaceInfo; + } + public String getId() { + return id; + } + public void setId(String id) { + this.id = id; + } + public VCloudAccessInfo getAccessInfo() { + return accessInfo; + } + public void setAccessInfo(VCloudAccessInfo accessInfo) { + this.accessInfo = accessInfo; + } + + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/VimComputeResourceFlavour.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/VimComputeResourceFlavour.java new file mode 100644 index 00000000..f0d7fbc1 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/VimComputeResourceFlavour.java @@ -0,0 +1,53 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class VimComputeResourceFlavour { + @JsonProperty("vimId") + private String vimId; + @JsonProperty("resourceId") + private String resourceId; + @JsonProperty("vnfdVirtualComputeDescId") + private String vnfdVirtualComputeDescId; + + public String getVimId() { + return vimId; + } + public void setVimId(String vimId) { + this.vimId = vimId; + } + public String getResourceId() { + return resourceId; + } + public void setResourceId(String resourceId) { + this.resourceId = resourceId; + } + public String getVnfdVirtualComputeDescId() { + return vnfdVirtualComputeDescId; + } + public void setVnfdVirtualComputeDescId(String vnfdVirtualComputeDescId) { + this.vnfdVirtualComputeDescId = vnfdVirtualComputeDescId; + } + + + + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/VimInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/VimInfo.java new file mode 100644 index 00000000..db55d95f --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/VimInfo.java @@ -0,0 +1,48 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class VimInfo { + @JsonProperty("id") + private String id; + @JsonProperty("vimInfoType") + private VimInfoType vimInfoType; + + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public VimInfoType getVimInfoType() { + return vimInfoType; + } + + public void setVimInfoType(VimInfoType vimInfoType) { + this.vimInfoType = vimInfoType; + } + + + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/VimInfoType.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/VimInfoType.java new file mode 100644 index 00000000..67e6ed76 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/VimInfoType.java @@ -0,0 +1,56 @@ +/* +* Copyright 2016-2017 Nokia Corporation +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity; + +public class VimInfoType { + + public OPENSTACK_V2_INFO OPENSTACK_V2_INFO; + public OPENSTACK_V3_INFO OPENSTACK_V3_INFO; + public VMWARE_VCLOUD_INFO VMWARE_VCLOUD_INFO; + public OTHER_VIM_INFO OTHER_VIM_INFO; + public OPENSTACK_V2_INFO getOPENSTACK_V2_INFO() { + return OPENSTACK_V2_INFO; + } + public void setOPENSTACK_V2_INFO(OPENSTACK_V2_INFO oPENSTACK_V2_INFO) { + OPENSTACK_V2_INFO = oPENSTACK_V2_INFO; + } + public OPENSTACK_V3_INFO getOPENSTACK_V3_INFO() { + return OPENSTACK_V3_INFO; + } + public void setOPENSTACK_V3_INFO(OPENSTACK_V3_INFO oPENSTACK_V3_INFO) { + OPENSTACK_V3_INFO = oPENSTACK_V3_INFO; + } + public VMWARE_VCLOUD_INFO getVMWARE_VCLOUD_INFO() { + return VMWARE_VCLOUD_INFO; + } + public void setVMWARE_VCLOUD_INFO(VMWARE_VCLOUD_INFO vMWARE_VCLOUD_INFO) { + VMWARE_VCLOUD_INFO = vMWARE_VCLOUD_INFO; + } + public OTHER_VIM_INFO getOTHER_VIM_INFO() { + return OTHER_VIM_INFO; + } + public void setOTHER_VIM_INFO(OTHER_VIM_INFO oTHER_VIM_INFO) { + OTHER_VIM_INFO = oTHER_VIM_INFO; + } + + + + + + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/VimSoftwareImage.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/VimSoftwareImage.java new file mode 100644 index 00000000..5b4521d1 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/VimSoftwareImage.java @@ -0,0 +1,49 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class VimSoftwareImage { + @JsonProperty("vimId") + private String vimId; + @JsonProperty("vnfdSoftwareImageId") + private String vnfdSoftwareImageId; + @JsonProperty("resourceId") + private String resourceId; + public String getVimId() { + return vimId; + } + public void setVimId(String vimId) { + this.vimId = vimId; + } + public String getVnfdSoftwareImageId() { + return vnfdSoftwareImageId; + } + public void setVnfdSoftwareImageId(String vnfdSoftwareImageId) { + this.vnfdSoftwareImageId = vnfdSoftwareImageId; + } + public String getResourceId() { + return resourceId; + } + public void setResourceId(String resourceId) { + this.resourceId = resourceId; + } + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/VnfExtCpData.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/VnfExtCpData.java new file mode 100644 index 00000000..bbd6287b --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/VnfExtCpData.java @@ -0,0 +1,60 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity; + +import java.util.ArrayList; +import java.util.List; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class VnfExtCpData { + @JsonProperty("cpdId") + private String cpdId; + + @JsonProperty("addresses") + private List addresses=new ArrayList(); + + @JsonProperty("numDynamicAddresses") + private Integer numDynamicAddresses; + + public String getCpdId() { + return cpdId; + } + + public void setCpdId(String cpdId) { + this.cpdId = cpdId; + } + + public List getAddresses() { + return addresses; + } + + public void setAddresses(List addresses) { + this.addresses = addresses; + } + + public Integer getNumDynamicAddresses() { + return numDynamicAddresses; + } + + public void setNumDynamicAddresses(Integer numDynamicAddresses) { + this.numDynamicAddresses = numDynamicAddresses; + } + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/VnfInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/VnfInfo.java new file mode 100644 index 00000000..1e5737cd --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/VnfInfo.java @@ -0,0 +1,209 @@ + +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity; + +import java.util.ArrayList; +import java.util.List; + +import org.onap.vfc.nfvo.driver.vnfm.svnfm.constant.CommonEnum; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class VnfInfo { + + @JsonProperty("id") + private String id; + + @JsonProperty("name") + private String name; + + @JsonProperty("description") + private String description; + + @JsonProperty("vnfdId") + private String vnfdId; + + @JsonProperty("vnfProvider") + private String vnfProvider; + + @JsonProperty("vnfProductName") + private String vnfProductName; + + @JsonProperty("vnfSoftwareVersion") + private String vnfSoftwareVersion; + + @JsonProperty("vnfdVersion") + private String vnfdVersion; + + @JsonProperty("onboardedVnfPkgInfoId") + private String onboardedVnfPkgInfoId; + + @JsonProperty("instantiationState") + private CommonEnum.InstantiationState instantiationState; + + @JsonProperty("operationExecution") + private List operationExecution=new ArrayList(); + + @JsonProperty("instantiatedVnfInfo") + private InstantiatedVnfInfo instantiatedVnfInfo; + + @JsonProperty("vnfConfigurableProperties") + private List vnfConfigurableProperties=new ArrayList(); + + @JsonProperty("extensions") + private List extensions=new ArrayList(); + + @JsonProperty("metadata") + private Object metadata; + + @JsonProperty("link") + private _links link;//todo + + + 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; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getVnfdId() { + return vnfdId; + } + + public void setVnfdId(String vnfdId) { + this.vnfdId = vnfdId; + } + + public String getVnfProvider() { + return vnfProvider; + } + + public void setVnfProvider(String vnfProvider) { + this.vnfProvider = vnfProvider; + } + + public String getVnfProductName() { + return vnfProductName; + } + + public void setVnfProductName(String vnfProductName) { + this.vnfProductName = vnfProductName; + } + + public String getVnfSoftwareVersion() { + return vnfSoftwareVersion; + } + + public void setVnfSoftwareVersion(String vnfSoftwareVersion) { + this.vnfSoftwareVersion = vnfSoftwareVersion; + } + + public String getVnfdVersion() { + return vnfdVersion; + } + + public void setVnfdVersion(String vnfdVersion) { + this.vnfdVersion = vnfdVersion; + } + + public String getOnboardedVnfPkgInfoId() { + return onboardedVnfPkgInfoId; + } + + public void setOnboardedVnfPkgInfoId(String onboardedVnfPkgInfoId) { + this.onboardedVnfPkgInfoId = onboardedVnfPkgInfoId; + } + + + + public CommonEnum.InstantiationState getInstantiationState() { + return instantiationState; + } + + public void setInstantiationState(CommonEnum.InstantiationState instantiationState) { + this.instantiationState = instantiationState; + } + + public List getOperationExecution() { + return operationExecution; + } + + public void setOperationExecution(List operationExecution) { + this.operationExecution = operationExecution; + } + + public InstantiatedVnfInfo getInstantiatedVnfInfo() { + return instantiatedVnfInfo; + } + + public void setInstantiatedVnfInfo(InstantiatedVnfInfo instantiatedVnfInfo) { + this.instantiatedVnfInfo = instantiatedVnfInfo; + } + + public List getVnfConfigurableProperties() { + return vnfConfigurableProperties; + } + + public void setVnfConfigurableProperties(List vnfConfigurableProperties) { + this.vnfConfigurableProperties = vnfConfigurableProperties; + } + + public List getExtensions() { + return extensions; + } + + public void setExtensions(List extensions) { + this.extensions = extensions; + } + + public Object getMetadata() { + return metadata; + } + + public void setMetadata(Object metadata) { + this.metadata = metadata; + } + + public _links getLink() { + return link; + } + + public void setLink(_links link) { + this.link = link; + } + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/VnfProperty.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/VnfProperty.java new file mode 100644 index 00000000..55444de1 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/VnfProperty.java @@ -0,0 +1,21 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity; + +public class VnfProperty { + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/ZoneInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/ZoneInfo.java new file mode 100644 index 00000000..fc283b80 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/ZoneInfo.java @@ -0,0 +1,61 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class ZoneInfo { + + @JsonProperty("vimId") + private String vimId; + + @JsonProperty("resourceId") + private String resourceId; + + @JsonProperty("id") + private String id; + + public String getVimId() { + return vimId; + } + + public void setVimId(String vimId) { + this.vimId = vimId; + } + + public String getResourceId() { + return resourceId; + } + + public void setResourceId(String resourceId) { + this.resourceId = resourceId; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + + + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/_links.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/_links.java new file mode 100644 index 00000000..3c8277ef --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/_links.java @@ -0,0 +1,84 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class _links { + @JsonProperty("cancel") + private String cancel; + @JsonProperty("operationParams") + private String operationParams; + @JsonProperty("endNotification") + private String endNotification; + @JsonProperty("self") + private String self; + @JsonProperty("additionalData") + private String additionalData; + @JsonProperty("list") + private String list; + @JsonProperty("vnf") + private String vnf; + public String getCancel() { + return cancel; + } + public void setCancel(String cancel) { + this.cancel = cancel; + } + public String getOperationParams() { + return operationParams; + } + public void setOperationParams(String operationParams) { + this.operationParams = operationParams; + } + public String getEndNotification() { + return endNotification; + } + public void setEndNotification(String endNotification) { + this.endNotification = endNotification; + } + public String getSelf() { + return self; + } + public void setSelf(String self) { + this.self = self; + } + public String getAdditionalData() { + return additionalData; + } + public void setAdditionalData(String additionalData) { + this.additionalData = additionalData; + } + public String getList() { + return list; + } + public void setList(String list) { + this.list = list; + } + public String getVnf() { + return vnf; + } + public void setVnf(String vnf) { + this.vnf = vnf; + } + + + + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/controller/CbamController.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/controller/CbamController.java new file mode 100644 index 00000000..9578e75f --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/controller/CbamController.java @@ -0,0 +1,188 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.cbam.controller; + +import java.io.IOException; + +import org.apache.http.client.ClientProtocolException; +import org.apache.http.impl.client.HttpClientBuilder; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.catalog.bo.CatalogQueryVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMCreateVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMHealVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMHealVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMInstantiateVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMInstantiateVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMOperExecutVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMOperExecutVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMQueryVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMScaleVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMScaleVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMTerminateVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMTerminateVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity.OperationExecution; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity.ProblemDetails; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity.VnfInfo; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.common.bo.AdaptorEnv; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.constant.CommonConstants; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.http.client.HttpRequestProcessor; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.MediaType; +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.bind.annotation.ResponseBody; + +import com.google.gson.Gson; + +@Controller +@RequestMapping(value = "/vnfm/lcm/v3") +public class CbamController { + private static final Logger logger = LogManager.getLogger("CbamController"); + @Autowired + private AdaptorEnv adaptorEnv; + + @Autowired + private HttpClientBuilder httpClientBuilder; + + private Gson gson = new Gson(); + + @RequestMapping(value = "/vnfs", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) + @ResponseBody + public CBAMCreateVnfResponse createVnf(CBAMInstantiateVnfRequest request) throws ClientProtocolException, IOException + { + CBAMCreateVnfResponse response = new CBAMCreateVnfResponse(); + String url=adaptorEnv.getCbamApiUriFront() + String.format(CommonConstants.CbamCreateVnfPath); + HttpRequestProcessor processor = new HttpRequestProcessor(httpClientBuilder, RequestMethod.GET); + + String responseStr = processor.process(url); + + logger.info("CbamMgmrImpl -> createVnf, responseStr is " + responseStr); + + CatalogQueryVnfResponse resp = gson.fromJson(responseStr, CatalogQueryVnfResponse.class); + + + return response; + } + @RequestMapping(value = "/vnfs/{vnfInstanceId}/instantiate", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) + @ResponseBody + public CBAMInstantiateVnfResponse initiateVnf(CBAMInstantiateVnfRequest request, @PathVariable("vnfInstanceId") String vnfInstanceId) throws ClientProtocolException, IOException + { + CBAMInstantiateVnfResponse response = new CBAMInstantiateVnfResponse(); + String url=adaptorEnv.getCbamApiUriFront() + String.format(CommonConstants.CbamInstantiateVnfPath,vnfInstanceId); + HttpRequestProcessor processor = new HttpRequestProcessor(httpClientBuilder, RequestMethod.GET); + + String responseStr = processor.process(url); + + logger.info("CbamMgmrImpl -> initiateVnf, responseStr is " + responseStr); + + CatalogQueryVnfResponse resp = gson.fromJson(responseStr, CatalogQueryVnfResponse.class); + + + return response; + } + + @RequestMapping(value = "/vnfs/{vnfInstanceId}/terminate", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) + @ResponseBody + public CBAMTerminateVnfResponse terminateVnf(CBAMTerminateVnfRequest request, @PathVariable("vnfInstanceId") String vnfInstanceId) throws ClientProtocolException, IOException + { + CBAMTerminateVnfResponse response = new CBAMTerminateVnfResponse(); + String url=adaptorEnv.getCbamApiUriFront() + String.format(CommonConstants.CbamTerminateVnfPath,vnfInstanceId); + HttpRequestProcessor processor = new HttpRequestProcessor(httpClientBuilder, RequestMethod.GET); + + String responseStr = processor.process(url); + + logger.info("CbamMgmrImpl -> terminateVnf, responseStr is " + responseStr); + + CatalogQueryVnfResponse resp = gson.fromJson(responseStr, CatalogQueryVnfResponse.class); + return response; + } + + @RequestMapping(value = "/vnfs/{vnfInstanceId}/scale", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) + @ResponseBody + public CBAMScaleVnfResponse scaleVnf(CBAMScaleVnfRequest request, @PathVariable("vnfInstanceId") String vnfInstanceId) throws ClientProtocolException, IOException + { + CBAMScaleVnfResponse response = new CBAMScaleVnfResponse(); + String url=adaptorEnv.getCbamApiUriFront() + String.format(CommonConstants.CbamScaleVnfPath,vnfInstanceId); + HttpRequestProcessor processor = new HttpRequestProcessor(httpClientBuilder, RequestMethod.GET); + + String responseStr = processor.process(url); + + logger.info("CbamMgmrImpl -> scaleVnf, responseStr is " + responseStr); + + CatalogQueryVnfResponse resp = gson.fromJson(responseStr, CatalogQueryVnfResponse.class); + return response; + } + + @RequestMapping(value = "/vnfs/{vnfInstanceId}/heal", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) + @ResponseBody + public CBAMHealVnfResponse healVnf(CBAMHealVnfRequest request, @PathVariable("vnfInstanceId") String vnfInstanceId) throws ClientProtocolException, IOException + { + CBAMHealVnfResponse response = new CBAMHealVnfResponse(); + String url=adaptorEnv.getCbamApiUriFront() + String.format(CommonConstants.CbamHealVnfPath,vnfInstanceId); + HttpRequestProcessor processor = new HttpRequestProcessor(httpClientBuilder, RequestMethod.GET); + + String responseStr = processor.process(url); + + logger.info("CbamMgmrImpl -> healVnf, responseStr is " + responseStr); + + CatalogQueryVnfResponse resp = gson.fromJson(responseStr, CatalogQueryVnfResponse.class); + return response; + } + + + @RequestMapping(value = "/vnfs/{vnfInstanceId}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) + @ResponseBody + public CBAMQueryVnfResponse queryVnf(@PathVariable("vnfInstanceId") String vnfInstanceId) throws ClientProtocolException, IOException + { + CBAMQueryVnfResponse response = new CBAMQueryVnfResponse(); + String url=adaptorEnv.getCbamApiUriFront() + String.format(CommonConstants.CbamQueryVnfPath, vnfInstanceId); + HttpRequestProcessor processor = new HttpRequestProcessor(httpClientBuilder, RequestMethod.GET); + + String responseStr = processor.process(url); + + logger.info("CbamMgmrImpl -> queryVnfPackage, responseStr is " + responseStr); + + CatalogQueryVnfResponse resp = gson.fromJson(responseStr, CatalogQueryVnfResponse.class); + + + return response; + } + + + @RequestMapping(value = "/operation_executions/{operationExecutionId}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) + @ResponseBody + public CBAMOperExecutVnfResponse operVnf(@PathVariable("operationExecutionId") String operationExecutionId) throws ClientProtocolException, IOException + { + CBAMOperExecutVnfResponse response = new CBAMOperExecutVnfResponse(); + String url=adaptorEnv.getCbamApiUriFront() + String.format(CommonConstants.CbamGetOperStatusPath,operationExecutionId); + HttpRequestProcessor processor = new HttpRequestProcessor(httpClientBuilder, RequestMethod.GET); + + String responseStr = processor.process(url); + + logger.info("CbamMgmrImpl -> operVnf, responseStr is " + responseStr); + + CatalogQueryVnfResponse resp = gson.fromJson(responseStr, CatalogQueryVnfResponse.class); + return response; + } + + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/impl/CbamMgmrImpl.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/impl/CbamMgmrImpl.java new file mode 100644 index 00000000..bb56fc18 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/impl/CbamMgmrImpl.java @@ -0,0 +1,203 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.cbam.impl; + +import java.io.IOException; + +import org.apache.http.client.ClientProtocolException; +import org.apache.http.impl.client.HttpClientBuilder; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.json.JSONException; +import org.json.JSONObject; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMCreateVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMCreateVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMHealVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMHealVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMInstantiateVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMInstantiateVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMQueryOperExecutionResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMQueryVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMScaleVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMScaleVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMTerminateVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMTerminateVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.inf.CbamMgmrInf; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.common.bo.AdaptorEnv; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.constant.CommonConstants; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.http.client.HttpRequestProcessor; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.MediaType; +import org.springframework.stereotype.Component; +import org.springframework.web.bind.annotation.RequestMethod; + +import com.google.gson.Gson; + +@Component +public class CbamMgmrImpl implements CbamMgmrInf { + private static final Logger logger = LogManager.getLogger("CbamMgmrImpl"); + private Gson gson = new Gson(); + + @Autowired + private AdaptorEnv adaptorEnv; + + @Autowired + private HttpClientBuilder httpClientBuilder; + + private String retrieveToken() throws ClientProtocolException, IOException, JSONException { + String result = null; + String url= adaptorEnv.getCbamApiUriFront() + CommonConstants.RetrieveCbamTokenPath; + HttpRequestProcessor processor = new HttpRequestProcessor(httpClientBuilder, RequestMethod.POST); + processor.addHdeader(CommonConstants.ACCEPT, "*/*"); + processor.addHdeader(CommonConstants.CONTENT_TYPE, MediaType.APPLICATION_FORM_URLENCODED_VALUE); + + String bodyPostStr = String.format(CommonConstants.RetrieveCbamTokenPostStr, adaptorEnv.getGrantType(), adaptorEnv.getClientId(), adaptorEnv.getClientSecret()); + processor.addPostEntity(bodyPostStr); + + String responseStr = processor.process(url); + + logger.info("CbamMgmrImpl -> retrieveToken, responseStr is " + responseStr); + + JSONObject tokenJsonObject = new JSONObject(responseStr); + + result = tokenJsonObject.getString(CommonConstants.CBAM_TOKEN_KEY); + + return result; + } + + public CBAMCreateVnfResponse createVnf(CBAMCreateVnfRequest cbamRequest) throws ClientProtocolException, IOException { + String httpPath = CommonConstants.CbamCreateVnfPath; + RequestMethod method = RequestMethod.POST; + + String responseStr = operateCbamHttpTask(cbamRequest, httpPath, method); + + logger.info("CbamMgmrImpl -> createVnf, responseStr is " + responseStr); + + CBAMCreateVnfResponse response = gson.fromJson(responseStr, CBAMCreateVnfResponse.class); + + return response; + } + + /* (non-Javadoc) + * @see com.nokia.vfcadaptor.cbam.impl.CbamMgmrInf#instantiateVnf(com.nokia.vfcadaptor.cbam.bo.CBAMInstantiateVnfRequest, java.lang.String) + */ + public CBAMInstantiateVnfResponse instantiateVnf(CBAMInstantiateVnfRequest cbamRequest, String vnfInstanceId) throws ClientProtocolException, IOException { + String httpPath = String.format(CommonConstants.CbamInstantiateVnfPath, vnfInstanceId); + RequestMethod method = RequestMethod.POST; + + String responseStr = operateCbamHttpTask(cbamRequest, httpPath, method); + + logger.info("CbamMgmrImpl -> instantiateVnf, responseStr is " + responseStr); + + CBAMInstantiateVnfResponse response = gson.fromJson(responseStr, CBAMInstantiateVnfResponse.class); + + return response; + } + + public CBAMTerminateVnfResponse terminateVnf(CBAMTerminateVnfRequest cbamRequest, String vnfInstanceId) throws ClientProtocolException, IOException { + String httpPath = String.format(CommonConstants.CbamTerminateVnfPath, vnfInstanceId); + RequestMethod method = RequestMethod.POST; + + String responseStr = operateCbamHttpTask(cbamRequest, httpPath, method); + + logger.info("CbamMgmrImpl -> terminateVnf, responseStr is " + responseStr); + + CBAMTerminateVnfResponse response = gson.fromJson(responseStr, CBAMTerminateVnfResponse.class); + + return response; + } + + public void deleteVnf(String vnfInstanceId) throws ClientProtocolException, IOException { + String httpPath = String.format(CommonConstants.CbamDeleteVnfPath, vnfInstanceId); + RequestMethod method = RequestMethod.DELETE; + + operateCbamHttpTask(null, httpPath, method); + + logger.info("CbamMgmrImpl -> deleteVnf."); + } + + public CBAMScaleVnfResponse scaleVnf(CBAMScaleVnfRequest cbamRequest, String vnfInstanceId) throws ClientProtocolException, IOException { + String httpPath = String.format(CommonConstants.CbamScaleVnfPath, vnfInstanceId); + RequestMethod method = RequestMethod.POST; + + String responseStr = operateCbamHttpTask(cbamRequest, httpPath, method); + + CBAMScaleVnfResponse response = gson.fromJson(responseStr, CBAMScaleVnfResponse.class); + + return response; + } + + public CBAMHealVnfResponse healVnf(CBAMHealVnfRequest cbamRequest, String vnfInstanceId) throws ClientProtocolException, IOException { + String httpPath = String.format(CommonConstants.CbamHealVnfPath, vnfInstanceId); + RequestMethod method = RequestMethod.POST; + + String responseStr = operateCbamHttpTask(cbamRequest, httpPath, method); + + logger.info("CbamMgmrImpl -> healVnf, responseStr is " + responseStr); + + CBAMHealVnfResponse response = gson.fromJson(responseStr, CBAMHealVnfResponse.class); + + return response; + } + + public CBAMQueryVnfResponse queryVnf(String vnfInstanceId) throws ClientProtocolException, IOException { + String httpPath = String.format(CommonConstants.CbamQueryVnfPath, vnfInstanceId); + RequestMethod method = RequestMethod.GET; + + String responseStr = operateCbamHttpTask(null, httpPath, method); + + logger.info("CbamMgmrImpl -> queryVnf, responseStr is " + responseStr); + + CBAMQueryVnfResponse response = gson.fromJson(responseStr, CBAMQueryVnfResponse.class); + + return response; + } + + public String operateCbamHttpTask(Object httpBodyObj, String httpPath, RequestMethod method) throws ClientProtocolException, IOException { + String token = null; + try { + token = retrieveToken(); + } catch (JSONException e) { + logger.error("retrieveTokenError ", e); + } + + String url= adaptorEnv.getCbamApiUriFront() + httpPath; + HttpRequestProcessor processor = new HttpRequestProcessor(httpClientBuilder, method); + processor.addHdeader(CommonConstants.AUTHORIZATION, "bearer " + token); + processor.addHdeader(CommonConstants.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE); + + processor.addPostEntity(gson.toJson(httpBodyObj)); + + String responseStr = processor.process(url); + + return responseStr; + } + + public CBAMQueryOperExecutionResponse queryOperExecution(String execId) throws ClientProtocolException, IOException{ + String httpPath = String.format(CommonConstants.CbamGetOperStatusPath, execId); + RequestMethod method = RequestMethod.GET; + + String responseStr = operateCbamHttpTask(null, httpPath, method); + + logger.info("CbamMgmrImpl -> CBAMQueryOperExecutionResponse, responseStr is " + responseStr); + + CBAMQueryOperExecutionResponse response = gson.fromJson(responseStr, CBAMQueryOperExecutionResponse.class); + + return response; + } + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/inf/CbamMgmrInf.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/inf/CbamMgmrInf.java new file mode 100644 index 00000000..9c4bc6cc --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/inf/CbamMgmrInf.java @@ -0,0 +1,56 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.cbam.inf; + +import java.io.IOException; + +import org.apache.http.client.ClientProtocolException; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMCreateVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMCreateVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMHealVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMHealVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMInstantiateVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMInstantiateVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMQueryOperExecutionResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMQueryVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMScaleVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMScaleVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMTerminateVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMTerminateVnfResponse; + +public interface CbamMgmrInf { + + public CBAMCreateVnfResponse createVnf(CBAMCreateVnfRequest cbamRequest) throws ClientProtocolException, IOException; + + public CBAMInstantiateVnfResponse instantiateVnf(CBAMInstantiateVnfRequest cbamRequest, String vnfInstanceId) + throws ClientProtocolException, IOException; + + public CBAMTerminateVnfResponse terminateVnf(CBAMTerminateVnfRequest cbamRequest, String vnfInstanceId) + throws ClientProtocolException, IOException; + + public CBAMScaleVnfResponse scaleVnf(CBAMScaleVnfRequest cbamRequest, String vnfInstanceId) + throws ClientProtocolException, IOException; + + public CBAMHealVnfResponse healVnf(CBAMHealVnfRequest cbamRequest, String vnfInstanceId) + throws ClientProtocolException, IOException; + + public CBAMQueryVnfResponse queryVnf(String vnfInstanceId) throws ClientProtocolException, IOException; + + public void deleteVnf(String vnfInstanceId) throws ClientProtocolException, IOException; + + public CBAMQueryOperExecutionResponse queryOperExecution(String execId) throws ClientProtocolException, IOException; +} \ No newline at end of file diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/common/bo/AdaptorEnv.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/common/bo/AdaptorEnv.java new file mode 100644 index 00000000..93454329 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/common/bo/AdaptorEnv.java @@ -0,0 +1,76 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.common.bo; + +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Component; + +@Component +public class AdaptorEnv { + @Value("${nslcmApiUriFront}") + private String nslcmApiUriFront; + @Value("${catalogApiUriFront}") + private String catalogApiUriFront; + @Value("${cbamApiUriFront}") + private String cbamApiUriFront; + + //for retrieving token from CBAM + @Value("${grantType}") + private String grantType; + @Value("${clientId}") + private String clientId; + @Value("${clientSecret}") + private String clientSecret; + + public String getNslcmApiUriFront() { + return nslcmApiUriFront; + } + public void setNslcmApiUriFront(String nslcmApiUriFront) { + this.nslcmApiUriFront = nslcmApiUriFront; + } + public String getCatalogApiUriFront() { + return catalogApiUriFront; + } + public void setCatalogApiUriFront(String catalogApiUriFront) { + this.catalogApiUriFront = catalogApiUriFront; + } + public String getCbamApiUriFront() { + return cbamApiUriFront; + } + public void setCbamApiUriFront(String cbamApiUriFront) { + this.cbamApiUriFront = cbamApiUriFront; + } + public String getGrantType() { + return grantType; + } + public void setGrantType(String grantType) { + this.grantType = grantType; + } + public String getClientId() { + return clientId; + } + public void setClientId(String clientId) { + this.clientId = clientId; + } + public String getClientSecret() { + return clientSecret; + } + public void setClientSecret(String clientSecret) { + this.clientSecret = clientSecret; + } + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/common/bo/KeyValuePair.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/common/bo/KeyValuePair.java new file mode 100644 index 00000000..0d5ee831 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/common/bo/KeyValuePair.java @@ -0,0 +1,42 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.common.bo; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class KeyValuePair { + @JsonProperty("key") + private String key; + + @JsonProperty("value") + private String value; + + public String getKey() { + return key; + } + public void setKey(String key) { + this.key = key; + } + public String getValue() { + return value; + } + public void setValue(String value) { + this.value = value; + } + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/constant/CommonConstants.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/constant/CommonConstants.java new file mode 100644 index 00000000..c145e28c --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/constant/CommonConstants.java @@ -0,0 +1,60 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.constant; + +public class CommonConstants { + public static final String HTTP_ERROR_DESC_500 = "Internal Server Error"; + + + public static final String CONTENT_TYPE = "Content-Type"; + public static final String ACCEPT = "Accept"; + + public static final String AUTH = "auth"; + public static final String AUTHORIZATION = "Authorization"; + public static final String UTF_8 = "utf-8"; + + //Nslcm path + public static final String RetrieveNvfmListPath = "/nslcm/vl/vnfms/%s"; + public static final String NslcmGrantPath = "/nslcm/v1/ns/grantvnf"; + public static final String NslcmNotifyPath = "/nslcm/v1/vnfs/%s/Notify"; + + //Catalog path + public static final String RetrieveVnfPackagePath = "/catalog/v1/vnfpackages/%s"; + + //CBAM -- Nokia VNFM path + public static final String CBAM_TOKEN_KEY = "access_token"; + public static final String RetrieveCbamTokenPath="/auth/realms/cbam/protocol/openid-connect/token"; + public static final String RetrieveCbamTokenPostStr="grant_type=%s&client_id=%s&client_secret=%s"; + public static final String CbamCreateVnfPath="/vnfs"; + public static final String CbamInstantiateVnfPath="/vnfs/%s/instantiate"; + public static final String CbamQueryVnfPath="/vnfs/%s"; + public static final String CbamDeleteVnfPath="/vnfs/%s"; + public static final String CbamTerminateVnfPath="/vnfs/%s/terminate"; + public static final String CbamGetOperStatusPath="/operation_executions/%s"; + public static final String CbamScaleVnfPath = "/vnfs/%s/scale"; + public static final String CbamHealVnfPath="/vnfs/%s/heal"; + + public static final String NSLCM_OPERATION_INSTANTIATE = "Instantiate"; + public static final String NSLCM_OPERATION_TERMINATE = "Terminal"; + public static final String NSLCM_OPERATION_SCALE_OUT = "Scaleout"; + public static final String NSLCM_OPERATION_SCALE_IN = "Scalein"; + public static final String NSLCM_OPERATION_SCALE_UP = "Scaleup"; + public static final String NSLCM_OPERATION_SCALE_DOWN = "Scaledown"; + + public static final String CBAM_OPERATION_STATUS_START = "start"; + public static final String CBAM_OPERATION_STATUS_FINISH = "finished"; +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/constant/CommonEnum.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/constant/CommonEnum.java new file mode 100644 index 00000000..cbb94b94 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/constant/CommonEnum.java @@ -0,0 +1,78 @@ +/* +* Copyright 2016-2017 Nokia Corporation +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.constant; + +public class CommonEnum { + + // Termination + public enum TerminationType { + GRACEFUL, FORCEFUL + } + + // Instantiation + + public enum InstantiationState { + NOT_INSTANTIATED, INSTANTIATED + } + // operation status + + public enum OperationStatus { + STARTED, FINISHED, FAILED, OTHER + } + + // scale + public enum ScaleDirection { + OUT, IN + } + + public enum ScaleType { + SCALE_OUT, SCALE_IN + } + + public enum Deletionpending { + TRUR, fALSE + } + + // GrantVnf + public enum LifecycleOperation { + Instantiate, Scaleout, Scalein, Scaleup, Scaledown, Terminal + } + + public enum type { + VDU, VL, CP, Strorage + } + + // NotifyLcmEvents + public enum status { + start, result + } + + public enum changeType { + vl_added, vl_removed, vl_modified + + } + + public enum resourceType + + { + vm, volume, network, port + } + + public enum AffectchangeType{ + added,removed, modified + } + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/db/bean/ResourceType.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/db/bean/ResourceType.java new file mode 100644 index 00000000..afb726c3 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/db/bean/ResourceType.java @@ -0,0 +1,24 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.db.bean; + +public enum ResourceType { + VDU, + VL, + CP, + Storage +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/db/bean/VnfmJobExecutionInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/db/bean/VnfmJobExecutionInfo.java new file mode 100644 index 00000000..9c53c516 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/db/bean/VnfmJobExecutionInfo.java @@ -0,0 +1,103 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.db.bean; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Table; + + +@Entity +@Table(name = "vnfm_job_execution_record") +public class VnfmJobExecutionInfo{ + private static final long serialVersionUID = -2880159539002942812L; + + @Id + @GeneratedValue(strategy=GenerationType.AUTO) + private long jobId; + + @Column(name = "vnfmExecutionId") + private String vnfmExecutionId; + + @Column(name = "vnfInstanceId") + private String vnfInstanceId; + + @Column(name = "vnfmInterfceName") + private String vnfmInterfceName; + + @Column(name = "status") + private String status; + + public long getJobId() { + return jobId; + } + + public void setJobId(long jobId) { + this.jobId = jobId; + } + + public String getVnfmExecutionId() { + return vnfmExecutionId; + } + + public void setVnfmExecutionId(String vnfmExecutionId) { + this.vnfmExecutionId = vnfmExecutionId; + } + + public String getVnfInstanceId() { + return vnfInstanceId; + } + + public void setVnfInstanceId(String vnfInstanceId) { + this.vnfInstanceId = vnfInstanceId; + } + + public String getVnfmInterfceName() { + return vnfmInterfceName; + } + + public void setVnfmInterfceName(String vnfmInterfceName) { + this.vnfmInterfceName = vnfmInterfceName; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + @Override + public String toString() + { + return " VnfmJobRecord: [ " + + super.toString() + + ", jobId = " + jobId + + ", vnfInstanceId = " + vnfInstanceId + + ", vnfmExecutionId = " + vnfmExecutionId + + ", vnfmInterfceName = " + vnfmInterfceName + + ", status = " + status + + "]"; + + } + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/db/bean/VnfmResourceInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/db/bean/VnfmResourceInfo.java new file mode 100644 index 00000000..b245f2b8 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/db/bean/VnfmResourceInfo.java @@ -0,0 +1,85 @@ +/* +* Copyright 2016-2017, Nokia Corporation +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.db.bean; + +import javax.persistence.Entity; +import javax.persistence.Column; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Table; + +@Entity +@Table(name = "vnfm_resource_record") +public class VnfmResourceInfo { + @Id + @GeneratedValue(strategy = GenerationType.AUTO) + private int id; + + @Column(name = "type") + private ResourceType type; + + @Column(name = "resourceDefinitionId") + private String resourceDefinitionId; + + @Column(name = "vdu") + private String vdu; + + @Column(name = "status") + private String status; + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public ResourceType getType() { + return type; + } + + public void setType(ResourceType type) { + this.type = type; + } + + public String getResourceDefinitionId() { + return resourceDefinitionId; + } + + public void setResourceDefinitionId(String resourceDefinitionId) { + this.resourceDefinitionId = resourceDefinitionId; + } + + public String getVdu() { + return vdu; + } + + public void setVdu(String vdu) { + this.vdu = vdu; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/db/repository/VnfmJobExecutionRepository.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/db/repository/VnfmJobExecutionRepository.java new file mode 100644 index 00000000..a499f452 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/db/repository/VnfmJobExecutionRepository.java @@ -0,0 +1,23 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.db.repository; + +import org.onap.vfc.nfvo.driver.vnfm.svnfm.db.bean.VnfmJobExecutionInfo; +import org.springframework.data.repository.CrudRepository; + +public interface VnfmJobExecutionRepository extends CrudRepository< VnfmJobExecutionInfo, Long> { + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/db/repository/VnfmResourceRepository.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/db/repository/VnfmResourceRepository.java new file mode 100644 index 00000000..52d41927 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/db/repository/VnfmResourceRepository.java @@ -0,0 +1,23 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.db.repository; + +import org.onap.vfc.nfvo.driver.vnfm.svnfm.db.bean.VnfmResourceInfo; +import org.springframework.data.repository.CrudRepository; + +public interface VnfmResourceRepository extends CrudRepository { + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/exception/VnfmDriverException.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/exception/VnfmDriverException.java new file mode 100644 index 00000000..8a465435 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/exception/VnfmDriverException.java @@ -0,0 +1,40 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.exception; + +public class VnfmDriverException extends RuntimeException{ + private static final long serialVersionUID = 14325435432545L; + + private int httpStatus; + + public VnfmDriverException(int httpStatus, String message) + { + super(message); + this.httpStatus = httpStatus; + } + + public int getHttpStatus() { + return httpStatus; + } + + public void setHttpStatus(int httpStatus) { + this.httpStatus = httpStatus; + } + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/http/client/HttpClientUtils.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/http/client/HttpClientUtils.java new file mode 100644 index 00000000..e3ed0c82 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/http/client/HttpClientUtils.java @@ -0,0 +1,93 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.http.client; + +import java.security.cert.CertificateException; +import java.security.cert.X509Certificate; + +import javax.net.ssl.HostnameVerifier; +import javax.net.ssl.SSLContext; + +import org.apache.http.client.methods.HttpDelete; +import org.apache.http.client.methods.HttpGet; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.client.methods.HttpRequestBase; +import org.apache.http.config.Registry; +import org.apache.http.config.RegistryBuilder; +import org.apache.http.conn.socket.ConnectionSocketFactory; +import org.apache.http.conn.socket.PlainConnectionSocketFactory; +import org.apache.http.conn.ssl.NoopHostnameVerifier; +import org.apache.http.conn.ssl.SSLConnectionSocketFactory; +import org.apache.http.impl.client.HttpClientBuilder; +import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; +import org.apache.http.ssl.SSLContextBuilder; +import org.apache.http.ssl.TrustStrategy; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.springframework.context.annotation.Bean; +import org.springframework.web.bind.annotation.RequestMethod; + +public class HttpClientUtils { + private static final Logger logger = LogManager.getLogger("HttpClientUtils"); + + @Bean + public static HttpClientBuilder createHttpClientBuilder() { + HttpClientBuilder httpClientBuilder = HttpClientBuilder.create(); + + SSLContext sslContext = null; + try { + sslContext = new SSLContextBuilder().loadTrustMaterial(null, new TrustStrategy() { + public boolean isTrusted(X509Certificate[] arg0, String arg1) throws CertificateException { + return true; + } + }).build(); + } catch (Exception e) { + logger.error("Error to createHttpClientBuilder", e); + } + httpClientBuilder.setSSLContext(sslContext); + + HostnameVerifier hostnameVerifier = NoopHostnameVerifier.INSTANCE; + + SSLConnectionSocketFactory sslSocketFactory = new SSLConnectionSocketFactory(sslContext, hostnameVerifier); + Registry socketFactoryRegistry = RegistryBuilder.create() + .register("http", PlainConnectionSocketFactory.getSocketFactory()) + .register("https", sslSocketFactory) + .build(); + + PoolingHttpClientConnectionManager connMgr = new PoolingHttpClientConnectionManager( socketFactoryRegistry); + connMgr.setMaxTotal(200); + connMgr.setDefaultMaxPerRoute(50); + httpClientBuilder.setConnectionManager(connMgr); + return httpClientBuilder; + } + + public static HttpRequestBase getHttpRequest(RequestMethod requestMethod) { + HttpRequestBase base = null; + switch(requestMethod) { + case GET: + base = new HttpGet(); + break; + case DELETE: + base = new HttpDelete(); + break; + default: + base = new HttpPost(); + break; + } + return base; + } +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/http/client/HttpRequestProcessor.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/http/client/HttpRequestProcessor.java new file mode 100644 index 00000000..b2414a52 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/http/client/HttpRequestProcessor.java @@ -0,0 +1,69 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.http.client; + +import java.io.IOException; +import java.net.URI; + +import org.apache.http.HttpEntity; +import org.apache.http.HttpResponse; +import org.apache.http.client.ClientProtocolException; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.client.methods.HttpRequestBase; +import org.apache.http.entity.StringEntity; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.impl.client.HttpClientBuilder; +import org.apache.http.util.EntityUtils; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.constant.CommonConstants; +import org.springframework.web.bind.annotation.RequestMethod; + +public class HttpRequestProcessor { + private CloseableHttpClient httpClient; + private HttpRequestBase httpRequest; + + public HttpRequestProcessor(HttpClientBuilder httpClientBuilder, RequestMethod requestMethod) + { + httpClient = httpClientBuilder.build(); + httpRequest = HttpClientUtils.getHttpRequest(requestMethod); + } + + public String process(String url) throws ClientProtocolException, IOException + { + httpRequest.setURI(URI.create(url)); + + HttpResponse response = httpClient.execute(httpRequest); + HttpEntity resEntity = response.getEntity(); + String responseContent = ""; + if (resEntity != null) { + responseContent = EntityUtils.toString(resEntity, CommonConstants.UTF_8); + EntityUtils.consume(resEntity); + } + httpClient.close(); + + return responseContent; + } + + public void addHdeader(String key, String value) { + httpRequest.setHeader(key, value); + + } + + public void addPostEntity(String bodyStr) { + ((HttpPost)httpRequest).setEntity(new StringEntity(bodyStr, CommonConstants.UTF_8)); + + } +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/NslcmGrantVnfRequest.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/NslcmGrantVnfRequest.java new file mode 100644 index 00000000..c441cee6 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/NslcmGrantVnfRequest.java @@ -0,0 +1,99 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo; + +import java.util.List; + +import org.onap.vfc.nfvo.driver.vnfm.svnfm.common.bo.KeyValuePair; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.constant.CommonEnum; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.entity.ResourceDefinition; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class NslcmGrantVnfRequest { + + @JsonProperty("vnfInstanceId") + private String vnfInstanceId; + + @JsonProperty("lifecycleOperation") + private CommonEnum.LifecycleOperation lifecycleOperation; + + @JsonProperty("jobId") + private String jobId; + + @JsonProperty("addResource") + private List addResource; + + @JsonProperty("removeResource") + private List removeResource; + + @JsonProperty("additionalParam") + private List additionalParam; + + public String getVnfInstanceId() { + return vnfInstanceId; + } + + public void setVnfInstanceId(String vnfInstanceId) { + this.vnfInstanceId = vnfInstanceId; + } + + + public CommonEnum.LifecycleOperation getLifecycleOperation() { + return lifecycleOperation; + } + + public void setLifecycleOperation(CommonEnum.LifecycleOperation lifecycleOperation) { + this.lifecycleOperation = lifecycleOperation; + } + + public String getJobId() { + return jobId; + } + + public void setJobId(String jobId) { + this.jobId = jobId; + } + + public List getAdditionalParam() { + return additionalParam; + } + + public void setAdditionalParam(List additionalParam) { + this.additionalParam = additionalParam; + } + + public List getAddResource() { + return addResource; + } + + public void setAddResource(List addResource) { + this.addResource = addResource; + } + + public List getRemoveResource() { + return removeResource; + } + + public void setRemoveResource(List removeResource) { + this.removeResource = removeResource; + } + + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/NslcmGrantVnfResponse.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/NslcmGrantVnfResponse.java new file mode 100644 index 00000000..b5f0fec1 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/NslcmGrantVnfResponse.java @@ -0,0 +1,65 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo; + +import java.util.List; + +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.entity.ResourceDefinition; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.entity.VimAssets; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.entity.VimInfo; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class NslcmGrantVnfResponse { + + @JsonProperty("vim") + private VimInfo vim; + @JsonProperty("vimAssets") + private VimAssets vimAssets; + + @JsonProperty("additionalParam") + private List additionalParam; + + public VimInfo getVim() { + return vim; + } + + public void setVim(VimInfo vim) { + this.vim = vim; + } + + public VimAssets getVimAssets() { + return vimAssets; + } + + public void setVimAssets(VimAssets vimAssets) { + this.vimAssets = vimAssets; + } + + public List getAdditionalParam() { + return additionalParam; + } + + public void setAdditionalParam(List additionalParam) { + this.additionalParam = additionalParam; + } + + + + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/NslcmNotifyLCMEventsRequest.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/NslcmNotifyLCMEventsRequest.java new file mode 100644 index 00000000..bdfdf848 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/NslcmNotifyLCMEventsRequest.java @@ -0,0 +1,89 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo; + +import org.onap.vfc.nfvo.driver.vnfm.svnfm.constant.CommonEnum; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.entity.AffectedVirtualLink; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.entity.AffectedVirtualStorage; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.entity.AffectedVnfc; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class NslcmNotifyLCMEventsRequest { + + @JsonProperty("status") + private CommonEnum.status status; + + @JsonProperty("vnfInstanceId") + private String vnfInstanceId; + @JsonProperty("operation") + private String operation; + @JsonProperty("jobId") + private String jobId; + @JsonProperty("affectedVnfc") + private AffectedVnfc affectedVnfc; + @JsonProperty("affectedVl") + private AffectedVirtualLink affectedVl; + @JsonProperty("affectedVirtualStorage") + private AffectedVirtualStorage affectedVirtualStorage; + public CommonEnum.status getStatus() { + return status; + } + public void setStatus(CommonEnum.status status) { + this.status = status; + } + public String getVnfInstanceId() { + return vnfInstanceId; + } + public void setVnfInstanceId(String vnfInstanceId) { + this.vnfInstanceId = vnfInstanceId; + } + public String getOperation() { + return operation; + } + public void setOperation(String operation) { + this.operation = operation; + } + public String getJobId() { + return jobId; + } + public void setJobId(String jobId) { + this.jobId = jobId; + } + public AffectedVnfc getAffectedVnfc() { + return affectedVnfc; + } + public void setAffectedVnfc(AffectedVnfc affectedVnfc) { + this.affectedVnfc = affectedVnfc; + } + public AffectedVirtualLink getAffectedVl() { + return affectedVl; + } + public void setAffectedVl(AffectedVirtualLink affectedVl) { + this.affectedVl = affectedVl; + } + public AffectedVirtualStorage getAffectedVirtualStorage() { + return affectedVirtualStorage; + } + public void setAffectedVirtualStorage(AffectedVirtualStorage affectedVirtualStorage) { + this.affectedVirtualStorage = affectedVirtualStorage; + } + + + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/VnfmInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/VnfmInfo.java new file mode 100644 index 00000000..bf6608df --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/VnfmInfo.java @@ -0,0 +1,153 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class VnfmInfo { + @JsonProperty("vnfmId") + private String vnfmId; + + @JsonProperty("name") + private String name; + + @JsonProperty("type") + private String type; + + @JsonProperty("url") + private String url; + + @JsonProperty("userName") + private String userName; + + @JsonProperty("password") + private String password; + + @JsonProperty("vimId") + private String vimId; + + @JsonProperty("vendor") + private String vendor; + + @JsonProperty("version") + private String version; + + @JsonProperty("description") + private String description; + + @JsonProperty("certificateUrl") + private String certificateUrl; + + @JsonProperty("createTime") + private String createTime; + + public String getVnfmId() { + return vnfmId; + } + + public void setVnfmId(String vnfmId) { + this.vnfmId = vnfmId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getVimId() { + return vimId; + } + + public void setVimId(String vimId) { + this.vimId = vimId; + } + + public String getVendor() { + return vendor; + } + + public void setVendor(String vendor) { + this.vendor = vendor; + } + + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getCertificateUrl() { + return certificateUrl; + } + + public void setCertificateUrl(String certificateUrl) { + this.certificateUrl = certificateUrl; + } + + public String getCreateTime() { + return createTime; + } + + public void setCreateTime(String createTime) { + this.createTime = createTime; + } +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/AccessInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/AccessInfo.java new file mode 100644 index 00000000..ae89c82a --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/AccessInfo.java @@ -0,0 +1,59 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.entity; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class AccessInfo { + + @JsonProperty("tenant") + private String tenant; + + @JsonProperty("username") + private String username; + + @JsonProperty("password") + private String password; + + public String getTenant() { + return tenant; + } + + public void setTenant(String tenant) { + this.tenant = tenant; + } + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/AffectedVirtualLink.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/AffectedVirtualLink.java new file mode 100644 index 00000000..fc1ab047 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/AffectedVirtualLink.java @@ -0,0 +1,69 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.entity; + +import org.onap.vfc.nfvo.driver.vnfm.svnfm.constant.CommonEnum; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class AffectedVirtualLink { + @JsonProperty("vlInstanceId") + private String vlInstanceId; + @JsonProperty("vldid") + private String vldid; + @JsonProperty("changeType") + private CommonEnum.changeType changeType; + + @JsonProperty("networkResource") + private ResourceHandle networkResource; + + public String getVlInstanceId() { + return vlInstanceId; + } + + public void setVlInstanceId(String vlInstanceId) { + this.vlInstanceId = vlInstanceId; + } + + public String getVldid() { + return vldid; + } + + public void setVldid(String vldid) { + this.vldid = vldid; + } + + public CommonEnum.changeType getChangeType() { + return changeType; + } + + public void setChangeType(CommonEnum.changeType changeType) { + this.changeType = changeType; + } + + public ResourceHandle getNetworkResource() { + return networkResource; + } + + public void setNetworkResource(ResourceHandle networkResource) { + this.networkResource = networkResource; + } + + + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/AffectedVirtualStorage.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/AffectedVirtualStorage.java new file mode 100644 index 00000000..6139adb8 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/AffectedVirtualStorage.java @@ -0,0 +1,56 @@ +/* +* Copyright 2016-2017 Nokia Corporation +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.entity; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class AffectedVirtualStorage { + @JsonProperty("vsInstanceId") + private String vsInstanceId; + @JsonProperty("vsdId") + private String vsdId; + + @JsonProperty("changeType") + private String changeType; + @JsonProperty("storageResource") + private String storageResource; + public String getVsInstanceId() { + return vsInstanceId; + } + public void setVsInstanceId(String vsInstanceId) { + this.vsInstanceId = vsInstanceId; + } + public String getVsdId() { + return vsdId; + } + public void setVsdId(String vsdId) { + this.vsdId = vsdId; + } + public String getChangeType() { + return changeType; + } + public void setChangeType(String changeType) { + this.changeType = changeType; + } + public String getStorageResource() { + return storageResource; + } + public void setStorageResource(String storageResource) { + this.storageResource = storageResource; + } + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/AffectedVnfc.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/AffectedVnfc.java new file mode 100644 index 00000000..e30f1513 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/AffectedVnfc.java @@ -0,0 +1,58 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.entity; + +import org.onap.vfc.nfvo.driver.vnfm.svnfm.constant.CommonEnum; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class AffectedVnfc { + @JsonProperty("vnfcInstanceId") + private String vnfcInstanceId; + @JsonProperty("vduId") + private String vduId; + @JsonProperty("changeType") + private CommonEnum.AffectchangeType changeType; + @JsonProperty("storageResource") + private ResourceHandle storageResource; + public String getVnfcInstanceId() { + return vnfcInstanceId; + } + public void setVnfcInstanceId(String vnfcInstanceId) { + this.vnfcInstanceId = vnfcInstanceId; + } + public String getVduId() { + return vduId; + } + public void setVduId(String vduId) { + this.vduId = vduId; + } + public CommonEnum.AffectchangeType getChangeType() { + return changeType; + } + public void setChangeType(CommonEnum.AffectchangeType changeType) { + this.changeType = changeType; + } + public ResourceHandle getStorageResource() { + return storageResource; + } + public void setStorageResource(ResourceHandle storageResource) { + this.storageResource = storageResource; + } + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/GrantInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/GrantInfo.java new file mode 100644 index 00000000..cb6a255f --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/GrantInfo.java @@ -0,0 +1,83 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.entity; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class GrantInfo { + + @JsonProperty("resourceDefinitionId") + private String resourceDefinitionId; + + @JsonProperty("reservationId") + private String reservationId; + + @JsonProperty("vimId") + private String vimId; + + @JsonProperty("resourceProviderId") + private String resourceProviderId; + + @JsonProperty("zoneId") + private String zoneId; + + public String getResourceDefinitionId() { + return resourceDefinitionId; + } + + public void setResourceDefinitionId(String resourceDefinitionId) { + this.resourceDefinitionId = resourceDefinitionId; + } + + public String getReservationId() { + return reservationId; + } + + public void setReservationId(String reservationId) { + this.reservationId = reservationId; + } + + public String getVimId() { + return vimId; + } + + public void setVimId(String vimId) { + this.vimId = vimId; + } + + public String getResourceProviderId() { + return resourceProviderId; + } + + public void setResourceProviderId(String resourceProviderId) { + this.resourceProviderId = resourceProviderId; + } + + public String getZoneId() { + return zoneId; + } + + public void setZoneId(String zoneId) { + this.zoneId = zoneId; + } + + + + + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/InterfaceInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/InterfaceInfo.java new file mode 100644 index 00000000..213bddd5 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/InterfaceInfo.java @@ -0,0 +1,59 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.entity; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class InterfaceInfo { + + @JsonProperty("vimType") + private String vimType; + + @JsonProperty("apiVersion") + private String apiVersion; + + @JsonProperty("protocolType") + private String protocolType; + + public String getVimType() { + return vimType; + } + + public void setVimType(String vimType) { + this.vimType = vimType; + } + + public String getApiVersion() { + return apiVersion; + } + + public void setApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + } + + public String getProtocolType() { + return protocolType; + } + + public void setProtocolType(String protocolType) { + this.protocolType = protocolType; + } + + + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/ResourceDefinition.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/ResourceDefinition.java new file mode 100644 index 00000000..4a10ae99 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/ResourceDefinition.java @@ -0,0 +1,60 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.entity; + +import org.onap.vfc.nfvo.driver.vnfm.svnfm.constant.CommonEnum; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class ResourceDefinition { + + @JsonProperty("type") + private CommonEnum.type type; + + @JsonProperty("resourceDefinitionId") + private String resourceDefinitionId; + + @JsonProperty("vdu") + private String vdu; + + public CommonEnum.type getType() { + return type; + } + + public void setType(CommonEnum.type type) { + this.type = type; + } + + public String getResourceDefinitionId() { + return resourceDefinitionId; + } + + public void setResourceDefinitionId(String resourceDefinitionId) { + this.resourceDefinitionId = resourceDefinitionId; + } + + public String getVdu() { + return vdu; + } + + public void setVdu(String vdu) { + this.vdu = vdu; + } + + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/ResourceHandle.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/ResourceHandle.java new file mode 100644 index 00000000..72d3dbc3 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/ResourceHandle.java @@ -0,0 +1,53 @@ +/* +* Copyright 2016-2017 Nokia Corporation +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.entity; + +import org.onap.vfc.nfvo.driver.vnfm.svnfm.constant.CommonEnum; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class ResourceHandle { + + @JsonProperty("resourceType") + private CommonEnum.resourceType resourceType; + @JsonProperty("resourceId") + private String resourceId; + @JsonProperty("resourceName") + private String resourceName; + public CommonEnum.resourceType getResourceType() { + return resourceType; + } + public void setResourceType(CommonEnum.resourceType resourceType) { + this.resourceType = resourceType; + } + public String getResourceId() { + return resourceId; + } + public void setResourceId(String resourceId) { + this.resourceId = resourceId; + } + public String getResourceName() { + return resourceName; + } + public void setResourceName(String resourceName) { + this.resourceName = resourceName; + } + + + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/VimAssets.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/VimAssets.java new file mode 100644 index 00000000..041e6413 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/VimAssets.java @@ -0,0 +1,35 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.entity; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class VimAssets { + + @JsonProperty("softwareImage") + private VimSoftwareImage softwareImage; + + public VimSoftwareImage getSoftwareImage() { + return softwareImage; + } + + public void setSoftwareImage(VimSoftwareImage softwareImage) { + this.softwareImage = softwareImage; + } + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/VimComputeResourceFlavour.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/VimComputeResourceFlavour.java new file mode 100644 index 00000000..38b2e183 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/VimComputeResourceFlavour.java @@ -0,0 +1,58 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.entity; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class VimComputeResourceFlavour { + + @JsonProperty("vimId") + private String vimId; + + @JsonProperty("vduId") + private String vduId; + + @JsonProperty("vimFlavourId") + private String vimFlavourId; + + public String getVimId() { + return vimId; + } + + public void setVimId(String vimId) { + this.vimId = vimId; + } + + public String getVduId() { + return vduId; + } + + public void setVduId(String vduId) { + this.vduId = vduId; + } + + public String getVimFlavourId() { + return vimFlavourId; + } + + public void setVimFlavourId(String vimFlavourId) { + this.vimFlavourId = vimFlavourId; + } + + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/VimInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/VimInfo.java new file mode 100644 index 00000000..8bb63490 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/VimInfo.java @@ -0,0 +1,81 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.entity; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class VimInfo { + + @JsonProperty("vimInfoId") + private String vimInfoId; + + @JsonProperty("vimId") + private String vimId; + @JsonProperty("interfaceInfo") + private InterfaceInfo interfaceInfo; + @JsonProperty("accessInfo") + private AccessInfo accessInfo; + + @JsonProperty("interfaceEndpoint") + private String interfaceEndpoint; + + public String getVimInfoId() { + return vimInfoId; + } + + public void setVimInfoId(String vimInfoId) { + this.vimInfoId = vimInfoId; + } + + public String getVimId() { + return vimId; + } + + public void setVimId(String vimId) { + this.vimId = vimId; + } + + public InterfaceInfo getInterfaceInfo() { + return interfaceInfo; + } + + public void setInterfaceInfo(InterfaceInfo interfaceInfo) { + this.interfaceInfo = interfaceInfo; + } + + public AccessInfo getAccessInfo() { + return accessInfo; + } + + public void setAccessInfo(AccessInfo accessInfo) { + this.accessInfo = accessInfo; + } + + public String getInterfaceEndpoint() { + return interfaceEndpoint; + } + + public void setInterfaceEndpoint(String interfaceEndpoint) { + this.interfaceEndpoint = interfaceEndpoint; + } + + + + + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/VimSoftwareImage.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/VimSoftwareImage.java new file mode 100644 index 00000000..a4f24a70 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/VimSoftwareImage.java @@ -0,0 +1,59 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.entity; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class VimSoftwareImage { + + @JsonProperty("vimId") + private String vimId; + + @JsonProperty("imageName") + private String imageName; + + @JsonProperty("vimImageId") + private String vimImageId; + + public String getVimId() { + return vimId; + } + + public void setVimId(String vimId) { + this.vimId = vimId; + } + + public String getImageName() { + return imageName; + } + + public void setImageName(String imageName) { + this.imageName = imageName; + } + + public String getVimImageId() { + return vimImageId; + } + + public void setVimImageId(String vimImageId) { + this.vimImageId = vimImageId; + } + + + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/VnfPackageInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/VnfPackageInfo.java new file mode 100644 index 00000000..53f80c1d --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/VnfPackageInfo.java @@ -0,0 +1,142 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.entity; + +import org.onap.vfc.nfvo.driver.vnfm.svnfm.constant.CommonEnum; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class VnfPackageInfo { + + @JsonProperty("name") + private String name; + + @JsonProperty("provider") + private String provider; + + @JsonProperty("version") + private String version; + + @JsonProperty("onBoardState") + private String onBoardState; + + @JsonProperty("deletionPending") + private CommonEnum.Deletionpending deletionPending; + + @JsonProperty("downloadUri") + private String downloadUri; + + @JsonProperty("vnfdId") + private String vnfdId; + + @JsonProperty("vnfdProvider") + private String vnfdProvider; + + @JsonProperty("vnfdVersion") + private String vnfdVersion; + + @JsonProperty("vnfVersion") + private String vnfVersion; + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getProvider() { + return provider; + } + + public void setProvider(String provider) { + this.provider = provider; + } + + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + public String getOnBoardState() { + return onBoardState; + } + + public void setOnBoardState(String onBoardState) { + this.onBoardState = onBoardState; + } + + public CommonEnum.Deletionpending getDeletionPending() { + return deletionPending; + } + + public void setDeletionPending(CommonEnum.Deletionpending deletionPending) { + this.deletionPending = deletionPending; + } + + public String getDownloadUri() { + return downloadUri; + } + + public void setDownloadUri(String downloadUri) { + this.downloadUri = downloadUri; + } + + public String getVnfdId() { + return vnfdId; + } + + public void setVnfdId(String vnfdId) { + this.vnfdId = vnfdId; + } + + public String getVnfdProvider() { + return vnfdProvider; + } + + public void setVnfdProvider(String vnfdProvider) { + this.vnfdProvider = vnfdProvider; + } + + public String getVnfdVersion() { + return vnfdVersion; + } + + public void setVnfdVersion(String vnfdVersion) { + this.vnfdVersion = vnfdVersion; + } + + public String getVnfVersion() { + return vnfVersion; + } + + public void setVnfVersion(String vnfVersion) { + this.vnfVersion = vnfVersion; + } + + + + + + + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/impl/NslcmMgmrImpl.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/impl/NslcmMgmrImpl.java new file mode 100644 index 00000000..94be8d21 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/impl/NslcmMgmrImpl.java @@ -0,0 +1,98 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.nslcm.impl; + +import java.io.IOException; + +import org.apache.http.client.ClientProtocolException; +import org.apache.http.impl.client.HttpClientBuilder; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.common.bo.AdaptorEnv; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.constant.CommonConstants; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.http.client.HttpRequestProcessor; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.NslcmGrantVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.NslcmGrantVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.NslcmNotifyLCMEventsRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.VnfmInfo; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.inf.NslcmMgmrInf; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.MediaType; +import org.springframework.stereotype.Component; +import org.springframework.web.bind.annotation.RequestMethod; + +import com.google.gson.Gson; + +@Component +public class NslcmMgmrImpl implements NslcmMgmrInf{ + private static final Logger logger = LogManager.getLogger("NslcmMgmrImpl"); + + @Autowired + private AdaptorEnv adaptorEnv; + + @Autowired + private HttpClientBuilder httpClientBuilder; + + private Gson gson = new Gson(); + + public VnfmInfo queryVnfm(String vnfmId) throws ClientProtocolException, IOException + { + String httpPath = String.format(CommonConstants.RetrieveNvfmListPath, vnfmId); + RequestMethod method = RequestMethod.GET; + + String responseStr = operateNslcmHttpTask(null, httpPath, method); + + logger.info("NslcmMgmrImpl->queryVnfm, the vnfmInfo is " + responseStr); + + VnfmInfo response = gson.fromJson(responseStr, VnfmInfo.class); + + return response; + } + + public NslcmGrantVnfResponse grantVnf(NslcmGrantVnfRequest driverRequest) throws ClientProtocolException, IOException { + String httpPath = CommonConstants.NslcmGrantPath; + RequestMethod method = RequestMethod.POST; + + String responseStr = operateNslcmHttpTask(driverRequest, httpPath, method); + + logger.info("NslcmMgmrImpl->grantVnf, the NslcmGrantVnfResponse is " + responseStr); + + NslcmGrantVnfResponse response = gson.fromJson(responseStr, NslcmGrantVnfResponse.class); + + return response; + } + + public void notifyVnf(NslcmNotifyLCMEventsRequest driverRequest, String vnfInstanceId) throws ClientProtocolException, IOException { + String httpPath = String.format(CommonConstants.NslcmNotifyPath, vnfInstanceId); + RequestMethod method = RequestMethod.POST; + + operateNslcmHttpTask(driverRequest, httpPath, method); + } + + public String operateNslcmHttpTask(Object httpBodyObj, String httpPath, RequestMethod method) throws ClientProtocolException, IOException { + String url=adaptorEnv.getNslcmApiUriFront() + httpPath; + HttpRequestProcessor processor = new HttpRequestProcessor(httpClientBuilder, method); + processor.addHdeader(CommonConstants.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE); + + processor.addPostEntity(gson.toJson(httpBodyObj)); + + String responseStr = processor.process(url); + + return responseStr; + } + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/inf/NslcmMgmrInf.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/inf/NslcmMgmrInf.java new file mode 100644 index 00000000..ca7fa449 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/inf/NslcmMgmrInf.java @@ -0,0 +1,33 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.nslcm.inf; + +import java.io.IOException; + +import org.apache.http.client.ClientProtocolException; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.NslcmGrantVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.NslcmGrantVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.NslcmNotifyLCMEventsRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.VnfmInfo; + +public interface NslcmMgmrInf { + public VnfmInfo queryVnfm(String vnfmId) throws ClientProtocolException, IOException; + + public NslcmGrantVnfResponse grantVnf(NslcmGrantVnfRequest driverRequest) throws ClientProtocolException, IOException; + + public void notifyVnf(NslcmNotifyLCMEventsRequest driverRequest, String vnfInstanceId) throws ClientProtocolException, IOException; +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/HealVnfRequest.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/HealVnfRequest.java new file mode 100644 index 00000000..bdf55b46 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/HealVnfRequest.java @@ -0,0 +1,56 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo; + +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.entity.Affectedvm; + +import com.fasterxml.jackson.annotation.JsonProperty; + + +public class HealVnfRequest { + @JsonProperty("action") + private String action; + + @JsonProperty("affectedvm") + private Affectedvm affectedvm; + + public String getAction() { + return action; + } + + public void setAction(String action) { + this.action = action; + } + + public Affectedvm getAffectedvm() { + return affectedvm; + } + + public void setAffectedvm(Affectedvm affectedvm) { + this.affectedvm = affectedvm; + } + + + + + + + + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/HealVnfResponse.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/HealVnfResponse.java new file mode 100644 index 00000000..65e9f89a --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/HealVnfResponse.java @@ -0,0 +1,40 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class HealVnfResponse { + @JsonProperty("jobId") + private String jobId; + + public String getJobId() { + return jobId; + } + + public void setJobId(String jobId) { + this.jobId = jobId; + } + + + + + + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/InstantiateVnfRequest.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/InstantiateVnfRequest.java new file mode 100644 index 00000000..6f1325d3 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/InstantiateVnfRequest.java @@ -0,0 +1,112 @@ +/* +* Copyright 2016-2017 Nokia Corporation +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo; + + +import java.util.List; + +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.entity.AdditionalParam; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.entity.ExtVirtualLinkData; + +import com.fasterxml.jackson.annotation.JsonProperty; + +//@JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class,property = "@id") +// -- zhouyufei added property id cause problem -- 415 Unsupported Media Type (UTF-8 is not supported) +public class InstantiateVnfRequest { + @JsonProperty("vnfInstanceName") + private String vnfInstanceName; + + @JsonProperty("vnfPackageId") + private String vnfPackageId; + + @JsonProperty("vnfDescriptorId") + private String vnfDescriptorId; + + @JsonProperty("flavourId") + private String flavourId; + + @JsonProperty("vnfInstanceDescription") + private String vnfInstanceDescription; + + @JsonProperty("extVirtualLink") +// @JsonBackReference -- zhouyufei deprecated, and mustn't initiate by new ArrayList; +// private List extVirtualLink = new ArrayList(); + private List extVirtualLink; + + @JsonProperty("additionalParam") + private AdditionalParam additionalParam; + + + + public String getVnfInstanceName() { + return vnfInstanceName; + } + + public void setVnfInstanceName(String vnfInstanceName) { + this.vnfInstanceName = vnfInstanceName; + } + + public String getVnfPackageId() { + return vnfPackageId; + } + + public void setVnfPackageId(String vnfPackageId) { + this.vnfPackageId = vnfPackageId; + } + + public String getVnfDescriptorId() { + return vnfDescriptorId; + } + + public void setVnfDescriptorId(String vnfDescriptorId) { + this.vnfDescriptorId = vnfDescriptorId; + } + + public String getFlavourId() { + return flavourId; + } + + public void setFlavourId(String flavourId) { + this.flavourId = flavourId; + } + + public String getVnfInstanceDescription() { + return vnfInstanceDescription; + } + + public void setVnfInstanceDescription(String vnfInstanceDescription) { + this.vnfInstanceDescription = vnfInstanceDescription; + } + + public AdditionalParam getAdditionalParam() { + return additionalParam; + } + + public void setAdditionalParam(AdditionalParam additionalParam) { + this.additionalParam = additionalParam; + } + + public List getExtVirtualLink() { + return extVirtualLink; + } + + public void setExtVirtualLink(List extVirtualLink) { + this.extVirtualLink = extVirtualLink; + } + +} + + diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/InstantiateVnfResponse.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/InstantiateVnfResponse.java new file mode 100644 index 00000000..ea1a1902 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/InstantiateVnfResponse.java @@ -0,0 +1,43 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class InstantiateVnfResponse { + @JsonProperty("jobId") + private String jobId; + + @JsonProperty("vnfInstanceId") + private String vnfInstanceId; + + public String getJobId() { + return jobId; + } + + public void setJobId(String jobId) { + this.jobId = jobId; + } + + public String getVnfInstanceId() { + return vnfInstanceId; + } + + public void setVnfInstanceId(String vnfInstanceId) { + this.vnfInstanceId = vnfInstanceId; + } +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/OperStatusVnfRequest.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/OperStatusVnfRequest.java new file mode 100644 index 00000000..5c140357 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/OperStatusVnfRequest.java @@ -0,0 +1,22 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo; + + +public class OperStatusVnfRequest { + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/OperStatusVnfResponse.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/OperStatusVnfResponse.java new file mode 100644 index 00000000..9f96bd38 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/OperStatusVnfResponse.java @@ -0,0 +1,51 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo; + +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.entity.ResponseDescriptor; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class OperStatusVnfResponse { + @JsonProperty("jobId") + private String jobId; + + @JsonProperty("responseDescriptor")//Including:vnfStatus��statusDescription��errorCode��progress��responseHistoryList��responseId + private ResponseDescriptor responseDescriptor; + + public String getJobId() { + return jobId; + } + + public void setJobId(String jobId) { + this.jobId = jobId; + } + + public ResponseDescriptor getResponseDescriptor() { + return responseDescriptor; + } + + public void setResponseDescriptor(ResponseDescriptor responseDescriptor) { + this.responseDescriptor = responseDescriptor; + } + + + + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/QueryVnfRequest.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/QueryVnfRequest.java new file mode 100644 index 00000000..ce29605c --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/QueryVnfRequest.java @@ -0,0 +1,26 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo; + + + +public class QueryVnfRequest { + + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/QueryVnfResponse.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/QueryVnfResponse.java new file mode 100644 index 00000000..27645149 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/QueryVnfResponse.java @@ -0,0 +1,34 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo; + +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.entity.VnfInfo; + +public class QueryVnfResponse extends VnfInfo { + /*@JsonProperty("vnfInfo") + private VnfInfo vnfInfo; + + + public VnfInfo getVnfInfo() { + return vnfInfo; + } + + public void setVnfInfo(VnfInfo vnfInfo) { + this.vnfInfo = vnfInfo; + }*/ + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/ScaleVnfRequest.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/ScaleVnfRequest.java new file mode 100644 index 00000000..536af321 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/ScaleVnfRequest.java @@ -0,0 +1,86 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo; + +import org.onap.vfc.nfvo.driver.vnfm.svnfm.constant.CommonEnum; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.entity.AdditionalParam; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class ScaleVnfRequest { + @JsonProperty("vnfInstanceId") + private String vnfInstanceId; + + @JsonProperty("type") + private CommonEnum.ScaleType type; + + @JsonProperty("aspectId") + private String aspectId; + + @JsonProperty("numberOfSteps") + private Integer numberOfSteps; + + @JsonProperty("additionalParam") + private AdditionalParam additionalParam; + + + public String getAspectId() { + return aspectId; + } + + public void setAspectId(String aspectId) { + this.aspectId = aspectId; + } + + public Integer getNumberOfSteps() { + return numberOfSteps; + } + + public void setNumberOfSteps(Integer numberOfSteps) { + this.numberOfSteps = numberOfSteps; + } + + public AdditionalParam getAdditionalParam() { + return additionalParam; + } + + public void setAdditionalParam(AdditionalParam additionalParam) { + this.additionalParam = additionalParam; + } + + public String getVnfInstanceId() { + return vnfInstanceId; + } + + public void setVnfInstanceId(String vnfInstanceId) { + this.vnfInstanceId = vnfInstanceId; + } + + public CommonEnum.ScaleType getType() { + return type; + } + + public void setType(CommonEnum.ScaleType type) { + this.type = type; + } + + + + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/ScaleVnfResponse.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/ScaleVnfResponse.java new file mode 100644 index 00000000..5fdf9854 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/ScaleVnfResponse.java @@ -0,0 +1,39 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class ScaleVnfResponse { + @JsonProperty("jobId") + private String jobId; + + public String getJobId() { + return jobId; + } + + public void setJobId(String jobId) { + this.jobId = jobId; + } + + + + + + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/TerminateVnfRequest.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/TerminateVnfRequest.java new file mode 100644 index 00000000..45acab42 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/TerminateVnfRequest.java @@ -0,0 +1,72 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo; + +import org.onap.vfc.nfvo.driver.vnfm.svnfm.constant.CommonEnum; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class TerminateVnfRequest { + + @JsonProperty("vnfInstanceId") + private String vnfInstanceId; + + @JsonProperty("terminationType") + private CommonEnum.TerminationType terminationType; + + @JsonProperty("gracefulTerminationTimeout") + private Integer gracefulTerminationTimeout; + + public enum TerminationType{ + + GRACEFUL, FORCEFUL; + } + + + + + + + + public CommonEnum.TerminationType getTerminationType() { + return terminationType; + } + + public void setTerminationType(CommonEnum.TerminationType terminationType) { + this.terminationType = terminationType; + } + + + public Integer getGracefulTerminationTimeout() { + return gracefulTerminationTimeout; + } + + public void setGracefulTerminationTimeout(Integer gracefulTerminationTimeout) { + this.gracefulTerminationTimeout = gracefulTerminationTimeout; + } + + public String getVnfInstanceId() { + return vnfInstanceId; + } + + public void setVnfInstanceId(String vnfInstanceId) { + this.vnfInstanceId = vnfInstanceId; + } + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/TerminateVnfResponse.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/TerminateVnfResponse.java new file mode 100644 index 00000000..a015abee --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/TerminateVnfResponse.java @@ -0,0 +1,31 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class TerminateVnfResponse { + @JsonProperty("jobId") + private String jobId; + + public String getJobId() { + return jobId; + } + + public void setJobId(String jobId) { + this.jobId = jobId; + } +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/entity/AccessInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/entity/AccessInfo.java new file mode 100644 index 00000000..2f10c7e4 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/entity/AccessInfo.java @@ -0,0 +1,57 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.entity; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class AccessInfo { + @JsonProperty("tenant") + private String tenant; + + @JsonProperty("username") + private String username; + + @JsonProperty("password") + private String password; + + public String getTenant() { + return tenant; + } + + public void setTenant(String tenant) { + this.tenant = tenant; + } + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/entity/AdditionalParam.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/entity/AdditionalParam.java new file mode 100644 index 00000000..8d1f44ed --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/entity/AdditionalParam.java @@ -0,0 +1,21 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.entity; + +public class AdditionalParam { + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/entity/Affectedvm.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/entity/Affectedvm.java new file mode 100644 index 00000000..b4841305 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/entity/Affectedvm.java @@ -0,0 +1,58 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.entity; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class Affectedvm { + @JsonProperty("vimid") + private String vimid; + + @JsonProperty("vduid") + private String vduid; + + @JsonProperty("vmname") + private String vmname; + + public String getVimid() { + return vimid; + } + + public void setVimid(String vimid) { + this.vimid = vimid; + } + + public String getVduid() { + return vduid; + } + + public void setVduid(String vduid) { + this.vduid = vduid; + } + + public String getVmname() { + return vmname; + } + + public void setVmname(String vmname) { + this.vmname = vmname; + } + + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/entity/ExtVirtualLinkData.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/entity/ExtVirtualLinkData.java new file mode 100644 index 00000000..3cbc9020 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/entity/ExtVirtualLinkData.java @@ -0,0 +1,57 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.entity; + +import com.fasterxml.jackson.annotation.JsonProperty; + + +public class ExtVirtualLinkData { + @JsonProperty("vlInstanceId") + private String vlInstanceId; + @JsonProperty("vim") + private VimInfo vim; + @JsonProperty("networkId") + private String networkId; + @JsonProperty("cpdId") + private String cpdId; + public String getVlInstanceId() { + return vlInstanceId; + } + public void setVlInstanceId(String vlInstanceId) { + this.vlInstanceId = vlInstanceId; + } + public VimInfo getVim() { + return vim; + } + public void setVim(VimInfo vim) { + this.vim = vim; + } + public String getNetworkId() { + return networkId; + } + public void setNetworkId(String networkId) { + this.networkId = networkId; + } + public String getCpdId() { + return cpdId; + } + public void setCpdId(String cpdId) { + this.cpdId = cpdId; + } + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/entity/InterfaceInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/entity/InterfaceInfo.java new file mode 100644 index 00000000..f046aa66 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/entity/InterfaceInfo.java @@ -0,0 +1,58 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.entity; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class InterfaceInfo { + + @JsonProperty("vimInfoId") + private String vimType; + + @JsonProperty("apiVersion") + private String apiVersion; + + @JsonProperty("protocolType") + private String protocolType; + + public String getVimType() { + return vimType; + } + + public void setVimType(String vimType) { + this.vimType = vimType; + } + + public String getApiVersion() { + return apiVersion; + } + + public void setApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + } + + public String getProtocolType() { + return protocolType; + } + + public void setProtocolType(String protocolType) { + this.protocolType = protocolType; + } + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/entity/ResponseDescriptor.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/entity/ResponseDescriptor.java new file mode 100644 index 00000000..e1b8f967 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/entity/ResponseDescriptor.java @@ -0,0 +1,104 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.entity; + +import java.util.List; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class ResponseDescriptor { + + + @JsonProperty("status") + private String status;//started;processing;finished;error + + @JsonProperty("progress") + private Integer progress;//progress (1-100) + + @JsonProperty("statusDescription") + private String statusDescription; + + @JsonProperty("errorCode") + private Integer errorCode; + + @JsonProperty("responseId") + private Integer responseId; + + @JsonProperty("responseHistoryList") + private List responseHistoryList; + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + + + public Integer getProgress() { + return progress; + } + + + public void setProgress(Integer progr) { + if(progr>0 && progr<100) { + progress = progr; + } + } + + public String getStatusDescription() { + return statusDescription; + } + + public void setStatusDescription(String statusDescription) { + this.statusDescription = statusDescription; + } + + public Integer getErrorCode() { + return errorCode; + } + + public void setErrorCode(Integer errorCode) { + this.errorCode = errorCode; + } + + public Integer getResponseId() { + return responseId; + } + + public void setResponseId(Integer responseId) { + this.responseId = responseId; + } + + public List getResponseHistoryList() { + return responseHistoryList; + } + + public void setResponseHistoryList(List responseHistoryList) { + this.responseHistoryList = responseHistoryList; + } + + + + + + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/entity/ResponseHistoryList.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/entity/ResponseHistoryList.java new file mode 100644 index 00000000..b9bbd6c4 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/entity/ResponseHistoryList.java @@ -0,0 +1,91 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.entity; + + + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class ResponseHistoryList { + + + @JsonProperty("status") + private String status;//started;processing;finished;error + + @JsonProperty("progress") + private Integer progress;//progress (1-100) + + @JsonProperty("statusDescription") + private String statusDescription; + + @JsonProperty("errorCode") + private Integer errorCode; + + @JsonProperty("responseId") + private Integer responseId; + + + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + + public Integer getProgress() { + return progress; + } + + public void setProgress(Integer progress) { + this.progress = progress; + } + + public String getStatusDescription() { + return statusDescription; + } + + public void setStatusDescription(String statusDescription) { + this.statusDescription = statusDescription; + } + + public Integer getErrorCode() { + return errorCode; + } + + public void setErrorCode(Integer errorCode) { + this.errorCode = errorCode; + } + + public Integer getResponseId() { + return responseId; + } + + public void setResponseId(Integer responseId) { + this.responseId = responseId; + } + + + + + + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/entity/VimInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/entity/VimInfo.java new file mode 100644 index 00000000..bd4e9d7a --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/entity/VimInfo.java @@ -0,0 +1,80 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.entity; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class VimInfo { + @JsonProperty("vimInfoId") + private String vimInfoId; + + @JsonProperty("vimId") + private String vimId; + + @JsonProperty("interfaceInfo") + private InterfaceInfo interfaceInfo; + + @JsonProperty("accessInfo") + private AccessInfo accessInfo; + + @JsonProperty("interfaceEndpoint") + private String interfaceEndpoint; + + public String getVimInfoId() { + return vimInfoId; + } + + public void setVimInfoId(String vimInfoId) { + this.vimInfoId = vimInfoId; + } + + public String getVimId() { + return vimId; + } + + public void setVimId(String vimId) { + this.vimId = vimId; + } + + public InterfaceInfo getInterfaceInfo() { + return interfaceInfo; + } + + public void setInterfaceInfo(InterfaceInfo interfaceInfo) { + this.interfaceInfo = interfaceInfo; + } + + public AccessInfo getAccessInfo() { + return accessInfo; + } + + public void setAccessInfo(AccessInfo accessInfo) { + this.accessInfo = accessInfo; + } + + public String getInterfaceEndpoint() { + return interfaceEndpoint; + } + + public void setInterfaceEndpoint(String interfaceEndpoint) { + this.interfaceEndpoint = interfaceEndpoint; + } + + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/entity/VnfInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/entity/VnfInfo.java new file mode 100644 index 00000000..01191f67 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/entity/VnfInfo.java @@ -0,0 +1,126 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.entity; + +import org.onap.vfc.nfvo.driver.vnfm.svnfm.constant.CommonEnum; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class VnfInfo { + @JsonProperty("vnfInstanceId") + private String vnfInstanceId; + + @JsonProperty("vnfInstanceName") + private String vnfInstanceName; + + @JsonProperty("vnfInstanceDescription") + private String vnfInstanceDescription; + + @JsonProperty("vnfdId") + private String vnfdId; + + @JsonProperty("vnfPackageId") + private String vnfPackageId; + + @JsonProperty("version") + private String version; + + @JsonProperty("vnfProvider") + private String vnfProvider; + + @JsonProperty("vnfType") + private String vnfType; + + @JsonProperty("vnfStatus") + private CommonEnum.InstantiationState vnfStatus; + + public String getVnfInstanceId() { + return vnfInstanceId; + } + + public void setVnfInstanceId(String vnfInstanceId) { + this.vnfInstanceId = vnfInstanceId; + } + + public String getVnfInstanceName() { + return vnfInstanceName; + } + + public void setVnfInstanceName(String vnfInstanceName) { + this.vnfInstanceName = vnfInstanceName; + } + + public String getVnfInstanceDescription() { + return vnfInstanceDescription; + } + + public void setVnfInstanceDescription(String vnfInstanceDescription) { + this.vnfInstanceDescription = vnfInstanceDescription; + } + + public String getVnfdId() { + return vnfdId; + } + + public void setVnfdId(String vnfdId) { + this.vnfdId = vnfdId; + } + + public String getVnfPackageId() { + return vnfPackageId; + } + + public void setVnfPackageId(String vnfPackageId) { + this.vnfPackageId = vnfPackageId; + } + + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + public String getVnfProvider() { + return vnfProvider; + } + + public void setVnfProvider(String vnfProvider) { + this.vnfProvider = vnfProvider; + } + + public String getVnfType() { + return vnfType; + } + + public void setVnfType(String vnfType) { + this.vnfType = vnfType; + } + + public CommonEnum.InstantiationState getVnfStatus() { + return vnfStatus; + } + + public void setVnfStatus(CommonEnum.InstantiationState vnfStatus) { + this.vnfStatus = vnfStatus; + } + + + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/controller/VnfmDriverController.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/controller/VnfmDriverController.java new file mode 100644 index 00000000..a3aee38e --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/controller/VnfmDriverController.java @@ -0,0 +1,196 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.controller; + +import java.io.IOException; + +import javax.servlet.http.HttpServletResponse; + +import org.apache.http.HttpStatus; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.exception.VnfmDriverException; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.HealVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.HealVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.InstantiateVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.InstantiateVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.OperStatusVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.QueryVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.ScaleVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.ScaleVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.TerminateVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.TerminateVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.inf.VnfmDriverMgmrInf; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.MediaType; +import org.springframework.stereotype.Controller; +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.ResponseBody; + +import com.google.gson.Gson; + +@Controller +@RequestMapping(value = "/nokiavnfm/v1") +public class VnfmDriverController { + private static final Logger logger = LogManager.getLogger("VnfmDriverController"); + + @Autowired + private VnfmDriverMgmrInf vnfmDriverMgmr; + + private Gson gson = new Gson(); + + @RequestMapping(value = "/{vnfmId}/vnfs", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) + @ResponseBody + public InstantiateVnfResponse instantiateVnf(@RequestBody InstantiateVnfRequest request, @PathVariable("vnfmId") String vnfmId, HttpServletResponse httpResponse) + { + String jsonString = gson.toJson(request); + logger.info("instantiateVnf request: vnfmId = " + vnfmId + ", bodyMessage is " + jsonString); + + InstantiateVnfResponse response = vnfmDriverMgmr.instantiateVnf(request, vnfmId); + + httpResponse.setStatus(HttpStatus.SC_CREATED); + + return response; + } + + @RequestMapping(value = "/{vnfmId}/vnfs/{vnfInstanceId}/terminate", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) + @ResponseBody + public TerminateVnfResponse terminateVnf(@RequestBody TerminateVnfRequest request, @PathVariable("vnfmId") String vnfmId, @PathVariable("vnfInstanceId") String vnfInstanceId, HttpServletResponse httpResponse) + { + String jsonString = gson.toJson(request); + logger.info("terminateVnf request: vnfmId = " + vnfmId + ", vnfInstanceId = " + vnfInstanceId + ", bodyMessage is " + jsonString); + + try { + TerminateVnfResponse response = vnfmDriverMgmr.terminateVnf(request, vnfmId, vnfInstanceId); + httpResponse.setStatus(HttpStatus.SC_CREATED); + return response; + } + catch(VnfmDriverException e) + { + try { + httpResponse.setStatus(HttpStatus.SC_BAD_REQUEST); + httpResponse.sendError(e.getHttpStatus(), e.getMessage()); + } catch (IOException e1) { + + } + } + + return null; + } + + + @RequestMapping(value = "/{vnfmId}/vnfs/{vnfInstanceId}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) + @ResponseBody + public QueryVnfResponse queryVnf(@PathVariable("vnfmId") String vnfmId, @PathVariable("vnfInstanceId") String vnfInstanceId, HttpServletResponse httpResponse) + { + logger.info("queryVnf request: vnfmId = " + vnfmId + ", vnfInstanceId = " + vnfInstanceId); + + try { + QueryVnfResponse response = vnfmDriverMgmr.queryVnf(vnfmId, vnfInstanceId); + httpResponse.setStatus(HttpStatus.SC_CREATED); + return response; + } + catch(VnfmDriverException e) + { + try { + httpResponse.setStatus(HttpStatus.SC_BAD_REQUEST); + httpResponse.sendError(e.getHttpStatus(), e.getMessage()); + } catch (IOException e1) { + + } + } + + return null; + } + @RequestMapping(value = "/{vnfmId}/jobs/{jobId}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) + @ResponseBody + public OperStatusVnfResponse getOperStatus(@PathVariable("vnfmId") String vnfmId,@PathVariable("jobId") String jobId, HttpServletResponse httpResponse) + { + logger.info("getOperStatus request: vnfmId = " + vnfmId + ", jobId = " + jobId); + + try { + OperStatusVnfResponse response = vnfmDriverMgmr.getOperStatus(vnfmId, jobId); + httpResponse.setStatus(HttpStatus.SC_CREATED); + return response; + } + catch(VnfmDriverException e) + { + try { + httpResponse.sendError(e.getHttpStatus(), e.getMessage()); + } catch (IOException e1) { + + } + } + + return null; + } + + + @RequestMapping(value = "/{vnfmId}/vnfs/{vnfInstanceId}/scale", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) + @ResponseBody + public ScaleVnfResponse scaleVnf(@RequestBody ScaleVnfRequest request, @PathVariable("vnfmId") String vnfmId, @PathVariable("vnfInstanceId") String vnfInstanceId, HttpServletResponse httpResponse) + { + String jsonString = gson.toJson(request); + logger.info("scaleVnf request: vnfmId = " + vnfmId + ", vnfInstanceId = " + vnfInstanceId + ", bodyMessage is " + jsonString); + + try { + ScaleVnfResponse response = vnfmDriverMgmr.scaleVnf(request, vnfmId, vnfInstanceId); + httpResponse.setStatus(HttpStatus.SC_CREATED); + return response; + } + catch(VnfmDriverException e) + { + try { + httpResponse.sendError(e.getHttpStatus(), e.getMessage()); + } catch (IOException e1) { + + } + } + + return null; + } + + + @RequestMapping(value = "/{vnfmId}/vnfs/{vnfInstanceId}/heal", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) + @ResponseBody + public HealVnfResponse healVnf(@RequestBody HealVnfRequest request, @PathVariable("vnfmId") String vnfmId, @PathVariable("vnfInstanceId") String vnfInstanceId, HttpServletResponse httpResponse) + { + String jsonString = gson.toJson(request); + logger.info("healVnf request: vnfmId = " + vnfmId + ", vnfInstanceId = " + vnfInstanceId + ", bodyMessage is " + jsonString); + + try { + HealVnfResponse response = vnfmDriverMgmr.healVnf(request, vnfmId, vnfInstanceId); + httpResponse.setStatus(HttpStatus.SC_CREATED); + return response; + } + catch(VnfmDriverException e) + { + try { + httpResponse.sendError(e.getHttpStatus(), e.getMessage()); + } catch (IOException e1) { + + } + } + + return null; + } + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/inf/VnfmDriverMgmrInf.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/inf/VnfmDriverMgmrInf.java new file mode 100644 index 00000000..01e7155f --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/inf/VnfmDriverMgmrInf.java @@ -0,0 +1,44 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.inf; + +import org.onap.vfc.nfvo.driver.vnfm.svnfm.exception.VnfmDriverException; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.HealVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.HealVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.InstantiateVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.InstantiateVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.OperStatusVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.QueryVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.ScaleVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.ScaleVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.TerminateVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.TerminateVnfResponse; + +public interface VnfmDriverMgmrInf { + + public InstantiateVnfResponse instantiateVnf(InstantiateVnfRequest request, String vnfmId) throws VnfmDriverException; + + public TerminateVnfResponse terminateVnf(TerminateVnfRequest request, String vnfmId, String vnfInstanceId) throws VnfmDriverException; + + public QueryVnfResponse queryVnf(String vnfmId, String vnfInstanceId) throws VnfmDriverException; + + public OperStatusVnfResponse getOperStatus(String vnfmId, String jobId) throws VnfmDriverException; + + public ScaleVnfResponse scaleVnf(ScaleVnfRequest request, String vnfmId, String vnfInstanceId) throws VnfmDriverException; + + public HealVnfResponse healVnf(HealVnfRequest request, String vnfmId, String vnfInstanceId) throws VnfmDriverException; +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/resources/ProxoolConf.xml b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/resources/ProxoolConf.xml deleted file mode 100644 index 1c58dcdc..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/resources/ProxoolConf.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - proxoolPool - jdbc:mysql://135.251.208.57:3306/aware_db?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=round - - - - com.mysql.jdbc.Driver - - - - - - - 2700000 - 100 - - 5 - 50 - - 2700000 - 7200000 - - 2 - true - - true - select CURRENT_DATE from dual - - - - \ No newline at end of file diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/resources/application.properties b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/resources/application.properties new file mode 100644 index 00000000..0ae1288c --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/resources/application.properties @@ -0,0 +1,45 @@ +############################################################################### +# Copyright 2016, Nokia Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +############################################################################### + +server.error.whitelabel.enabled=false +## for MySql Database begin ## +spring.datasource.url=jdbc:mysql://135.251.208.57:5029/aware_db?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=round +spring.datasource.username=root +spring.datasource.password=123456 + +spring.datasource.driver-class-name=com.mysql.jdbc.Driver +spring.datasource.tomcat.max-wait=30000 +spring.datasource.tomcat.max-active=50 +spring.datasource.tomcat.test-on-borrow=true +## for MySql Database end ## + +## for logging begin ## +com.fasterxml.jackson.core=jackson-databind +logging.file=D:/VfcadaptorApplication.log +logging.level.org.springframework.web=DEBUG +logging.level.org.hibernate=ERROR +## for logging end ## + +## common configuration for connections begin ## +nslcmApiHttpFront=http://1.2.3.4:88 +catalogApiUriFront=http://1.2.6.7:88 +cbamApiUriFront=https://1.2.5.4:88 + +## for retrieving token from CBAM ## +grantType=grantType1 +clientId=clientId1 +clientSecret=clientSecret1 +## common configuration for connections end ## \ No newline at end of file diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/resources/config.properties b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/resources/config.properties deleted file mode 100644 index ad3ba369..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/resources/config.properties +++ /dev/null @@ -1,27 +0,0 @@ -############################################################################### -# Copyright 2016, Nokia Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -############################################################################### - -nslcmIp=1.2.3.4 -nslcmPort=88 - -catalogIp=1.2.3.4 -catalogPort=88 - -cbamIp=2.3.4.5 - -grant_type=lient_credentials -client_id=frontend -client_secret=secret \ No newline at end of file diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/resources/hdm/vnfm_job_execution_map.hbm.xml b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/resources/hdm/vnfm_job_execution_map.hbm.xml deleted file mode 100644 index 0977b94c..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/resources/hdm/vnfm_job_execution_map.hbm.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/resources/hdm/vnfm_resource_record.hbm.xml b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/resources/hdm/vnfm_resource_record.hbm.xml deleted file mode 100644 index c1e279e9..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/resources/hdm/vnfm_resource_record.hbm.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/resources/log4j.properties b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/resources/log4j.properties deleted file mode 100644 index 41230be3..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/resources/log4j.properties +++ /dev/null @@ -1,33 +0,0 @@ -############################################################################### -# Copyright 2016, Nokia Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -############################################################################### -log4j.rootLogger=info, stdout, R -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout - -# Pattern to output the caller's file name and line number. -log4j.appender.stdout.layout.ConversionPattern=%5p %d [%t] (%F:%L) - %m%n - -log4j.appender.R=org.apache.log4j.RollingFileAppender -log4j.appender.R.File=D:/tmp/vnfmdriver.log -log4j.appender.R.MaxFileSize= 10MB - -# Keep one backup file -log4j.appender.R.MaxBackupIndex=5 - -log4j.appender.R.layout=org.apache.log4j.PatternLayout -log4j.appender.R.layout.ConversionPattern=%5p %d [%t] (%F:%L) - %m%n - - diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/webapp/WEB-INF/applicationContext-hibernate.xml b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/webapp/WEB-INF/applicationContext-hibernate.xml deleted file mode 100644 index 08a34c58..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/webapp/WEB-INF/applicationContext-hibernate.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - org.hibernate.dialect.MySQLDialect - - false - 100 - - true - proxoolPool - ProxoolConf.xml - org.hibernate.connection.ProxoolConnectionProvider - - org.hibernate.cache.HashtableCacheProvider - - after_transaction - - - - - - - - hbm/vnfm_job_execution_map.hbm.xml - - - - - - - - - - - \ No newline at end of file diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/webapp/WEB-INF/mvc-servlet.xml b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/webapp/WEB-INF/mvc-servlet.xml deleted file mode 100644 index f26ce071..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/webapp/WEB-INF/mvc-servlet.xml +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - org.hibernate.dialect.MySQLDialect - - false - 100 - - true - proxoolPool - ProxoolConf.xml - org.hibernate.connection.ProxoolConnectionProvider - - org.hibernate.cache.HashtableCacheProvider - - after_transaction - - - - - - - - hbm/vnfm_job_execution_map.hbm.xml - - - - - - - - - - - diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/webapp/WEB-INF/web.xml b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/webapp/WEB-INF/web.xml index 124ec37e..e6aa9856 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/webapp/WEB-INF/web.xml +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/webapp/WEB-INF/web.xml @@ -1,68 +1,16 @@ - - - vfcadaptor - - - CharacterEncoding - org.springframework.web.filter.CharacterEncodingFilter - - encoding - UTF-8 - - - forceEncoding - true - - - - - CharacterEncoding - /* - - - - - springservlet - org.springframework.web.servlet.DispatcherServlet - - contextConfigLocation - /WEB-INF/mvc-servlet.xml - - 1 - - - springservlet - / - + + vfcadaptorsrc - - 60 - + index.html diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/test/java/com/nokia/vfcadaptor/http/client/HttpRequestProcessorTest.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/test/java/com/nokia/vfcadaptor/http/client/HttpRequestProcessorTest.java deleted file mode 100644 index 61367505..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/test/java/com/nokia/vfcadaptor/http/client/HttpRequestProcessorTest.java +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.http.client; - -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.security.KeyManagementException; -import java.security.KeyStoreException; -import java.security.NoSuchAlgorithmException; - -import org.apache.http.client.ClientProtocolException; -import org.apache.http.impl.client.HttpClientBuilder; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.MediaType; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -import org.springframework.test.context.web.WebAppConfiguration; -import org.springframework.test.web.servlet.MockMvc; -import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; -import org.springframework.test.web.servlet.setup.MockMvcBuilders; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.context.WebApplicationContext; - -import com.google.gson.Gson; -import com.nokia.vfcadaptor.vnfmdriver.bo.InstantiateVnfRequest; - -@RunWith(SpringJUnit4ClassRunner.class) -@ContextConfiguration(locations={"file:src/main/webapp/WEB-INF/mvc-servlet.xml"}) -@WebAppConfiguration -public class HttpRequestProcessorTest { - private String url; - private String basicUrl="http://localhost:8080/NvfmDriver/api/nokiavnfm/v1"; - private String funcPath; - - private Gson gson = new Gson(); - - @Autowired - private WebApplicationContext wac; - private MockMvc mockMvc; - @Before - public void setup() { - this.mockMvc = MockMvcBuilders.webAppContextSetup(this.wac).build(); //MockMvc - } - - @Test - public void testP() - { - String message = "{\"vnfInstanceName\":\"vnfInstanceName_001\",\"vnfPackageId\":\"1\"}"; - InstantiateVnfRequest request = gson.fromJson(message, InstantiateVnfRequest.class); - - System.out.println("vnfInstanceName = " + request.getVnfInstanceName()); - - String result; - try { - result = mockMvc.perform(MockMvcRequestBuilders.post("/nokiavnfm/v1/vnfmId_001/vnfs") - .contentType(MediaType.APPLICATION_JSON).content(message) - .accept(MediaType.APPLICATION_JSON)) //ִ - .andReturn().getResponse().getContentAsString(); - System.out.println("result = " + result); - } catch (UnsupportedEncodingException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (Exception e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - - } -// -// @Test -// public void testProcess() throws KeyManagementException, NoSuchAlgorithmException, KeyStoreException, ClientProtocolException, IOException -// { -// funcPath = "/vnfmId_001/vnfs"; -// url = basicUrl + funcPath; -// String message = "{\"vnfInstanceName\":\"vnfInstanceName_001\",\"vnfPackageId\":\"1\"}"; -// -// HttpClientBuilder httpClientBuilder = HttpClientUtils.createHttpClientBuilder(); -// HttpRequestProcessor processor = new HttpRequestProcessor(httpClientBuilder, RequestMethod.POST); -// processor.addPostEntity(message); -// String result = processor.process(url); -// -// System.out.println(result); -// } -// -// @Test -// public void testHttps() throws KeyManagementException, NoSuchAlgorithmException, KeyStoreException, ClientProtocolException, IOException -// { -// url = "https://www.baidu.com"; -// HttpClientBuilder httpClientBuilder = HttpClientUtils.createHttpClientBuilder(); -// HttpRequestProcessor processor = new HttpRequestProcessor(httpClientBuilder, RequestMethod.GET); -// -// String result = processor.process(url); -// -// System.out.println("The result is :" + result); -// } -// @Test -// public void testHome() throws KeyManagementException, NoSuchAlgorithmException, KeyStoreException, ClientProtocolException, IOException -// { -// url = "http://172.24.208.168/"; -// HttpClientBuilder httpClientBuilder = HttpClientUtils.createHttpClientBuilder(); -// HttpRequestProcessor processor = new HttpRequestProcessor(httpClientBuilder, RequestMethod.GET); -// -// String result = processor.process(url); -// -// System.out.println("The result is :" + result); -// } -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/test/java/com/nokia/vfcadaptor/vnfmdriver/controller/BaseControllerTestCase.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/test/java/com/nokia/vfcadaptor/vnfmdriver/controller/BaseControllerTestCase.java deleted file mode 100644 index 025949c0..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/test/java/com/nokia/vfcadaptor/vnfmdriver/controller/BaseControllerTestCase.java +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.vnfmdriver.controller; - -import java.io.IOException; -import java.io.UnsupportedEncodingException; - -import javax.net.ssl.SSLContext; -import javax.net.ssl.TrustManager; -import javax.net.ssl.X509TrustManager; - -import org.apache.http.HttpEntity; -import org.apache.http.HttpResponse; -import org.apache.http.client.ClientProtocolException; -import org.apache.http.client.HttpClient; -import org.apache.http.client.methods.HttpGet; -import org.apache.http.client.methods.HttpPost; -import org.apache.http.conn.scheme.Scheme; -import org.apache.http.conn.scheme.SchemeRegistry; -import org.apache.http.conn.ssl.SSLSocketFactory; -import org.apache.http.entity.StringEntity; -import org.apache.http.impl.client.DefaultHttpClient; -import org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager; -import org.apache.http.util.EntityUtils; -import org.junit.BeforeClass; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.http.MediaType; - -public class BaseControllerTestCase { - - private static final String CONTENT_TYPE = "Content-Type"; - private static final String AUTH = "auth"; - - private static final String UTF_8 = "utf-8"; - - protected static String serviceUrl = "http://127.0.0.1:8080/AppSenseAnalysisSystem"; - - protected static String baseUrl; - - protected static String pictureServerRootUrl = "http://localhost"; - - protected Logger log = LoggerFactory.getLogger(this.getClass()); - protected boolean isHttpsProtocol = false; - - @BeforeClass - public static void beforeClass() throws Exception { - baseUrl = serviceUrl; - } - - public static org.apache.http.client.HttpClient wrapClient(org.apache.http.client.HttpClient base) { - try { - SSLContext ctx = SSLContext.getInstance("TLS"); - X509TrustManager tm = new X509TrustManager() { - public java.security.cert.X509Certificate[] getAcceptedIssuers() { - return null; - } - public void checkClientTrusted( - java.security.cert.X509Certificate[] chain, - String authType) - throws java.security.cert.CertificateException { - // TODO Auto-generated method stub - - } - public void checkServerTrusted( - java.security.cert.X509Certificate[] chain, - String authType) - throws java.security.cert.CertificateException { - // TODO Auto-generated method stub - - } - }; - ctx.init(null, new TrustManager[] { tm }, null); - SSLSocketFactory ssf = new SSLSocketFactory(ctx, SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER); - SchemeRegistry registry = new SchemeRegistry(); - registry.register(new Scheme("https", 8089, ssf)); - ThreadSafeClientConnManager mgr = new ThreadSafeClientConnManager(registry); - return new DefaultHttpClient(mgr, base.getParams()); - } catch (Exception ex) { - ex.printStackTrace(); - return null; - } - } - - protected String sendPostMsg(String message, String url) throws UnsupportedEncodingException, - IOException, ClientProtocolException { - - HttpClient httpclient = new DefaultHttpClient(); - if(isHttpsProtocol) - { - httpclient = wrapClient(httpclient); - } - HttpPost httppost = new HttpPost(url); - StringEntity myEntity = new StringEntity(message, UTF_8); - String auth = ""; - httppost.addHeader(AUTH, auth); - httppost.addHeader(CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE); -// httppost.addHeader(CONTENT_TYPE, MediaType.TEXT_XML_VALUE); - httppost.setEntity(myEntity); - HttpResponse response = httpclient.execute(httppost); - HttpEntity resEntity = response.getEntity(); - String responseContent = ""; - if (resEntity != null) { - responseContent = EntityUtils.toString(resEntity, "UTF-8"); - EntityUtils.consume(resEntity); - } - httpclient.getConnectionManager().shutdown(); - return responseContent; - } - - protected String sendGetMsg(String message, String url) throws UnsupportedEncodingException, - IOException, ClientProtocolException { - - HttpClient httpclient = new DefaultHttpClient(); - if(isHttpsProtocol) - { - httpclient = wrapClient(httpclient); - } - HttpGet httpGet = new HttpGet(url); - StringEntity myEntity = new StringEntity(message, UTF_8); - String auth = ""; - httpGet.addHeader(AUTH, auth); - httpGet.addHeader(CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE); - //httppost.addHeader(CONTENT_TYPE, MediaType.TEXT_XML_VALUE); - //((HttpResponse) httpGet).setEntity(myEntity); - HttpResponse response = httpclient.execute(httpGet); - HttpEntity resEntity = response.getEntity(); - String responseContent = ""; - if (resEntity != null) { - responseContent = EntityUtils.toString(resEntity, "UTF-8"); - responseContent.replaceAll("\r", "");// - EntityUtils.consume(resEntity); - } - httpclient.getConnectionManager().shutdown(); - return responseContent; - } -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/test/java/com/nokia/vfcadaptor/vnfmdriver/controller/VnfmDriverAdaptorControllerTest.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/test/java/com/nokia/vfcadaptor/vnfmdriver/controller/VnfmDriverAdaptorControllerTest.java deleted file mode 100644 index 69a5c853..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/test/java/com/nokia/vfcadaptor/vnfmdriver/controller/VnfmDriverAdaptorControllerTest.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.vnfmdriver.controller; - -import java.io.IOException; -import java.net.URISyntaxException; - -import org.apache.http.client.ClientProtocolException; -import org.junit.Before; -import org.junit.Test; - -public class VnfmDriverAdaptorControllerTest extends BaseControllerTestCase{ - - private String url; - private String basicUrl="http://localhost:8080/NvfmDriver/api/nokiavnfm/v1"; - private String funcPath; - - @Before - public void setUp() - { - isHttpsProtocol = false; - } - - @Test - public void testInstantiateVnf() throws URISyntaxException, ClientProtocolException, IOException { - funcPath = "/vnfmId_001/vnfs"; - url = basicUrl + funcPath; - String message = "{\"vnfInstanceName\":\"vnfInstanceName_001\",\"vnfPackageId\":\"1\"}"; - - String responseContent = sendPostMsg(message, url); - System.out.println("-------------------------------"); - System.out.println( " Initiate Response is " + responseContent); - } - - @Test - public void testTerminateVnf() throws URISyntaxException, ClientProtocolException, IOException { - funcPath = "/vnfmId_001/vnfs/vnfInstanceId_001/terminate"; - url = basicUrl + funcPath; - String message = "{\"terminationType\":\"graceful\"}"; - String responseContent = sendPostMsg(message, url); - System.out.println("-------------------------------"); - System.out.println("Terminate Response is " + responseContent); - } - - @Test - public void testQueryVnf() throws URISyntaxException, ClientProtocolException, IOException { - funcPath = "/vnfmId_001/vnfs/vnfInstanceId_001"; - url = basicUrl + funcPath; - String message = "{\"vnfInfo\":\"{\"nfInstanceId\":\"1\",\"vnfInstanceName\":\"vFW\",\"vnfInstanceDescription\":\"vFW in Nanjing TIC Edge\",\"vnfdId\":\"1\"}\"}"; - String responseContent = sendGetMsg(message, url); - - System.out.println("-------------------------------"); - System.out.println("QueryResponse is " + responseContent); - } - - @Test - public void testOperStatusVnf() throws URISyntaxException, ClientProtocolException, IOException { - funcPath = "/vnfmId_001/jobs/jobId_001&responseId=responseId_001"; - url = basicUrl + funcPath; - String message = "{\"jobId\":\"12345\",\"responseDescriptor\":\"{\"progress\":\"40\",\"status\":\"proccessing\"}\"}"; - String responseContent = sendGetMsg(message, url); - System.out.println("-------------------------------"); - System.out.println(" operStatus Response is " + responseContent); - } - - @Test - public void testScaleVnf() throws URISyntaxException, ClientProtocolException, IOException { - funcPath = "/vnfmId_001/vnfs/vnfInstanceId_001/scale"; - url = basicUrl + funcPath; - String message = "{\"type\":\"12345\",\"aspectId\":\"145\"}"; - String responseContent = sendPostMsg(message, url); - System.out.println("-------------------------------"); - System.out.println(" Scale Response is " + responseContent); - } - - @Test - public void testHealVnf() throws URISyntaxException, ClientProtocolException, IOException { - funcPath = "/vnfmId_001/vnfs/vnfInstanceId_001/heal"; - url = basicUrl + funcPath; - String message = "{\"action\":\"12345\"}"; - String responseContent = sendPostMsg(message, url); - System.out.println("-------------------------------"); - System.out.println(" Heal Response is " + responseContent); - } - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/test/java/com/nokia/vfcadaptor/vnfmdriver/controller/VnfmDriverControllerTest.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/test/java/com/nokia/vfcadaptor/vnfmdriver/controller/VnfmDriverControllerTest.java deleted file mode 100644 index cd6d93eb..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/test/java/com/nokia/vfcadaptor/vnfmdriver/controller/VnfmDriverControllerTest.java +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 com.nokia.vfcadaptor.vnfmdriver.controller; - - -import static org.mockito.Mockito.when; -import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; -import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; - -import org.apache.http.HttpStatus; -import org.json.JSONObject; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.mockito.InjectMocks; -import org.mockito.Mock; -import org.mockito.Mockito; -import org.mockito.MockitoAnnotations; -import org.springframework.http.MediaType; -import org.springframework.test.web.servlet.MockMvc; -import org.springframework.test.web.servlet.setup.MockMvcBuilders; - -import com.nokia.vfcadaptor.exception.VnfmDriverException; -import com.nokia.vfcadaptor.vnfmdriver.bo.InstantiateVnfRequest; -import com.nokia.vfcadaptor.vnfmdriver.bo.InstantiateVnfResponse; -import com.nokia.vfcadaptor.vnfmdriver.bo.TerminateVnfRequest; -import com.nokia.vfcadaptor.vnfmdriver.bo.TerminateVnfResponse; -import com.nokia.vfcadaptor.vnfmdriver.inf.VnfmDriverMgmrInf; - -//@RunWith(SpringJUnit4ClassRunner.class) -//@ContextConfiguration(locations={"file:src/main/webapp/WEB-INF/mvc-servlet.xml"}) -//@WebAppConfiguration(value = "src/main/webapp") -public class VnfmDriverControllerTest { - - @Mock - private VnfmDriverMgmrInf vnfmDriverMgmr; - - @InjectMocks - private VnfmDriverController controller; - - private MockMvc mockMvc; - - @Before - public void setUp() { - MockitoAnnotations.initMocks(this); - mockMvc = MockMvcBuilders.standaloneSetup(controller).build(); - } - - @Test - public void testInstantiateVnf() throws Exception - { - InstantiateVnfResponse mockResponse = new InstantiateVnfResponse(); - mockResponse.setJobId("job_001"); - mockResponse.setVnfInstanceId("vnfInstanceId_001"); - String jsonString = "{\"vnfInstanceName\":\"vnfInstanceName_001\",\"vnfPackageId\":\"1\"}"; - when(vnfmDriverMgmr.instantiateVnf(Mockito.any(InstantiateVnfRequest.class), Mockito.anyString())).thenReturn(mockResponse); - - String responseString = mockMvc.perform( - post("/nokiavnfm/v1/vnfmId_001/vnfs"). - characterEncoding("UTF-8"). - accept(MediaType.APPLICATION_JSON). - contentType(MediaType.APPLICATION_JSON). - content(jsonString)) - .andDo(print()) - .andExpect(status().isCreated()) - .andReturn().getResponse().getContentAsString(); - - JSONObject jsonObj = new JSONObject(responseString); - Assert.assertEquals("jobId is ", mockResponse.getJobId(), jsonObj.get("jobId")); - Assert.assertEquals("vnfInstanceId is ", mockResponse.getVnfInstanceId(), jsonObj.get("vnfInstanceId")); - } - - @Test - public void testTerminateVnfSuccess() throws Exception - { - TerminateVnfResponse mockResponse = new TerminateVnfResponse(); - mockResponse.setJobId("job_002"); - String jsonString = "{\"vnfInstanceId\":\"vnfInstanceId_001\"}"; - when(vnfmDriverMgmr.terminateVnf(Mockito.any(TerminateVnfRequest.class), Mockito.anyString(), Mockito.anyString())).thenReturn(mockResponse); - - String responseString = mockMvc.perform( - post("/nokiavnfm/v1/vnfmId_001/vnfs/vnfInstanceId_001/terminate"). - characterEncoding("UTF-8"). - accept(MediaType.APPLICATION_JSON). - contentType(MediaType.APPLICATION_JSON). - content(jsonString)) - .andDo(print()) - .andExpect(status().isCreated()) - .andReturn().getResponse().getContentAsString(); - - JSONObject jsonObj = new JSONObject(responseString); - Assert.assertEquals("jobId is ", mockResponse.getJobId(), jsonObj.get("jobId")); - } - @Test - public void testTerminateVnfException() throws Exception - { - TerminateVnfResponse mockResponse = new TerminateVnfResponse(); - mockResponse.setJobId("job_002"); - String jsonString = "{\"vnfInstanceId\":\"vnfInstanceId_001\"}"; - VnfmDriverException exception = new VnfmDriverException(HttpStatus.SC_BAD_REQUEST, "vnfInstanceId is wrong"); - when(vnfmDriverMgmr.terminateVnf(Mockito.any(TerminateVnfRequest.class), Mockito.anyString(), Mockito.anyString())).thenThrow(exception); - - String erroMsg = mockMvc.perform( - post("/nokiavnfm/v1/vnfmId_001/vnfs/vnfInstanceId_001/terminate"). - characterEncoding("UTF-8"). - accept(MediaType.APPLICATION_JSON). - contentType(MediaType.APPLICATION_JSON). - content(jsonString)) - .andDo(print()) - .andExpect(status().isBadRequest()) - .andReturn().getResponse().getErrorMessage() - ; - Assert.assertEquals("Error Message is ", exception.getMessage(), erroMsg); - } - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vfcadaptor/VfcadaptorApplicationTests.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vfcadaptor/VfcadaptorApplicationTests.java new file mode 100644 index 00000000..288770f5 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vfcadaptor/VfcadaptorApplicationTests.java @@ -0,0 +1,32 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.vfc.nfvo.driver.vnfm.svnfm.vfcadaptor; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +@RunWith(SpringRunner.class) +@SpringBootTest +public class VfcadaptorApplicationTests { + + @Test + public void contextLoads() { + } + +} -- cgit 1.2.3-korg