Skip to content

Commit

Permalink
vm changeowner
Browse files Browse the repository at this point in the history
  • Loading branch information
apocas committed Jul 18, 2013
1 parent dd58405 commit 967ba08
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions lib/onapp/virtualmachine.js
Expand Up @@ -42,6 +42,19 @@ VirtualMachine.prototype.off = function(callback) {
});
};

VirtualMachine.prototype.changeOwner = function(userid, callback) {
var createOptions = {
method: 'POST',
uri: 'virtual_machines/' + this.identifier + '/change_owner.json',
client: this.client,
body: {'user_id': userid}
};

utils.modem(createOptions, callback, function(body, response) {
callback(null, JSON.parse(body));
});
};

VirtualMachine.prototype.reboot = function(callback) {
var createOptions = {
method: 'POST',
Expand Down

0 comments on commit 967ba08

Please sign in to comment.