2013-06-20 13:36:34 -04:00
|
|
|
require 'fog/core/model'
|
|
|
|
|
|
|
|
module Fog
|
|
|
|
module Compute
|
2013-08-27 05:19:54 -04:00
|
|
|
class VcloudDirector
|
2013-06-20 13:36:34 -04:00
|
|
|
|
2013-07-09 09:16:00 -04:00
|
|
|
class Vapp < Model
|
2013-09-16 10:38:38 -04:00
|
|
|
|
|
|
|
|
2013-06-20 13:36:34 -04:00
|
|
|
identity :id
|
2013-09-16 10:38:38 -04:00
|
|
|
|
2013-06-20 13:36:34 -04:00
|
|
|
attribute :name
|
|
|
|
attribute :type
|
|
|
|
attribute :href
|
|
|
|
attribute :description, :aliases => :Description
|
|
|
|
attribute :deployed, :type => :boolean
|
|
|
|
attribute :status
|
2013-08-19 10:04:25 -04:00
|
|
|
attribute :lease_settings, :aliases => :LeaseSettingsSection
|
2013-06-24 07:46:30 -04:00
|
|
|
attribute :network_section, :aliases => :"ovf:NetworkSection", :squash => :"ovf:Network"
|
2013-06-20 13:36:34 -04:00
|
|
|
attribute :network_config, :aliases => :NetworkConfigSection, :squash => :NetworkConfig
|
2013-06-24 07:46:30 -04:00
|
|
|
attribute :owner, :aliases => :Owner, :squash => :User
|
2013-06-20 13:36:34 -04:00
|
|
|
attribute :InMaintenanceMode, :type => :boolean
|
2013-09-16 10:38:38 -04:00
|
|
|
|
2013-06-24 07:46:30 -04:00
|
|
|
def vms
|
|
|
|
requires :id
|
2013-07-09 09:16:00 -04:00
|
|
|
service.vms(:vapp => self)
|
2013-06-24 07:46:30 -04:00
|
|
|
end
|
|
|
|
|
2013-08-26 10:57:58 -04:00
|
|
|
def tags
|
|
|
|
requires :id
|
|
|
|
service.tags(:vm => self)
|
|
|
|
end
|
2013-09-16 10:38:38 -04:00
|
|
|
|
|
|
|
def undeploy
|
|
|
|
service.undeploy(id)
|
|
|
|
end
|
|
|
|
|
2013-06-20 13:36:34 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2013-09-16 10:38:38 -04:00
|
|
|
end
|