-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a test about keeping management address type when disabling
Before it was forced to change into IPv4 and would break IPv6 setups Signed-off-by: Benjamin Reis <[email protected]>
- Loading branch information
1 parent
d1fb97a
commit 1c43424
Showing
3 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import pytest | ||
|
||
# Requirements: | ||
# - one XCP-ng host (--host) (>= 8.3 for IPv6 test) | ||
|
||
def _test_management_disable_type(host, type): | ||
management_pif = host.management_pif() | ||
assert management_pif.param_get("primary-address-type").lower() == type | ||
|
||
host.xe("host-management-disable") | ||
assert management_pif.param_get("primary-address-type").lower() == type | ||
|
||
host.xe("host-management-reconfigure", {"pif-uuid": management_pif.uuid}) | ||
assert management_pif.param_get("primary-address-type").lower() == type | ||
|
||
class TestManagementDisableAddressType: | ||
@pytest.mark.usefixtures("host_no_ipv6") | ||
def test_management_disable_ipv4(self, host): | ||
_test_management_disable_type(host, "ipv4") | ||
|
||
@pytest.mark.usefixtures("host_ipv6") | ||
def test_management_disable_ipv6(self, host): | ||
_test_management_disable_type(host, "ipv6") |