Table of Contents |
---|
Status | ||||
---|---|---|---|---|
|
Internal libraries
The internal libraries had been refactored.
...
As the new data backend has been moved from NMIS files to the mongo database, the node information access is different.
Sys::ndinfo has been replaced by Sys::nmisng_node and Node::nmisng_node can be accessed directly rather than accessing Sys::nmisng_node
- Sys::ndinfo->{system} becomes hash returned by Node::configuration()
- Node::Configuration()->{roleType} replaces NMIS::loadLocalNodeTable()>{<a_node_name>} {role}
- Be warned that Sys::ndinfo->{system} key values often carry the strings "true" and "false" for boolean whereas Node::configuration() returns hash key values will carry 0 and 1 for boolean.
- Therefore one should always use Common::getBool() to evaluate key values.
- Furthermore, Node::configuration() returns a clone copy each call, therefore it is advisable to set a variable if re-used:
- Sys::ndinfo->{status} becomes Node::get_status_model_data()
- NMIS8 ref(Sys::ndinfo->{status}) versus NMIS9 ref(Node::get_status_model_data)
- NMIS8 Sys::ndinfo->{status} was a hash of hashes, whereas
- NMIS9 Node::get_status_model_data() is an array of hashes.
- NMIS8 Sys::ndinfo->{status}->{source} is not a hashkey in Node::get_status_model_data()
- NMIS8 Sys::ndinfo->{status} has entries either by 'source' or by 'index', whereas
- NMIS9 Node::get_status_model_data() only has entries by 'index'
- NMIS8 <object>->{<a_node>}->{active} should be replaced by
- Node::configuration→{active}
- NMIS8 ref(Sys::ndinfo->{status}) versus NMIS9 ref(Node::get_status_model_data)
- Sys::ndinfo->{sysUpTime} is replaced by Node::node_summary->{sysUpTimeSec}
...