Code Review
/
vfc
/
gvnfm
/
vnflcm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "update version to 1.3.2"
[vfc/gvnfm/vnflcm.git]
/
lcm
/
lcm
/
nf
/
views
/
common.py
diff --git
a/lcm/lcm/nf/views/common.py
b/lcm/lcm/nf/views/common.py
index
57e6a62
..
a57a93e
100644
(file)
--- a/
lcm/lcm/nf/views/common.py
+++ b/
lcm/lcm/nf/views/common.py
@@
-53,7
+53,7
@@
def view_safe_call_with_log(logger):
except NFLCMExceptionSeeOther as e:
logger.error(e.message)
resp = Response(status=status.HTTP_303_SEE_OTHER)
except NFLCMExceptionSeeOther as e:
logger.error(e.message)
resp = Response(status=status.HTTP_303_SEE_OTHER)
- resp["Location"] =
""
+ resp["Location"] =
e.message
# resp["Location"] = "subscriptions/%s" % e.id
return resp
except NFLCMExceptionNotFound as e:
# resp["Location"] = "subscriptions/%s" % e.id
return resp
except NFLCMExceptionNotFound as e:
@@
-117,11
+117,10
@@
def deal_vnf_action(logger, opt_type, opt_status, instid, req, req_serializer, a
raise NFLCMExceptionConflict("VNF(%s) is not INSTANTIATED." % instid)
req_etag = None
raise NFLCMExceptionConflict("VNF(%s) is not INSTANTIATED." % instid)
req_etag = None
- is_upd_vnf_opt = (opt_type == "UpdateVnf")
- if is_upd_vnf_opt:
+ if opt_type == OPERATION_TYPE.MODIFY_INFO:
req_etag = req.META.get("HTTP_IF_MATCH")
logger.debug("req_etag=%s, CACHE_ETAG=%s", req_etag, CACHE_ETAG)
req_etag = req.META.get("HTTP_IF_MATCH")
logger.debug("req_etag=%s, CACHE_ETAG=%s", req_etag, CACHE_ETAG)
- if req_etag != CACHE_ETAG:
+ if req_etag
and req_etag
!= CACHE_ETAG:
raise NFLCMExceptionPreconditionFailed("Etag mismatch")
job_id = JobUtil.create_job('NF', opt_type, instid)
raise NFLCMExceptionPreconditionFailed("Etag mismatch")
job_id = JobUtil.create_job('NF', opt_type, instid)
@@
-131,7
+130,7
@@
def deal_vnf_action(logger, opt_type, opt_status, instid, req, req_serializer, a
act_task(req.data, instid, job_id).start()
resp = Response(data={"jobId": job_id}, status=status.HTTP_202_ACCEPTED)
act_task(req.data, instid, job_id).start()
resp = Response(data={"jobId": job_id}, status=status.HTTP_202_ACCEPTED)
- if
is_upd_vnf_opt
:
+ if
opt_type == OPERATION_TYPE.MODIFY_INFO
:
resp["ETag"] = req_etag
return resp
resp["ETag"] = req_etag
return resp