Sha256: 10df669f3530c1cc8b1fe9285f056d8ea08a854ed61d4b73f2a7a09629e88562
Contents?: true
Size: 1.3 KB
Versions: 29
Compression:
Stored size: 1.3 KB
Contents
module Fog module Compute class Ecloud class Real include Shared def backup_internet_service_edit(data) validate_data([:name, :protocol, :enabled, :persistence], data) unless data[:persistence][:type] raise ArgumentError.new("Required data missing: :persistence[:type]") end request( :body => generate_backup_internet_service_request(data), :expects => 202, :method => "PUT", :headers => {}, :uri => data[:uri], :parse => true ) end private def generate_backup_internet_service_request(data) xml = Builder::XmlMarkup.new xml.BackupInternetService(:name => data[:name]) do xml.Protocol data[:protocol] xml.Enabled data[:enabled] if data[:description] xml.Description data[:description] end xml.Persistence do xml.Type data[:persistence][:type] if data[:persistence][:timeout] xml.Timeout data[:persistence][:timeout] end end if data[:redirect_url] xml.RedirectUrl data[:redirect_url] end end end end end end end
Version data entries
29 entries across 27 versions & 6 rubygems