Skip to content

Instantly share code, notes, and snippets.

@meeech
Created May 1, 2017 15:51
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save meeech/e33c0323d54bb3dd20f07523f6736989 to your computer and use it in GitHub Desktop.
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);
/**
* 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