Skip to content

Commit f153365

Browse files
authored
chore: get vefaas app_id by name (#75)
1 parent 433d028 commit f153365

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

veadk/cloud/cloud_app.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,15 @@ def _get_vefaas_application_id_by_name(self) -> str:
105105
raise ValueError(
106106
"VeFaaS CloudAPP must be set application_name to get application_id."
107107
)
108-
# TODO(zakahan): get application id from vefaas application name
109-
vefaas_application_id = ""
108+
from veadk.integrations.ve_faas.ve_faas import VeFaaS
109+
110+
vefaas_client = VeFaaS(
111+
access_key=getenv("VOLCENGINE_ACCESS_KEY"),
112+
secret_key=getenv("VOLCENGINE_SECRET_KEY"),
113+
)
114+
vefaas_application_id = vefaas_client.find_app_id_by_name(
115+
self.vefaas_application_name
116+
)
110117
return vefaas_application_id
111118

112119
async def _get_a2a_client(self) -> A2AClient:

0 commit comments

Comments
 (0)