aap-utils 0.2.13__py3-none-any.whl → 0.2.16__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.
aap_utils/cli.py CHANGED
@@ -10,8 +10,9 @@ def is_debug_mode():
10
10
 
11
11
  def extract_default_image():
12
12
  """Extracts the image name from KERNEL_IMAGE if available and formats it."""
13
- kernel_image = os.getenv("KERNEL_IMAGE", "unname/unname_image@sha256:3024")
14
- image_name = kernel_image.split("/")[1].split("@")[0] # Extract image name
13
+ kernel_image = os.getenv("KERNEL_IMAGE", "unname/unname_image@sha256:3024")
14
+ image_part = kernel_image.split("/")[-1]
15
+ image_name = image_part.split("@")[0].split(":")[0]
15
16
  return format_name(image_name)
16
17
 
17
18
  def format_name(name):
@@ -82,6 +83,9 @@ def publish_env():
82
83
  else:
83
84
  error_message = response_json.get("error", "Unknown error occurred.")
84
85
  print(f"❌ Failed to publish: {error_message}")
86
+ output = response_json.get("output")
87
+ if output: # Check if output has a value
88
+ print(f"📜 Output: {output}")
85
89
  else:
86
90
  print(f"❌ Failed to publish. Server responded with: {response.status_code}, {response.text}")
87
91
  except requests.RequestException as e:
@@ -89,7 +93,7 @@ def publish_env():
89
93
 
90
94
  def main():
91
95
  import sys
92
- if len(sys.argv) > 2 and sys.argv[1] == "publish" and sys.argv[2] == "env":
96
+ if len(sys.argv) > 2 and sys.argv[1] == "push" and sys.argv[2] == "env":
93
97
  publish_env()
94
98
  else:
95
- print("Usage: aap_utils publish env")
99
+ print("Usage: aap_utils push env")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: aap_utils
3
- Version: 0.2.13
3
+ Version: 0.2.16
4
4
  Summary: A Python library for registering an IP address for AAP
5
5
  Author: Minh Dang
6
6
  Author-email: danghoangminh86@gmail.com
@@ -8,4 +8,5 @@ Classifier: Programming Language :: Python :: 3
8
8
  Classifier: License :: OSI Approved :: MIT License
9
9
  Classifier: Operating System :: OS Independent
10
10
  Requires-Dist: requests
11
+ Requires-Dist: hydra-core
11
12
 
@@ -0,0 +1,8 @@
1
+ aap_utils/__init__.py,sha256=g6G3i3a5ANDJWqFX2oPsLpP93aTaoTj0gkMQzeqQIJw,172
2
+ aap_utils/cli.py,sha256=IEpuB7CH9OA8-JlFGuKpd_fZWvDh873RN9Ydl4Qf2dQ,3718
3
+ aap_utils/register.py,sha256=J9tukByU1mcy4SoaJOoGY8jjzL9JMuNTZGtCBSwwon0,3823
4
+ aap_utils-0.2.16.dist-info/METADATA,sha256=PbgLx3I979kUbMsK9VplpvgT5OHgDBvSmQUmsMSVnNs,373
5
+ aap_utils-0.2.16.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
6
+ aap_utils-0.2.16.dist-info/entry_points.txt,sha256=K-h2toLoqFxAg4Bx2r7FWggKgYnAX9zp9s4Ms4r-d6s,49
7
+ aap_utils-0.2.16.dist-info/top_level.txt,sha256=Qt5xmL8_0_jhMl9uA3lg-xnvs4nCEyVj1tBE4vnp36M,10
8
+ aap_utils-0.2.16.dist-info/RECORD,,
@@ -1,8 +0,0 @@
1
- aap_utils/__init__.py,sha256=g6G3i3a5ANDJWqFX2oPsLpP93aTaoTj0gkMQzeqQIJw,172
2
- aap_utils/cli.py,sha256=EALRupuiTmKYous4odICF5Udvi2X1HgBqvSlDsUtTfA,3536
3
- aap_utils/register.py,sha256=J9tukByU1mcy4SoaJOoGY8jjzL9JMuNTZGtCBSwwon0,3823
4
- aap_utils-0.2.13.dist-info/METADATA,sha256=yGgWQPOej-GAylbuUh3hMyP-cbrYr-JyQjtg_tMSt5c,347
5
- aap_utils-0.2.13.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
6
- aap_utils-0.2.13.dist-info/entry_points.txt,sha256=K-h2toLoqFxAg4Bx2r7FWggKgYnAX9zp9s4Ms4r-d6s,49
7
- aap_utils-0.2.13.dist-info/top_level.txt,sha256=Qt5xmL8_0_jhMl9uA3lg-xnvs4nCEyVj1tBE4vnp36M,10
8
- aap_utils-0.2.13.dist-info/RECORD,,