-
Notifications
You must be signed in to change notification settings - Fork 882
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
Translate key names for OpenStack bond properties #5367
Conversation
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.
Thanks for improving cloud-init. In addition to the inline comments, could we add some unit-tests under tests/unittests/sources/helpers/test_openstack.py
covering this change?
# cloudinit schema but 'bond_' in OpenStack | ||
# network_data.json schema. Translate them to what | ||
# is expected by cloudinit. | ||
translated_key = re.sub(r'^(bond)_(.+)$', r'\1-\2', k) |
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.
Being this a simple split, could do something in the lines of the following and avoid using re
to reduce complexity:
translated_key = k.split("bond_", 1)[-1]
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.
Thanks for the suggestion. Updated as requested to remove re
.
Could you sign the CLA, please? https://docs.cloud-init.io/en/latest/development/index.html#prerequisites |
I'm working to get approval for the CLA, I should have it signed near term. |
Hello! Thank you for this proposed change to cloud-init. This pull request is now marked as stale as it has not seen any activity in 14 days. If no activity occurs within the next 7 days, this pull request will automatically close. If you are waiting for code review and you are seeing this message, apologies! Please reply, tagging TheRealFalcon, and he will ensure that someone takes a look soon. (If the pull request is closed and you would like to continue working on it, please do tag TheRealFalcon to reopen it.) |
@jcmoore3 Ping! Any updates on this? We can't merge any of your PRs until this happens. If you respond letting us know the status of this I will drop the stale-pr tag. |
Apologies that the CLA is taking so long. This needs to go through my company's internal open source approval process. I do not anticipate any issues, it just takes time. I'm hoping to have final internal approval this week. |
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.
LGTM!
…anonical#5367) There is a discrepancy between the properties key name formatting in the OpenStack network_data.json and cloudinit network-config.json specifications. Ensure `bond_` is translated to `bond-` when the OpenStack configuration is parsed by cloudinit. Fixes canonicalGH-5366 Co-authored-by: Alberto Contreras <[email protected]>
After 70f7e78, mac_address is not rendered for in openstack for network config v1. Fix the unit test to reflect that.
Force-pushed to fix commit message. |
…5367) There is a discrepancy between the properties key name formatting in the OpenStack network_data.json and cloudinit network-config.json specifications. Ensure `bond_` is translated to `bond-` when the OpenStack configuration is parsed by cloudinit. Fixes GH-5366 Co-authored-by: Alberto Contreras <[email protected]>
…5367) There is a discrepancy between the properties key name formatting in the OpenStack network_data.json and cloudinit network-config.json specifications. Ensure `bond_` is translated to `bond-` when the OpenStack configuration is parsed by cloudinit. Fixes GH-5366 Co-authored-by: Alberto Contreras <[email protected]>
After 70f7e78, mac_address is not rendered for in openstack for network config v1. Fix the unit test to reflect that.
Ensure that properties for bonded interfaces are translated properly from the OpenStack network_config.json format.
Fixes #5366
Proposed Commit Message
Additional Context
Test Steps
Checklist
Merge type