class Fog::OpenStack::Model
Attributes
project[RW]
In some cases it's handy to be able to store the project for the record, e.g. swift doesn't contain project info in the result, so we can track it in this attribute based on what project was used in the request
Public Class Methods
new(attributes)
click to toggle source
Initialize a record
Calls superclass method
# File lib/fog/openstack/models/model.rb, line 14 def initialize(attributes) # Old 'connection' is renamed as service and should be used instead prepare_service_value(attributes) super end
Public Instance Methods
create()
click to toggle source
Creates a record
# File lib/fog/openstack/models/model.rb, line 32 def create # uncomment when exception is defined in another PR # raise Fog::OpenStack::Errors::InterfaceNotImplemented.new('Method :get is not implemented') end
destroy()
click to toggle source
Destroys a record
# File lib/fog/openstack/models/model.rb, line 38 def destroy # uncomment when exception is defined in another PR # raise Fog::OpenStack::Errors::InterfaceNotImplemented.new('Method :get is not implemented') end
save()
click to toggle source
Saves a record, call create or update based on identity, which marks if object was already created
# File lib/fog/openstack/models/model.rb, line 21 def save identity ? update : create end
update()
click to toggle source
Updates a record
# File lib/fog/openstack/models/model.rb, line 26 def update # uncomment when exception is defined in another PR # raise Fog::OpenStack::Errors::InterfaceNotImplemented.new('Method :get is not implemented') end