Class: NasneChecker::Nasne
- Inherits:
-
Object
- Object
- NasneChecker::Nasne
- Defined in:
- lib/nasne_checker/nasne.rb
Instance Attribute Summary collapse
-
#host ⇒ Object
readonly
Returns the value of attribute host.
Instance Method Summary collapse
- #hdd_detail ⇒ Object
- #hdd_info(id) ⇒ Object
- #hdd_list ⇒ Object
-
#initialize(host) ⇒ Nasne
constructor
A new instance of Nasne.
- #reserved_list ⇒ Object
Constructor Details
#initialize(host) ⇒ Nasne
8 9 10 11 |
# File 'lib/nasne_checker/nasne.rb', line 8 def initialize(host) @host = host @clients = {} end |
Instance Attribute Details
#host ⇒ Object (readonly)
Returns the value of attribute host.
6 7 8 |
# File 'lib/nasne_checker/nasne.rb', line 6 def host @host end |
Instance Method Details
#hdd_detail ⇒ Object
34 35 36 37 |
# File 'lib/nasne_checker/nasne.rb', line 34 def hdd_detail hdd = hdd_list[:HDD].select{ |info| info[:registerFlag] == 1 } hdd.map {|info| hdd_info(info[:id])[:HDD] } end |
#hdd_info(id) ⇒ Object
30 31 32 |
# File 'lib/nasne_checker/nasne.rb', line 30 def hdd_info(id) get('64210', '/status/HDDInfoGet', id: id).body end |
#hdd_list ⇒ Object
26 27 28 |
# File 'lib/nasne_checker/nasne.rb', line 26 def hdd_list get('64210', '/status/HDDListGet').body end |
#reserved_list ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/nasne_checker/nasne.rb', line 13 def reserved_list get( '64220', '/schedule/reservedListGet', searchCriteria: 0, filter: 0, startingIndex: 0, requestedCount: 0, sortCriteria: 0, withDescriptionLong: 0, withUserData: 1 ).body end |