Class: IbmCloudRest::Storage

Inherits:
Object
  • Object
show all
Defined in:
lib/ibm_cloud_rest/core/storage.rb

Constant Summary collapse

STATES =
%w[NEW
 CREATING
 DELETING
 DELETED
 UNMOUNTED
 MOUNTED
 FAILED
]

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(server = 'https://www.ibm.com', base_path = '/cloud/developer/api/rest/20090403/storage/', uuid_batch_count = 1000) ⇒ Storage

Returns a new instance of Storage.



12
13
14
# File 'lib/ibm_cloud_rest/core/storage.rb', line 12

def initialize(server = 'https://www.ibm.com', base_path= '/cloud/developer/api/rest/20090403/storage/', uuid_batch_count = 1000)
  @uri = server+base_path
end

Instance Attribute Details

#uriObject

Returns the value of attribute uri.



11
12
13
# File 'lib/ibm_cloud_rest/core/storage.rb', line 11

def uri
  @uri
end

Instance Method Details

#get(id) ⇒ Object



15
16
17
# File 'lib/ibm_cloud_rest/core/storage.rb', line 15

def get(id)
    IbmCloudRest.get @uri+id.to_s
end