Class: Pec::Handler::Image
- Inherits:
-
Object
- Object
- Pec::Handler::Image
show all
- Extended by:
- Core
- Defined in:
- lib/pec/handler/image.rb
Instance Attribute Summary
Attributes included from Core
#kind
Class Method Summary
collapse
Methods included from Core
build, post_build, recover
Class Method Details
.build(host) ⇒ Object
6
7
8
9
10
11
12
13
14
|
# File 'lib/pec/handler/image.rb', line 6
def self.build(host)
Pec::Logger.notice "image is #{host.image}"
image_id = Yao::Image.list.find {|image| image.name == host.image}.id
{
imageRef: image_id
}
rescue
raise Pec::ConfigError, "image name=#{host.image} does not exist"
end
|