20 lines
790 B
Plaintext
20 lines
790 B
Plaintext
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
|
||
|