projects
/
osm
/
osmclient.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixes CPU pinning policy when overriding VNFD EPA
[osm/osmclient.git]
/
osmclient
/
common
/
utils.py
diff --git
a/osmclient/common/utils.py
b/osmclient/common/utils.py
index
6b6c6f9
..
6d5ebd8
100644
(file)
--- a/
osmclient/common/utils.py
+++ b/
osmclient/common/utils.py
@@
-30,7
+30,7
@@
def wait_for_value(func, result=True, wait_time=10, catch_exception=None):
return True
except catch_exception:
pass
return True
except catch_exception:
pass
- time.sleep(
1
)
+ time.sleep(
5
)
try:
return func() == result
except catch_exception:
try:
return func() == result
except catch_exception:
@@
-66,25
+66,13
@@
def get_key_val_from_pkg(descriptor_file):
if yamlfile is None:
return None
if yamlfile is None:
return None
- dict = yaml.load(tar.extractfile(yamlfile))
+ dict = yaml.
safe_
load(tar.extractfile(yamlfile))
result = {}
result = {}
- for k1, v1 in list(dict.items()):
- if not k1.endswith('-catalog'):
- continue
- for k2, v2 in list(v1.items()):
- if not k2.endswith('nsd') and not k2.endswith('vnfd'):
- continue
+ for k in dict:
+ if 'nsd' in k:
+ result['type'] = 'nsd'
+ else:
+ result['type'] = 'vnfd'
- if 'nsd' in k2:
- result['type'] = 'nsd'
- else:
- result['type'] = 'vnfd'
-
- for entry in v2:
- for k3, v3 in list(entry.items()):
- # strip off preceeding chars before :
- key_name = k3.split(':').pop()
-
- result[key_name] = v3
tar.close()
return result
tar.close()
return result