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

33 lines
1.1 KiB
Plaintext

async def get_vpc_band_width(ns={}):
'''
获取vpc线路
:return:
'''
ns = {
'siteId': 'e5aa47be-da46-11ec-bad2-defff767b3b5'
}
import aiohttp
CCS_URL = 'http://cdsapi.capitalonline.net/gcw'
action = "GetVpcBandwidth"
method = "GET"
param = {
"siteId": ns.get("siteId")
}
return {'status': True, 'data': [{'conf_id': 10289, 'conf_name': '电信'}], 'msg': ''}
# url = get_signature(action, method, CCS_URL, param=param)
# async with aiohttp.ClientSession() as session:
# async with session.request(method, url) as response:
# resp = await response.text()
# result = json.loads(resp)
# if result['Code'] == 'Success':
# result['status'] = True
# result.pop('Code')
# result['data'] = result.pop('Data')
# result['msg'] = result.pop('Message')
# else:
# result['status'] = False
# result['msg'] = result.pop('Message')
# return result
ret = await get_vpc_band_width(params_kw)
return ret