Class: Brocade::SAN::Provisioning::Agent::Transaction
- Inherits:
-
Object
- Object
- Brocade::SAN::Provisioning::Agent::Transaction
- Defined in:
- lib/brocadesan/provisioning.rb
Overview
simple Transaction class that processes Switch#cfg_transaction output
Value of id
means:
- :id
-
-1 - no transaction exist
nil - unexpected result
string - string representation of current transaction id
Instance Attribute Summary collapse
-
#abortable ⇒ Object
writeonly
Sets the attribute abortable.
-
#id ⇒ Object
Specifies the id of Transaction.
Instance Method Summary collapse
-
#abortable? ⇒ Boolean
Returns abortable flag.
-
#initialize(opts = {}) ⇒ Transaction
constructor
takes hash returned by cfg_transaction command.
Constructor Details
#initialize(opts = {}) ⇒ Transaction
takes hash returned by cfg_transaction command
864 865 866 867 868 869 870 |
# File 'lib/brocadesan/provisioning.rb', line 864 def initialize(opts={}) #:nodoc: # empty hash means unexpected result of cfg_transaction if [:id, :abortable].all? {|k| opts.key? k} @id = opts[:id] @abortable = opts[:abortable] end end |
Instance Attribute Details
#abortable=(value) ⇒ Object (writeonly)
Sets the attribute abortable
859 860 861 |
# File 'lib/brocadesan/provisioning.rb', line 859 def abortable=(value) @abortable = value end |
#id ⇒ Object
Specifies the id of Transaction
861 862 863 |
# File 'lib/brocadesan/provisioning.rb', line 861 def id @id end |
Instance Method Details
#abortable? ⇒ Boolean
Returns abortable flag
873 874 875 |
# File 'lib/brocadesan/provisioning.rb', line 873 def abortable? @abortable end |