Class: Fog::Compute::XenServer::Models::Servers
- Inherits:
-
Collection
- Object
- Fog::Collection
- Collection
- Fog::Compute::XenServer::Models::Servers
show all
- Defined in:
- lib/fog/compute/xen_server/models/servers.rb
Instance Method Summary
collapse
Methods inherited from Collection
#get, #get_by_name, #get_by_reference_or_name_or_uuid, #get_by_uuid
Instance Method Details
#all(options = {}) ⇒ Object
25
26
27
28
29
30
31
32
33
|
# File 'lib/fog/compute/xen_server/models/servers.rb', line 25
def all(options = {})
data = service.get_records "VM"
data.delete_if { |vm| vm[:is_control_domain] or vm[:is_a_template] }
data.delete_if { |vm| vm[:is_a_snapshot] and !options[:include_snapshots] }
data.delete_if { |vm| options[:name_matches] and (vm[:name_label] !~ /#{Regexp.escape(options[:name_matches])}/i ) }
data.delete_if { |vm| options[:name_equals] and (vm[:name_label] != options[:name_equals] ) }
load(data)
end
|
#builtin_templates ⇒ Object
20
21
22
23
|
# File 'lib/fog/compute/xen_server/models/servers.rb', line 20
def builtin_templates
Fog::Logger.deprecation "This method is DEPRECATED. Call #builtin_templates directly on the connection instead."
service.builtin_templates
end
|
#custom_templates ⇒ Object
15
16
17
18
|
# File 'lib/fog/compute/xen_server/models/servers.rb', line 15
def custom_templates
Fog::Logger.deprecation "This method is DEPRECATED. Call #custom_templates directly on the connection instead."
service.custom_templates
end
|
#templates ⇒ Object
10
11
12
13
|
# File 'lib/fog/compute/xen_server/models/servers.rb', line 10
def templates
Fog::Logger.deprecation "This method is DEPRECATED. Call #templates directly on the connection instead."
service.templates
end
|