Method: Deltacloud::Drivers::Openstack::OpenstackDriver#storage_snapshots
- Defined in:
- lib/deltacloud/drivers/openstack/openstack_driver.rb
#storage_snapshots(credentials, opts = {}) ⇒ Object
454 455 456 457 458 459 460 461 462 463 464 465 466 467 |
# File 'lib/deltacloud/drivers/openstack/openstack_driver.rb', line 454 def storage_snapshots(credentials, opts={}) vs = new_client(credentials, "volume") snapshots = [] safely do if opts[:id] snapshots << convert_snapshot(vs.get_snapshot(opts[:id])) else vs.snapshots.each do |snap| snapshots << convert_snapshot(snap) end end end snapshots end |