Class: ProjectFifo::VM
Constant Summary
collapse
- VALIDATIONS =
{
package: 'string',
dataset: 'string',
config: {
alias: 'string',
networks: {
net0: 'string'
}
}
}
Instance Attribute Summary
Attributes inherited from Resource
#fifo, #namespace
Instance Method Summary
collapse
Methods inherited from Resource
#[], #create, #delete, #get, #list, #metadata, #post, #put
Constructor Details
#initialize(fifo) ⇒ VM
7
8
9
|
# File 'lib/project-fifo/vm.rb', line 7
def initialize(fifo)
super(fifo, 'vms')
end
|
Instance Method Details
#get_by_alias(a) ⇒ Object
11
12
13
|
# File 'lib/project-fifo/vm.rb', line 11
def get_by_alias(a)
list.map{|i| get(i) }.select{|i| i['config']['alias'] == a }
end
|
#get_by_name(n) ⇒ Object
15
16
17
|
# File 'lib/project-fifo/vm.rb', line 15
def get_by_name(n)
get_by_alias(n)
end
|