Module: Fog::Volume::OpenStack::Transfers
- Included in:
- V1::Transfers, V2::Transfers
- Defined in:
- lib/fog/openstack/models/volume/transfers.rb
Instance Method Summary collapse
- #accept(transfer_id, auth_key) ⇒ Object
- #all(options = {}) ⇒ Object
- #get(transfer_id) ⇒ Object
- #summary(options = {}) ⇒ Object
Instance Method Details
#accept(transfer_id, auth_key) ⇒ Object
24 25 26 27 28 29 30 31 |
# File 'lib/fog/openstack/models/volume/transfers.rb', line 24 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
8 9 10 |
# File 'lib/fog/openstack/models/volume/transfers.rb', line 8 def all( = {}) load_response(service.list_transfers_detailed(), 'transfers') end |
#get(transfer_id) ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/fog/openstack/models/volume/transfers.rb', line 16 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
12 13 14 |
# File 'lib/fog/openstack/models/volume/transfers.rb', line 12 def summary( = {}) load_response(service.list_transfers(), 'transfers') end |