Class: Fog::Volume::OpenStack::Transfers
- Inherits:
-
OpenStack::Collection
- Object
- Collection
- OpenStack::Collection
- Fog::Volume::OpenStack::Transfers
- Defined in:
- lib/fog/openstack/models/volume/transfers.rb
Instance Attribute Summary
Attributes inherited from OpenStack::Collection
Instance Method Summary collapse
- #accept(transfer_id, auth_key) ⇒ Object
- #all(options = {}) ⇒ Object
- #get(transfer_id) ⇒ Object
- #summary(options = {}) ⇒ Object
Methods inherited from OpenStack::Collection
Instance Method Details
#accept(transfer_id, auth_key) ⇒ Object
26 27 28 29 30 31 32 33 |
# File 'lib/fog/openstack/models/volume/transfers.rb', line 26 def accept(transfer_id, auth_key) # NOTE: This is NOT a method on the Transfer object, since the # receiver cannot see the transfer object in the get_transfer_details # or list_transfers(_detailed) requests. if transfer = service.accept_transfer(transfer_id, auth_key).body['transfer'] new(transfer) end end |
#all(options = {}) ⇒ Object
10 11 12 |
# File 'lib/fog/openstack/models/volume/transfers.rb', line 10 def all( = {}) load_response(service.list_transfers_detailed(), 'transfers') end |
#get(transfer_id) ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/fog/openstack/models/volume/transfers.rb', line 18 def get(transfer_id) if transfer = service.get_transfer_details(transfer_id).body['transfer'] new(transfer) end rescue Fog::Volume::OpenStack::NotFound nil end |
#summary(options = {}) ⇒ Object
14 15 16 |
# File 'lib/fog/openstack/models/volume/transfers.rb', line 14 def summary( = {}) load_response(service.list_transfers(), 'transfers') end |