Method: Hyperkit::Client::Images#create_image_from_snapshot
- Defined in:
- lib/hyperkit/client/images.rb
#create_image_from_snapshot(container, snapshot, options = {}) ⇒ Sawyer::Resource
Create an image from an existing snapshot.
358 359 360 361 362 363 364 365 366 367 368 369 |
# File 'lib/hyperkit/client/images.rb', line 358 def create_image_from_snapshot(container, snapshot, ={}) opts = .slice(:filename, :public, :description) opts[:properties] = stringify_hash([:properties]) if [:properties] opts[:source] = { type: "snapshot", name: "#{container}/#{snapshot}" } response = post(images_path, opts). handle_async(response, [:sync]) end |