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 kubernetes module to kubernetesmod #51936

Merged
merged 4 commits into from Mar 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/ref/modules/all/index.rst
Expand Up @@ -202,7 +202,7 @@ execution modules
keystone
keystoneng
kmod
kubernetes
kubernetesmod
launchctl_service
layman
ldap3
Expand Down
6 changes: 0 additions & 6 deletions doc/ref/modules/all/salt.modules.kubernetes.rst

This file was deleted.

6 changes: 6 additions & 0 deletions doc/ref/modules/all/salt.modules.kubernetesmod.rst
@@ -0,0 +1,6 @@
==========================
salt.modules.kubernetesmod
==========================

.. automodule:: salt.modules.kubernetesmod
:members:
2 changes: 1 addition & 1 deletion doc/topics/releases/2017.7.0.rst
Expand Up @@ -710,7 +710,7 @@ Execution modules
- :mod:`salt.modules.grafana4 <salt.modules.grafana4>`
- :mod:`salt.modules.heat <salt.modules.heat>`
- :mod:`salt.modules.icinga2 <salt.modules.icinga2>`
- :mod:`salt.modules.kubernetes <salt.modules.kubernetes>`
- :mod:`salt.modules.kubernetesmod <salt.modules.kubernetesmod>`
- :mod:`salt.modules.logmod <salt.modules.logmod>`
- :mod:`salt.modules.mattermost <salt.modules.mattermost>`
- :mod:`salt.modules.namecheap_dns <salt.modules.namecheap_dns>`
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion salt/states/kubernetes.py
Expand Up @@ -4,7 +4,7 @@
==========================================

gtmanfred marked this conversation as resolved.
Show resolved Hide resolved
NOTE: This module requires the proper pillar values set. See
salt.modules.kubernetes for more information.
salt.modules.kubernetesmod for more information.

.. warning::

Expand Down
Expand Up @@ -18,7 +18,7 @@
NO_MOCK_REASON
)

from salt.modules import kubernetes
from salt.modules import kubernetesmod as kubernetes


@contextmanager
Expand All @@ -28,7 +28,7 @@ def mock_kubernetes_library():
it caused kubernetes._cleanup() to get called for virtually every
test, which blows up. This prevents that specific blow-up once
"""
with patch('salt.modules.kubernetes.kubernetes') as mock_kubernetes_lib:
with patch('salt.modules.kubernetesmod.kubernetes') as mock_kubernetes_lib:
mock_kubernetes_lib.client.configuration.ssl_ca_cert = ''
mock_kubernetes_lib.client.configuration.cert_file = ''
mock_kubernetes_lib.client.configuration.key_file = ''
Expand All @@ -40,7 +40,7 @@ def mock_kubernetes_library():
"Skipping test_kubernetes.py")
class KubernetesTestCase(TestCase, LoaderModuleMockMixin):
'''
Test cases for salt.modules.kubernetes
Test cases for salt.modules.kubernetesmod
'''

def setup_loader_modules(self):
Expand Down Expand Up @@ -114,7 +114,7 @@ def test_delete_deployments(self):
:return:
'''
with mock_kubernetes_library() as mock_kubernetes_lib:
with patch('salt.modules.kubernetes.show_deployment', Mock(return_value=None)):
with patch('salt.modules.kubernetesmod.show_deployment', Mock(return_value=None)):
with patch.dict(kubernetes.__salt__, {'config.option': Mock(return_value="")}):
mock_kubernetes_lib.client.V1DeleteOptions = Mock(return_value="")
mock_kubernetes_lib.client.ExtensionsV1beta1Api.return_value = Mock(
Expand Down Expand Up @@ -164,7 +164,7 @@ def test_node_labels(self):
Test kubernetes.node_labels
:return:
'''
with patch('salt.modules.kubernetes.node') as mock_node:
with patch('salt.modules.kubernetesmod.node') as mock_node:
mock_node.return_value = {
'metadata': {
'labels': {
Expand All @@ -184,7 +184,7 @@ def test_adding_change_cause_annotation(self):
kubectl [apply|create|replace] --record does
:return:
'''
with patch('salt.modules.kubernetes.sys.argv', ['/usr/bin/salt-call', 'state.apply']) as mock_sys:
with patch('salt.modules.kubernetesmod.sys.argv', ['/usr/bin/salt-call', 'state.apply']) as mock_sys:
func = getattr(kubernetes, '__dict_to_object_meta')
data = func(name='test-pod', namespace='test', metadata={})

Expand Down