Created
May 1, 2017 15:51
-
-
Save meeech/e33c0323d54bb3dd20f07523f6736989 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 hidden or 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