Skip to content
This repository has been archived by the owner on Mar 13, 2022. It is now read-only.

Commit

Permalink
changing function name from load_kube_config_from_dict to load_from_c…
Browse files Browse the repository at this point in the history
…onfig_dict
  • Loading branch information
vishnu667 committed Jun 19, 2020
1 parent 52a3bdc commit 242e78f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
from .config_exception import ConfigException
from .incluster_config import load_incluster_config
from .kube_config import (list_kube_config_contexts, load_kube_config,
new_client_from_config, load_kube_config_from_dict)
new_client_from_config, load_from_config_dict)
2 changes: 1 addition & 1 deletion config/kube_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,7 @@ def load_kube_config(config_file=None, context=None,
else:
loader.load_and_set(client_configuration)

def load_kube_config_from_dict(config_dict, context=None,
def load_from_config_dict(config_dict, context=None,
client_configuration=None,
persist_config=True):
"""Loads authentication and cluster information from kube-config file
Expand Down
6 changes: 3 additions & 3 deletions config/kube_config_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
_get_kube_config_loader,
_get_kube_config_loader_for_yaml_file,
list_kube_config_contexts, load_kube_config,
load_kube_config_from_dict, new_client_from_config)
load_from_config_dict, new_client_from_config)

BEARER_TOKEN_FORMAT = "Bearer %s"

Expand Down Expand Up @@ -1230,12 +1230,12 @@ def test_load_kube_config(self):
client_configuration=actual)
self.assertEqual(expected, actual)

def test_load_kube_config_from_dict(self):
def test_load_from_config_dict(self):
expected = FakeConfig(host=TEST_HOST,
token=BEARER_TOKEN_FORMAT % TEST_DATA_BASE64)

actual = FakeConfig()
load_kube_config_from_dict(config_dict=self.TEST_KUBE_CONFIG,
load_from_config_dict(config_dict=self.TEST_KUBE_CONFIG,
context="simple_token",
client_configuration=actual)
self.assertEqual(expected, actual)
Expand Down

0 comments on commit 242e78f

Please sign in to comment.