2  * ============LICENSE_START=======================================================
 
   4  * ================================================================================
 
   5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
 
   6  * ================================================================================
 
   7  * Modifications Copyright (c) 2019 Samsung
 
   8  * ================================================================================
 
   9  * Licensed under the Apache License, Version 2.0 (the "License");
 
  10  * you may not use this file except in compliance with the License.
 
  11  * You may obtain a copy of the License at
 
  13  *      http://www.apache.org/licenses/LICENSE-2.0
 
  15  * Unless required by applicable law or agreed to in writing, software
 
  16  * distributed under the License is distributed on an "AS IS" BASIS,
 
  17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 
  18  * See the License for the specific language governing permissions and
 
  19  * limitations under the License.
 
  20  * ============LICENSE_END=========================================================
 
  23 package org.onap.so.client.orchestration;
 
  25 import org.onap.so.adapters.vnfrest.CreateVolumeGroupRequest;
 
  26 import org.onap.so.adapters.vnfrest.DeleteVolumeGroupRequest;
 
  27 import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion;
 
  28 import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
 
  29 import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance;
 
  30 import org.onap.so.bpmn.servicedecomposition.bbobjects.VolumeGroup;
 
  31 import org.onap.so.bpmn.servicedecomposition.generalobjects.OrchestrationContext;
 
  32 import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext;
 
  33 import org.onap.so.client.adapter.vnf.VnfVolumeAdapterClientImpl;
 
  34 import org.onap.so.client.adapter.vnf.mapper.VnfAdapterObjectMapper;
 
  35 import org.slf4j.Logger;
 
  36 import org.slf4j.LoggerFactory;
 
  37 import org.springframework.beans.factory.annotation.Autowired;
 
  38 import org.springframework.stereotype.Component;
 
  41 public class VnfAdapterVolumeGroupResources {
 
  44     private VnfAdapterObjectMapper vnfAdapterObjectMapper;
 
  47     private VnfVolumeAdapterClientImpl vnfVolumeAdapterClient;
 
  49     public CreateVolumeGroupRequest createVolumeGroupRequest(RequestContext requestContext, CloudRegion cloudRegion,
 
  50             OrchestrationContext orchestrationContext, ServiceInstance serviceInstance, GenericVnf genericVnf,
 
  51             VolumeGroup volumeGroup, String sdncVfModuleQueryResponse) throws Exception {
 
  52         return vnfAdapterObjectMapper.createVolumeGroupRequestMapper(requestContext, cloudRegion, orchestrationContext,
 
  53                 serviceInstance, genericVnf, volumeGroup, sdncVfModuleQueryResponse);
 
  56     public DeleteVolumeGroupRequest deleteVolumeGroupRequest(RequestContext requestContext, CloudRegion cloudRegion,
 
  57             ServiceInstance serviceInstance, VolumeGroup volumeGroup) throws Exception {
 
  58         return vnfAdapterObjectMapper.deleteVolumeGroupRequestMapper(requestContext, cloudRegion, serviceInstance,