Class: VagrantPlugins::Openstack::Action::SnapshotList
- Inherits:
-
AbstractAction
- Object
- AbstractAction
- VagrantPlugins::Openstack::Action::SnapshotList
- Defined in:
- lib/vagrant-openstack-illuin-provider/action/snapshot_list.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, _env) ⇒ SnapshotList
constructor
A new instance of SnapshotList.
Constructor Details
#initialize(app, _env) ⇒ SnapshotList
Returns a new instance of SnapshotList.
7 8 9 |
# File 'lib/vagrant-openstack-illuin-provider/action/snapshot_list.rb', line 7 def initialize(app, _env) @app = app end |
Instance Method Details
#call(env) ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/vagrant-openstack-illuin-provider/action/snapshot_list.rb', line 11 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 |