class Fog::Compute::OneAndOne::SharedStorage

Public Instance Methods

add_servers(options = {}) click to toggle source
# File lib/oneandone/models/compute/shared_storage.rb, line 51
def add_servers(options = {})

  requires :id

  response = service.add_shared_storage_servers(shared_storage_id: id,
    servers: options[:servers])

  # Merge Attributes
  merge_attributes(response.body)

  true

end
destroy() click to toggle source
# File lib/oneandone/models/compute/shared_storage.rb, line 81
def destroy

  requires :id

  service.delete_shared_storage(id)
  
  true

end
ready?() click to toggle source
# File lib/oneandone/models/compute/shared_storage.rb, line 92
def ready?

  state == 'ACTIVE'

end
remove_server(options = {}) click to toggle source
# File lib/oneandone/models/compute/shared_storage.rb, line 66
def remove_server(options = {})

  requires :id

  response = service.remove_shared_storage_server(shared_storage_id: id,
    server_id: options[:server_id])

  # Merge Attributes
  merge_attributes(response.body)

  true

end
save() click to toggle source
# File lib/oneandone/models/compute/shared_storage.rb, line 19
def save

  requires :name, :size

  # Perform Request
  response = service.create_shared_storage(name: name, size: size,
    description: description, datacenter_id: datacenter_id)

  # Merge Attributes
  merge_attributes(response.body)

  true

end
update(options = {}) click to toggle source
# File lib/oneandone/models/compute/shared_storage.rb, line 35
def update(options = {})

  requires :id

  response = service.update_shared_storage(shared_storage_id: id,
    name: options[:name], description: options[:description],
    size: options[:size])

  # Merge Attributes
  merge_attributes(response.body)

  true

end