Class: Fog::Kubevirt::Compute::Templates
- Inherits:
-
Collection
- Object
- Collection
- Fog::Kubevirt::Compute::Templates
- Defined in:
- lib/fog/kubevirt/compute/models/templates.rb
Instance Attribute Summary collapse
-
#kind ⇒ Object
readonly
Returns the value of attribute kind.
-
#resource_version ⇒ Object
readonly
Returns the value of attribute resource_version.
Instance Method Summary collapse
Instance Attribute Details
#kind ⇒ Object (readonly)
Returns the value of attribute kind.
8 9 10 |
# File 'lib/fog/kubevirt/compute/models/templates.rb', line 8 def kind @kind end |
#resource_version ⇒ Object (readonly)
Returns the value of attribute resource_version.
8 9 10 |
# File 'lib/fog/kubevirt/compute/models/templates.rb', line 8 def resource_version @resource_version end |
Instance Method Details
#all(filters = {}) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/fog/kubevirt/compute/models/templates.rb', line 12 def all(filters = {}) begin temps = service.list_templates(filters) rescue ::Fog::Kubevirt::Errors::ClientError # we assume that we get 404 temps = [] end @kind = temps.kind @resource_version = temps.resource_version load temps end |
#get(name) ⇒ Object
24 25 26 |
# File 'lib/fog/kubevirt/compute/models/templates.rb', line 24 def get(name) new service.get_template(name) end |