Skip to content

Instantly share code, notes, and snippets.

/gist:cd9c307b94ec827340f5 Secret
Created Apr 14, 2013

Embed
What would you like to do?
var serverId = '343jkjljk-eea4-4d75-842b-jhjsahf89834'; // Your server ID here
client.getServer(serverId, function(err, server) {
if (err) {
console.log(err);
}
//console.log(server)
client.createImage({ serverId: server}, function(err, image) {
// if not err, you can create your new server here:
if(!err){
console.log('No error detected, creating...');
console.log('image.id:',image.id);
client.createServer({
imageRef: image.id, flavor: 3 , name:'some descrip', keyname: 'myKeyName'
})
}else{
console.log(err)
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.