aap-utils 0.2.11__py3-none-any.whl → 0.2.13__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
@@ -22,9 +22,9 @@ def validate_image_name(image_name):
22
22
  """Validate image name format: lowercase, only alphanumeric and underscores."""
23
23
  return bool(re.fullmatch(r'[a-z0-9_]+', image_name))
24
24
 
25
- def validate_tags(tags):
25
+ def validate_tags(tag):
26
26
  """Validate tag format: lowercase, only alphanumeric and underscores."""
27
- return bool(re.fullmatch(r'[a-z0-9_]+', tags))
27
+ return bool(re.fullmatch(r'[a-z0-9_]+', tag))
28
28
 
29
29
  def get_username():
30
30
  """Retrieve the username from the environment variable KERNEL_AP_USER or use 'unname'."""
@@ -54,21 +54,21 @@ def publish_env():
54
54
  print("Invalid image name. Use only lowercase letters, numbers, or underscores (_).")
55
55
 
56
56
  while True:
57
- tags = input("Enter tag (only 1 tag accepted): ").strip()
58
- formatted_tags = validate_tags(tags)
59
- if formatted_tags:
57
+ tag = input("Enter tag (only 1 tag accepted): ").strip()
58
+ checked_tag = validate_tags(tag)
59
+ if checked_tag:
60
60
  break
61
61
  print("Invalid tag. Each tag must be lowercase, contain only letters, numbers, or underscores (_), and have no spaces.")
62
62
 
63
63
  data = {
64
64
  "username": username,
65
65
  "imagename": image_name,
66
- "tags": formatted_tags,
66
+ "tags": tag,
67
67
  "namespace": namespace,
68
68
  "pod": pod
69
69
  }
70
70
 
71
- print(f"Publishing environment: {username}/{image_name}:{';'.join(formatted_tags)}")
71
+ print(f"Publishing environment: {username}/{image_name}:{tag}")
72
72
 
73
73
  if is_debug_mode():
74
74
  print(f"🔍 DEBUG: Sending data to API: {data}")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: aap_utils
3
- Version: 0.2.11
3
+ Version: 0.2.13
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
@@ -0,0 +1,8 @@
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,,
@@ -1,8 +0,0 @@
1
- aap_utils/__init__.py,sha256=g6G3i3a5ANDJWqFX2oPsLpP93aTaoTj0gkMQzeqQIJw,172
2
- aap_utils/cli.py,sha256=kf18Sy1vqvHME3wnlARf4yZY7m5C1Z4DT_cTOfI9xU4,3578
3
- aap_utils/register.py,sha256=J9tukByU1mcy4SoaJOoGY8jjzL9JMuNTZGtCBSwwon0,3823
4
- aap_utils-0.2.11.dist-info/METADATA,sha256=Vlx2LkSOhJ_3nlIuiRlulegeD23rtH2UU2pwfRIMw5Q,347
5
- aap_utils-0.2.11.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
6
- aap_utils-0.2.11.dist-info/entry_points.txt,sha256=K-h2toLoqFxAg4Bx2r7FWggKgYnAX9zp9s4Ms4r-d6s,49
7
- aap_utils-0.2.11.dist-info/top_level.txt,sha256=Qt5xmL8_0_jhMl9uA3lg-xnvs4nCEyVj1tBE4vnp36M,10
8
- aap_utils-0.2.11.dist-info/RECORD,,