Class: Pec::Handler::Image

Inherits:
Object
  • Object
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(config) ⇒ Object



6
7
8
9
10
11
12
13
14
# File 'lib/pec/handler/image.rb', line 6

def self.build(config)
  Pec::Logger.notice "image is #{config.image}"
  image_id = Yao::Image.list.find {|image| image.name == config.image}.id
  {
    imageRef:  image_id
  }
rescue
  raise Pec::ConfigError, "image name=#{config.image} does not exist"
end