1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/lib/fog/vsphere/models/compute/datacenter.rb
Nick Huanca 258275929b Added a new attribute to server model (relative_path)
cleaned up clone function from server model
Added better use of resource pool, dest_folder
Added new datastore selection, simplified vm_clone.rb
Added Customization specs for linux machines
Added a new call from datacenters method to grab virtual_servers in datacenter
2012-12-01 07:48:18 -07:00

39 lines
853 B
Ruby

module Fog
module Compute
class Vsphere
class Datacenter < Fog::Model
identity :id
attribute :name
attribute :status
def clusters filters = { }
connection.clusters({ :datacenter => name }.merge(filters))
end
def networks filters = { }
connection.networks({ :datacenter => name }.merge(filters))
end
def datastores filters = { }
connection.datastores({ :datacenter => name }.merge(filters))
end
def vm_folders filters = { }
connection.folders({ :datacenter => name, :type => :vm }.merge(filters))
end
def virtual_machines filters = {}
connection.servers({ :datacenter => name }.merge(filters))
end
def to_s
name
end
end
end
end
end