openmainframeproject / feilong

Feilong is a open source z/VM cloud connector project under the Open Mainframe Project umbrella that will accelerate the z/VM adoption, extending its ecosystem and its user experience. It provides a set of APIs to operate z/VM including guest, image, network, volume etc.
https://www.openmainframeproject.org/projects/feilong
Apache License 2.0
35 stars 70 forks source link

Take first IP address found (usually IPv4) #806

Closed Bischoff closed 5 months ago

Bischoff commented 7 months ago

Minimal fix for issue #805

Instead of using the last IP address met, at the risk of taking an useless IPv6 link-local address, take the first one met.

Before approving and merging this, please read issue #805 for a discussion of the problem, and other possible fixes.

Bischoff commented 5 months ago

The code changes LGTM. Perhaps the UT cases need be updated accordingly too.

OK, I beefed up the get_adapter_info unit test by adding IPv6 addresses consistent with the existing MACs.

zhshuj commented 5 months ago

@jichenjc @bjhuangr Can you help review?