Requests¶
-
tnglib.get_request(request_uuid)¶ Returns info on a specific request.
Parameters: request_uuid – A string. The uuid of the request. Returns: A tuple. [0] is a bool with the result. [1] is a dictionary containing the request.
-
tnglib.get_requests()¶ Returns info on all requests.
Returns: A tuple. [0] is a bool with the result. [1] is a list of dictionaries, each containing a request.
-
tnglib.service_instantiate(service_uuid, sla_uuid=None, mapping=None)¶ Makes a request to instantiate a service.
Parameters: - service_uuid – A string. The uuid of the service.
- sla_uuid – A string (Default value = None). The uuid of the SLA.
- input_mapping –
dictionary with two keys: vnfs and vls. Both keys contain a list. vnf list elements are dictionaries with two keys: vnf_id and vim_id. vls list elements are dictionaries with three keys: vl_id, external_net and vim_id. — network_functions:
- vnf_id: <foo> vim_id: <bar>
- vnf_id: <foo2> vim_id: <bar2>
- virtual_links:
- vl_id: <foo> vim_id: <bar> external_net: <foo.bar>
- vl_id: <foo2> vim_id: <bar2> external_net: <foo.bar2>
Returns: A tuple. [0] is a bool with the result. [1] is a string containing the uuid of the request.
-
tnglib.service_terminate(instance_uuid)¶ Makes a request to terminate a service.
Parameters: instance_uuid – A string. The uuid of the instance. Returns: A tuple. [0] is a bool with the result. [1] is a string containing the uuid of the terminated instance.
-
tnglib.slice_instantiate(slice_template_uuid, name=None, description=None)¶ Makes a request to instantiate a slice.
Parameters: - slice_template_uuid – A string. The uuid of the slice template.
- name – A string (Default value = None). A name for the slice instance.
- description – A string (Default value = None). A description for the slice template
Returns: A tuple. [0] is a bool with the result. [1] is a string containing the uuid of the instantiated slice.
-
tnglib.slice_terminate(instance_uuid)¶ Makes a request to terminate a slice.
Parameters: instance_uuid – A string. The uuid of the slice instance. Returns: A tuple. [0] is a bool with the result. [1] is a string containing the uuid of the terminated slice instance.
-
tnglib.service_scale_in(instance_uuid, vnf_uuid=None, vnfd_uuid=None, number_inst=1)¶ Makes a request to scale in a service.
Parameters: - instance_uuid – A string. The uuid of the service instance.
- vnfd_uuid – A string. the uuid of either the vnf descriptor or instance that needs to be scaled in.
- vnf_uuid – A string. Contains the uuid of a VNF instance.
- number_inst – An integer. Number of required intances to scale in. Only when vnfd_uuid is present.
Returns: A tuple. [0] is a bool with the result. [1] is a string containing the uuid of the request.
-
tnglib.service_scale_out(instance_uuid, vnfd_uuid, number_inst=1, vim_uuid=None)¶ Makes a request to scale out a service.
Parameters: - instance_uuid – A string. The uuid of the service instance.
- vnfd_uuid – A string. the uuid of the vnf descriptor to scale.
- number_inst – An integer. Number of required extra intances.
Returns: A tuple. [0] is a bool with the result. [1] is a string containing the uuid of the request.