Skip to content

Instantly share code, notes, and snippets.

@chiradeep
Created April 11, 2014 05:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chiradeep/10442766 to your computer and use it in GitHub Desktop.
Save chiradeep/10442766 to your computer and use it in GitHub Desktop.
Patch to get AWS Ruby SDK v1.34.1 working with Apache CloudStack awsapi module v4.2.1
--- aws-sdk-1.34.1-original/lib/aws/core/client.rb 2014-04-10 22:07:31.722036263 -0700
+++ aws-sdk-1.34.1/lib/aws/core/client.rb 2014-04-10 22:10:49.538138111 -0700
@@ -551,6 +551,9 @@
http_request.service_ruby_name = service_ruby_name
http_request.host = endpoint
http_request.port = port
+ if AWS.config.respond_to?("#{service_ruby_name}_service_path")
+ http_request.uri = config.send(:"#{service_ruby_name}_service_path")
+ end
http_request.region = @region
http_request.use_ssl = config.use_ssl?
diff -Naur aws-sdk-1.34.1-original/lib/aws/core/configuration.rb aws-sdk-1.34.1/lib/aws/core/configuration.rb
--- aws-sdk-1.34.1-original/lib/aws/core/configuration.rb 2014-04-10 22:07:31.720036589 -0700
+++ aws-sdk-1.34.1/lib/aws/core/configuration.rb 2014-04-10 22:12:28.457038557 -0700
@@ -534,6 +534,8 @@
add_option :user_agent_prefix
+ add_option :ec2_service_path, '/'
+
add_option :verify_response_body_content_length, true, :boolean => true
end
diff -Naur aws-sdk-1.34.1-original/lib/aws/ec2/instance.rb aws-sdk-1.34.1/lib/aws/ec2/instance.rb
--- aws-sdk-1.34.1-original/lib/aws/ec2/instance.rb 2014-04-10 22:07:31.704037358 -0700
+++ aws-sdk-1.34.1/lib/aws/ec2/instance.rb 2014-04-10 22:46:03.016067534 -0700
@@ -231,9 +231,11 @@
describe_call_attribute :ami_launch_index, :static => true
- describe_call_attribute :monitoring do
- translates_output {|v| v.state.to_sym }
- end
+ #describe_call_attribute :monitoring do
+ #translates_output {|v| v.state.to_sym }
+ #end
+
+ describe_call_attribute :monitoring
describe_call_attribute :private_ip_address
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment