X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=n2vc%2Fvnf.py;h=899e407589576e720f77ef64630d16b07ddb084a;hb=refs%2Fchanges%2F70%2F5970%2F1;hp=7244b2245153cd55b0fa849f390e8cec785482ac;hpb=88a49630895a6045586e6f547c0b6ad118110f25;p=osm%2FN2VC.git diff --git a/n2vc/vnf.py b/n2vc/vnf.py index 7244b22..899e407 100644 --- a/n2vc/vnf.py +++ b/n2vc/vnf.py @@ -373,6 +373,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() @@ -392,11 +398,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: