Sha256: 55572f8a9830d9d54232279f90264004bfb073fa98977752e61107e814d5eb40

Contents?: true

Size: 506 Bytes

Versions: 5

Compression:

Stored size: 506 Bytes

Contents

require 'vagrant-openstack-provider/action/abstract_action'

module VagrantPlugins
  module Openstack
    module Action
      class SnapshotList < AbstractAction
        def initialize(app, _env)
          @app = app
        end

        def call(env)
          nova = env[:openstack_client].nova
          machine_snapshots = nova.list_snapshots(env, env[:machine].id)

          env[:machine_snapshot_list] = machine_snapshots.map(&:name)

          @app.call env
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
vagrant-openstack-provider-0.13.0 lib/vagrant-openstack-provider/action/snapshot_list.rb
vagrant-openstack-provider-0.12.0 lib/vagrant-openstack-provider/action/snapshot_list.rb
vagrant-openstack-provider-illuin-0.11.1 lib/vagrant-openstack-provider/action/snapshot_list.rb
vagrant-openstack-provider-0.11.0 lib/vagrant-openstack-provider/action/snapshot_list.rb
vagrant-openstack-provider-0.10.0 lib/vagrant-openstack-provider/action/snapshot_list.rb