Class: Occi::Infrastructure::Storage

Inherits:
Core::Resource show all
Defined in:
lib/occi/infrastructure/storage.rb

Defined Under Namespace

Classes: Backup, Offline, Online, Resize, Snapshot

Instance Attribute Summary

Attributes inherited from Core::Resource

#links

Attributes inherited from Core::Entity

#actions, #attributes, #id, #kind, #mixins, #model

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Core::Resource

#as_json, #initialize, #link, #model=, #summary, #summary=, #to_header, #to_text

Methods inherited from Core::Entity

#as_json, check, #check, #initialize, #inspect, #location, new, #title, #title=, #to_header, #to_s, #to_text, type_identifier

Constructor Details

This class inherits a constructor from Occi::Core::Resource

Class Method Details

.actionsObject



48
49
50
# File 'lib/occi/infrastructure/storage.rb', line 48

def self.actions
  Occi::Core::Actions.new << Online.new << Offline.new << Backup.new << Snapshot.new
end

Instance Method Details

#sizeObject



78
79
80
# File 'lib/occi/infrastructure/storage.rb', line 78

def size
  @attributes.occi.storage.size if @attributes.occi.storage if @attributes.occi
end

#size=(size) ⇒ Object



82
83
84
# File 'lib/occi/infrastructure/storage.rb', line 82

def size=(size)
  @attributes.occi!.storage!.size = size
end

#stateObject



86
87
88
# File 'lib/occi/infrastructure/storage.rb', line 86

def state
  @attributes.occi.storage.state if @attributes.occi.storage if @attributes.occi
end

#state=(state) ⇒ Object



90
91
92
# File 'lib/occi/infrastructure/storage.rb', line 90

def state=(state)
  @attributes.occi!.storage!.state = state
end