Titan Language Rhapsody
begin tran;
var myCloud as Cloud
var vm=myCloud.createVM(cpu=1, mem=2GB, public_ip=dhcp);
vm.wait(VM.RUNNING);
var trigger1 as Trigger;
trigger1.addSensor(‘cpu>80%, duration>10s’);
trigger1.addSensor(‘memory>80%, duration>10s’);
trigger1.addAction(new Action(ACTION.SCALE_UP, 1));
vm.addTrigger(trigger1;
commit;