aap-utils 0.2.13__tar.gz → 0.2.16__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.
@@ -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,3 +8,4 @@ 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
@@ -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,3 +8,4 @@ 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
@@ -0,0 +1,2 @@
1
+ requests
2
+ hydra-core
@@ -2,13 +2,14 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="aap_utils", # The name of your library
5
- version="0.2.13",
5
+ version="0.2.16",
6
6
  description="A Python library for registering an IP address for AAP",
7
7
  author="Minh Dang",
8
8
  author_email="danghoangminh86@gmail.com",
9
9
  packages=find_packages(), # Auto-find packages in the directory
10
10
  install_requires=[
11
- "requests", # Any external dependencies (e.g., 'requests')
11
+ "requests", # Any external dependencies (e.g., 'requests')
12
+ "hydra-core",
12
13
  ],
13
14
  entry_points={
14
15
  "console_scripts": [
@@ -1 +0,0 @@
1
- requests
File without changes
File without changes
File without changes