Skip to content

oboehmer/Cisco-CCW

Repository files navigation

Repository to hold scripts to track orders or check estimates in Cisco Commerce Workspace (CCW)

Installation Guide

  1. Clone this repository to a folder and change directory into the folder
git clone hhttps://github.com/oboehmer/Cisco-CCW.git
cd Cisco-CCW
  1. Set up a virtual environment in it and install the required packages
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
export PYTHONPATH=$(pwd)
  1. Set the following environment variables: CCO_PASSWORD to your CEC password (if not set the scripts prompts you to add it) and CCW_CLIENTSECRET to the secret for your client. In Linux/MacOS, you can use the following commands in your Terminal (note that the read -s .. command does not each the password as you type it):
$ read -s CCO_PASSWORD
<enter your pass>
$ read -s CCW_CLIENTSECRET
<enter the secrect>
$ export CCO_PASSWORD CCW_CLIENTSECRET

The scripts also need to know your CCO username and CCW client ID. You can put the latter into utils.py as default, and/or populate them in the environment:

$ export CCO_USERNAME='xxxx'
$ export CCW_CLIENTID='xxxxxxxxxxxxxxxx'
  1. Test the API and the setup of your environment:
$ python test_api.py 
Hello successful
  1. Try to retrieve an order:
$ ./get_order_status.py 1234567890

You can use the options --collect-sublevels and/or --show-serials to show more than the main lineitems or to show serial numbers (only for the main lineitems).

  1. Try to retrieve a quote/estimate

$ ./get_estimate_details.py 1234567890

Using the CCW Modules

Check the get_order_status.py or get_estimate_details as example on how to use the CCW, Order and Estimate modules. The CCW object takes cco_username/password/client-secret/client-id information as required arguments, there is a method in utils.py which populates this based on the environment variable and defaults.

CCW API Documentation:

About

Examples on how to interact with Cisco's CCW API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages