Class: Occi::Infrastructure::Storagelink

Inherits:
Core::Link show all
Defined in:
lib/occi/infrastructure/storagelink.rb

Defined Under Namespace

Classes: Offline, Online

Instance Attribute Summary

Attributes inherited from Core::Link

#rel, #source, #target

Attributes inherited from Core::Entity

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

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Core::Link

#as_json, #check, #initialize, #to_string, #to_text_link

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::Link

Class Method Details

.actionsObject



21
22
23
# File 'lib/occi/infrastructure/storagelink.rb', line 21

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

Instance Method Details

#deviceidObject



47
48
49
# File 'lib/occi/infrastructure/storagelink.rb', line 47

def deviceid
  @attributes.occi.storagelink.deviceid if @attributes.occi.storagelink if @attributes.occi
end

#deviceid=(deviceid) ⇒ Object



51
52
53
# File 'lib/occi/infrastructure/storagelink.rb', line 51

def deviceid=(deviceid)
  @attributes.occi!.storagelink!.deviceid = deviceid
end

#mountpointObject



55
56
57
# File 'lib/occi/infrastructure/storagelink.rb', line 55

def mountpoint
  @attributes.occi.storagelink.mountpoint if @attributes.occi.storagelink if @attributes.occi
end

#mountpoint=(mountpoint) ⇒ Object



59
60
61
# File 'lib/occi/infrastructure/storagelink.rb', line 59

def mountpoint=(mountpoint)
  @attributes.occi!.storagelink!.mountpoint = mountpoint
end

#stateObject



63
64
65
# File 'lib/occi/infrastructure/storagelink.rb', line 63

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

#state=(state) ⇒ Object



67
68
69
# File 'lib/occi/infrastructure/storagelink.rb', line 67

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