a little post-patch cleanup

This commit is contained in:
geemus 2010-08-17 08:45:18 -07:00
parent f0a02ed4bc
commit efdf19fb07
3 changed files with 4 additions and 13 deletions

View File

@ -1,14 +1,5 @@
http://geemus.com/fog.png
= VIRTUAL PRIVATE CLOUD ON AMAZON:
This version of fog has been modified to support Amazon's virtual private cloud. It is based on v0.2.22 (which was available at the time). It should be regarded as experimental. We have made a pull request to the fog maintainers. This patch was uploaded to Github on 17 August 2010.
= CHANGES FOR VPC COMPATIBILITY:
* Introduction of a subnet parameter (to define which subnet_id the virtual private instance will run on)
* Remove security groups from the EC2 API request when there is a subnet_id present
fog is the Ruby cloud computing library.
The quick and dirty, top to bottom:

View File

@ -58,7 +58,7 @@ module Fog
end
# def security_group
# connection.security_groups.all(@group_id)
# connection.security_groups.all(@group_id)
# end
#
# def security_group=(new_security_group)
@ -129,7 +129,7 @@ module Fog
'UserData' => @user_data
}
# If subnet is defined we are working on a virtual private cloud
# If subnet is defined we are working on a virtual private cloud.
# subnet & security group cannot co-exist. I wish VPC just ignored
# the security group parameter instead, it would be much easier!
if subnet_id.blank?

View File

@ -26,7 +26,7 @@ module Fog
# * 'Ebs.SnapshotId'<~String> - id of snapshot to boot volume from
# * 'Ebs.VolumeSize'<~String> - size of volume in GiBs required unless snapshot is specified
# * 'Ebs.DeleteOnTermination'<~String> - specifies whether or not to delete the volume on instance termination
# * 'SecurityGroup'<~Array> or <~String> - Name of security group(s) for instances
# * 'SecurityGroup'<~Array> or <~String> - Name of security group(s) for instances (you must omit this parameter if using Virtual Private Clouds)
# * 'InstanceInitiatedShutdownBehaviour'<~String> - specifies whether volumes are stopped or terminated when instance is shutdown
# * 'InstanceType'<~String> - Type of instance to boot. Valid options
# in ['m1.small', 'm1.large', 'm1.xlarge', 'c1.medium', 'c1.xlarge', 'm2.2xlarge', 'm2.4xlarge']
@ -86,7 +86,7 @@ module Fog
end
end
end
if security_groups = [*options.delete('SecurityGroup')] # cannot use Security Groups on Virtual Private Clouds
if security_groups = [*options.delete('SecurityGroup')]
options.merge!(AWS.indexed_param('SecurityGroup', security_groups))
end
if options['UserData']