projects
/
osm
/
osmclient.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Replace deprecated yaml.load by yaml.safe_load
[osm/osmclient.git]
/
osmclient
/
scripts
/
osm.py
diff --git
a/osmclient/scripts/osm.py
b/osmclient/scripts/osm.py
index
3f269bb
..
7b2e1a3
100755
(executable)
--- a/
osmclient/scripts/osm.py
+++ b/
osmclient/scripts/osm.py
@@
-1316,7
+1316,7
@@
def pdu_create(ctx, name, pdu_type, interface, description, vim_account, descrip
raise ClientException('in absence of descriptor file, option "--vim_account" is mandatory (at least once)')
else:
with open(descriptor_file, 'r') as df:
raise ClientException('in absence of descriptor file, option "--vim_account" is mandatory (at least once)')
else:
with open(descriptor_file, 'r') as df:
- pdu = yaml.load(df.read())
+ pdu = yaml.
safe_
load(df.read())
if name: pdu["name"] = name
if pdu_type: pdu["type"] = pdu_type
if description: pdu["description"] = description
if name: pdu["name"] = name
if pdu_type: pdu["type"] = pdu_type
if description: pdu["description"] = description
@@
-2818,7
+2818,7
@@
def ns_action(ctx,
op_data['vdu_count_index'] = vdu_count
op_data['primitive'] = action_name
if params:
op_data['vdu_count_index'] = vdu_count
op_data['primitive'] = action_name
if params:
- op_data['primitive_params'] = yaml.load(params)
+ op_data['primitive_params'] = yaml.
safe_
load(params)
else:
op_data['primitive_params'] = {}
ctx.obj.ns.exec_op(ns_name, op_name='action', op_data=op_data, wait=wait)
else:
op_data['primitive_params'] = {}
ctx.obj.ns.exec_op(ns_name, op_name='action', op_data=op_data, wait=wait)