Class: Fog::Kubevirt::Compute::Template
- Inherits:
-
Model
- Object
- Model
- Fog::Kubevirt::Compute::Template
show all
- Includes:
- Shared
- Defined in:
- lib/fog/kubevirt/compute/models/template.rb
Constant Summary
Constants included
from Shared
Shared::OS_LABEL, Shared::OS_LABEL_SYMBOL
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from Shared
#deep_merge!, #object_to_hash
Class Method Details
.parse(object) ⇒ Object
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
# File 'lib/fog/kubevirt/compute/models/template.rb', line 28
def self.parse(object)
metadata = object[:metadata]
annotations = metadata[:annotations]
{
:namespace => metadata[:namespace],
:annotations => metadata[:annotations],
:name => metadata[:name],
:labels => metadata[:labels],
:resource_version => metadata[:resourceVersion],
:uid => metadata[:uid],
:objects => object[:objects],
:parameters => object[:parameters],
:description => annotations && annotations[:description],
:tags => annotations && annotations[:tags]
}
end
|
Instance Method Details
#clone(options = {}) ⇒ Object
18
19
20
21
22
23
24
25
26
|
# File 'lib/fog/kubevirt/compute/models/template.rb', line 18
def clone(options = {})
params = values(options)
create_persistent_volume_claims(persistent_volume_claims_from_objects(objects), params, namespace)
create_vm(vm_from_objects(objects), params, namespace)
end
|