lib/fog/terremark/requests/shared/add_internet_service.rb in fog-1.22.0 vs lib/fog/terremark/requests/shared/add_internet_service.rb in fog-1.22.1
- old
+ new
@@ -1,10 +1,9 @@
module Fog
module Terremark
module Shared
module Real
-
# Reserve requested resources and deploy vApp
#
# ==== Parameters
# * ip_id<~Integer> - Id of ip to add service to
# * name<~String> - Name of service
@@ -25,11 +24,11 @@
# * 'Owner'<~String> -
# * 'href'<~String> - href of owner
# * 'name'<~String> - name of owner
# * 'type'<~String> - type of owner
def add_internet_service(ip_id, name, protocol, port, options = {})
- unless options.has_key?('Enabled')
+ unless options.key?('Enabled')
options['Enabled'] = true
end
data = <<-DATA
<CreateInternetServiceRequest xml:lang="en" xmlns="urn:tmrk:vCloudExpressExtensions-1.6" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Name>#{name}</Name>
@@ -47,10 +46,9 @@
:parser => Fog::Parsers::Terremark::Shared::InternetService.new,
:path => "api/extensions/v1.6/publicIp/#{ip_id}/internetServices",
:override_path => true
)
end
-
end
end
end
end