Skip to content
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

Use a custom designate driver for FIP's #70

Open
wants to merge 14 commits into
base: stable/yoga-m3
Choose a base branch
from

Conversation

misamoylov
Copy link

No description provided.

@misamoylov misamoylov force-pushed the fip_update branch 5 times, most recently from 672dc6d to 1be302f Compare November 15, 2024 12:53
@misamoylov misamoylov marked this pull request as ready for review November 15, 2024 13:17
Use designate /v2/reverse/floatingips/ endpoint to create DNS zones and
DNS entries during FIP creation.
Current driver uses zones and recordset endpoints instead of specific
designate endpoint.
@misamoylov misamoylov marked this pull request as draft January 30, 2025 14:02
@misamoylov misamoylov marked this pull request as ready for review February 5, 2025 10:09
Copy link

@mutax mutax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only some minor things

@misamoylov misamoylov requested a review from mutax February 12, 2025 10:13
Comment on lines +80 to +81
class DesignateCcloud(driver.ExternalDNSService):
"""Driver for Designate."""
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like your code is almost identical to neutron.services.externaldns.drivers.designate.driver.Designate. You could inherit that class and then only use the methods that changed, i.e. create_record_set() and delete_record_set.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I read the git log correctly, we already extensively modified that driver compared to upstream.
This means updating to a new release would mean patching two classes. If we want to avoid that we would need to compare the currently proposed new driver to upstream first and then overwrite the changed methods.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we already have a changes for driver.py.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I see. Would it then make sense to - in an extra commit - change the driver back to original? Then we have the usptream driver there and only our changes in our own driver.

Comment on lines +244 to +245
client, admin_client = get_all_projects_edit_managed_client(
context)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be the only change to the already existing Designate externaldns driver for this class. Why do we need this change here? It doesn't seem to be related to the FIP problem you set out to solve. If we don't need it we could just use the already existing delete_record_set() and would have less code duplication.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need it to avoid leftover ptr's.

@@ -0,0 +1,654 @@
# Copyright 2012 VMware, Inc.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A lot in this file seems to be copypasted from different parts of the neutron tests. Please import all unchanged classes from somewhere else and don't just copypaste them into your code. Only keep things you are actually changing. Please also only keep tests that actually test something relevant to your change. If it's not actually testing something regarding your own class we don't need to copy it over.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no sense to import classes from other code if we won't to stay more independent from upstream changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants