Class: Fog::Compute::Vsphere::Datacenter

Inherits:
Model
  • Object
show all
Defined in:
lib/fog/vsphere/models/compute/datacenter.rb

Instance Attribute Summary

Attributes inherited from Model

#collection, #connection

Instance Method Summary collapse

Methods inherited from Model

#initialize, #inspect, #reload, #symbolize_keys, #to_json, #wait_for

Methods included from Attributes::ClassMethods

#_load, #aliases, #attribute, #attributes, #identity, #ignore_attributes, #ignored_attributes

Methods included from Attributes::InstanceMethods

#_dump, #attributes, #dup, #identity, #identity=, #merge_attributes, #new_record?, #requires, #requires_one

Constructor Details

This class inherits a constructor from Fog::Model

Instance Method Details

#clusters(filters = { }) ⇒ Object



11
12
13
# File 'lib/fog/vsphere/models/compute/datacenter.rb', line 11

def clusters filters = { }
  connection.clusters({ :datacenter => name }.merge(filters))
end

#datastores(filters = { }) ⇒ Object



19
20
21
# File 'lib/fog/vsphere/models/compute/datacenter.rb', line 19

def datastores filters = { }
  connection.datastores({ :datacenter => name }.merge(filters))
end

#networks(filters = { }) ⇒ Object



15
16
17
# File 'lib/fog/vsphere/models/compute/datacenter.rb', line 15

def networks filters = { }
  connection.networks({ :datacenter => name }.merge(filters))
end

#to_sObject



27
28
29
# File 'lib/fog/vsphere/models/compute/datacenter.rb', line 27

def to_s
  name
end

#vm_folders(filters = { }) ⇒ Object



23
24
25
# File 'lib/fog/vsphere/models/compute/datacenter.rb', line 23

def vm_folders filters = { }
  connection.folders({ :datacenter => name, :type => :vm }.merge(filters))
end