projects
/
osm
/
RO.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bug782 fix: use_existing_flavors flag was not working
[osm/RO.git]
/
osm_ro
/
nfvo.py
diff --git
a/osm_ro/nfvo.py
b/osm_ro/nfvo.py
index
b0a6a64
..
9a2e5e1
100644
(file)
--- a/
osm_ro/nfvo.py
+++ b/
osm_ro/nfvo.py
@@
-808,7
+808,7
@@
def create_or_use_flavor(mydb, vims, flavor_dict, rollback_list, only_create_at_
try:
flavor_vim_id = None
flavor_vim_id=vim.get_flavor_id_from_data(flavor_dict)
try:
flavor_vim_id = None
flavor_vim_id=vim.get_flavor_id_from_data(flavor_dict)
- flavor_create="false"
+ flavor_create
d
="false"
except vimconn.vimconnException as e:
pass
try:
except vimconn.vimconnException as e:
pass
try:
@@
-1282,13
+1282,21
@@
def new_vnfd_v3(mydb, tenant_id, vnf_descriptor):
numa["threads"] = max(db_flavor["vcpus"], 1)
epa_vcpu_set = True
if vdu["guest-epa"].get("cpu-quota") and not epa_vcpu_set:
numa["threads"] = max(db_flavor["vcpus"], 1)
epa_vcpu_set = True
if vdu["guest-epa"].get("cpu-quota") and not epa_vcpu_set:
- extended["cpu-quota"] = get_resource_allocation_params(vdu["guest-epa"].get("cpu-quota"))
+ cpuquota = get_resource_allocation_params(vdu["guest-epa"].get("cpu-quota"))
+ if cpuquota:
+ extended["cpu-quota"] = cpuquota
if vdu["guest-epa"].get("mem-quota"):
if vdu["guest-epa"].get("mem-quota"):
- extended["mem-quota"] = get_resource_allocation_params(vdu["guest-epa"].get("mem-quota"))
+ vduquota = get_resource_allocation_params(vdu["guest-epa"].get("mem-quota"))
+ if vduquota:
+ extended["mem-quota"] = vduquota
if vdu["guest-epa"].get("disk-io-quota"):
if vdu["guest-epa"].get("disk-io-quota"):
- extended["disk-io-quota"] = get_resource_allocation_params(vdu["guest-epa"].get("disk-io-quota"))
+ diskioquota = get_resource_allocation_params(vdu["guest-epa"].get("disk-io-quota"))
+ if diskioquota:
+ extended["disk-io-quota"] = diskioquota
if vdu["guest-epa"].get("vif-quota"):
if vdu["guest-epa"].get("vif-quota"):
- extended["vif-quota"] = get_resource_allocation_params(vdu["guest-epa"].get("vif-quota"))
+ vifquota = get_resource_allocation_params(vdu["guest-epa"].get("vif-quota"))
+ if vifquota:
+ extended["vif-quota"] = vifquota
if numa:
extended["numas"] = [numa]
if extended:
if numa:
extended["numas"] = [numa]
if extended: