hcs-core 0.1.283__py3-none-any.whl → 0.1.285__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
hcs_core/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.1.
|
|
1
|
+
__version__ = "0.1.285"
|
hcs_core/ctxp/state.py
CHANGED
|
@@ -31,7 +31,7 @@ class _StateFile:
|
|
|
31
31
|
self._cache = jsondot.load(self._path, {}, lock=True)
|
|
32
32
|
return self._cache
|
|
33
33
|
|
|
34
|
-
def get(self, key: str, default: Any, reload: bool = False):
|
|
34
|
+
def get(self, key: str, default: Any = None, reload: bool = False):
|
|
35
35
|
return self._data(reload).get(key, default)
|
|
36
36
|
|
|
37
37
|
def set(self, key: str, value: Any):
|
|
@@ -47,7 +47,7 @@ def init(store_path: str, name: str):
|
|
|
47
47
|
_file = _StateFile(os.path.join(store_path, name))
|
|
48
48
|
|
|
49
49
|
|
|
50
|
-
def get(key: str, default: Any, reload: bool = False):
|
|
50
|
+
def get(key: str, default: Any = None, reload: bool = False):
|
|
51
51
|
return _file.get(key=key, default=default, reload=reload)
|
|
52
52
|
|
|
53
53
|
|
hcs_core/sglib/auth.py
CHANGED
|
@@ -109,7 +109,7 @@ def _get_new_oauth_token(old_oauth_token, effective_profile):
|
|
|
109
109
|
old_oauth_token = profile.auth.get().token
|
|
110
110
|
if old_oauth_token:
|
|
111
111
|
try:
|
|
112
|
-
oauth_token =
|
|
112
|
+
oauth_token = refresh_oauth_token(old_oauth_token, csp_config.url)
|
|
113
113
|
except Exception as e:
|
|
114
114
|
oauth_token = None
|
|
115
115
|
log.warning(e)
|
|
@@ -122,7 +122,7 @@ def _get_new_oauth_token(old_oauth_token, effective_profile):
|
|
|
122
122
|
return oauth_token
|
|
123
123
|
|
|
124
124
|
|
|
125
|
-
def
|
|
125
|
+
def refresh_oauth_token(old_oauth_token: dict, csp_url: str):
|
|
126
126
|
with OAuth2Client(token=old_oauth_token) as client:
|
|
127
127
|
log.debug("Refresh auth token...")
|
|
128
128
|
new_token = client.refresh_token(csp_url + "/csp/gateway/am/api/auth/token")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hcs-core
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.285
|
|
4
4
|
Summary: Horizon Cloud Service CLI module.
|
|
5
5
|
Project-URL: Homepage, https://github.com/euc-eng/hcs-cli
|
|
6
6
|
Project-URL: Bug Tracker, https://github.com/euc-eng/hcs-cli/issues
|
|
@@ -35,7 +35,7 @@ Requires-Dist: schedule>=1.1.0
|
|
|
35
35
|
Requires-Dist: setuptools>=70.0.0
|
|
36
36
|
Requires-Dist: tabulate>=0.9.0
|
|
37
37
|
Requires-Dist: websocket-client>=1.2.3
|
|
38
|
-
Requires-Dist: yumako>=0.1.
|
|
38
|
+
Requires-Dist: yumako>=0.1.24
|
|
39
39
|
Provides-Extra: dev
|
|
40
40
|
Requires-Dist: bandit; extra == 'dev'
|
|
41
41
|
Requires-Dist: black; extra == 'dev'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
hcs_core/__init__.py,sha256=
|
|
1
|
+
hcs_core/__init__.py,sha256=5YbVr3-aqJTRGHkmYg7hDxGfTrKj3cj9TWPVQZmzlII,24
|
|
2
2
|
hcs_core/ctxp/__init__.py,sha256=bHVHhJP10Luz1a3Kk3zFx14dAO4SY6Q20Lrv8rNWWGc,1075
|
|
3
3
|
hcs_core/ctxp/_init.py,sha256=yq46VOty4zs_WcLt1SrtePxbW8S4RIz4YUCP3xIBvCA,2797
|
|
4
4
|
hcs_core/ctxp/cli_options.py,sha256=g5JnzOtyWiGLCLcGp5x54MPFLW_NOfhfevXUlX5L8tM,2532
|
|
@@ -17,7 +17,7 @@ hcs_core/ctxp/logger.py,sha256=6Sh1WXUrjrQNU7K6zUlBzE34fIS6o6oMU3eqSknUOEo,6321
|
|
|
17
17
|
hcs_core/ctxp/profile.py,sha256=OElbba1V1hnnn-m9UI7-WjUglYpaJ_FHeHjeqyhm13c,7690
|
|
18
18
|
hcs_core/ctxp/profile_store.py,sha256=v4RvKSaKSJhAt5rEGbC6v-NfaI3N67YffPm-qlrQWdg,1566
|
|
19
19
|
hcs_core/ctxp/recent.py,sha256=Lbv1q6Ld-7FKFaA_FNyqI_WaFDp9zQAOFjFVzox5GoE,1767
|
|
20
|
-
hcs_core/ctxp/state.py,sha256=
|
|
20
|
+
hcs_core/ctxp/state.py,sha256=gjcMRVONKBq7WiFQo-xca1726ngZe90mnPrF3vbXDrU,1634
|
|
21
21
|
hcs_core/ctxp/task_schd.py,sha256=dKNVUGqv1SSXdHufm552FoLr812Grrj3-CNYmSiCfyw,4648
|
|
22
22
|
hcs_core/ctxp/template_util.py,sha256=XslvIuRBlTVsUW0Y9M_D8gUPc1jWq6X2p4At2VAe1KU,731
|
|
23
23
|
hcs_core/ctxp/timeutil.py,sha256=RyRrIRdFHbIghdB8wbC8VdABvc7hki2v51b1x2JvHgo,445
|
|
@@ -41,7 +41,7 @@ hcs_core/plan/provider/dev/_prepare.py,sha256=PvVnheEQwpj8sWYz2lDONQVTs4pHPYuo2c
|
|
|
41
41
|
hcs_core/plan/provider/dev/dummy.py,sha256=zKEr9J4WHhlN5gFdmrFyEfCF0xlQlCJg0CC1dG9VaLA,1958
|
|
42
42
|
hcs_core/plan/provider/dev/fibonacci.py,sha256=8WhDr5c9harNAlVPZomQJEqbWe0hUqbppO6ZkwEUcJ0,1104
|
|
43
43
|
hcs_core/sglib/__init__.py,sha256=oT0etW7vsEbHlXiGL5x23ZXyyFqeLi81RxQQ5lfKSV0,654
|
|
44
|
-
hcs_core/sglib/auth.py,sha256=
|
|
44
|
+
hcs_core/sglib/auth.py,sha256=4nYqW4Hl1mOytQRR0uR7MmT_9BOUQW8RwjyPCZcNIQA,6235
|
|
45
45
|
hcs_core/sglib/cli_options.py,sha256=NvdiHpX_o6IYPEM8cQYLb_R7T4aiXVvYLqn6Vk4Q2-Y,1761
|
|
46
46
|
hcs_core/sglib/client_util.py,sha256=ZCXmNfmUL4_iry4yU2bPWL0dLLNIGu3zp541cFt6Or0,10876
|
|
47
47
|
hcs_core/sglib/csp.py,sha256=anZqbQLIZw831PgW9Z4pweqfAeBH7rXPIAkwkyPkfGY,8054
|
|
@@ -63,6 +63,6 @@ hcs_core/util/query_util.py,sha256=5bh3bUVIQuY9qerndfuyfyzkTExYJ8zD0_e3PSN7y-4,3
|
|
|
63
63
|
hcs_core/util/scheduler.py,sha256=bPpCmGUL1UctJMfLPAg-h4Hl2YZr96FiI78-G_Usn08,2958
|
|
64
64
|
hcs_core/util/ssl_util.py,sha256=MvU102fGwWWh9hhSmLnn1qQIWuD6TjZnN0iH0MXUtW0,1239
|
|
65
65
|
hcs_core/util/versions.py,sha256=wwbcYFpxBohI-QjcrmxGsNghdnx4EWHBipMUL7vnpwM,1728
|
|
66
|
-
hcs_core-0.1.
|
|
67
|
-
hcs_core-0.1.
|
|
68
|
-
hcs_core-0.1.
|
|
66
|
+
hcs_core-0.1.285.dist-info/METADATA,sha256=UTr7anutc4oV_HOXJ_zUWerSit6quDs_BaqIw6dYSZs,1837
|
|
67
|
+
hcs_core-0.1.285.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
68
|
+
hcs_core-0.1.285.dist-info/RECORD,,
|
|
File without changes
|