1 package org.onap.vid.job.command;
3 import org.onap.vid.changeManagement.RequestDetailsWrapper;
4 import org.onap.vid.job.JobAdapter;
5 import org.onap.vid.job.command.CommandParentData.CommandDataKey;
6 import org.onap.vid.model.serviceInstantiation.VfModule;
7 import org.onap.vid.mso.model.VfModuleInstantiationRequestDetails;
8 import org.onap.vid.services.AsyncInstantiationBusinessLogic;
9 import org.springframework.beans.factory.config.ConfigurableBeanFactory;
10 import org.springframework.context.annotation.Scope;
11 import org.springframework.stereotype.Component;
13 import javax.inject.Inject;
16 @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
17 public class VfmoduleInstantiationCommand extends ResourceInstantiationCommand {
19 private AsyncInstantiationBusinessLogic asyncInstantiationBL;
22 protected String getRequestPath() {
23 return asyncInstantiationBL.getVfmoduleInstantiationPath(commandParentData.getInstanceId(CommandDataKey.SERVICE_INSTANCE_ID),commandParentData.getInstanceId(CommandDataKey.VNF_INSTANCE_ID));
27 protected RequestDetailsWrapper<VfModuleInstantiationRequestDetails> generateMSORequest(JobAdapter.AsyncJobRequest request, String userId) {
28 return asyncInstantiationBL.generateVfModuleInstantiationRequest(
29 (VfModule) getSharedData().getRequest(),
30 commandParentData.getModelInfo(CommandDataKey.SERVICE_MODEL_INFO),
31 commandParentData.getInstanceId(CommandDataKey.SERVICE_INSTANCE_ID),
32 commandParentData.getModelInfo(CommandDataKey.VNF_MODEL_INFO),
33 commandParentData.getInstanceId(CommandDataKey.VNF_INSTANCE_ID),
34 commandParentData.getInstanceId(CommandDataKey.VG_INSTANCE_ID),
35 getSharedData().getUserId()
40 protected String getJobAuditMSOStatus() {
41 return "VF_MODULE_REQUESTED";