Return the uuid of the queued primitive from ExecutePrimitive, the first
step in allowing the orchestrator check the status and output of the primitive.
Signed-off-by: Adam Israel <adam.israel@canonical.com>
raise
async def ExecutePrimitive(self, model_name, application_name, primitive, callback, *callback_args, **params):
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()
try:
if not self.authenticated:
await self.login()
if unit:
self.log.debug("Executing primitive {}".format(primitive))
action = await unit.run_action(primitive, **params)
if unit:
self.log.debug("Executing primitive {}".format(primitive))
action = await unit.run_action(primitive, **params)
- # action = await action.wait()
await model.disconnect()
except Exception as e:
self.log.debug("Caught exception while executing primitive: {}".format(e))
raise e
await model.disconnect()
except Exception as e:
self.log.debug("Caught exception while executing primitive: {}".format(e))
raise e
async def RemoveCharms(self, model_name, application_name, callback=None, *callback_args):
try:
async def RemoveCharms(self, model_name, application_name, callback=None, *callback_args):
try: