Self Destruct Calm App

  • 3 August 2018
  • 1 reply

Badge +6

I have a calm blue print which the user can use to create an app which does some processing depending on the value of variables specified by the user and stores the result in persistent storage. But then the user has to remeber to delete the application.

Is there any way to get the blue print to delete the application affter it has done the processing?

I can shutdown the VM by having the service start call service stop with a task to execute "shutdown -h +1" but that still leaves the app

Best answer by Chandru 5 August 2018, 23:04

View original

This topic has been closed for comments

1 reply

Userlevel 3
Badge +13
You can try this following workaround,

Add the following script as the last task in Service Start action with type as escript and create the following application profile level variables,

username - prism central admin username
password - password for the above mentioned username

sleep (120)
headers= {"accept":"application/json"}

The above script uses Prism Central REST API to call the APP delete action.

Note: The above script has been tested only on single service blueprints