X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FN2VC.git;a=blobdiff_plain;f=n2vc%2Fvnf.py;h=9641e73d22fac006ba9c7c694a83af3d22dad945;hp=e0eec2e5327207aa432181804edee2e0adbe99df;hb=839299d635bb7b739aace1a242e28918577b13e2;hpb=b521451dfde089dcce9ae160734d401a1030517f diff --git a/n2vc/vnf.py b/n2vc/vnf.py index e0eec2e..9641e73 100644 --- a/n2vc/vnf.py +++ b/n2vc/vnf.py @@ -400,6 +400,12 @@ class N2VC: raise async def ExecutePrimitive(self, model_name, application_name, primitive, callback, *callback_args, **params): + """ + Queue the execution of a primitive + + returns the UUID of the executed primitive + """ + uuid = None try: if not self.authenticated: await self.login() @@ -422,11 +428,12 @@ class N2VC: if unit: self.log.debug("Executing primitive {}".format(primitive)) action = await unit.run_action(primitive, **params) - # action = await action.wait() + uuid = action.id await model.disconnect() except Exception as e: self.log.debug("Caught exception while executing primitive: {}".format(e)) raise e + return uuid async def RemoveCharms(self, model_name, application_name, callback=None, *callback_args): try: