Class: Latitude::API::Resources::Storage::Volume
Defined Under Namespace
Classes: Initiator
Constant Summary
Constants inherited
from APIResource
APIResource::READ_ONLY_ATTRIBUTES
Instance Attribute Summary collapse
Attributes inherited from APIResource
#id, #meta, #path_params, #raw_data, #type
Class Method Summary
collapse
Instance Method Summary
collapse
all, list
create
retrieve
delete
Methods inherited from APIResource
#==, #[], #[]=, #as_json, #attributes, #changed?, class_url, config_source, construct_from, #delete, execute_request, extract_path_params, #hash, id_prefix, #initialize, #inspect, instance_url, #method_missing, path_param_keys, #refresh, resource_path, resource_type, #resource_url, #respond_to_missing?, #save, #to_h, #unsaved_attributes, with_config, #write_attribute
#attribute, #attribute_specs
#attribute_spec, #read_attribute, #wrap_attribute
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class Latitude::API::APIResource
Instance Attribute Details
#connector_id ⇒ String
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
# File 'lib/latitude/api/resources/storage_volume.rb', line 23
class Volume < APIResource
class Initiator < APIObject
attribute :nqn, :string, read_only: true
end
attribute :name, :string
attribute :size_in_gb, :integer
attribute :created_at, :time, read_only: true
attribute :namespace_id, :string
attribute :connector_id, :string
attribute :initiators, [Initiator]
attribute :project, Objects::Project
attribute :team, Objects::Team
resource_type "volumes"
resource_path "/storage/volumes"
id_prefix "vol_"
extend Operations::List
extend Operations::Create
extend Operations::Retrieve
extend Operations::Delete
class << self
def mount(id, server_id: nil, opts: {})
attrs = { server_id: server_id }.compact
body = JSONAPI.encode(type: "volumes", attributes: attrs)
parsed = execute_request(method: :post, path: "#{instance_url(id)}/mount", body: body, opts: opts)
parsed
end
end
def mount(server_id: nil, opts: {})
self.class.mount(id, server_id: server_id, opts: opts)
end
end
|
#created_at ⇒ Time
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
# File 'lib/latitude/api/resources/storage_volume.rb', line 23
class Volume < APIResource
class Initiator < APIObject
attribute :nqn, :string, read_only: true
end
attribute :name, :string
attribute :size_in_gb, :integer
attribute :created_at, :time, read_only: true
attribute :namespace_id, :string
attribute :connector_id, :string
attribute :initiators, [Initiator]
attribute :project, Objects::Project
attribute :team, Objects::Team
resource_type "volumes"
resource_path "/storage/volumes"
id_prefix "vol_"
extend Operations::List
extend Operations::Create
extend Operations::Retrieve
extend Operations::Delete
class << self
def mount(id, server_id: nil, opts: {})
attrs = { server_id: server_id }.compact
body = JSONAPI.encode(type: "volumes", attributes: attrs)
parsed = execute_request(method: :post, path: "#{instance_url(id)}/mount", body: body, opts: opts)
parsed
end
end
def mount(server_id: nil, opts: {})
self.class.mount(id, server_id: server_id, opts: opts)
end
end
|
#initiators ⇒ Array<Initiator>
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
# File 'lib/latitude/api/resources/storage_volume.rb', line 23
class Volume < APIResource
class Initiator < APIObject
attribute :nqn, :string, read_only: true
end
attribute :name, :string
attribute :size_in_gb, :integer
attribute :created_at, :time, read_only: true
attribute :namespace_id, :string
attribute :connector_id, :string
attribute :initiators, [Initiator]
attribute :project, Objects::Project
attribute :team, Objects::Team
resource_type "volumes"
resource_path "/storage/volumes"
id_prefix "vol_"
extend Operations::List
extend Operations::Create
extend Operations::Retrieve
extend Operations::Delete
class << self
def mount(id, server_id: nil, opts: {})
attrs = { server_id: server_id }.compact
body = JSONAPI.encode(type: "volumes", attributes: attrs)
parsed = execute_request(method: :post, path: "#{instance_url(id)}/mount", body: body, opts: opts)
parsed
end
end
def mount(server_id: nil, opts: {})
self.class.mount(id, server_id: server_id, opts: opts)
end
end
|
#name ⇒ String
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
# File 'lib/latitude/api/resources/storage_volume.rb', line 23
class Volume < APIResource
class Initiator < APIObject
attribute :nqn, :string, read_only: true
end
attribute :name, :string
attribute :size_in_gb, :integer
attribute :created_at, :time, read_only: true
attribute :namespace_id, :string
attribute :connector_id, :string
attribute :initiators, [Initiator]
attribute :project, Objects::Project
attribute :team, Objects::Team
resource_type "volumes"
resource_path "/storage/volumes"
id_prefix "vol_"
extend Operations::List
extend Operations::Create
extend Operations::Retrieve
extend Operations::Delete
class << self
def mount(id, server_id: nil, opts: {})
attrs = { server_id: server_id }.compact
body = JSONAPI.encode(type: "volumes", attributes: attrs)
parsed = execute_request(method: :post, path: "#{instance_url(id)}/mount", body: body, opts: opts)
parsed
end
end
def mount(server_id: nil, opts: {})
self.class.mount(id, server_id: server_id, opts: opts)
end
end
|
#namespace_id ⇒ String
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
# File 'lib/latitude/api/resources/storage_volume.rb', line 23
class Volume < APIResource
class Initiator < APIObject
attribute :nqn, :string, read_only: true
end
attribute :name, :string
attribute :size_in_gb, :integer
attribute :created_at, :time, read_only: true
attribute :namespace_id, :string
attribute :connector_id, :string
attribute :initiators, [Initiator]
attribute :project, Objects::Project
attribute :team, Objects::Team
resource_type "volumes"
resource_path "/storage/volumes"
id_prefix "vol_"
extend Operations::List
extend Operations::Create
extend Operations::Retrieve
extend Operations::Delete
class << self
def mount(id, server_id: nil, opts: {})
attrs = { server_id: server_id }.compact
body = JSONAPI.encode(type: "volumes", attributes: attrs)
parsed = execute_request(method: :post, path: "#{instance_url(id)}/mount", body: body, opts: opts)
parsed
end
end
def mount(server_id: nil, opts: {})
self.class.mount(id, server_id: server_id, opts: opts)
end
end
|
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
# File 'lib/latitude/api/resources/storage_volume.rb', line 23
class Volume < APIResource
class Initiator < APIObject
attribute :nqn, :string, read_only: true
end
attribute :name, :string
attribute :size_in_gb, :integer
attribute :created_at, :time, read_only: true
attribute :namespace_id, :string
attribute :connector_id, :string
attribute :initiators, [Initiator]
attribute :project, Objects::Project
attribute :team, Objects::Team
resource_type "volumes"
resource_path "/storage/volumes"
id_prefix "vol_"
extend Operations::List
extend Operations::Create
extend Operations::Retrieve
extend Operations::Delete
class << self
def mount(id, server_id: nil, opts: {})
attrs = { server_id: server_id }.compact
body = JSONAPI.encode(type: "volumes", attributes: attrs)
parsed = execute_request(method: :post, path: "#{instance_url(id)}/mount", body: body, opts: opts)
parsed
end
end
def mount(server_id: nil, opts: {})
self.class.mount(id, server_id: server_id, opts: opts)
end
end
|
#size_in_gb ⇒ Integer
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
# File 'lib/latitude/api/resources/storage_volume.rb', line 23
class Volume < APIResource
class Initiator < APIObject
attribute :nqn, :string, read_only: true
end
attribute :name, :string
attribute :size_in_gb, :integer
attribute :created_at, :time, read_only: true
attribute :namespace_id, :string
attribute :connector_id, :string
attribute :initiators, [Initiator]
attribute :project, Objects::Project
attribute :team, Objects::Team
resource_type "volumes"
resource_path "/storage/volumes"
id_prefix "vol_"
extend Operations::List
extend Operations::Create
extend Operations::Retrieve
extend Operations::Delete
class << self
def mount(id, server_id: nil, opts: {})
attrs = { server_id: server_id }.compact
body = JSONAPI.encode(type: "volumes", attributes: attrs)
parsed = execute_request(method: :post, path: "#{instance_url(id)}/mount", body: body, opts: opts)
parsed
end
end
def mount(server_id: nil, opts: {})
self.class.mount(id, server_id: server_id, opts: opts)
end
end
|
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
# File 'lib/latitude/api/resources/storage_volume.rb', line 23
class Volume < APIResource
class Initiator < APIObject
attribute :nqn, :string, read_only: true
end
attribute :name, :string
attribute :size_in_gb, :integer
attribute :created_at, :time, read_only: true
attribute :namespace_id, :string
attribute :connector_id, :string
attribute :initiators, [Initiator]
attribute :project, Objects::Project
attribute :team, Objects::Team
resource_type "volumes"
resource_path "/storage/volumes"
id_prefix "vol_"
extend Operations::List
extend Operations::Create
extend Operations::Retrieve
extend Operations::Delete
class << self
def mount(id, server_id: nil, opts: {})
attrs = { server_id: server_id }.compact
body = JSONAPI.encode(type: "volumes", attributes: attrs)
parsed = execute_request(method: :post, path: "#{instance_url(id)}/mount", body: body, opts: opts)
parsed
end
end
def mount(server_id: nil, opts: {})
self.class.mount(id, server_id: server_id, opts: opts)
end
end
|
Class Method Details
.mount(id, server_id: nil, opts: {}) ⇒ Object
49
50
51
52
53
54
|
# File 'lib/latitude/api/resources/storage_volume.rb', line 49
def mount(id, server_id: nil, opts: {})
attrs = { server_id: server_id }.compact
body = JSONAPI.encode(type: "volumes", attributes: attrs)
parsed = execute_request(method: :post, path: "#{instance_url(id)}/mount", body: body, opts: opts)
parsed
end
|
Instance Method Details
#mount(server_id: nil, opts: {}) ⇒ Object
57
58
59
|
# File 'lib/latitude/api/resources/storage_volume.rb', line 57
def mount(server_id: nil, opts: {})
self.class.mount(id, server_id: server_id, opts: opts)
end
|