fog-aws 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/fog/aws.rb +205 -28
- data/lib/fog/aws/auto_scaling.rb +0 -2
- data/lib/fog/aws/beanstalk.rb +0 -2
- data/lib/fog/aws/cdn.rb +0 -2
- data/lib/fog/aws/cloud_formation.rb +0 -2
- data/lib/fog/aws/cloud_watch.rb +0 -2
- data/lib/fog/aws/compute.rb +0 -2
- data/lib/fog/aws/credential_fetcher.rb +0 -2
- data/lib/fog/aws/data_pipeline.rb +0 -2
- data/lib/fog/aws/dns.rb +0 -2
- data/lib/fog/aws/dynamodb.rb +0 -2
- data/lib/fog/aws/elasticache.rb +0 -2
- data/lib/fog/aws/elb.rb +0 -2
- data/lib/fog/aws/emr.rb +0 -2
- data/lib/fog/aws/errors.rb +14 -0
- data/lib/fog/aws/federation.rb +0 -2
- data/lib/fog/aws/glacier.rb +0 -2
- data/lib/fog/aws/iam.rb +0 -2
- data/lib/fog/aws/mock.rb +170 -0
- data/lib/fog/aws/models/auto_scaling/activity.rb +0 -2
- data/lib/fog/aws/models/auto_scaling/configuration.rb +0 -2
- data/lib/fog/aws/models/auto_scaling/group.rb +0 -2
- data/lib/fog/aws/models/auto_scaling/instance.rb +0 -2
- data/lib/fog/aws/models/auto_scaling/policy.rb +0 -2
- data/lib/fog/aws/models/beanstalk/application.rb +0 -2
- data/lib/fog/aws/models/beanstalk/applications.rb +0 -1
- data/lib/fog/aws/models/beanstalk/environment.rb +0 -2
- data/lib/fog/aws/models/beanstalk/environments.rb +0 -1
- data/lib/fog/aws/models/beanstalk/event.rb +0 -2
- data/lib/fog/aws/models/beanstalk/events.rb +0 -1
- data/lib/fog/aws/models/beanstalk/template.rb +0 -2
- data/lib/fog/aws/models/beanstalk/templates.rb +0 -1
- data/lib/fog/aws/models/beanstalk/version.rb +0 -2
- data/lib/fog/aws/models/beanstalk/versions.rb +0 -1
- data/lib/fog/aws/models/cdn/distribution.rb +0 -1
- data/lib/fog/aws/models/cdn/distribution_helper.rb +0 -2
- data/lib/fog/aws/models/cdn/distributions.rb +0 -1
- data/lib/fog/aws/models/cdn/distributions_helper.rb +0 -2
- data/lib/fog/aws/models/cdn/invalidation.rb +0 -2
- data/lib/fog/aws/models/cdn/invalidations.rb +0 -1
- data/lib/fog/aws/models/cdn/streaming_distribution.rb +0 -1
- data/lib/fog/aws/models/cdn/streaming_distributions.rb +0 -1
- data/lib/fog/aws/models/cloud_watch/alarm.rb +0 -2
- data/lib/fog/aws/models/cloud_watch/alarm_data.rb +0 -1
- data/lib/fog/aws/models/cloud_watch/alarm_datum.rb +0 -2
- data/lib/fog/aws/models/cloud_watch/alarm_histories.rb +0 -1
- data/lib/fog/aws/models/cloud_watch/alarm_history.rb +0 -2
- data/lib/fog/aws/models/cloud_watch/alarms.rb +0 -1
- data/lib/fog/aws/models/cloud_watch/metric.rb +0 -2
- data/lib/fog/aws/models/cloud_watch/metric_statistic.rb +0 -2
- data/lib/fog/aws/models/cloud_watch/metric_statistics.rb +0 -1
- data/lib/fog/aws/models/cloud_watch/metrics.rb +0 -1
- data/lib/fog/aws/models/compute/address.rb +0 -2
- data/lib/fog/aws/models/compute/addresses.rb +0 -1
- data/lib/fog/aws/models/compute/dhcp_option.rb +0 -2
- data/lib/fog/aws/models/compute/dhcp_options.rb +0 -1
- data/lib/fog/aws/models/compute/flavor.rb +0 -2
- data/lib/fog/aws/models/compute/flavors.rb +0 -1
- data/lib/fog/aws/models/compute/image.rb +0 -2
- data/lib/fog/aws/models/compute/images.rb +0 -1
- data/lib/fog/aws/models/compute/internet_gateway.rb +0 -2
- data/lib/fog/aws/models/compute/internet_gateways.rb +0 -1
- data/lib/fog/aws/models/compute/key_pair.rb +0 -2
- data/lib/fog/aws/models/compute/key_pairs.rb +0 -1
- data/lib/fog/aws/models/compute/network_acl.rb +0 -2
- data/lib/fog/aws/models/compute/network_acls.rb +0 -1
- data/lib/fog/aws/models/compute/network_interface.rb +0 -2
- data/lib/fog/aws/models/compute/network_interfaces.rb +0 -1
- data/lib/fog/aws/models/compute/route_table.rb +0 -2
- data/lib/fog/aws/models/compute/route_tables.rb +0 -1
- data/lib/fog/aws/models/compute/security_group.rb +0 -2
- data/lib/fog/aws/models/compute/security_groups.rb +0 -1
- data/lib/fog/aws/models/compute/servers.rb +1 -2
- data/lib/fog/aws/models/compute/snapshot.rb +0 -2
- data/lib/fog/aws/models/compute/snapshots.rb +0 -1
- data/lib/fog/aws/models/compute/spot_requests.rb +0 -1
- data/lib/fog/aws/models/compute/subnet.rb +0 -2
- data/lib/fog/aws/models/compute/subnets.rb +0 -1
- data/lib/fog/aws/models/compute/tag.rb +0 -2
- data/lib/fog/aws/models/compute/tags.rb +0 -1
- data/lib/fog/aws/models/compute/volume.rb +0 -2
- data/lib/fog/aws/models/compute/volumes.rb +0 -1
- data/lib/fog/aws/models/compute/vpc.rb +0 -2
- data/lib/fog/aws/models/compute/vpcs.rb +0 -1
- data/lib/fog/aws/models/data_pipeline/pipeline.rb +0 -2
- data/lib/fog/aws/models/data_pipeline/pipelines.rb +0 -1
- data/lib/fog/aws/models/dns/record.rb +0 -2
- data/lib/fog/aws/models/dns/records.rb +0 -1
- data/lib/fog/aws/models/dns/zone.rb +0 -1
- data/lib/fog/aws/models/dns/zones.rb +0 -1
- data/lib/fog/aws/models/elasticache/cluster.rb +0 -2
- data/lib/fog/aws/models/elasticache/clusters.rb +0 -1
- data/lib/fog/aws/models/elasticache/parameter_group.rb +0 -2
- data/lib/fog/aws/models/elasticache/parameter_groups.rb +0 -1
- data/lib/fog/aws/models/elasticache/security_group.rb +0 -2
- data/lib/fog/aws/models/elasticache/security_groups.rb +0 -1
- data/lib/fog/aws/models/elasticache/subnet_group.rb +0 -2
- data/lib/fog/aws/models/elasticache/subnet_groups.rb +0 -1
- data/lib/fog/aws/models/elb/backend_server_description.rb +0 -1
- data/lib/fog/aws/models/elb/listener.rb +0 -1
- data/lib/fog/aws/models/elb/load_balancer.rb +0 -1
- data/lib/fog/aws/models/elb/policy.rb +0 -1
- data/lib/fog/aws/models/glacier/archive.rb +0 -2
- data/lib/fog/aws/models/glacier/archives.rb +0 -1
- data/lib/fog/aws/models/glacier/job.rb +0 -2
- data/lib/fog/aws/models/glacier/jobs.rb +0 -1
- data/lib/fog/aws/models/glacier/vault.rb +0 -1
- data/lib/fog/aws/models/glacier/vaults.rb +0 -1
- data/lib/fog/aws/models/iam/access_key.rb +0 -2
- data/lib/fog/aws/models/iam/access_keys.rb +0 -1
- data/lib/fog/aws/models/iam/policies.rb +0 -1
- data/lib/fog/aws/models/iam/policy.rb +0 -2
- data/lib/fog/aws/models/iam/role.rb +0 -2
- data/lib/fog/aws/models/iam/roles.rb +0 -1
- data/lib/fog/aws/models/iam/user.rb +0 -2
- data/lib/fog/aws/models/iam/users.rb +0 -1
- data/lib/fog/aws/models/rds/event_subscription.rb +0 -2
- data/lib/fog/aws/models/rds/event_subscriptions.rb +0 -1
- data/lib/fog/aws/models/rds/instance_option.rb +0 -2
- data/lib/fog/aws/models/rds/instance_options.rb +0 -1
- data/lib/fog/aws/models/rds/log_file.rb +0 -2
- data/lib/fog/aws/models/rds/log_files.rb +0 -1
- data/lib/fog/aws/models/rds/parameter.rb +0 -2
- data/lib/fog/aws/models/rds/parameter_group.rb +0 -2
- data/lib/fog/aws/models/rds/parameter_groups.rb +0 -1
- data/lib/fog/aws/models/rds/parameters.rb +0 -1
- data/lib/fog/aws/models/rds/security_group.rb +0 -3
- data/lib/fog/aws/models/rds/security_groups.rb +0 -1
- data/lib/fog/aws/models/rds/server.rb +0 -2
- data/lib/fog/aws/models/rds/servers.rb +0 -1
- data/lib/fog/aws/models/rds/snapshot.rb +0 -2
- data/lib/fog/aws/models/rds/snapshots.rb +0 -1
- data/lib/fog/aws/models/rds/subnet_group.rb +0 -2
- data/lib/fog/aws/models/rds/subnet_groups.rb +0 -1
- data/lib/fog/aws/models/sns/subscriptions.rb +0 -1
- data/lib/fog/aws/models/sns/topic.rb +0 -2
- data/lib/fog/aws/models/sns/topics.rb +0 -1
- data/lib/fog/aws/models/storage/directories.rb +0 -1
- data/lib/fog/aws/models/storage/directory.rb +0 -1
- data/lib/fog/aws/models/storage/file.rb +8 -5
- data/lib/fog/aws/models/storage/files.rb +0 -1
- data/lib/fog/aws/models/storage/version.rb +0 -2
- data/lib/fog/aws/models/storage/versions.rb +0 -1
- data/lib/fog/aws/parsers/compute/associate_route_table.rb +0 -0
- data/lib/fog/aws/parsers/compute/create_route_table.rb +0 -0
- data/lib/fog/aws/parsers/compute/describe_route_tables.rb +0 -0
- data/lib/fog/aws/parsers/compute/describe_spot_price_history.rb +1 -1
- data/lib/fog/aws/rds.rb +16 -2
- data/lib/fog/aws/redshift.rb +0 -2
- data/lib/fog/aws/requests/compute/associate_route_table.rb +0 -0
- data/lib/fog/aws/requests/compute/create_route.rb +0 -0
- data/lib/fog/aws/requests/compute/create_route_table.rb +0 -0
- data/lib/fog/aws/requests/compute/delete_route.rb +0 -0
- data/lib/fog/aws/requests/compute/delete_route_table.rb +0 -0
- data/lib/fog/aws/requests/compute/describe_availability_zones.rb +3 -0
- data/lib/fog/aws/requests/compute/describe_route_tables.rb +0 -0
- data/lib/fog/aws/requests/compute/describe_spot_price_history.rb +27 -1
- data/lib/fog/aws/requests/compute/disassociate_route_table.rb +0 -0
- data/lib/fog/aws/requests/compute/replace_route.rb +0 -0
- data/lib/fog/aws/requests/dns/change_resource_record_sets.rb +3 -2
- data/lib/fog/aws/requests/rds/create_db_snapshot.rb +1 -0
- data/lib/fog/aws/requests/rds/delete_db_instance.rb +20 -14
- data/lib/fog/aws/requests/rds/describe_db_engine_versions.rb +8 -1
- data/lib/fog/aws/requests/rds/describe_db_instances.rb +2 -3
- data/lib/fog/aws/requests/storage/post_object_hidden_fields.rb +9 -3
- data/lib/fog/aws/ses.rb +0 -2
- data/lib/fog/aws/signaturev4.rb +2 -3
- data/lib/fog/aws/simpledb.rb +0 -2
- data/lib/fog/aws/sns.rb +0 -2
- data/lib/fog/aws/sqs.rb +0 -2
- data/lib/fog/aws/storage.rb +27 -17
- data/lib/fog/aws/sts.rb +0 -2
- data/lib/fog/aws/version.rb +1 -1
- data/tests/models/rds/server_tests.rb +4 -3
- data/tests/requests/compute/spot_price_history_tests.rb +2 -1
- data/tests/requests/dns/change_resource_record_sets_tests.rb +10 -0
- data/tests/requests/rds/db_engine_versions.rb +7 -0
- data/tests/requests/rds/helper.rb +14 -0
- metadata +6 -5
- data/lib/fog/aws/core.rb +0 -344
- data/lib/fog/aws/parsers/.DS_Store +0 -0
- data/lib/fog/aws/requests/.DS_Store +0 -0
|
File without changes
|
|
@@ -8,6 +8,14 @@ module Fog
|
|
|
8
8
|
#
|
|
9
9
|
# ==== Parameters
|
|
10
10
|
# * filters<~Hash> - List of filters to limit results with
|
|
11
|
+
# * filters and/or the following
|
|
12
|
+
# * 'AvailabilityZone'<~String> - availability zone of offering
|
|
13
|
+
# * 'InstanceType'<~Array> - instance types of offering
|
|
14
|
+
# * 'ProductDescription'<~Array> - basic product descriptions
|
|
15
|
+
# * 'StartTime'<~Time> - The date and time, up to the past 90 days, from which to start retrieving the price history data
|
|
16
|
+
# * 'EndTime'<~Time> - The date and time, up to the current date, from which to stop retrieving the price history data
|
|
17
|
+
# * 'MaxResults'<~Integer> - The maximum number of results to return for the request in a single page
|
|
18
|
+
# * 'NextToken'<~String> - The token to retrieve the next page of results
|
|
11
19
|
#
|
|
12
20
|
# ==== Returns
|
|
13
21
|
# * response<~Excon::Response>:
|
|
@@ -19,10 +27,28 @@ module Fog
|
|
|
19
27
|
# * 'productDescription'<~String> - general description of AMI
|
|
20
28
|
# * 'spotPrice'<~Float> - maximum price to launch one or more instances
|
|
21
29
|
# * 'timestamp'<~Time> - date and time of request creation
|
|
30
|
+
# * 'nextToken'<~String> - token to retrieve the next page of results
|
|
22
31
|
#
|
|
23
32
|
# {Amazon API Reference}[http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeSpotPriceHistory.html]
|
|
24
33
|
def describe_spot_price_history(filters = {})
|
|
25
|
-
params =
|
|
34
|
+
params = {}
|
|
35
|
+
|
|
36
|
+
for key in %w(AvailabilityZone StartTime EndTime MaxResults NextToken)
|
|
37
|
+
if filters.is_a?(Hash) && filters.key?(key)
|
|
38
|
+
params[key] = filters.delete(key)
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
if instance_types = filters.delete('InstanceType')
|
|
43
|
+
params.merge!(Fog::AWS.indexed_param('InstanceType', [*instance_types]))
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
if product_descriptions = filters.delete('ProductDescription')
|
|
47
|
+
params.merge!(Fog::AWS.indexed_param('ProductDescription', [*product_descriptions]))
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
params.merge!(Fog::AWS.indexed_filters(filters))
|
|
51
|
+
|
|
26
52
|
request({
|
|
27
53
|
'Action' => 'DescribeSpotPriceHistory',
|
|
28
54
|
:idempotent => true,
|
|
File without changes
|
|
File without changes
|
|
@@ -222,9 +222,9 @@ module Fog
|
|
|
222
222
|
end
|
|
223
223
|
|
|
224
224
|
def self.hosted_zone_for_alias_target(dns_name)
|
|
225
|
-
elb_hosted_zone_mapping.select { |k, _|
|
|
225
|
+
Hash[elb_hosted_zone_mapping.select { |k, _|
|
|
226
226
|
dns_name =~ /\A.+\.#{k}\.elb\.amazonaws\.com\.?\z/
|
|
227
|
-
}.last
|
|
227
|
+
}].values.last
|
|
228
228
|
end
|
|
229
229
|
|
|
230
230
|
def self.elb_hosted_zone_mapping
|
|
@@ -233,6 +233,7 @@ module Fog
|
|
|
233
233
|
"ap-southeast-1" => "Z1WI8VXHPB1R38",
|
|
234
234
|
"ap-southeast-2" => "Z2999QAZ9SRTIC",
|
|
235
235
|
"eu-west-1" => "Z3NF1Z3NOM5OY2",
|
|
236
|
+
"eu-central-1" => "Z215JYRZR1TBD5",
|
|
236
237
|
"sa-east-1" => "Z2ES78Y61JGQKS",
|
|
237
238
|
"us-east-1" => "Z3DZXE0Q79N41H",
|
|
238
239
|
"us-west-1" => "Z1M58G0W56PQJA",
|
|
@@ -18,10 +18,10 @@ module Fog
|
|
|
18
18
|
params = {}
|
|
19
19
|
params['FinalDBSnapshotIdentifier'] = snapshot_identifier if snapshot_identifier
|
|
20
20
|
request({
|
|
21
|
-
'Action'
|
|
21
|
+
'Action' => 'DeleteDBInstance',
|
|
22
22
|
'DBInstanceIdentifier' => identifier,
|
|
23
|
-
'SkipFinalSnapshot'
|
|
24
|
-
:parser
|
|
23
|
+
'SkipFinalSnapshot' => skip_snapshot,
|
|
24
|
+
:parser => Fog::Parsers::AWS::RDS::DeleteDBInstance.new
|
|
25
25
|
}.merge(params))
|
|
26
26
|
end
|
|
27
27
|
end
|
|
@@ -30,20 +30,26 @@ module Fog
|
|
|
30
30
|
def delete_db_instance(identifier, snapshot_identifier, skip_snapshot = false)
|
|
31
31
|
response = Excon::Response.new
|
|
32
32
|
|
|
33
|
+
|
|
34
|
+
server_set = self.data[:servers][identifier] ||
|
|
35
|
+
raise(Fog::AWS::RDS::NotFound.new("DBInstance #{identifier} not found"))
|
|
36
|
+
|
|
33
37
|
unless skip_snapshot
|
|
34
|
-
|
|
38
|
+
if server_set["ReadReplicaSourceDBInstanceIdentifier"]
|
|
39
|
+
raise Fog::AWS::RDS::Error.new("InvalidParameterCombination => FinalDBSnapshotIdentifier can not be specified when deleting a replica instance")
|
|
40
|
+
else
|
|
41
|
+
create_db_snapshot(identifier, snapshot_identifier)
|
|
42
|
+
end
|
|
35
43
|
end
|
|
36
44
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
raise Fog::AWS::RDS::NotFound.new("DBInstance #{identifier} not found")
|
|
46
|
-
end
|
|
45
|
+
self.data[:servers].delete(identifier)
|
|
46
|
+
|
|
47
|
+
response.status = 200
|
|
48
|
+
response.body = {
|
|
49
|
+
"ResponseMetadata" => { "RequestId" => Fog::AWS::Mock.request_id },
|
|
50
|
+
"DeleteDBInstanceResult" => { "DBInstance" => server_set }
|
|
51
|
+
}
|
|
52
|
+
response
|
|
47
53
|
end
|
|
48
54
|
end
|
|
49
55
|
end
|
|
@@ -22,7 +22,14 @@ module Fog
|
|
|
22
22
|
|
|
23
23
|
class Mock
|
|
24
24
|
def describe_db_engine_versions(opts={})
|
|
25
|
-
|
|
25
|
+
response = Excon::Response.new
|
|
26
|
+
|
|
27
|
+
response.status = 200
|
|
28
|
+
response.body = {
|
|
29
|
+
"ResponseMetadata" => { "RequestId" => Fog::AWS::Mock.request_id },
|
|
30
|
+
"DescribeDBEngineVersionsResult" => { "DBEngineVersions" => self.data[:db_engine_versions] }
|
|
31
|
+
}
|
|
32
|
+
response
|
|
26
33
|
end
|
|
27
34
|
end
|
|
28
35
|
end
|
|
@@ -33,8 +33,8 @@ module Fog
|
|
|
33
33
|
response = Excon::Response.new
|
|
34
34
|
server_set = []
|
|
35
35
|
if identifier
|
|
36
|
-
if
|
|
37
|
-
server_set <<
|
|
36
|
+
if specified_server = self.data[:servers][identifier]
|
|
37
|
+
server_set << specified_server
|
|
38
38
|
else
|
|
39
39
|
raise Fog::AWS::RDS::NotFound.new("DBInstance #{identifier} not found")
|
|
40
40
|
end
|
|
@@ -46,7 +46,6 @@ module Fog
|
|
|
46
46
|
case server["DBInstanceStatus"]
|
|
47
47
|
when "creating"
|
|
48
48
|
if Time.now - server['InstanceCreateTime'] >= Fog::Mock.delay * 2
|
|
49
|
-
region = "us-east-1"
|
|
50
49
|
server["DBInstanceStatus"] = "available"
|
|
51
50
|
server["AvailabilityZone"] ||= region + 'a'
|
|
52
51
|
server["Endpoint"] = {"Port"=>3306,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
module Fog
|
|
2
2
|
module Storage
|
|
3
3
|
class AWS
|
|
4
|
-
|
|
4
|
+
module PostObjectHiddenFields
|
|
5
5
|
# Get a hash of hidden fields for form uploading to S3, in the form {:field_name => :field_value}
|
|
6
6
|
# Form should look like: <form action="http://#{bucket_name}.s3.amazonaws.com/" method="post" enctype="multipart/form-data">
|
|
7
7
|
# These hidden fields should then appear, followed by a field named 'file' which is either a textarea or file input.
|
|
@@ -42,13 +42,19 @@ module Fog
|
|
|
42
42
|
options['X-Amz-Date'] = date.to_iso8601_basic
|
|
43
43
|
options['X-Amz-Algorithm'] = Fog::AWS::SignatureV4::ALGORITHM
|
|
44
44
|
if @aws_session_token
|
|
45
|
-
options['X-Amz-Security-Token'] = @aws_session_token
|
|
45
|
+
options['X-Amz-Security-Token'] = @aws_session_token
|
|
46
46
|
end
|
|
47
47
|
options['X-Amz-Signature'] = @signer.derived_hmac(date).sign(options['policy']).unpack('H*').first
|
|
48
48
|
end
|
|
49
|
-
options
|
|
49
|
+
options
|
|
50
50
|
end
|
|
51
51
|
end
|
|
52
|
+
class Real
|
|
53
|
+
include PostObjectHiddenFields
|
|
54
|
+
end
|
|
55
|
+
class Mock
|
|
56
|
+
include PostObjectHiddenFields
|
|
57
|
+
end
|
|
52
58
|
end
|
|
53
59
|
end
|
|
54
60
|
end
|
data/lib/fog/aws/ses.rb
CHANGED
data/lib/fog/aws/signaturev4.rb
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
require 'fog/aws/core'
|
|
2
|
-
|
|
3
1
|
# See http://docs.amazonwebservices.com/general/latest/gr/signature-version-4.html
|
|
2
|
+
|
|
4
3
|
module Fog
|
|
5
4
|
module AWS
|
|
6
5
|
class SignatureV4
|
|
7
6
|
ALGORITHM = 'AWS4-HMAC-SHA256'
|
|
7
|
+
|
|
8
8
|
def initialize(aws_access_key_id, secret_key, region, service)
|
|
9
9
|
@region = region
|
|
10
10
|
@service = service
|
|
@@ -115,7 +115,6 @@ DATA
|
|
|
115
115
|
def signed_headers(headers)
|
|
116
116
|
headers.keys.map {|key| key.to_s.downcase}.sort.join(';')
|
|
117
117
|
end
|
|
118
|
-
|
|
119
118
|
end
|
|
120
119
|
end
|
|
121
120
|
end
|
data/lib/fog/aws/simpledb.rb
CHANGED
data/lib/fog/aws/sns.rb
CHANGED
data/lib/fog/aws/sqs.rb
CHANGED
data/lib/fog/aws/storage.rb
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
require 'fog/aws/core'
|
|
2
|
-
|
|
3
1
|
module Fog
|
|
4
2
|
module Storage
|
|
5
3
|
class AWS < Fog::Service
|
|
@@ -256,21 +254,25 @@ module Fog
|
|
|
256
254
|
if params[:bucket_name]
|
|
257
255
|
bucket_name = params[:bucket_name]
|
|
258
256
|
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
257
|
+
if params[:bucket_cname]
|
|
258
|
+
host = bucket_name
|
|
259
|
+
else
|
|
260
|
+
path_style = params.fetch(:path_style, @path_style)
|
|
261
|
+
if !path_style
|
|
262
|
+
if COMPLIANT_BUCKET_NAMES !~ bucket_name
|
|
263
|
+
Fog::Logger.warning("fog: the specified s3 bucket name(#{bucket_name}) is not a valid dns name, which will negatively impact performance. For details see: http://docs.amazonwebservices.com/AmazonS3/latest/dev/BucketRestrictions.html")
|
|
264
|
+
path_style = true
|
|
265
|
+
elsif scheme == 'https' && !path_style && bucket_name =~ /\./
|
|
266
|
+
Fog::Logger.warning("fog: the specified s3 bucket name(#{bucket_name}) contains a '.' so is not accessible over https as a virtual hosted bucket, which will negatively impact performance. For details see: http://docs.amazonwebservices.com/AmazonS3/latest/dev/BucketRestrictions.html")
|
|
267
|
+
path_style = true
|
|
268
|
+
end
|
|
267
269
|
end
|
|
268
|
-
end
|
|
269
270
|
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
271
|
+
if path_style
|
|
272
|
+
path = bucket_to_path bucket_name, path
|
|
273
|
+
else
|
|
274
|
+
host = [bucket_name, host].join('.')
|
|
275
|
+
end
|
|
274
276
|
end
|
|
275
277
|
end
|
|
276
278
|
|
|
@@ -532,6 +534,7 @@ module Fog
|
|
|
532
534
|
date = Fog::Time.now
|
|
533
535
|
|
|
534
536
|
params = params.dup
|
|
537
|
+
stringify_query_keys(params)
|
|
535
538
|
params[:headers] = (params[:headers] || {}).dup
|
|
536
539
|
|
|
537
540
|
params[:headers]['x-amz-security-token'] = @aws_session_token if @aws_session_token
|
|
@@ -556,9 +559,12 @@ module Fog
|
|
|
556
559
|
params[:headers]['x-amz-content-sha256'] = 'STREAMING-AWS4-HMAC-SHA256-PAYLOAD'
|
|
557
560
|
params[:headers]['x-amz-decoded-content-length'] = params[:headers].delete 'Content-Length'
|
|
558
561
|
|
|
559
|
-
|
|
562
|
+
if params[:headers]['Content-Encoding']
|
|
563
|
+
encoding = "aws-chunked, #{params[:headers]['Content-Encoding']}"
|
|
564
|
+
else
|
|
565
|
+
encoding = "aws-chunked, identity"
|
|
566
|
+
end
|
|
560
567
|
|
|
561
|
-
encoding += ", #{params[:headers]['Content-Encoding']}" if params[:headers]['Content-Encoding']
|
|
562
568
|
params[:headers]['Content-Encoding'] = encoding
|
|
563
569
|
else
|
|
564
570
|
params[:headers]['x-amz-content-sha256'] ||= Digest::SHA256.hexdigest(params[:body] || '')
|
|
@@ -729,6 +735,10 @@ DATA
|
|
|
729
735
|
signed_string = @hmac.sign(string_to_sign)
|
|
730
736
|
Base64.encode64(signed_string).chomp!
|
|
731
737
|
end
|
|
738
|
+
|
|
739
|
+
def stringify_query_keys(params)
|
|
740
|
+
params[:query] = Hash[params[:query].map { |k,v| [k.to_s, v] }] if params[:query]
|
|
741
|
+
end
|
|
732
742
|
end
|
|
733
743
|
end
|
|
734
744
|
end
|
data/lib/fog/aws/sts.rb
CHANGED
data/lib/fog/aws/version.rb
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
Shindo.tests("AWS::RDS | server", ['aws', 'rds']) do
|
|
2
|
-
# Disabled due to https://github.com/fog/fog/1546
|
|
3
|
-
pending
|
|
4
|
-
|
|
5
2
|
model_tests(Fog::AWS[:rds].servers, rds_default_server_params) do
|
|
6
3
|
# We'll need this later; create it early to avoid waiting
|
|
7
4
|
@instance_with_final_snapshot = Fog::AWS[:rds].servers.create(rds_default_server_params.merge(:id => uniq_id("fog-snapshot-test"), :backup_retention_period => 1))
|
|
@@ -89,6 +86,10 @@ Shindo.tests("AWS::RDS | server", ['aws', 'rds']) do
|
|
|
89
86
|
returns(@instance_with_final_snapshot.id) { replica.read_replica_source }
|
|
90
87
|
|
|
91
88
|
replica.wait_for { ready? }
|
|
89
|
+
|
|
90
|
+
# FinalDBSnapshotIdentifier can not be specified when deleting a replica instance
|
|
91
|
+
raises(Fog::AWS::RDS::Error) { replica.destroy("foobar") }
|
|
92
|
+
|
|
92
93
|
replica.destroy
|
|
93
94
|
end
|
|
94
95
|
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
Shindo.tests('Fog::DNS[:aws] | change_resource_record_sets', ['aws', 'dns']) do
|
|
2
|
+
@r53_connection = Fog::DNS[:aws]
|
|
3
|
+
|
|
4
|
+
tests('success') do
|
|
5
|
+
test('#elb_hosted_zone_mapping from DNS name') do
|
|
6
|
+
zone_id = Fog::DNS::AWS.hosted_zone_for_alias_target('arbitrary-sub-domain.eu-west-1.elb.amazonaws.com')
|
|
7
|
+
zone_id == Fog::DNS::AWS.elb_hosted_zone_mapping['eu-west-1']
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
end
|
|
@@ -291,6 +291,20 @@ class AWS
|
|
|
291
291
|
'EventSubscriptionsList' => [EVENT_SUBSCRIPTION]
|
|
292
292
|
}
|
|
293
293
|
}
|
|
294
|
+
|
|
295
|
+
DB_ENGINE_VERSION = {
|
|
296
|
+
'Engine' => String,
|
|
297
|
+
'DBParameterGroupFamily' => String,
|
|
298
|
+
'DBEngineDescription' => String,
|
|
299
|
+
'EngineVersion' => String,
|
|
300
|
+
'DBEngineVersionDescription' => String
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
DB_ENGINE_VERSIONS_LIST = BASIC.merge(
|
|
304
|
+
'DescribeDBEngineVersionsResult' => {
|
|
305
|
+
'DBEngineVersions' => [DB_ENGINE_VERSION]
|
|
306
|
+
}
|
|
307
|
+
)
|
|
294
308
|
end
|
|
295
309
|
end
|
|
296
310
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fog-aws
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Josh Lane
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2015-
|
|
12
|
+
date: 2015-04-07 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: bundler
|
|
@@ -137,7 +137,6 @@ files:
|
|
|
137
137
|
- lib/fog/aws/cloud_formation.rb
|
|
138
138
|
- lib/fog/aws/cloud_watch.rb
|
|
139
139
|
- lib/fog/aws/compute.rb
|
|
140
|
-
- lib/fog/aws/core.rb
|
|
141
140
|
- lib/fog/aws/credential_fetcher.rb
|
|
142
141
|
- lib/fog/aws/data_pipeline.rb
|
|
143
142
|
- lib/fog/aws/dns.rb
|
|
@@ -146,9 +145,11 @@ files:
|
|
|
146
145
|
- lib/fog/aws/elb.rb
|
|
147
146
|
- lib/fog/aws/elb/policy_types.rb
|
|
148
147
|
- lib/fog/aws/emr.rb
|
|
148
|
+
- lib/fog/aws/errors.rb
|
|
149
149
|
- lib/fog/aws/federation.rb
|
|
150
150
|
- lib/fog/aws/glacier.rb
|
|
151
151
|
- lib/fog/aws/iam.rb
|
|
152
|
+
- lib/fog/aws/mock.rb
|
|
152
153
|
- lib/fog/aws/models/auto_scaling/activities.rb
|
|
153
154
|
- lib/fog/aws/models/auto_scaling/activity.rb
|
|
154
155
|
- lib/fog/aws/models/auto_scaling/configuration.rb
|
|
@@ -285,7 +286,6 @@ files:
|
|
|
285
286
|
- lib/fog/aws/models/storage/files.rb
|
|
286
287
|
- lib/fog/aws/models/storage/version.rb
|
|
287
288
|
- lib/fog/aws/models/storage/versions.rb
|
|
288
|
-
- lib/fog/aws/parsers/.DS_Store
|
|
289
289
|
- lib/fog/aws/parsers/auto_scaling/basic.rb
|
|
290
290
|
- lib/fog/aws/parsers/auto_scaling/describe_adjustment_types.rb
|
|
291
291
|
- lib/fog/aws/parsers/auto_scaling/describe_auto_scaling_groups.rb
|
|
@@ -634,7 +634,6 @@ files:
|
|
|
634
634
|
- lib/fog/aws/rds.rb
|
|
635
635
|
- lib/fog/aws/redshift.rb
|
|
636
636
|
- lib/fog/aws/region_methods.rb
|
|
637
|
-
- lib/fog/aws/requests/.DS_Store
|
|
638
637
|
- lib/fog/aws/requests/auto_scaling/create_auto_scaling_group.rb
|
|
639
638
|
- lib/fog/aws/requests/auto_scaling/create_launch_configuration.rb
|
|
640
639
|
- lib/fog/aws/requests/auto_scaling/create_or_update_tags.rb
|
|
@@ -1345,6 +1344,7 @@ files:
|
|
|
1345
1344
|
- tests/requests/compute/vpc_tests.rb
|
|
1346
1345
|
- tests/requests/data_pipeline/helper.rb
|
|
1347
1346
|
- tests/requests/data_pipeline/pipeline_tests.rb
|
|
1347
|
+
- tests/requests/dns/change_resource_record_sets_tests.rb
|
|
1348
1348
|
- tests/requests/dns/dns_tests.rb
|
|
1349
1349
|
- tests/requests/dns/health_check_tests.rb
|
|
1350
1350
|
- tests/requests/dns/helper.rb
|
|
@@ -1382,6 +1382,7 @@ files:
|
|
|
1382
1382
|
- tests/requests/iam/server_certificate_tests.rb
|
|
1383
1383
|
- tests/requests/iam/user_policy_tests.rb
|
|
1384
1384
|
- tests/requests/iam/user_tests.rb
|
|
1385
|
+
- tests/requests/rds/db_engine_versions.rb
|
|
1385
1386
|
- tests/requests/rds/describe_events.rb
|
|
1386
1387
|
- tests/requests/rds/event_subscription_tests.rb
|
|
1387
1388
|
- tests/requests/rds/helper.rb
|