Code Monkey home page Code Monkey logo

generate_circuit_id's Introduction

generate-circuit-id

This insanely simple, unintentionally patriotic script generates a circuit ID based on input variables.

Circuit IDs are composed of the following variables:

  • Service Type (IP Transit, MPLS, SD-WAN)
  • Location Identifier
    • Combination of country (USA, in my case)
    • US Region ID (From list from the US Census Bureau)
    • US Division ID (From the same list)
    • US State FIPS Code (From the same list)
  • Customer ID
    • Should be something reusable that maps to the customer across all systems. In our case, the ConnectWise Company RecID
  • Service ID
    • Randomly generated 4 digit number

This is pretty tailored to our environment and standards, but who knows, perhaps it would be useful to some other souls out there.

Installation

$ pip install git+https://github.com/checktheroads/generate_circuit_id.git

Usage

$ generate-circuit-id
  CRM ID: 12345
  US State: hi

  Service Type:
      [1] IP Transit
      [2] MPLS
      [3] SD-WAN
      [4] Cross Connect
  : 3

 Circuit ID: 3.84048.12345.5821

Options can also be passed as arguements:

$ generate-circuit-id --help
Usage: generate-circuit-id [OPTIONS]

  Parses input data, passes to child functions, prints generated circuit ID

Options:
  -c, --customer-id INTEGER  Customer ID Number from CRM  [required]
  -s, --state TEXT           US State Where Service is Delivered  [required]
  -t, --type [1|2|3|4]       Customer ID Number from CRM  [required]
  --help                     Show this message and exit.
$ generate-circuit-id -c 12345 -s Hawaii -t 3
Circuit ID: 3.84048.12345.5821

License

WTFPL

generate_circuit_id's People

Contributors

thatmattlove avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

troopert

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.