if scenario_dict["cloud_config"]:
scenario_dict["cloud-config"] = yaml.load(scenario_dict["cloud_config"])
del scenario_dict["cloud_config"]
if scenario_dict["cloud_config"]:
scenario_dict["cloud-config"] = yaml.load(scenario_dict["cloud_config"])
del scenario_dict["cloud_config"]
cmd = "SELECT uuid,name,member_vnf_index,vnf_id,description FROM sce_vnfs WHERE scenario_id='{}' "\
"ORDER BY created_at".format(scenario_dict['uuid'])
self.logger.debug(cmd)
cmd = "SELECT uuid,name,member_vnf_index,vnf_id,description FROM sce_vnfs WHERE scenario_id='{}' "\
"ORDER BY created_at".format(scenario_dict['uuid'])
self.logger.debug(cmd)
# vms
cmd = "SELECT vms.uuid as uuid, flavor_id, image_id, image_list, vms.name as name," \
" vms.description as description, vms.boot_data as boot_data, count," \
# vms
cmd = "SELECT vms.uuid as uuid, flavor_id, image_id, image_list, vms.name as name," \
" vms.description as description, vms.boot_data as boot_data, count," \
" FROM vnfs join vms on vnfs.uuid=vms.vnf_id" \
" WHERE vnfs.uuid='" + vnf['vnf_id'] + "'" \
" ORDER BY vms.created_at"
" FROM vnfs join vms on vnfs.uuid=vms.vnf_id" \
" WHERE vnfs.uuid='" + vnf['vnf_id'] + "'" \
" ORDER BY vms.created_at"
- cmd = "SELECT uuid,name,type,description FROM nets WHERE vnf_id='{}'".format(vnf['vnf_id'])
+ cmd = "SELECT uuid,name,type,description, osm_id FROM nets WHERE vnf_id='{}'".format(vnf['vnf_id'])
- cmd = "SELECT uuid,name,type,external,description" \
+ cmd = "SELECT uuid,name,type,external,description,vim_network_name, osm_id" \
:param tables: list with dictionary where the keys are the table names and the values are a row or row list
with the values to be inserted at the table. Each row is a dictionary with the key values. E.g.:
tables = [
:param tables: list with dictionary where the keys are the table names and the values are a row or row list
with the values to be inserted at the table. Each row is a dictionary with the key values. E.g.:
tables = [
If tables does not contain the 'created_at', it is generated incrementally with the order of tables. You can
provide a integer value, that it is an index multiply by 0.00001 to add to the created time to manually set
up and order
If tables does not contain the 'created_at', it is generated incrementally with the order of tables. You can
provide a integer value, that it is an index multiply by 0.00001 to add to the created time to manually set
up and order
:param uuid_list: list of created uuids, first one is the root (#TODO to store at uuid table)
:return: None if success, raise exception otherwise
"""
:param uuid_list: list of created uuids, first one is the root (#TODO to store at uuid table)
:return: None if success, raise exception otherwise
"""
if isinstance(row_list, dict):
row_list = (row_list, ) #create a list with the single value
for row in row_list:
if isinstance(row_list, dict):
row_list = (row_list, ) #create a list with the single value
for row in row_list:
else:
created_time_param = 0
self._new_row_internal(table_name, row, add_uuid=False, root_uuid=None,
else:
created_time_param = 0
self._new_row_internal(table_name, row, add_uuid=False, root_uuid=None,
vnf_manage_iface_list=[]
#instance vms
cmd = "SELECT iv.uuid as uuid, vim_vm_id, status, error_msg, vim_info, iv.created_at as "\
vnf_manage_iface_list=[]
#instance vms
cmd = "SELECT iv.uuid as uuid, vim_vm_id, status, error_msg, vim_info, iv.created_at as "\
- "created_at, name, vms.osm_id as vdu_osm_id"\
+ "created_at, name, vms.osm_id as vdu_osm_id, vim_name"\
" FROM instance_vms as iv join vms on iv.vm_id=vms.uuid "\
" WHERE instance_vnf_id='{}' ORDER BY iv.created_at".format(vnf['uuid'])
self.logger.debug(cmd)
" FROM instance_vms as iv join vms on iv.vm_id=vms.uuid "\
" WHERE instance_vnf_id='{}' ORDER BY iv.created_at".format(vnf['uuid'])
self.logger.debug(cmd)