fog 0.1.8 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +2 -2
- data/Gemfile.lock +5 -5
- data/README.rdoc +29 -29
- data/fog.gemspec +24 -2
- data/lib/fog.rb +4 -15
- data/lib/fog/aws.rb +2 -2
- data/lib/fog/aws/ec2.rb +64 -101
- data/lib/fog/aws/elb.rb +19 -27
- data/lib/fog/aws/models/ec2/addresses.rb +1 -9
- data/lib/fog/aws/models/ec2/flavors.rb +1 -7
- data/lib/fog/aws/models/ec2/images.rb +1 -7
- data/lib/fog/aws/models/ec2/key_pairs.rb +1 -7
- data/lib/fog/aws/models/ec2/security_groups.rb +1 -7
- data/lib/fog/aws/models/ec2/servers.rb +1 -7
- data/lib/fog/aws/models/ec2/snapshots.rb +1 -9
- data/lib/fog/aws/models/ec2/volumes.rb +1 -9
- data/lib/fog/aws/models/s3/directories.rb +1 -7
- data/lib/fog/aws/models/s3/file.rb +5 -0
- data/lib/fog/aws/requests/ec2/allocate_address.rb +2 -0
- data/lib/fog/aws/requests/ec2/attach_volume.rb +2 -0
- data/lib/fog/aws/requests/ec2/create_key_pair.rb +2 -0
- data/lib/fog/aws/requests/ec2/create_snapshot.rb +2 -0
- data/lib/fog/aws/requests/ec2/create_volume.rb +2 -0
- data/lib/fog/aws/requests/ec2/describe_addresses.rb +2 -0
- data/lib/fog/aws/requests/ec2/describe_availability_zones.rb +2 -0
- data/lib/fog/aws/requests/ec2/describe_images.rb +2 -0
- data/lib/fog/aws/requests/ec2/describe_instances.rb +2 -0
- data/lib/fog/aws/requests/ec2/describe_key_pairs.rb +2 -0
- data/lib/fog/aws/requests/ec2/describe_regions.rb +2 -0
- data/lib/fog/aws/requests/ec2/describe_reserved_instances.rb +2 -0
- data/lib/fog/aws/requests/ec2/describe_security_groups.rb +2 -0
- data/lib/fog/aws/requests/ec2/describe_snapshots.rb +2 -0
- data/lib/fog/aws/requests/ec2/describe_volumes.rb +2 -0
- data/lib/fog/aws/requests/ec2/detach_volume.rb +2 -0
- data/lib/fog/aws/requests/ec2/get_console_output.rb +2 -0
- data/lib/fog/aws/requests/ec2/run_instances.rb +2 -0
- data/lib/fog/aws/requests/ec2/terminate_instances.rb +2 -0
- data/lib/fog/aws/requests/elb/create_load_balancer.rb +2 -0
- data/lib/fog/aws/requests/elb/delete_load_balancer.rb +2 -0
- data/lib/fog/aws/requests/elb/deregister_instances_from_load_balancer.rb +2 -0
- data/lib/fog/aws/requests/elb/describe_instance_health.rb +2 -0
- data/lib/fog/aws/requests/elb/describe_load_balancers.rb +2 -0
- data/lib/fog/aws/requests/elb/disable_availability_zones_for_load_balancer.rb +2 -0
- data/lib/fog/aws/requests/elb/enable_availability_zones_for_load_balancer.rb +2 -0
- data/lib/fog/aws/requests/elb/register_instances_with_load_balancer.rb +2 -0
- data/lib/fog/aws/requests/s3/copy_object.rb +2 -0
- data/lib/fog/aws/requests/s3/get_bucket.rb +2 -0
- data/lib/fog/aws/requests/s3/get_bucket_acl.rb +2 -0
- data/lib/fog/aws/requests/s3/get_bucket_location.rb +2 -0
- data/lib/fog/aws/requests/s3/get_bucket_logging.rb +2 -0
- data/lib/fog/aws/requests/s3/get_bucket_object_versions.rb +2 -0
- data/lib/fog/aws/requests/s3/get_bucket_versioning.rb +2 -0
- data/lib/fog/aws/requests/s3/get_object_acl.rb +2 -0
- data/lib/fog/aws/requests/s3/get_request_payment.rb +2 -0
- data/lib/fog/aws/requests/s3/get_service.rb +2 -0
- data/lib/fog/aws/requests/s3/put_object.rb +2 -2
- data/lib/fog/aws/requests/simpledb/domain_metadata.rb +2 -0
- data/lib/fog/aws/requests/simpledb/get_attributes.rb +2 -0
- data/lib/fog/aws/requests/simpledb/list_domains.rb +2 -0
- data/lib/fog/aws/requests/simpledb/select.rb +2 -0
- data/lib/fog/aws/s3.rb +68 -85
- data/lib/fog/aws/simpledb.rb +15 -29
- data/lib/fog/bluebox.rb +23 -40
- data/lib/fog/bluebox/models/flavors.rb +1 -7
- data/lib/fog/bluebox/models/images.rb +1 -9
- data/lib/fog/bluebox/models/servers.rb +1 -7
- data/lib/fog/credentials.rb +2 -0
- data/lib/fog/errors.rb +20 -0
- data/lib/fog/hmac.rb +48 -0
- data/lib/fog/local.rb +9 -22
- data/lib/fog/local/models/directories.rb +1 -7
- data/lib/fog/rackspace.rb +2 -6
- data/lib/fog/rackspace/files.rb +46 -48
- data/lib/fog/rackspace/models/files/directories.rb +1 -7
- data/lib/fog/rackspace/models/servers/flavors.rb +1 -7
- data/lib/fog/rackspace/models/servers/images.rb +1 -9
- data/lib/fog/rackspace/models/servers/server.rb +37 -1
- data/lib/fog/rackspace/models/servers/servers.rb +8 -7
- data/lib/fog/rackspace/requests/files/put_object.rb +1 -1
- data/lib/fog/rackspace/servers.rb +33 -45
- data/lib/fog/service.rb +82 -0
- data/lib/fog/slicehost.rb +28 -42
- data/lib/fog/slicehost/models/flavors.rb +1 -7
- data/lib/fog/slicehost/models/images.rb +1 -9
- data/lib/fog/slicehost/models/servers.rb +1 -7
- data/lib/fog/ssh.rb +1 -1
- data/lib/fog/vcloud.rb +20 -3
- data/lib/fog/vcloud/collection.rb +25 -5
- data/lib/fog/vcloud/model.rb +4 -0
- data/lib/fog/vcloud/parsers/get_organization.rb +2 -2
- data/lib/fog/vcloud/parsers/get_vdc.rb +2 -2
- data/lib/fog/vcloud/parsers/get_versions.rb +1 -1
- data/lib/fog/vcloud/parsers/login.rb +2 -2
- data/lib/fog/vcloud/parsers/network.rb +53 -0
- data/lib/fog/vcloud/requests/get_network.rb +54 -0
- data/lib/fog/vcloud/requests/get_organization.rb +1 -2
- data/lib/fog/vcloud/terremark/ecloud.rb +17 -4
- data/lib/fog/vcloud/terremark/ecloud/models/internet_service.rb +35 -0
- data/lib/fog/vcloud/terremark/ecloud/models/internet_services.rb +9 -9
- data/lib/fog/vcloud/terremark/ecloud/models/ip.rb +18 -0
- data/lib/fog/vcloud/terremark/ecloud/models/ips.rb +36 -0
- data/lib/fog/vcloud/terremark/ecloud/models/network.rb +32 -0
- data/lib/fog/vcloud/terremark/ecloud/models/networks.rb +38 -0
- data/lib/fog/vcloud/terremark/ecloud/models/public_ip.rb +3 -1
- data/lib/fog/vcloud/terremark/ecloud/models/public_ips.rb +1 -1
- data/lib/fog/vcloud/terremark/ecloud/models/vdc.rb +9 -0
- data/lib/fog/vcloud/terremark/ecloud/models/vdcs.rb +2 -0
- data/lib/fog/vcloud/terremark/ecloud/parsers/network.rb +28 -0
- data/lib/fog/vcloud/terremark/ecloud/parsers/network_ips.rb +31 -0
- data/lib/fog/vcloud/terremark/ecloud/requests/add_internet_service.rb +10 -7
- data/lib/fog/vcloud/terremark/ecloud/requests/configure_internet_service.rb +99 -0
- data/lib/fog/vcloud/terremark/ecloud/requests/get_network.rb +54 -0
- data/lib/fog/vcloud/terremark/ecloud/requests/get_network_ips.rb +51 -0
- data/spec/aws/models/s3/file_spec.rb +15 -0
- data/spec/vcloud/requests/get_network_spec.rb +55 -0
- data/spec/vcloud/spec_helper.rb +1 -0
- data/spec/vcloud/terremark/ecloud/models/internet_service_spec.rb +15 -0
- data/spec/vcloud/terremark/ecloud/models/ip_spec.rb +35 -0
- data/spec/vcloud/terremark/ecloud/models/ips_spec.rb +28 -0
- data/spec/vcloud/terremark/ecloud/models/network_spec.rb +65 -0
- data/spec/vcloud/terremark/ecloud/models/networks_spec.rb +26 -0
- data/spec/vcloud/terremark/ecloud/models/public_ip_spec.rb +0 -2
- data/spec/vcloud/terremark/ecloud/requests/configure_internet_service_spec.rb +44 -0
- data/spec/vcloud/terremark/ecloud/requests/get_network_ips_spec.rb +54 -0
- data/spec/vcloud/terremark/ecloud/requests/get_network_spec.rb +63 -0
- data/tests/aws/requests/ec2/volume_tests.rb +2 -2
- data/tests/helper.rb +2 -0
- metadata +25 -3
data/lib/fog/aws/elb.rb
CHANGED
@@ -1,39 +1,31 @@
|
|
1
1
|
module Fog
|
2
2
|
module AWS
|
3
3
|
module ELB
|
4
|
+
extend Fog::Service
|
4
5
|
|
5
|
-
|
6
|
+
requires :aws_access_key_id, :aws_secret_access_key
|
6
7
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
require 'fog/aws/requests/elb/create_load_balancer'
|
17
|
-
require 'fog/aws/requests/elb/delete_load_balancer'
|
18
|
-
require 'fog/aws/requests/elb/deregister_instances_from_load_balancer'
|
19
|
-
require 'fog/aws/requests/elb/describe_instance_health'
|
20
|
-
require 'fog/aws/requests/elb/describe_load_balancers'
|
21
|
-
require 'fog/aws/requests/elb/disable_availability_zones_for_load_balancer'
|
22
|
-
require 'fog/aws/requests/elb/enable_availability_zones_for_load_balancer'
|
23
|
-
require 'fog/aws/requests/elb/register_instances_with_load_balancer'
|
24
|
-
@required = true
|
25
|
-
end
|
8
|
+
request_path 'fog/aws/requests/elb'
|
9
|
+
request 'create_load_balancer'
|
10
|
+
request 'delete_load_balancer'
|
11
|
+
request 'deregister_instances_from_load_balancer'
|
12
|
+
request 'describe_instance_health'
|
13
|
+
request 'describe_load_balancers'
|
14
|
+
request 'disable_availability_zones_for_load_balancer'
|
15
|
+
request 'enable_availability_zones_for_load_balancer'
|
16
|
+
request 'register_instances_with_load_balancer'
|
26
17
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
18
|
+
class Mock
|
19
|
+
include Collections
|
20
|
+
|
21
|
+
def initialize(options={})
|
22
|
+
Fog::Mock.not_implemented
|
32
23
|
end
|
33
|
-
|
24
|
+
|
34
25
|
end
|
35
26
|
|
36
27
|
class Real
|
28
|
+
include Collections
|
37
29
|
|
38
30
|
# Initialize connection to ELB
|
39
31
|
#
|
@@ -56,7 +48,7 @@ module Fog
|
|
56
48
|
def initialize(options={})
|
57
49
|
@aws_access_key_id = options[:aws_access_key_id]
|
58
50
|
@aws_secret_access_key = options[:aws_secret_access_key]
|
59
|
-
@hmac = HMAC
|
51
|
+
@hmac = Fog::HMAC.new('sha256', @aws_secret_access_key)
|
60
52
|
@host = options[:host] || case options[:region]
|
61
53
|
when 'ap-southeast-1'
|
62
54
|
'elasticloadbalancing.ap-southeast-1.amazonaws.com'
|
@@ -5,15 +5,7 @@ module Fog
|
|
5
5
|
module AWS
|
6
6
|
module EC2
|
7
7
|
|
8
|
-
|
9
|
-
def addresses(attributes = {})
|
10
|
-
Fog::AWS::EC2::Addresses.new({
|
11
|
-
:connection => self
|
12
|
-
}.merge!(attributes))
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
class Real
|
8
|
+
module Collections
|
17
9
|
def addresses(attributes = {})
|
18
10
|
Fog::AWS::EC2::Addresses.new({
|
19
11
|
:connection => self
|
@@ -5,13 +5,7 @@ module Fog
|
|
5
5
|
module AWS
|
6
6
|
module EC2
|
7
7
|
|
8
|
-
|
9
|
-
def security_groups
|
10
|
-
Fog::AWS::EC2::SecurityGroups.new(:connection => self)
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
class Real
|
8
|
+
module Collections
|
15
9
|
def security_groups
|
16
10
|
Fog::AWS::EC2::SecurityGroups.new(:connection => self)
|
17
11
|
end
|
@@ -5,15 +5,7 @@ module Fog
|
|
5
5
|
module AWS
|
6
6
|
module EC2
|
7
7
|
|
8
|
-
|
9
|
-
def snapshots(attributes = {})
|
10
|
-
Fog::AWS::EC2::Snapshots.new({
|
11
|
-
:connection => self
|
12
|
-
}.merge!(attributes))
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
class Real
|
8
|
+
module Collections
|
17
9
|
def snapshots(attributes = {})
|
18
10
|
Fog::AWS::EC2::Snapshots.new({
|
19
11
|
:connection => self
|
@@ -5,15 +5,7 @@ module Fog
|
|
5
5
|
module AWS
|
6
6
|
module EC2
|
7
7
|
|
8
|
-
|
9
|
-
def volumes(attributes = {})
|
10
|
-
Fog::AWS::EC2::Volumes.new({
|
11
|
-
:connection => self
|
12
|
-
}.merge!(attributes))
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
class Real
|
8
|
+
module Collections
|
17
9
|
def volumes(attributes = {})
|
18
10
|
Fog::AWS::EC2::Volumes.new({
|
19
11
|
:connection => self
|
@@ -5,13 +5,7 @@ module Fog
|
|
5
5
|
module AWS
|
6
6
|
module S3
|
7
7
|
|
8
|
-
|
9
|
-
def directories
|
10
|
-
Fog::AWS::S3::Directories.new(:connection => self)
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
class Mock
|
8
|
+
module Collections
|
15
9
|
def directories
|
16
10
|
Fog::AWS::S3::Directories.new(:connection => self)
|
17
11
|
end
|