Permalink
Browse files

Merge pull request #136 from BeachheadStudio/master

Basic support for VPC (Virtual Private Cloud)
  • Loading branch information...
Nathaniel Eliot
Nathaniel Eliot committed May 23, 2012
2 parents 52de388 + 6dc276b commit a8e8320c257fc8090c52a93c2e84c6ed817007f4
Showing with 12 additions and 3 deletions.
  1. +0 −1 ironfan.gemspec
  2. +10 −2 lib/ironfan/cloud.rb
  3. +2 −0 lib/ironfan/fog_layer.rb
View
@@ -70,7 +70,6 @@ Gem::Specification.new do |s|
"lib/ironfan/server.rb",
"lib/ironfan/server_slice.rb",
"lib/ironfan/volume.rb",
- "notes/Backup of ec2-pricing_and_capacity.numbers",
"notes/Home.md",
"notes/INSTALL-cloud_setup.md",
"notes/INSTALL.md",
View
@@ -123,8 +123,8 @@ class Ec2 < Base
:region, :availability_zones, :backing,
:spot_price, :spot_price_fraction,
:user_data, :security_groups,
- :monitoring,
- :placement_group
+ :monitoring, :placement_group,
+ :vpc, :subnet
)
def initialize(*args)
@@ -236,6 +236,14 @@ def list_images
end
end
+ def vpc(val=nil)
+ set :vpc, val
+ end
+
+ def subnet(val=nil)
+ set :subnet, val
+ end
+
def flavor(val=nil)
if val && (not FLAVOR_INFO.has_key?(val.to_s))
ui.warn("Unknown machine image flavor '#{val}'")
View
@@ -27,6 +27,8 @@ def fog_launch_description
description = {
:image_id => cloud.image_id,
:flavor_id => cloud.flavor,
+ :vpc_id => cloud.vpc,
+ :subnet_id => cloud.subnet,
:groups => cloud.security_groups.keys,
:key_name => cloud.keypair.to_s,
# Fog does not actually create tags when it creates a server.

0 comments on commit a8e8320

Please sign in to comment.