fog 1.41.0 → 1.42.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +20 -0
- data/Rakefile +0 -3
- data/fog.gemspec +5 -6
- data/lib/fog/vcloud_director/requests/compute/post_power_on_vapp.rb +1 -1
- data/lib/fog/version.rb +1 -1
- data/lib/tasks/changelog_task.rb +2 -1
- data/lib/tasks/github_release_task.rb +1 -1
- data/tests/helpers/mock_helper.rb +0 -3
- metadata +19 -135
- data/lib/fog/bin/ovirt.rb +0 -28
- data/lib/fog/ovirt/compute.rb +0 -155
- data/lib/fog/ovirt/core.rb +0 -16
- data/lib/fog/ovirt/models/compute/affinity_group.rb +0 -25
- data/lib/fog/ovirt/models/compute/affinity_groups.rb +0 -20
- data/lib/fog/ovirt/models/compute/cluster.rb +0 -20
- data/lib/fog/ovirt/models/compute/clusters.rb +0 -20
- data/lib/fog/ovirt/models/compute/instance_type.rb +0 -39
- data/lib/fog/ovirt/models/compute/instance_types.rb +0 -20
- data/lib/fog/ovirt/models/compute/interface.rb +0 -19
- data/lib/fog/ovirt/models/compute/interfaces.rb +0 -29
- data/lib/fog/ovirt/models/compute/quota.rb +0 -16
- data/lib/fog/ovirt/models/compute/quotas.rb +0 -20
- data/lib/fog/ovirt/models/compute/server.rb +0 -175
- data/lib/fog/ovirt/models/compute/servers.rb +0 -27
- data/lib/fog/ovirt/models/compute/template.rb +0 -58
- data/lib/fog/ovirt/models/compute/templates.rb +0 -20
- data/lib/fog/ovirt/models/compute/volume.rb +0 -36
- data/lib/fog/ovirt/models/compute/volumes.rb +0 -28
- data/lib/fog/ovirt/requests/compute/add_interface.rb +0 -20
- data/lib/fog/ovirt/requests/compute/add_to_affinity_group.rb +0 -21
- data/lib/fog/ovirt/requests/compute/add_volume.rb +0 -21
- data/lib/fog/ovirt/requests/compute/attach_volume.rb +0 -22
- data/lib/fog/ovirt/requests/compute/create_affinity_group.rb +0 -18
- data/lib/fog/ovirt/requests/compute/create_vm.rb +0 -18
- data/lib/fog/ovirt/requests/compute/datacenters.rb +0 -20
- data/lib/fog/ovirt/requests/compute/destroy_affinity_group.rb +0 -19
- data/lib/fog/ovirt/requests/compute/destroy_interface.rb +0 -22
- data/lib/fog/ovirt/requests/compute/destroy_vm.rb +0 -19
- data/lib/fog/ovirt/requests/compute/destroy_volume.rb +0 -22
- data/lib/fog/ovirt/requests/compute/detach_volume.rb +0 -22
- data/lib/fog/ovirt/requests/compute/get_affinity_group.rb +0 -18
- data/lib/fog/ovirt/requests/compute/get_api_version.rb +0 -16
- data/lib/fog/ovirt/requests/compute/get_cluster.rb +0 -17
- data/lib/fog/ovirt/requests/compute/get_instance_type.rb +0 -17
- data/lib/fog/ovirt/requests/compute/get_quota.rb +0 -17
- data/lib/fog/ovirt/requests/compute/get_template.rb +0 -17
- data/lib/fog/ovirt/requests/compute/get_virtual_machine.rb +0 -17
- data/lib/fog/ovirt/requests/compute/list_affinity_group_vms.rb +0 -22
- data/lib/fog/ovirt/requests/compute/list_affinity_groups.rb +0 -20
- data/lib/fog/ovirt/requests/compute/list_clusters.rb +0 -19
- data/lib/fog/ovirt/requests/compute/list_instance_types.rb +0 -19
- data/lib/fog/ovirt/requests/compute/list_networks.rb +0 -16
- data/lib/fog/ovirt/requests/compute/list_quotas.rb +0 -19
- data/lib/fog/ovirt/requests/compute/list_template_interfaces.rb +0 -19
- data/lib/fog/ovirt/requests/compute/list_template_volumes.rb +0 -19
- data/lib/fog/ovirt/requests/compute/list_templates.rb +0 -19
- data/lib/fog/ovirt/requests/compute/list_virtual_machines.rb +0 -19
- data/lib/fog/ovirt/requests/compute/list_vm_interfaces.rb +0 -19
- data/lib/fog/ovirt/requests/compute/list_vm_volumes.rb +0 -19
- data/lib/fog/ovirt/requests/compute/list_volumes.rb +0 -19
- data/lib/fog/ovirt/requests/compute/mock_files/affinitygroup.xml +0 -8
- data/lib/fog/ovirt/requests/compute/mock_files/affinitygroup_vms.xml +0 -9
- data/lib/fog/ovirt/requests/compute/mock_files/affinitygroups.xml +0 -17
- data/lib/fog/ovirt/requests/compute/mock_files/cluster.xml +0 -20
- data/lib/fog/ovirt/requests/compute/mock_files/clusters.xml +0 -39
- data/lib/fog/ovirt/requests/compute/mock_files/data_centers.xml +0 -17
- data/lib/fog/ovirt/requests/compute/mock_files/disks.xml +0 -58
- data/lib/fog/ovirt/requests/compute/mock_files/instance_type.xml +0 -42
- data/lib/fog/ovirt/requests/compute/mock_files/instance_types.xml +0 -197
- data/lib/fog/ovirt/requests/compute/mock_files/nics.xml +0 -10
- data/lib/fog/ovirt/requests/compute/mock_files/quotas.xml +0 -7
- data/lib/fog/ovirt/requests/compute/mock_files/storage_domains.xml +0 -36
- data/lib/fog/ovirt/requests/compute/mock_files/template.xml +0 -39
- data/lib/fog/ovirt/requests/compute/mock_files/templates.xml +0 -110
- data/lib/fog/ovirt/requests/compute/mock_files/vm.xml +0 -52
- data/lib/fog/ovirt/requests/compute/mock_files/vms.xml +0 -152
- data/lib/fog/ovirt/requests/compute/mock_files/volumes.xml +0 -40
- data/lib/fog/ovirt/requests/compute/remove_from_affinity_group.rb +0 -21
- data/lib/fog/ovirt/requests/compute/storage_domains.rb +0 -20
- data/lib/fog/ovirt/requests/compute/update_interface.rb +0 -35
- data/lib/fog/ovirt/requests/compute/update_vm.rb +0 -18
- data/lib/fog/ovirt/requests/compute/update_volume.rb +0 -39
- data/lib/fog/ovirt/requests/compute/vm_action.rb +0 -22
- data/lib/fog/ovirt/requests/compute/vm_start_with_cloudinit.rb +0 -19
- data/lib/fog/ovirt/requests/compute/vm_ticket.rb +0 -17
- data/spec/fog/bin/ovirt_spec.rb +0 -10
- data/tests/ovirt/compute_tests.rb +0 -25
- data/tests/ovirt/models/compute/cluster_tests.rb +0 -31
- data/tests/ovirt/models/compute/clusters_tests.rb +0 -9
- data/tests/ovirt/models/compute/interface_tests.rb +0 -27
- data/tests/ovirt/models/compute/interfaces_tests.rb +0 -9
- data/tests/ovirt/models/compute/server_tests.rb +0 -51
- data/tests/ovirt/models/compute/servers_tests.rb +0 -14
- data/tests/ovirt/models/compute/template_tests.rb +0 -28
- data/tests/ovirt/models/compute/templates_tests.rb +0 -9
- data/tests/ovirt/requests/compute/create_vm_tests.rb +0 -26
- data/tests/ovirt/requests/compute/destroy_vm_tests.rb +0 -18
- data/tests/ovirt/requests/compute/list_datacenters_tests.rb +0 -13
- data/tests/ovirt/requests/compute/list_quotas_tests.rb +0 -12
- data/tests/ovirt/requests/compute/list_storage_domains_tests.rb +0 -13
- data/tests/ovirt/requests/compute/update_vm_tests.rb +0 -18
- data/tests/ovirt/requests/compute/update_volume_tests.rb +0 -20
data/lib/fog/ovirt/core.rb
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
require 'fog/core'
|
|
2
|
-
require 'fog/xml'
|
|
3
|
-
|
|
4
|
-
module Fog
|
|
5
|
-
module Ovirt
|
|
6
|
-
extend Fog::Provider
|
|
7
|
-
|
|
8
|
-
module Errors
|
|
9
|
-
class ServiceError < Fog::Errors::Error; end
|
|
10
|
-
class SecurityError < ServiceError; end
|
|
11
|
-
class NotFound < ServiceError; end
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
service(:compute, 'Compute')
|
|
15
|
-
end
|
|
16
|
-
end
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
module Fog
|
|
2
|
-
module Compute
|
|
3
|
-
class Ovirt
|
|
4
|
-
class AffinityGroup < Fog::Model
|
|
5
|
-
identity :id
|
|
6
|
-
|
|
7
|
-
attribute :name
|
|
8
|
-
attribute :positive
|
|
9
|
-
attribute :enforcing
|
|
10
|
-
|
|
11
|
-
def vms
|
|
12
|
-
id.nil? ? [] : service.list_affinity_group_vms(id)
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
def destroy
|
|
16
|
-
service.destroy_affinity_group(id)
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
def to_s
|
|
20
|
-
name
|
|
21
|
-
end
|
|
22
|
-
end
|
|
23
|
-
end
|
|
24
|
-
end
|
|
25
|
-
end
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
require 'fog/core/collection'
|
|
2
|
-
require 'fog/ovirt/models/compute/affinity_group'
|
|
3
|
-
|
|
4
|
-
module Fog
|
|
5
|
-
module Compute
|
|
6
|
-
class Ovirt
|
|
7
|
-
class AffinityGroups < Fog::Collection
|
|
8
|
-
model Fog::Compute::Ovirt::AffinityGroup
|
|
9
|
-
|
|
10
|
-
def all(filters = {})
|
|
11
|
-
load service.list_affinity_groups(filters)
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
def get(id)
|
|
15
|
-
new service.get_affinity_group(id)
|
|
16
|
-
end
|
|
17
|
-
end
|
|
18
|
-
end
|
|
19
|
-
end
|
|
20
|
-
end
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
require 'fog/core/collection'
|
|
2
|
-
require 'fog/ovirt/models/compute/cluster'
|
|
3
|
-
|
|
4
|
-
module Fog
|
|
5
|
-
module Compute
|
|
6
|
-
class Ovirt
|
|
7
|
-
class Clusters < Fog::Collection
|
|
8
|
-
model Fog::Compute::Ovirt::Cluster
|
|
9
|
-
|
|
10
|
-
def all(filters = {})
|
|
11
|
-
load service.list_clusters(filters)
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
def get(id)
|
|
15
|
-
new service.get_cluster(id)
|
|
16
|
-
end
|
|
17
|
-
end
|
|
18
|
-
end
|
|
19
|
-
end
|
|
20
|
-
end
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
module Fog
|
|
2
|
-
module Compute
|
|
3
|
-
class Ovirt
|
|
4
|
-
class InstanceType < Fog::Model
|
|
5
|
-
identity :id
|
|
6
|
-
|
|
7
|
-
attr_accessor :raw
|
|
8
|
-
|
|
9
|
-
attribute :name
|
|
10
|
-
attribute :description
|
|
11
|
-
attribute :memory
|
|
12
|
-
attribute :cores
|
|
13
|
-
attribute :creation_time
|
|
14
|
-
attribute :os
|
|
15
|
-
attribute :ha
|
|
16
|
-
attribute :ha_priority
|
|
17
|
-
attribute :display
|
|
18
|
-
attribute :usb
|
|
19
|
-
attribute :migration_downtime
|
|
20
|
-
attribute :type
|
|
21
|
-
attribute :status
|
|
22
|
-
attribute :cpu_shares
|
|
23
|
-
attribute :boot_menu
|
|
24
|
-
attribute :origin
|
|
25
|
-
attribute :stateless
|
|
26
|
-
attribute :delete_protected
|
|
27
|
-
attribute :sso
|
|
28
|
-
attribute :timezone
|
|
29
|
-
attribute :migration
|
|
30
|
-
attribute :io_threads
|
|
31
|
-
attribute :memory_garanteed
|
|
32
|
-
|
|
33
|
-
def to_s
|
|
34
|
-
name
|
|
35
|
-
end
|
|
36
|
-
end
|
|
37
|
-
end
|
|
38
|
-
end
|
|
39
|
-
end
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
require 'fog/core/collection'
|
|
2
|
-
require 'fog/ovirt/models/compute/instance_type'
|
|
3
|
-
|
|
4
|
-
module Fog
|
|
5
|
-
module Compute
|
|
6
|
-
class Ovirt
|
|
7
|
-
class InstanceTypes < Fog::Collection
|
|
8
|
-
model Fog::Compute::Ovirt::InstanceType
|
|
9
|
-
|
|
10
|
-
def all(filters = {})
|
|
11
|
-
load service.list_instance_types(filters)
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
def get(id)
|
|
15
|
-
new service.get_instance_type(id)
|
|
16
|
-
end
|
|
17
|
-
end
|
|
18
|
-
end
|
|
19
|
-
end
|
|
20
|
-
end
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
module Fog
|
|
2
|
-
module Compute
|
|
3
|
-
class Ovirt
|
|
4
|
-
class Interface < Fog::Model
|
|
5
|
-
attr_accessor :raw
|
|
6
|
-
identity :id
|
|
7
|
-
|
|
8
|
-
attribute :name
|
|
9
|
-
attribute :network
|
|
10
|
-
attribute :interface
|
|
11
|
-
attribute :mac
|
|
12
|
-
|
|
13
|
-
def to_s
|
|
14
|
-
name
|
|
15
|
-
end
|
|
16
|
-
end
|
|
17
|
-
end
|
|
18
|
-
end
|
|
19
|
-
end
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
require 'fog/core/collection'
|
|
2
|
-
require 'fog/ovirt/models/compute/interface'
|
|
3
|
-
|
|
4
|
-
module Fog
|
|
5
|
-
module Compute
|
|
6
|
-
class Ovirt
|
|
7
|
-
class Interfaces < Fog::Collection
|
|
8
|
-
model Fog::Compute::Ovirt::Interface
|
|
9
|
-
|
|
10
|
-
attr_accessor :vm
|
|
11
|
-
|
|
12
|
-
def all(filters = {})
|
|
13
|
-
requires :vm
|
|
14
|
-
if vm.is_a? Fog::Compute::Ovirt::Server
|
|
15
|
-
load service.list_vm_interfaces(vm.id)
|
|
16
|
-
elsif vm.is_a? Fog::Compute::Ovirt::Template
|
|
17
|
-
load service.list_template_interfaces(vm.id)
|
|
18
|
-
else
|
|
19
|
-
raise 'interfaces should have vm or template'
|
|
20
|
-
end
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
def get(id)
|
|
24
|
-
new service.get_interface(id)
|
|
25
|
-
end
|
|
26
|
-
end
|
|
27
|
-
end
|
|
28
|
-
end
|
|
29
|
-
end
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
require 'fog/core/collection'
|
|
2
|
-
require 'fog/ovirt/models/compute/quota'
|
|
3
|
-
|
|
4
|
-
module Fog
|
|
5
|
-
module Compute
|
|
6
|
-
class Ovirt
|
|
7
|
-
class Quotas < Fog::Collection
|
|
8
|
-
model Fog::Compute::Ovirt::Quota
|
|
9
|
-
|
|
10
|
-
def all(filters = {})
|
|
11
|
-
load service.list_quotas(filters)
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
def get(id)
|
|
15
|
-
new service.get_quota(id)
|
|
16
|
-
end
|
|
17
|
-
end
|
|
18
|
-
end
|
|
19
|
-
end
|
|
20
|
-
end
|
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
require 'fog/compute/models/server'
|
|
2
|
-
|
|
3
|
-
module Fog
|
|
4
|
-
module Compute
|
|
5
|
-
class Ovirt
|
|
6
|
-
class Server < Fog::Compute::Server
|
|
7
|
-
# This will be the instance uuid which is globally unique across
|
|
8
|
-
# a oVirt deployment.
|
|
9
|
-
identity :id
|
|
10
|
-
|
|
11
|
-
attribute :name
|
|
12
|
-
attribute :comment
|
|
13
|
-
attribute :description
|
|
14
|
-
attribute :profile
|
|
15
|
-
attribute :display
|
|
16
|
-
attribute :storage, :aliases => 'disk_size'
|
|
17
|
-
attribute :creation_time
|
|
18
|
-
attribute :os
|
|
19
|
-
attribute :ip
|
|
20
|
-
attribute :status
|
|
21
|
-
attribute :cores, :aliases => 'cpus'
|
|
22
|
-
attribute :memory
|
|
23
|
-
attribute :host
|
|
24
|
-
attribute :cluster
|
|
25
|
-
attribute :template
|
|
26
|
-
attribute :instance_type
|
|
27
|
-
attribute :interfaces
|
|
28
|
-
attribute :volumes
|
|
29
|
-
attribute :raw
|
|
30
|
-
attribute :quota
|
|
31
|
-
attribute :ips
|
|
32
|
-
attribute :ha
|
|
33
|
-
attribute :ha_priority
|
|
34
|
-
attribute :clone
|
|
35
|
-
attribute :disks
|
|
36
|
-
|
|
37
|
-
def ready?
|
|
38
|
-
!(status =~ /down/i)
|
|
39
|
-
end
|
|
40
|
-
|
|
41
|
-
def locked?
|
|
42
|
-
@volumes = nil # force reload volumes
|
|
43
|
-
!!(status =~ /locked/i) || (attributes[:volumes]=nil) || volumes.any?{|v| !!(v.status =~ /locked/i)}
|
|
44
|
-
end
|
|
45
|
-
|
|
46
|
-
def stopped?
|
|
47
|
-
status.downcase == 'down'
|
|
48
|
-
end
|
|
49
|
-
|
|
50
|
-
def mac
|
|
51
|
-
interfaces.first.mac unless interfaces.empty?
|
|
52
|
-
end
|
|
53
|
-
|
|
54
|
-
def interfaces
|
|
55
|
-
@interfaces ||= id.nil? ? [] : Fog::Compute::Ovirt::Interfaces.new(
|
|
56
|
-
:service => service,
|
|
57
|
-
:vm => self
|
|
58
|
-
)
|
|
59
|
-
end
|
|
60
|
-
|
|
61
|
-
def add_interface attrs
|
|
62
|
-
wait_for { stopped? } if attrs[:blocking]
|
|
63
|
-
service.add_interface(id, attrs)
|
|
64
|
-
end
|
|
65
|
-
|
|
66
|
-
def update_interface attrs
|
|
67
|
-
wait_for { stopped? } if attrs[:blocking]
|
|
68
|
-
service.update_interface(id, attrs)
|
|
69
|
-
end
|
|
70
|
-
|
|
71
|
-
def destroy_interface attrs
|
|
72
|
-
wait_for { stopped? } if attrs[:blocking]
|
|
73
|
-
service.destroy_interface(id, attrs)
|
|
74
|
-
end
|
|
75
|
-
|
|
76
|
-
def volumes
|
|
77
|
-
@volumes ||= id.nil? ? [] : Fog::Compute::Ovirt::Volumes.new(
|
|
78
|
-
:service => service,
|
|
79
|
-
:vm => self
|
|
80
|
-
)
|
|
81
|
-
end
|
|
82
|
-
|
|
83
|
-
def add_volume attrs
|
|
84
|
-
wait_for { stopped? } if attrs[:blocking]
|
|
85
|
-
service.add_volume(id, attrs)
|
|
86
|
-
end
|
|
87
|
-
|
|
88
|
-
def destroy_volume attrs
|
|
89
|
-
wait_for { stopped? } if attrs[:blocking]
|
|
90
|
-
service.destroy_volume(id, attrs)
|
|
91
|
-
end
|
|
92
|
-
|
|
93
|
-
def update_volume attrs
|
|
94
|
-
wait_for { stopped? } if attrs[:blocking]
|
|
95
|
-
service.update_volume(id, attrs)
|
|
96
|
-
end
|
|
97
|
-
|
|
98
|
-
def attach_volume(attrs)
|
|
99
|
-
wait_for { stopped? } if attrs[:blocking]
|
|
100
|
-
service.attach_volume(id, attrs)
|
|
101
|
-
end
|
|
102
|
-
|
|
103
|
-
def detach_volume(attrs)
|
|
104
|
-
wait_for { stopped? } if attrs[:blocking]
|
|
105
|
-
service.detach_volume(id, attrs)
|
|
106
|
-
end
|
|
107
|
-
|
|
108
|
-
def add_to_affinity_group(attrs)
|
|
109
|
-
wait_for { stopped? } if attrs[:blocking]
|
|
110
|
-
service.add_to_affinity_group(id, attrs)
|
|
111
|
-
end
|
|
112
|
-
|
|
113
|
-
def remove_from_affinity_group(attrs)
|
|
114
|
-
wait_for { stopped? } if attrs[:blocking]
|
|
115
|
-
service.remove_from_affinity_group(id, attrs)
|
|
116
|
-
end
|
|
117
|
-
|
|
118
|
-
def start(options = {})
|
|
119
|
-
wait_for { !locked? } if options[:blocking]
|
|
120
|
-
service.vm_action(:id =>id, :action => :start)
|
|
121
|
-
reload
|
|
122
|
-
end
|
|
123
|
-
|
|
124
|
-
def start_with_cloudinit(options = {})
|
|
125
|
-
wait_for { !locked? } if options[:blocking]
|
|
126
|
-
user_data = Hash[YAML.load(options[:user_data]).map{|a| [a.first.to_sym, a.last]}]
|
|
127
|
-
service.vm_start_with_cloudinit(:id =>id, :user_data =>user_data)
|
|
128
|
-
reload
|
|
129
|
-
end
|
|
130
|
-
|
|
131
|
-
def stop(options = {})
|
|
132
|
-
service.vm_action(:id =>id, :action => :stop)
|
|
133
|
-
reload
|
|
134
|
-
end
|
|
135
|
-
|
|
136
|
-
def reboot(options = {})
|
|
137
|
-
unless stopped?
|
|
138
|
-
stop
|
|
139
|
-
wait_for { stopped? }
|
|
140
|
-
end
|
|
141
|
-
start options.merge(:blocking => true)
|
|
142
|
-
end
|
|
143
|
-
|
|
144
|
-
def suspend(options = {})
|
|
145
|
-
service.vm_action(:id =>id, :action => :suspend)
|
|
146
|
-
reload
|
|
147
|
-
end
|
|
148
|
-
|
|
149
|
-
def destroy(options = {})
|
|
150
|
-
(stop unless stopped?) rescue nil #ignore failure, destroy the machine anyway.
|
|
151
|
-
wait_for { stopped? }
|
|
152
|
-
service.destroy_vm(:id => id)
|
|
153
|
-
end
|
|
154
|
-
|
|
155
|
-
def ticket(options = {})
|
|
156
|
-
raise "Can not set console ticket, Server is not ready. Server status: #{status}" unless ready?
|
|
157
|
-
service.vm_ticket(id, options)
|
|
158
|
-
end
|
|
159
|
-
|
|
160
|
-
def save
|
|
161
|
-
if persisted?
|
|
162
|
-
service.update_vm(attributes)
|
|
163
|
-
else
|
|
164
|
-
self.id = service.create_vm(attributes).id
|
|
165
|
-
end
|
|
166
|
-
reload
|
|
167
|
-
end
|
|
168
|
-
|
|
169
|
-
def to_s
|
|
170
|
-
name
|
|
171
|
-
end
|
|
172
|
-
end
|
|
173
|
-
end
|
|
174
|
-
end
|
|
175
|
-
end
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
require 'fog/core/collection'
|
|
2
|
-
require 'fog/ovirt/models/compute/server'
|
|
3
|
-
|
|
4
|
-
module Fog
|
|
5
|
-
module Compute
|
|
6
|
-
class Ovirt
|
|
7
|
-
class Servers < Fog::Collection
|
|
8
|
-
model Fog::Compute::Ovirt::Server
|
|
9
|
-
|
|
10
|
-
def all(filters = {})
|
|
11
|
-
load service.list_virtual_machines(filters)
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
def get(id)
|
|
15
|
-
new service.get_virtual_machine(id)
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
def bootstrap(new_attributes = {})
|
|
19
|
-
server = create(new_attributes)
|
|
20
|
-
server.wait_for { stopped? }
|
|
21
|
-
server.start
|
|
22
|
-
server
|
|
23
|
-
end
|
|
24
|
-
end
|
|
25
|
-
end
|
|
26
|
-
end
|
|
27
|
-
end
|