Class: Pec::Handler::Image
- Inherits:
-
Object
- Object
- Pec::Handler::Image
- Extended by:
- Core
- Defined in:
- lib/pec/handler/image.rb
Class Method Summary collapse
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 |