Policies

tnglib.attach_policy(policy_uuid, service_uuid, sla_uuid)

Attaches a policy to a service and SLA.

Parameters:
  • policy_uuid – uuid of a policy descriptor.
  • service_uuid – uuid of a network service.
  • sla_uuid – uuid of an SLA.
Returns:

A tuple. [0] is a bool with the result. [1] is a string indicating the result.

tnglib.create_policy(path)

Uploads a policy descriptor.

Parameters:path – relative path where policy descriptor is stored.
Returns:A tuple. [0] is a bool with the result. [1] is a string containing the uuid of the uploaded policy descriptor.
tnglib.delete_policy(policy_uuid)

Deletes a policy descriptor.

Parameters:policy_uuid – uuid of a policy descriptor.
Returns:A tuple. [0] is a bool with the result. [1] is a string containing the uuid of the terminated policy descriptor.
tnglib.get_policies()

Returns info on all available policiy descriptors.

Returns:A tuple. [0] is a bool with the result. [1] is a list of dictionaries. Each dictionary contains a policy descriptor.
tnglib.get_policy(policy_uuid)

Returns info on a specific policy descriptor.

Parameters:policy_uuid – uuid of a policy descriptor.
Returns:A tuple. [0] is a bool with the result. [1] is a dictionary containg a policy descriptor.