kboss/b/k8cloud/get_available_resources.dspy
2025-07-16 14:27:17 +08:00

20 lines
790 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

async def get_available_resources(ns={}):
# 客户方需要提供用户密码用basic_auth_headers函数生成验证用户所需
# 的http请求的headers并在请求是放在headers参数中
headers = basic_auth_headers('kyycloud','Kyy@123456')
hc = HttpClient()
# https://pcapi.opencomputing.cn/api/v1/create_pod.dspy
resp = await hc.request('https://pcapi.opencomputing.cn/api/v1/get_available_resources.dspy',
method='GET',
params={
"a":"1",
"key":"87y32iuhi453u8y56",
"secretkey":"qqqqqcccccceeeee"
},
headers=headers)
info(f'{resp=}')
return resp
ret = await get_available_resources(params_kw)
return ret