aap-utils 0.2.16__py3-none-any.whl → 0.2.18__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 +13 -1
- aap_utils/register.py +5 -3
- {aap_utils-0.2.16.dist-info → aap_utils-0.2.18.dist-info}/METADATA +1 -1
- aap_utils-0.2.18.dist-info/RECORD +8 -0
- aap_utils-0.2.16.dist-info/RECORD +0 -8
- {aap_utils-0.2.16.dist-info → aap_utils-0.2.18.dist-info}/WHEEL +0 -0
- {aap_utils-0.2.16.dist-info → aap_utils-0.2.18.dist-info}/entry_points.txt +0 -0
- {aap_utils-0.2.16.dist-info → aap_utils-0.2.18.dist-info}/top_level.txt +0 -0
aap_utils/cli.py
CHANGED
@@ -91,9 +91,21 @@ def publish_env():
|
|
91
91
|
except requests.RequestException as e:
|
92
92
|
print(f"❌ Error connecting to the server: {e}")
|
93
93
|
|
94
|
+
|
95
|
+
def get_ssh_password_if_prompted(prompt_bytes):
|
96
|
+
return "aiplatform"
|
97
|
+
|
98
|
+
|
94
99
|
def main():
|
95
100
|
import sys
|
96
101
|
if len(sys.argv) > 2 and sys.argv[1] == "push" and sys.argv[2] == "env":
|
97
102
|
publish_env()
|
103
|
+
elif len(sys.argv) > 1 and "password" in sys.argv[1]:
|
104
|
+
# Example: python aap_utils.py b "\raiplatform@172.20.0.11's password:\n"
|
105
|
+
prompt = sys.argv[2].encode()
|
106
|
+
password = get_ssh_password_if_prompted(prompt)
|
107
|
+
print(password)
|
98
108
|
else:
|
99
|
-
print("Usage:
|
109
|
+
print("Usage:")
|
110
|
+
print(" aap_utils push env")
|
111
|
+
print(" aap_utils b \"<prompt_bytes>\"")
|
aap_utils/register.py
CHANGED
@@ -47,14 +47,16 @@ def create_url(domain_name = "aiplatform.vcntt.tech"):
|
|
47
47
|
kernel_namespace = os.getenv("KERNEL_NAMESPACE")
|
48
48
|
|
49
49
|
# Validate the environment variable
|
50
|
-
if not kernel_namespace:
|
51
|
-
kernel_namespace="
|
50
|
+
if not kernel_namespace:
|
51
|
+
kernel_namespace = os.getenv("ARGOWORKFLOW_NAMESPACE")
|
52
|
+
if not kernel_namespace:
|
53
|
+
kernel_namespace="undefined"
|
52
54
|
|
53
55
|
# Replace 'machinelearning' with 'appmachinepublic' in KERNEL_NAMESPACE
|
54
56
|
if kernel_namespace.startswith("machinelearning"):
|
55
57
|
transformed_namespace = kernel_namespace.replace("machinelearning", "appmachinepublic", 1)
|
56
58
|
else:
|
57
|
-
raise ValueError(f"The KERNEL_NAMESPACE '{kernel_namespace}' does not follow the expected format.")
|
59
|
+
raise ValueError(f"The KERNEL_NAMESPACE or ARGOWORKFLOW_NAMESPACE'{kernel_namespace}' does not follow the expected format.")
|
58
60
|
|
59
61
|
# Create the final URL
|
60
62
|
url = f"https://{transformed_namespace}.{domain_name}"
|
@@ -0,0 +1,8 @@
|
|
1
|
+
aap_utils/__init__.py,sha256=g6G3i3a5ANDJWqFX2oPsLpP93aTaoTj0gkMQzeqQIJw,172
|
2
|
+
aap_utils/cli.py,sha256=3aRyq4bj0MRn535uy6ptc5JD1Iib6wctc6Kz3XjTzM0,4128
|
3
|
+
aap_utils/register.py,sha256=0okAQ8b8wVtT_bSFCAsV3pcVOTifLHfkyCZzvLSpsYc,3964
|
4
|
+
aap_utils-0.2.18.dist-info/METADATA,sha256=PMsu5lpmisSq8dS3VX2YdeRy86uGkzEo2PvxP8OPZMo,373
|
5
|
+
aap_utils-0.2.18.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
6
|
+
aap_utils-0.2.18.dist-info/entry_points.txt,sha256=K-h2toLoqFxAg4Bx2r7FWggKgYnAX9zp9s4Ms4r-d6s,49
|
7
|
+
aap_utils-0.2.18.dist-info/top_level.txt,sha256=Qt5xmL8_0_jhMl9uA3lg-xnvs4nCEyVj1tBE4vnp36M,10
|
8
|
+
aap_utils-0.2.18.dist-info/RECORD,,
|
@@ -1,8 +0,0 @@
|
|
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,,
|
File without changes
|
File without changes
|
File without changes
|