Class: Morpheus::StorageVolumesInterface
- Inherits:
-
RestInterface
- Object
- RestInterface
- Morpheus::StorageVolumesInterface
- Defined in:
- lib/morpheus/api/storage_volumes_interface.rb
Instance Method Summary collapse
- #base_path ⇒ Object
- #resize(id, payload) ⇒ Object
-
#update_tenant(id, payload, params = {}, headers = {}) ⇒ Object
Transfer ownership of a storage volume to another tenant.
Instance Method Details
#base_path ⇒ Object
5 6 7 |
# File 'lib/morpheus/api/storage_volumes_interface.rb', line 5 def base_path "/api/storage-volumes" end |
#resize(id, payload) ⇒ Object
9 10 11 12 13 14 |
# File 'lib/morpheus/api/storage_volumes_interface.rb', line 9 def resize(id,payload) url = "#{@base_url}/api/storage-volumes/#{id}/resize" headers = { :params => {},:authorization => "Bearer #{@access_token}", 'Content-Type' => 'application/json' } opts = {method: :put, url: url, headers: headers, payload: payload.to_json} execute(opts) end |
#update_tenant(id, payload, params = {}, headers = {}) ⇒ Object
Transfer ownership of a storage volume to another tenant.
The server expects { "storageVolume": { "tenant": { "id":
19 20 21 22 |
# File 'lib/morpheus/api/storage_volumes_interface.rb', line 19 def update_tenant(id, payload, params={}, headers={}) validate_id!(id) execute(method: :put, url: "#{base_path}/#{CGI::escape(id.to_s)}", params: params, payload: payload, headers: headers) end |