-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added a job/tasks to add switch Macs to lookups #219
Conversation
.then(function(snmpData) { | ||
return _.map(snmpData.data, function(val, key) { | ||
if (key.startsWith("IF-MIB::ifPhysAddress")) { | ||
val = _.map(val.split(':'), function(chunk) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A comment on why this is necessary might save future developers from confusion :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, put some sample data here will help other developer to understand the code.
👍 |
var self = this; | ||
return waterline.catalogs.findLatestCatalogOfSource(self.nodeId, 'snmp-1') | ||
.then(function(snmpData) { | ||
return _.map(snmpData.data, function(val, key) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about if catalog 'snmp-1' doesn't exist?
snmpData.data will throw a reference error because snmpData is undefined
, but this error is not clear enough for debugging.
+1 after comment is fixed. |
👍 after @yyscamper's comments as well. |
solves https://github.com/RackHD/RackHD/issues/236
@RackHD/corecommitters @johren
Added a job that gets the mac addresses (including management) and adds them to the lookups collection.
supports on RackHD/on-taskgraph#107