Skip to content

Instantly share code, notes, and snippets.

@bradgignac
Created April 30, 2013 22:34
Show Gist options
  • Save bradgignac/5492474 to your computer and use it in GitHub Desktop.
Save bradgignac/5492474 to your computer and use it in GitHub Desktop.
Create Server with Cloud Networks
compute = Fog::Compute.new(:provider => 'Rackspace', :version => 'v2')
server = compute.servers.new
server.name = 'test-networks'
server.flavor_id = compute.flavors.first.id
server.image_id = compute.images.first.id
server.save(:networks => [compute.networks.first.id])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment