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

rename shadow to linux_shadow for consistency #53296

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 6 additions & 0 deletions doc/ref/modules/all/salt.modules.linux_shadow.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
=========================
salt.modules.linux_shadow
=========================

.. automodule:: salt.modules.linux_shadow
:members:
2 changes: 1 addition & 1 deletion doc/ref/modules/all/salt.modules.shadow.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ modules:
====================================== ========================================
Execution Module Used for
====================================== ========================================
:py:mod:`~salt.modules.shadow` Linux
:py:mod:`~salt.modules.linux_shadow` Linux
:py:mod:`~salt.modules.bsd_shadow` FreeBSD, OpenBSD, NetBSD
:py:mod:`~salt.modules.solaris_shadow` Solaris-based OSes
:py:mod:`~salt.modules.win_shadow` Windows
Expand Down
4 changes: 3 additions & 1 deletion salt/modules/shadow.py → salt/modules/linux_shadow.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@
except ImportError:
HAS_CRYPT = False

__virtualname__ = 'shadow'


def __virtual__():
return __grains__.get('kernel', '') == 'Linux'
return __virtualname__ if __grains__.get('kernel', '') == 'Linux' else False


def default_hash():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# Import Salt libs
import salt.utils.files
import salt.utils.platform
import salt.modules.shadow
import salt.modules.linux_shadow as shadow
from salt.ext.six.moves import range


Expand Down Expand Up @@ -45,7 +45,7 @@ def setUp(self):
)
self._test_user = self.__random_string()
self._no_user = self.__random_string()
self._password = salt.modules.shadow.gen_password('Password1234')
self._password = shadow.gen_password('Password1234')

def __random_string(self, size=6):
'''
Expand Down