Giter VIP home page Giter VIP logo

cisco-ccw's Introduction

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:

cisco-ccw's People

Contributors

oboehmer avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.