hcs-core 0.1.296__tar.gz → 0.1.297__tar.gz
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-0.1.296 → hcs_core-0.1.297}/PKG-INFO +2 -2
- hcs_core-0.1.297/hcs_core/__init__.py +1 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/ctxp/util.py +26 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/util/versions.py +10 -8
- {hcs_core-0.1.296 → hcs_core-0.1.297}/pyproject.toml +1 -1
- hcs_core-0.1.296/hcs_core/__init__.py +0 -1
- {hcs_core-0.1.296 → hcs_core-0.1.297}/.gitignore +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/README.md +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/ctxp/__init__.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/ctxp/_init.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/ctxp/built_in_cmds/__init__.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/ctxp/built_in_cmds/_ut.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/ctxp/built_in_cmds/context.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/ctxp/built_in_cmds/profile.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/ctxp/cli_options.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/ctxp/cli_processor.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/ctxp/cmd_util.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/ctxp/config.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/ctxp/context.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/ctxp/data_util.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/ctxp/dispatcher.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/ctxp/duration.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/ctxp/extension.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/ctxp/fn_util.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/ctxp/fstore.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/ctxp/jsondot.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/ctxp/logger.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/ctxp/profile.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/ctxp/profile_store.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/ctxp/recent.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/ctxp/state.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/ctxp/task_schd.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/ctxp/telemetry.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/ctxp/template_util.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/ctxp/timeutil.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/ctxp/var_template.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/plan/__init__.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/plan/actions.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/plan/base_provider.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/plan/context.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/plan/core.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/plan/dag.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/plan/helper.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/plan/kop.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/plan/provider/__init__.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/plan/provider/dev/__init__.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/plan/provider/dev/_prepare.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/plan/provider/dev/dummy.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/plan/provider/dev/fibonacci.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/sglib/__init__.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/sglib/auth.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/sglib/cli_options.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/sglib/client_util.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/sglib/csp.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/sglib/ez_client.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/sglib/hcs_client.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/sglib/init.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/sglib/login_support.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/sglib/payload_util.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/sglib/requtil.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/sglib/utils.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/util/__init__.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/util/check_license.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/util/duration.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/util/exit.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/util/hcs_constants.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/util/job_view.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/util/pki_util.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/util/query_util.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/util/scheduler.py +0 -0
- {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/util/ssl_util.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hcs-core
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.297
|
|
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
|
|
@@ -36,7 +36,7 @@ Requires-Dist: schedule>=1.1.0
|
|
|
36
36
|
Requires-Dist: setuptools>=70.0.0
|
|
37
37
|
Requires-Dist: tabulate>=0.9.0
|
|
38
38
|
Requires-Dist: websocket-client>=1.2.3
|
|
39
|
-
Requires-Dist: yumako>=0.1.
|
|
39
|
+
Requires-Dist: yumako>=0.1.30
|
|
40
40
|
Provides-Extra: dev
|
|
41
41
|
Requires-Dist: bandit; extra == 'dev'
|
|
42
42
|
Requires-Dist: black; extra == 'dev'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.1.297"
|
|
@@ -368,3 +368,29 @@ def format_table(data: list, fields_mapping: dict, columns_to_sum: list = None):
|
|
|
368
368
|
traceback.print_exc()
|
|
369
369
|
|
|
370
370
|
return tabulate(table, headers=headers) + "\n"
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
def colorize(data: dict, name: str, mapping: dict):
|
|
374
|
+
if os.environ.get("TERM_COLOR") == "0":
|
|
375
|
+
return
|
|
376
|
+
|
|
377
|
+
s = data.get(name)
|
|
378
|
+
if not s:
|
|
379
|
+
return
|
|
380
|
+
|
|
381
|
+
if isinstance(mapping, dict):
|
|
382
|
+
c = mapping.get(s)
|
|
383
|
+
if c:
|
|
384
|
+
if isinstance(c, str):
|
|
385
|
+
data[name] = click.style(s, fg=c)
|
|
386
|
+
elif callable(c):
|
|
387
|
+
color = c(data)
|
|
388
|
+
data[name] = click.style(s, fg=color)
|
|
389
|
+
else:
|
|
390
|
+
raise Exception(f"Unexpected color type: {type(c)} {c}")
|
|
391
|
+
elif callable(mapping):
|
|
392
|
+
c = mapping(s)
|
|
393
|
+
if c:
|
|
394
|
+
data[name] = click.style(s, fg=c)
|
|
395
|
+
else:
|
|
396
|
+
raise Exception(f"Unexpected mapping type: {type(mapping)} {mapping}")
|
|
@@ -30,14 +30,16 @@ def check_upgrade():
|
|
|
30
30
|
checked_at = hcs_core.ctxp.state.get(last_upgrade_check_at, 0)
|
|
31
31
|
|
|
32
32
|
now = time.time()
|
|
33
|
-
if now - checked_at
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
33
|
+
if now - checked_at < 24 * 60 * 60:
|
|
34
|
+
return
|
|
35
|
+
|
|
36
|
+
try:
|
|
37
|
+
latest = get_latest_version()
|
|
38
|
+
current = Version(get_version())
|
|
39
|
+
if current < latest:
|
|
40
|
+
log.warning(f"New version available: {latest}. Execute 'hcs upgrade' to upgrade.")
|
|
41
|
+
except Exception as e:
|
|
42
|
+
logging.debug(e)
|
|
41
43
|
|
|
42
44
|
hcs_core.ctxp.state.set(last_upgrade_check_at, now)
|
|
43
45
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.1.296"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|