2011-02-17 13:44:46 -05:00
|
|
|
module Fog
|
2011-06-16 19:28:54 -04:00
|
|
|
module Compute
|
|
|
|
class Ecloud
|
2011-02-17 13:44:46 -05:00
|
|
|
class BackupInternetService < Fog::Ecloud::Model
|
2012-06-07 12:50:11 -04:00
|
|
|
identity :href
|
2011-02-17 13:44:46 -05:00
|
|
|
|
|
|
|
attribute :name, :aliases => :Name
|
2012-06-07 12:50:11 -04:00
|
|
|
attribute :type, :aliases => :Type
|
|
|
|
attribute :other_links, :aliases => :Links
|
2011-02-17 13:44:46 -05:00
|
|
|
attribute :protocol, :aliases => :Protocol
|
2012-12-22 18:27:38 -05:00
|
|
|
attribute :enabled, :aliases => :Enabled, :type => :boolean
|
2011-02-17 13:44:46 -05:00
|
|
|
attribute :description, :aliases => :Description
|
2012-06-07 12:50:11 -04:00
|
|
|
attribute :persistence, :aliases => :Persistence
|
|
|
|
attribute :redirect_url, :aliases => :RedirectUrl
|
2011-02-17 13:44:46 -05:00
|
|
|
|
2012-06-07 12:50:11 -04:00
|
|
|
def tasks
|
2012-12-22 18:27:38 -05:00
|
|
|
@tasks = Fog::Compute::Ecloud::Tasks.new(:service => service, :href => href)
|
2011-02-17 13:44:46 -05:00
|
|
|
end
|
|
|
|
|
2012-06-07 12:50:11 -04:00
|
|
|
def internet_services
|
2012-12-22 18:27:38 -05:00
|
|
|
@internet_services = Fog::Compute::Ecloud::InternetServices.new(:service => service, :href => href)
|
2011-02-17 13:44:46 -05:00
|
|
|
end
|
|
|
|
|
2012-06-07 12:50:11 -04:00
|
|
|
def node_services
|
2012-12-22 18:27:38 -05:00
|
|
|
@node_services = Fog::Compute::Ecloud::NodeServices.new(:service => service, :href => href)
|
2011-02-17 13:44:46 -05:00
|
|
|
end
|
|
|
|
|
2012-06-07 12:50:11 -04:00
|
|
|
def edit(options)
|
|
|
|
options[:uri] = href
|
2012-12-22 18:27:38 -05:00
|
|
|
data = service.backup_internet_service_edit(options).body
|
2012-06-07 12:50:11 -04:00
|
|
|
object = collection.from_data(data)
|
2011-02-17 13:44:46 -05:00
|
|
|
end
|
|
|
|
|
2012-06-07 12:50:11 -04:00
|
|
|
def delete
|
2012-12-22 18:27:38 -05:00
|
|
|
data = service.backup_internet_service_delete(href).body
|
|
|
|
task = Fog::Compute::Ecloud::Tasks.new(:service => service, :href => data[:href])[0]
|
2011-02-17 13:44:46 -05:00
|
|
|
end
|
|
|
|
|
2012-06-07 12:50:11 -04:00
|
|
|
def id
|
|
|
|
href.scan(/\d+/)[0]
|
|
|
|
end
|
2011-02-17 13:44:46 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|