From b75ee61daf5878a9a2f6da60d83dac6f9203dfbf Mon Sep 17 00:00:00 2001 From: Chirag Jog Date: Wed, 2 May 2012 21:59:07 +0530 Subject: [PATCH] Fix support to add internet service to the existing Public Ip --- .../requests/shared/add_internet_service.rb | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/lib/fog/terremark/requests/shared/add_internet_service.rb b/lib/fog/terremark/requests/shared/add_internet_service.rb index 251589f7c..6ac39b82d 100644 --- a/lib/fog/terremark/requests/shared/add_internet_service.rb +++ b/lib/fog/terremark/requests/shared/add_internet_service.rb @@ -31,21 +31,22 @@ module Fog options['Enabled'] = true end data = <<-DATA - - #{name} - #{protocol.upcase} - #{port} - #{options['Enabled']} - #{options['Description']} - - DATA + + #{name} + #{protocol.upcase} + #{port} + #{options['Enabled']} + #{options['Description']} + + DATA request( :body => data, :expects => 200, :headers => {'Content-Type' => 'application/xml'}, :method => 'POST', :parser => Fog::Parsers::Terremark::Shared::InternetService.new, - :path => "publicIps/#{ip_id}/internetServices" + :path => "api/extensions/v1.6/publicIp/#{ip_id}/internetServices", + :override_path => true ) end