class VfcManager {

    public RestfulResponse instantiateNs(String nsInstanceId, NSResourceInputParameter segInput)
            throws ApplicationException {
        // Call the NFVO or SDNO service to instantiate service
        LOGGER.info("instantiate ns -> begin");

        // Step1: Prepare restful parameters and options
        NsInstantiateReq oRequest = new NsInstantiateReq();
        oRequest.setNsInstanceId(nsInstanceId);
        NsParameters nsParameters = segInput.getNsParameters();
        oRequest.setLocationConstraints(nsParameters.getLocationConstraints());
        oRequest.setAdditionalParamForNs(nsParameters.getAdditionalParamForNs());
        String instReq = JsonUtil.marshal(oRequest);
        // Step2: prepare url and
        String url = getUrl(nsInstanceId, CommonConstant.Step.INSTANTIATE);
        String methodType = CommonConstant.MethodType.POST;

        RestfulResponse instRsp = restfulUtil.send(url, methodType, instReq);
        ResourceOperationStatus status = new ResourceOperationStatus(segInput.getNsOperationKey().getServiceId(),
                segInput.getNsOperationKey().getOperationId(), segInput.getNsOperationKey().getNodeTemplateUUID());
        ValidateUtil.assertObjectNotNull(instRsp);
        if (!HttpCode.isSucess(instRsp.getStatus())) {
            LOGGER.error("update segment operation status : fail to instantiate ns");
            status.setStatus(RequestsDbConstant.Status.ERROR);
            status.setErrorCode(String.valueOf(instRsp.getStatus()));
            status.setStatusDescription(CommonConstant.StatusDesc.INSTANTIATE_NS_FAILED);
            resourceOperationStatusRepository.save(status);
            throw new ApplicationException(HttpCode.INTERNAL_SERVER_ERROR, DriverExceptionID.FAIL_TO_INSTANTIATE_NS);
        }
        LOGGER.info("instantiate ns response status is : {}", instRsp.getStatus());
        LOGGER.info("instantiate ns response content is : {}", instRsp.getResponseContent());
        ValidateUtil.assertObjectNotNull(instRsp.getResponseContent());
        @SuppressWarnings("unchecked")
        Map<String, String> rsp = JsonUtil.unMarshal(instRsp.getResponseContent(), Map.class);
        String jobId = rsp.get(CommonConstant.JOB_ID);
        if (ValidateUtil.isStrEmpty(jobId)) {
            LOGGER.error("Invalid jobId from instantiate operation");
            status.setStatus(RequestsDbConstant.Status.ERROR);
            status.setErrorCode(String.valueOf(instRsp.getStatus()));
            status.setStatusDescription(CommonConstant.StatusDesc.INSTANTIATE_NS_FAILED);
            resourceOperationStatusRepository.save(status);
            throw new ApplicationException(HttpCode.INTERNAL_SERVER_ERROR,
                    DriverExceptionID.INVALID_RESPONSE_FROM_INSTANTIATE_OPERATION);
        }
        LOGGER.info("instantiate ns -> end");
        // Step 3: update segment operation job id
        LOGGER.info("update resource operation status job id -> begin");
        status.setJobId(jobId);
        status.setProgress("100");
        status.setStatusDescription("NS initiation completed.");
        resourceOperationStatusRepository.save(status);
        LOGGER.info("update segment operation job id -> end");

        return instRsp;
    }

    public  VfcManager();

}