Collect all IP addresses on eth0#457
Conversation
|
Hey @JarryShaw , How was this change tested and what about other IP addresses stored in eth1 or eth2? Hard-coding the logic to only fetch eth0 IP addresses as per your requirements would not be the best way of coding over here since other Device Client users might not need eth0 IP addresses or might require some other IP addresses. We should have a generalized way of fetching system details which can be used by different users for their different use cases. |
…collect MAC address (default to eth0)
|
Hi @HarshGandhi-AWS , thanks for the comments. We've just pushed another commit to address the hardcoded network interface issue. We're proposing to add a |
Motivation
As discovered internally by our team, on certain devices, there might be multiple IP addresses associated on interface
eth0.This change will collect all of these IP addresses on the
eth0interface and send them altogether to the pre-provisioning Lambda instance for further processing.NOTE: I was unable to figure out a programming approach to distinguish the two IP addresses as listed above. The address with
scope globalis the one we're looking for. However, it seems that the stdlib doesn't provide any info and/or API to check that. Should anyone have a better idea, do please let us know.Modifications
Change summary
Please describe what changes are included in this pull request.
Collect all IP addresses on
eth0interface and format them as a comma separated string. Also updating the parameter key name fromDeviceIPAddresstoDeviceIPAddressesfor backward compatibility.Revision diff summary
If there is more than one revision, please explain what has been changed since the last revision.
Testing
Is your change tested? If not, please justify the reason.
Please list your testing steps and test results.
Tested on the above described camera and the provisioning was successful.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.