Cisco CCW
1.0.0
git clone hhttps://github.com/oboehmer/Cisco-CCW.git
cd Cisco-CCW
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
export PYTHONPATH=$(pwd)
CCO_PASSWORD
为您的 CEC 密码(如果未设置,脚本会提示您添加它), CCW_CLIENTSECRET
为您的客户端的密码。在 Linux/MacOS 中,您可以在终端中使用以下命令(请注意, read -s ..
命令并不包含您键入的密码): $ read -s CCO_PASSWORD
<enter your pass>
$ read -s CCW_CLIENTSECRET
<enter the secrect>
$ export CCO_PASSWORD CCW_CLIENTSECRET
脚本还需要知道您的 CCO 用户名和 CCW 客户端 ID。您可以将后者作为默认值放入 utils.py 中,和/或将它们填充到环境中:
$ export CCO_USERNAME='xxxx'
$ export CCW_CLIENTID='xxxxxxxxxxxxxxxx'
$ python test_api.py
Hello successful
$ ./get_order_status.py 1234567890
您可以使用选项--collect-sublevels
和/或--show-serials
来显示主行项目以外的内容或显示序列号(仅适用于主行项目)。
$ ./get_estimate_details.py 1234567890
检查 get_order_status.py 或 get_estimate_details 作为有关如何使用 CCW、订单和估算模块的示例。 CCW 对象将 cco_username/password/client-secret/client-id 信息作为必需参数,utils.py 中有一个方法可以根据环境变量和默认值填充此信息。