Consume¶
ManoConsumer¶
-
class
sonmano.consume.ManoConsumer(broker_host='amqp://guest:guest@localhost:5672/%2F', broker_exchange='son-kernel', cat_url='http://localhost:4011/api/v2/')¶ This class serves as a MANO Framework Consumer object. It sets up a connection with the MANO Framework message broker, and provides a range of methods to interact with it.
-
instantiate_service(pkg_path)¶ This method instantiates a service, packaged in a 5GTANGO package, on the selected MANO Framework.
Parameters: pkg_path – path to the tgo package containing the service that needs to be instantiated. Returns: A tuple. tuple[0] is a bool indicating the outcome of the request, tuple[1] contains the response message by the MANO.
-
scale_out_service(service_instance_uuid, vnfd_uuid, num=1)¶ This method scales out a service instance that is running on the selected MANO Framework.
Parameters: - service_instance_uuid – The instance uuid of the service that needs to be scaled out.
- vnfd_uuid – the vnfd of the VNF that requires additional instances to be deployed
- num_inst – number of required extra instances
Returns: A tuple. tuple[0] is a bool indicating the outcome of the request, tuple[1] contains the response message by the MANO.
-
scale_in_service(service_instance_uuid, vnf_uuid)¶ This method makes a request to scale in a running service instance on the selected MANO Framework. The VNF that needs to be scaled in is selected by its VNF instance id.
Parameters: - service_instance_uuid – The instance uuid of the service that needs to be scaled in.
- vnf_uuid – the VNJF instance id that needs to be scaled in.
Returns: A tuple. tuple[0] is a bool indicating the outcome of the request, tuple[1] contains the response message by the MANO.
-
scale_in_service_vnfd(service_instance_uuid, vnfd_uuid, num=1)¶ This method makes a request to scale in a running service instance on the selected MANO Framework. The VNF that needs to be scaled in is selected by its VNFD id.
Parameters: - service_instance_uuid – The instance uuid of the service that needs to be scaled in.
- vnfd_uuid – the id of the VNFD that needs to be scaled in. If multiple instances of this VNFD are running, the MANO will decide which get removed.
- num – The number of VNFs associated to this VNFD that need to be removed.
Returns: A tuple. tuple[0] is a bool indicating the outcome of the request, tuple[1] contains the response message by the MANO.
-
migrate_service(service_instance_uuid, vim_uuid, vnf_uuid)¶ This method makes a migration request for a running service instance on the selected MANO Framework
Parameters: - service_instance_uuid – The instance uuid of the service that needs to be migrated.
- vim_uuid – the id of the VIM that the VNF needs to be migrated to.
- vnf_uuid – the id of the vnf instance that needs to be migrated.
Returns: A tuple. tuple[0] is a bool indicating the outcome of the request, tuple[1] contains the response message by the MANO.
-
terminate_service(service_instance_uuid)¶ This method makes a termination request for a running service instance on the selected MANO Framework
Parameters: service_instance_uuid – The instance uuid of the service that needs to be terminated. Returns: A tuple. tuple[0] is a bool indicating the outcome of the request, tuple[1] contains the response message by the MANO.
-