cgcsdk 1.0.11__tar.gz → 1.0.12__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.
Files changed (98) hide show
  1. {cgcsdk-1.0.11/cgcsdk.egg-info → cgcsdk-1.0.12}/PKG-INFO +1 -1
  2. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/.env +1 -1
  3. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/CHANGELOG.md +6 -0
  4. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/utils/__init__.py +1 -1
  5. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/utils/config_utils.py +15 -0
  6. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/utils/requests_helper.py +2 -2
  7. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/utils/version_control.py +11 -2
  8. {cgcsdk-1.0.11 → cgcsdk-1.0.12/cgcsdk.egg-info}/PKG-INFO +1 -1
  9. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/LICENSE +0 -0
  10. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/MANIFEST.in +0 -0
  11. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/README.md +0 -0
  12. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/__init__.py +0 -0
  13. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/cgc.py +0 -0
  14. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/commands/__init__.py +0 -0
  15. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/commands/auth/__init__.py +0 -0
  16. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/commands/auth/auth_cmd.py +0 -0
  17. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/commands/auth/auth_responses.py +0 -0
  18. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/commands/auth/auth_utils.py +0 -0
  19. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/commands/billing/__init__.py +0 -0
  20. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/commands/billing/billing_cmd.py +0 -0
  21. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/commands/billing/billing_responses.py +0 -0
  22. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/commands/billing/billing_utils.py +0 -0
  23. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/commands/cgc_cmd.py +0 -0
  24. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/commands/cgc_cmd_responses.py +0 -0
  25. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/commands/cgc_helpers.py +0 -0
  26. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/commands/cgc_models.py +0 -0
  27. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/commands/compute/__init__.py +0 -0
  28. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/commands/compute/compute_cmd.py +0 -0
  29. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/commands/compute/compute_models.py +0 -0
  30. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/commands/compute/compute_responses.py +0 -0
  31. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/commands/compute/compute_utils.py +0 -0
  32. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/commands/db/__init__.py +0 -0
  33. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/commands/db/db_cmd.py +0 -0
  34. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/commands/db/db_models.py +0 -0
  35. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/commands/debug/__init__.py +0 -0
  36. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/commands/debug/debug_cmd.py +0 -0
  37. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/commands/exceptions.py +0 -0
  38. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/commands/jobs/__init__.py +0 -0
  39. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/commands/jobs/job_utils.py +0 -0
  40. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/commands/jobs/jobs_cmd.py +0 -0
  41. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/commands/jobs/jobs_responses.py +0 -0
  42. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/commands/resource/__init__.py +0 -0
  43. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/commands/resource/resource_cmd.py +0 -0
  44. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/commands/resource/resource_responses.py +0 -0
  45. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/commands/user/__init__.py +0 -0
  46. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/commands/user/keys_cmd.py +0 -0
  47. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/commands/user/keys_models.py +0 -0
  48. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/commands/user/keys_responses.py +0 -0
  49. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/commands/user/keys_utils.py +0 -0
  50. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/commands/user/secret_cmd.py +0 -0
  51. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/commands/user/secret_models.py +0 -0
  52. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/commands/user/secret_responses.py +0 -0
  53. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/commands/user/secret_utils.py +0 -0
  54. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/commands/volume/__init__.py +0 -0
  55. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/commands/volume/data_model.py +0 -0
  56. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/commands/volume/volume_cmd.py +0 -0
  57. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/commands/volume/volume_responses.py +0 -0
  58. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/commands/volume/volume_utils.py +0 -0
  59. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/config.py +0 -0
  60. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/sdk/__init__.py +0 -0
  61. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/sdk/exceptions.py +0 -0
  62. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/sdk/job.py +0 -0
  63. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/sdk/postgresql.py +0 -0
  64. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/sdk/resource.py +0 -0
  65. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/server.crt +0 -0
  66. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/telemetry/__init__.py +0 -0
  67. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/telemetry/basic.py +0 -0
  68. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/tests/__init__.py +0 -0
  69. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/tests/desired_responses/test_billing_invoice.txt +0 -0
  70. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/tests/desired_responses/test_billing_status.txt +0 -0
  71. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/tests/desired_responses/test_billing_stop_events_compute.txt +0 -0
  72. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/tests/desired_responses/test_billing_stop_events_volume.txt +0 -0
  73. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/tests/desired_responses/test_compute_list.txt +0 -0
  74. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/tests/desired_responses/test_compute_list_no_labels.txt +0 -0
  75. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/tests/desired_responses/test_tabulate_response.txt +0 -0
  76. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/tests/desired_responses/test_volume_list.txt +0 -0
  77. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/tests/responses_tests.py +0 -0
  78. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/utils/click_group.py +0 -0
  79. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/utils/consts/__init__.py +0 -0
  80. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/utils/consts/env_consts.py +0 -0
  81. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/utils/consts/message_consts.py +0 -0
  82. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/utils/cryptography/__init__.py +0 -0
  83. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/utils/cryptography/aes_crypto.py +0 -0
  84. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/utils/cryptography/encryption_module.py +0 -0
  85. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/utils/cryptography/rsa_crypto.py +0 -0
  86. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/utils/custom_exceptions.py +0 -0
  87. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/utils/message_utils.py +0 -0
  88. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/utils/prepare_headers.py +0 -0
  89. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/utils/response_utils.py +0 -0
  90. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgc/utils/update.py +0 -0
  91. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgcsdk.egg-info/SOURCES.txt +0 -0
  92. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgcsdk.egg-info/dependency_links.txt +0 -0
  93. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgcsdk.egg-info/entry_points.txt +0 -0
  94. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgcsdk.egg-info/requires.txt +0 -0
  95. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/cgcsdk.egg-info/top_level.txt +0 -0
  96. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/pyproject.toml +0 -0
  97. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/setup.cfg +0 -0
  98. {cgcsdk-1.0.11 → cgcsdk-1.0.12}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cgcsdk
3
- Version: 1.0.11
3
+ Version: 1.0.12
4
4
  Summary: Comtegra GPU Cloud REST API client
5
5
  Author: Comtegra AI Team
6
6
  Author-email: ai@comtegra.pl
@@ -6,4 +6,4 @@ CONFIG_FILE_NAME = cfg.json
6
6
  TMP_DIR = .tmp
7
7
  RELEASE = 1
8
8
  MAJOR_VERSION = 0
9
- MINOR_VERSION = 11
9
+ MINOR_VERSION = 12
@@ -1,5 +1,11 @@
1
1
  # Change Log
2
2
 
3
+ ## 1.0.12
4
+
5
+ Release on May 09, 2024
6
+
7
+ * hotfix: allow secret upper cased, during registration process
8
+
3
9
  ## 1.0.11
4
10
 
5
11
  Release on April 25, 2024
@@ -22,7 +22,7 @@ def require_confirm_loop(message: str):
22
22
 
23
23
  def require_answer_loop(message: str, default: str):
24
24
  while True:
25
- answer = input(f"{message}: [{default}]").lower()
25
+ answer = input(f"{message}: [{default}]")
26
26
  if answer == "":
27
27
  return default
28
28
  return answer
@@ -55,6 +55,21 @@ def save_to_config(**kwargs):
55
55
  json.dump(final_cfg, f)
56
56
 
57
57
 
58
+ def is_config_file_present():
59
+ """Function to check if the config file is present
60
+
61
+ :return: True if the config file is present, False otherwise
62
+ :rtype: bool
63
+ """
64
+ try:
65
+ with open(
66
+ os.path.join(config_path, get_config_file_name()), "r", encoding="UTF-8"
67
+ ) as _:
68
+ return True
69
+ except FileNotFoundError:
70
+ return False
71
+
72
+
58
73
  def read_from_cfg(key: str, filename=None):
59
74
  """Function to read a single value from config
60
75
 
@@ -32,12 +32,12 @@ def _process_endpoint_kwargs(**kwargs):
32
32
  return kwargs
33
33
 
34
34
 
35
- def _call_rest_endpoint(request: EndpointTypes, **kwargs):
35
+ def _call_rest_endpoint(request: EndpointTypes, **kwargs) -> requests.Response:
36
36
  kwargs = _process_endpoint_kwargs(**kwargs)
37
37
  return request(**kwargs)
38
38
 
39
39
 
40
- def _call_rest_ssl_endpoint(request: EndpointTypes, **kwargs):
40
+ def _call_rest_ssl_endpoint(request: EndpointTypes, **kwargs) -> requests.Response:
41
41
  kwargs = _process_endpoint_kwargs(**kwargs)
42
42
  return request(
43
43
  **kwargs, verify=False
@@ -2,6 +2,7 @@ import os
2
2
  import subprocess
3
3
  import sys
4
4
  import click
5
+ from cgc.utils.config_utils import is_config_file_present
5
6
  from cgc.utils.prepare_headers import get_api_url_and_prepare_headers_version_control
6
7
  from cgc.utils.message_utils import (
7
8
  prepare_error_message,
@@ -15,7 +16,6 @@ from cgc.utils.consts.message_consts import (
15
16
  )
16
17
 
17
18
  from cgc.utils.requests_helper import call_api, EndpointTypes
18
- from cgc.utils.response_utils import retrieve_and_validate_response_send_metric
19
19
 
20
20
 
21
21
  def get_server_version():
@@ -26,7 +26,14 @@ def get_server_version():
26
26
  """
27
27
  api_url, headers = get_api_url_and_prepare_headers_version_control()
28
28
  __res = call_api(request=EndpointTypes.get, url=api_url, headers=headers)
29
- return retrieve_and_validate_response_send_metric(__res, None)
29
+ try:
30
+ __res.raise_for_status()
31
+ except Exception:
32
+ click.echo(
33
+ "Your current context server is not available, cannot check server version.",
34
+ color="yellow",
35
+ )
36
+ return __res.json()
30
37
 
31
38
 
32
39
  def print_compare_versions(server_version: str, client_version: str):
@@ -37,6 +44,8 @@ def print_compare_versions(server_version: str, client_version: str):
37
44
  @key_error_decorator_for_helpers
38
45
  def check_version():
39
46
  """Checks if Client version is up to date with Server version."""
47
+ if not is_config_file_present():
48
+ return
40
49
  data = get_server_version()
41
50
  server_release, server_major, server_minor = (
42
51
  data["server_version"]["release"],
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cgcsdk
3
- Version: 1.0.11
3
+ Version: 1.0.12
4
4
  Summary: Comtegra GPU Cloud REST API client
5
5
  Author: Comtegra AI Team
6
6
  Author-email: ai@comtegra.pl
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