return Response(data={'nsInstanceId': "test"}, status=status.HTTP_201_CREATED)
csar_id = ignore_case_get(request.data, 'nsdId')
ns_name = ignore_case_get(request.data, 'nsName')
- description = ignore_case_get(request.data, 'description')
+ description = ignore_case_get(request.data, 'nsDescription')
context = {
"globalCustomerId": globalCustomerId,
"serviceType": serviceType
logger.debug("CreateNSView::post::ret={'nsInstanceId':%s}", ns_inst_id)
ns_filter = {"ns_inst_id": ns_inst_id}
nsInstance = GetNSInfoService(ns_filter).get_ns_info(is_sol=True)[0]
+ logger.debug("nsInstance: %s" % nsInstance)
resp_serializer = NsInstanceSerializer(data=nsInstance)
if not resp_serializer.is_valid():
raise NSLCMException(resp_serializer.errors)
response = Response(data=resp_serializer.data, status=status.HTTP_201_CREATED)
response["Location"] = NS_INSTANCE_BASE_URI % nsInstance['id']
return response
-
except BadRequestException as e:
logger.error("Exception in CreateNS: %s", e.message)
data = {'status': status.HTTP_400_BAD_REQUEST, 'detail': e.message}
@swagger_auto_schema(
request_body=None,
responses={
- status.HTTP_204_NO_CONTENT: None
+ status.HTTP_204_NO_CONTENT: "HTTP_204_NO_CONTENT"
}
)
def delete(self, request, ns_instance_id):