print("kwargs > {}".format(kwargs))
if args:
if "update" in args:
- ro_ns_desc = yaml.load(
- descriptors.ro_update_action_text, Loader=yaml.Loader
+ ro_ns_desc = yaml.safe_load(
+ descriptors.ro_update_action_text
)
while True:
yield ro_ns_desc
if kwargs.get("delete"):
- ro_ns_desc = yaml.load(
- descriptors.ro_delete_action_text, Loader=yaml.Loader
+ ro_ns_desc = yaml.safe_load(
+ descriptors.ro_delete_action_text
)
while True:
yield ro_ns_desc
- ro_ns_desc = yaml.load(descriptors.ro_ns_text, Loader=yaml.Loader)
+ ro_ns_desc = yaml.safe_load(descriptors.ro_ns_text)
# if ip address provided, replace descriptor
ip_addresses = getenv("OSMLCMTEST_NS_IPADDRESS", "")
self.db = Database({"database": {"driver": "memory"}}).instance.db
self.db.create_list(
- "vnfds", yaml.load(descriptors.db_vnfds_text, Loader=yaml.Loader)
+ "vnfds", yaml.safe_load(descriptors.db_vnfds_text)
)
self.db.create_list(
"vnfds_revisions",
- yaml.load(descriptors.db_vnfds_revisions_text, Loader=yaml.Loader),
+ yaml.safe_load(descriptors.db_vnfds_revisions_text),
)
self.db.create_list(
- "nsds", yaml.load(descriptors.db_nsds_text, Loader=yaml.Loader)
+ "nsds", yaml.safe_load(descriptors.db_nsds_text)
)
self.db.create_list(
- "nsrs", yaml.load(descriptors.db_nsrs_text, Loader=yaml.Loader)
+ "nsrs", yaml.safe_load(descriptors.db_nsrs_text)
)
self.db.create_list(
"vim_accounts",
- yaml.load(descriptors.db_vim_accounts_text, Loader=yaml.Loader),
+ yaml.safe_load(descriptors.db_vim_accounts_text),
)
self.db.create_list(
"k8sclusters",
- yaml.load(descriptors.db_k8sclusters_text, Loader=yaml.Loader),
+ yaml.safe_load(descriptors.db_k8sclusters_text),
)
self.db.create_list(
- "nslcmops", yaml.load(descriptors.db_nslcmops_text, Loader=yaml.Loader)
+ "nslcmops", yaml.safe_load(descriptors.db_nslcmops_text)
)
self.db.create_list(
- "vnfrs", yaml.load(descriptors.db_vnfrs_text, Loader=yaml.Loader)
+ "vnfrs", yaml.safe_load(descriptors.db_vnfrs_text)
)
- self.db_vim_accounts = yaml.load(
- descriptors.db_vim_accounts_text, Loader=yaml.Loader
+ self.db_vim_accounts = yaml.safe_load(
+ descriptors.db_vim_accounts_text
)
# Mock kafka