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

Fixed the problem with the slaacSupport #245

Merged
merged 7 commits into from
May 14, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Addressed the review comments
MUTHU-RAKESH-27 committed May 14, 2024
commit 0c24da9a4cdc0a97c3af0fd80b8f7fe8e08136e5
17 changes: 12 additions & 5 deletions plugins/modules/network_settings_workflow_manager.py
Original file line number Diff line number Diff line change
@@ -197,16 +197,17 @@
type: str
ipv6_prefix:
description: >
Ipv6 prefix value is true, the ip6 prefix length input field is enabled,
if it is false ipv6 total Host input is enable.
Determines whether to enable the 'ipv6_prefix_length' or 'ipv6_total_host' input field.
If IPv6 prefix value is true, the IPv6 prefix length input field is mandatory,
If it is false ipv6 total Host input is mandatory.
type: bool
ipv6_prefix_length:
description: IPv6 prefix length is required when the ipv6_prefix value is true.
description: Specifies the IPv6 prefix length. Required when 'ipv6_prefix' is set to true.
type: int
ipv6_total_host:
description:
MUTHU-RAKESH-27 marked this conversation as resolved.
Show resolved Hide resolved
- The total number of hosts for IPv6 is required if the 'ipv6_prefix' is set to false.
- The number of IP addresses for IPv6 should be less than 256.
- Specifies the total number of IPv6 hosts. Required when 'ipv6_prefix' is set to false.
- Must specify a number of IPv6 IP addresses that is less than or equal to 256.
type: int
prev_name:
description: The former name associated with the reserved IP sub-pool.
@@ -877,6 +878,9 @@ def get_reserve_pool_params(self, pool_info):
}
pool_info_ippools = pool_info.get("ipPools")
pool_info_length = len(pool_info_ippools)

# If the reserved pool has only IPv4, pool_info_length will be 1.
# If the reserved pool has both IPv4 and IPv6, pool_info_length will be 2.
if pool_info_length == 1:
MUTHU-RAKESH-27 marked this conversation as resolved.
Show resolved Hide resolved
reserve_pool.update({
"ipv4DhcpServers": pool_info_ippools[0].get("dhcpServerIps"),
@@ -889,6 +893,9 @@ def get_reserve_pool_params(self, pool_info):
reserve_pool.update({"ipv4GateWay": ""})
reserve_pool.update({"ipv6AddressSpace": "False"})
else:

# If the ipv6 flag is set in the second element, ipv4_index will be 0 and ipv6_index will be 1.
# If the ipv6 flag is set in the first element, ipv4_index will be 1 and ipv6_index will be 0.
if not pool_info_ippools[0].get("ipv6"):
MUTHU-RAKESH-27 marked this conversation as resolved.
Show resolved Hide resolved
ipv4_index = 0
ipv6_index = 1