-
Notifications
You must be signed in to change notification settings - Fork 14
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
DNS Info Modules #40
base: main
Are you sure you want to change the base?
DNS Info Modules #40
Conversation
|
||
# Filter data by deleting all entries without the right criteria | ||
i = 0 | ||
while i < len(data): |
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.
double loop (and popping from array) is not good. Merge this into prev loop
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.
Do you have an Idea how I can merge that into the previous loop?
And why is that bad? Those aren't double loops, the runtime should be still linear O(n).
@gtema
|
||
# Filter data by deleting all entries without the right criteria | ||
i = 0 | ||
while i < len(data): |
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.
and again - merge loops
plugins/modules/dns_zone_info.py
Outdated
query = {} | ||
|
||
if self.params['zone_type']: | ||
query['zone_type'] = self.params['zone_type'] |
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.
lots of filters are already suported by API (https://docs.openstack.org/api-ref/dns/?expanded=list-floatingip-s-ptr-record-detail,list-recordsets-in-a-zone-detail,list-zones-detail#list-zones), please pass as much as possible into list
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.
@gtema I looked at our doc under https://docs.otc.t-systems.com/en-us/api/dns/dns_api_62002.html and there nothing of that is written. WIll change that
Update: When requesting with e.g. the Query Parameter "name" which is supported according to the OpenStack Docu, it doesn't work.
"msg": "Invalid query params: name"
|
||
# Filter data by deleting all entries without the right criteria | ||
i = 0 | ||
while i < len(data): |
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.
same as above
Don't merge this yet. |
recheck |
3 similar comments
recheck |
recheck |
recheck |
recheck |
2 similar comments
recheck |
recheck |
No description provided.