diff --git a/plugins/inventory/kubevirt.py b/plugins/inventory/kubevirt.py index 40cbc99..e83b3e4 100644 --- a/plugins/inventory/kubevirt.py +++ b/plugins/inventory/kubevirt.py @@ -251,7 +251,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable): snake_case_pattern = re_compile(r"(?<=[a-z])(?=[A-Z])|(?<=[A-Z])(?=[A-Z][a-z])") @staticmethod - def get_default_host_name(host: str) -> str: + def get_default_hostname(host: str) -> str: """ get_default_host_name strips URL schemes from the host name and replaces invalid characters. diff --git a/tests/unit/plugins/inventory/test_kubevirt.py b/tests/unit/plugins/inventory/test_kubevirt.py index befa273..a8f0c92 100644 --- a/tests/unit/plugins/inventory/test_kubevirt.py +++ b/tests/unit/plugins/inventory/test_kubevirt.py @@ -27,8 +27,8 @@ from ansible_collections.kubevirt.core.tests.unit.plugins.inventory.constants im ("https://example.com:8080", "example-com_8080"), ], ) -def test_get_default_host_name(host, expected): - assert InventoryModule.get_default_host_name(host) == expected +def test_get_default_hostname(host, expected): + assert InventoryModule.get_default_hostname(host) == expected @pytest.mark.parametrize(