Skip to content

Instantly share code, notes, and snippets.

@makyo
Created May 10, 2014 19:38
Show Gist options
  • Save makyo/9dc0503658b439d1ed7e to your computer and use it in GitHub Desktop.
Save makyo/9dc0503658b439d1ed7e to your computer and use it in GitHub Desktop.
ecs = app.env.get('ecs');
cb = function() { console.log(arguments); };
app.env.addMachines([{}], cb);
ecs.changeSet; // note the unique ID of the addMachines entry
app.env.addMachines([{containerType: 'lxc', parentId: 'addMachines-XXX'}], cb); // Replace XXX with the ID above
ecs.commit(app.env);
app.db.machines.size(); // should be 2
app.db.machines.item(1).id; // should be 0/lxc/0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment