-
Notifications
You must be signed in to change notification settings - Fork 22
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
Fix: Resolved errors for integration test in github action #50
base: v2
Are you sure you want to change the base?
Conversation
@@ -284,27 +284,7 @@ | |||
that: | |||
- subnet is not failed | |||
- subnet_info.objects | length == 1 | |||
- subnet_info.objects[0].ddns_send_updates == false | |||
|
|||
- name: "Create a Subnet with ddns_ttl_percent set to 25" |
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.
Instead of deleting the Task , it would be a better idea to comment it out and add the reason as well as the ticket number indicating why the task is skipped
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.
done
@@ -266,12 +266,12 @@ | |||
- subnet_info.objects | length == 1 | |||
- subnet_info.objects[0].ddns_generate_name == true | |||
|
|||
- name: "Create a Subnet with ddns_send_updates set to false" | |||
- name: "Create a Subnet with ddns_send_updates set to true" |
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.
Its generally a good idea to test the attribute value other default values , hence in this case false
would be a better input
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.
done
plugins/modules/ipam_subnet.py
Outdated
@@ -2436,6 +2436,18 @@ def __init__(self, *args, **kwargs): | |||
exclude = ["state", "csp_url", "api_key", "id"] |
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.
As per Address block implementation , shouldn't this "exclude" contain abandoned_reclaim_time
, abandoned_reclaim_time_v6
and echo_client_id
too ?
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.
done
@@ -2436,6 +2436,18 @@ def __init__(self, *args, **kwargs): | |||
exclude = ["state", "csp_url", "api_key", "id"] | |||
self._payload_params = {k: v for k, v in self.params.items() if v is not None and k not in exclude} | |||
self._payload = Subnet.from_dict(self._payload_params) | |||
# Safely remove unwanted attributes | |||
if self._payload.dhcp_config: | |||
self._payload.dhcp_config.abandoned_reclaim_time = None |
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.
The Documentation and Return for subnet should to be updated to remove these 3 attributes.
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.
all the fields are required to be sent as part of the inheritance payload
@@ -2436,6 +2436,18 @@ def __init__(self, *args, **kwargs): | |||
exclude = ["state", "csp_url", "api_key", "id"] | |||
self._payload_params = {k: v for k, v in self.params.items() if v is not None and k not in exclude} | |||
self._payload = Subnet.from_dict(self._payload_params) | |||
# Safely remove unwanted attributes |
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.
# Safely remove unwanted attributes | |
# Unset unsupported DHCP configuration attributes |
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.
done
plugins/modules/ipam_subnet.py
Outdated
self._payload.dhcp_config.abandoned_reclaim_time_v6 = None | ||
self._payload.dhcp_config.echo_client_id = None | ||
|
||
# Handle inheritance sources safely |
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.
# Handle inheritance sources safely | |
# Unset unsupported DHCP configuration attributes in the inherited DHCP config |
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.
This piece of code was redundant, i have removed it
No description provided.