types/network: introduce MACAddress type (temporary placement)#51319
types/network: introduce MACAddress type (temporary placement)#513192003Aditya wants to merge 1 commit intomoby:masterfrom
Conversation
|
Thank you for contributing! It appears your commit message is missing a DCO sign-off, We require all commit messages to have a There is no need to open a new pull request, but to fix this (and make CI pass), Unfortunately, it's not possible to do so through GitHub's web UI, so this needs You can find some instructions in the output of the DCO check (which can be found Steps to do so "roughly" come down to:
Sorry for the hassle (I wish GitHub would make this a bit easier to do), and let me know if you need help or more detailed instructions! |
|
@thaJeztah Thank you for pointing that out! I’m sorry sir, I missed that. I’ll follow your instructions and fix it right away. |
|
@2003Aditya no worries! We discussed the related ticket in our maintainers call, and it looks like some more changes were needed; as we wanted to get these changes in before tagging the next beta of the API module, @corhere volunteered to work on making this change. Hope that's ok for you (sorry for going that route, but we had to move fast on this one 😅); please don't let that stop you from contributing to this project! ❤️ |
Fixes #51146
- What I did
Introduced a new
MACAddresstype that wrapsnet.HardwareAddrwith custom JSON marshaling and unmarshaling logic to ensure consistent serialization/deserialization of MAC addresses.Currently added in
api/types/network/endpoint.gotemporarily for review and discussion on ideal placement.- How I did it
MACAddresstype withString(),MarshalJSON(), andUnmarshalJSON()methods.MacAddressfield inEndpointSettingswith this new type.dockerdfrom this branch.MacAddressserialization.