Created
May 1, 2017 15:51
Star
You must be signed in to star a gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mapping; | |
var oids = { foo: { x: 'bar' } }; | |
_.each(oids, function (row, index) { | |
// driver.log.fatal(row.entPhysicalClass, this.snmp.get(row.entPhysicalClass)); | |
mapping[index] = { | |
name: row.x | |
}; | |
}, this); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Keep track of all elements in the system as a flat collection | |
* key is the oid index from the table | |
*/ | |
interface MyNode { | |
name: string | |
} | |
interface Mapping{ | |
[index: string] : MyNode | |
} | |
var mapping: Mapping; | |
var oids = {foo: {x:'bar'}}; | |
_.each(oids, function(row ,index){ | |
// driver.log.fatal(row.entPhysicalClass, this.snmp.get(row.entPhysicalClass)); | |
mapping[index] = { | |
name: row.x | |
} | |
}, this) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment