Define __virtualname__ for transactional_update module

This prevent problems with LazyLoader when importing this module,
which was wrongly exposing functions for this module under "state.*"
This commit is contained in:
Pablo Suárez Hernández 2023-05-18 12:50:20 +01:00 committed by Megan Wilhite
parent 0f26cf5b93
commit 2b06ea6f65

View file

@ -285,6 +285,8 @@ from salt.modules.state import _check_queue, _prior_running_states, _wait, runni
__func_alias__ = {"apply_": "apply"}
__virtualname__ = "transactional_update"
log = logging.getLogger(__name__)
@ -300,7 +302,7 @@ def __virtual__():
_prior_running_states, globals()
)
running = salt.utils.functools.namespaced_function(running, globals())
return True
return __virtualname__
else:
return (False, "Module transactional_update requires a transactional system")