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
CCW, Order 및 Estimate 모듈을 사용하는 방법에 대한 예로 get_order_status.py 또는 get_estimate_details를 확인하세요. CCW 개체는 cco_username/password/client-secret/client-id 정보를 필수 인수로 사용하며, utils.py에는 환경 변수 및 기본값을 기반으로 이를 채우는 메서드가 있습니다.