Installation
Requirement
Genie
requires pyATS to be installed.It is highly recommended to install Genie and pyATS within a virtual environment. (Cisco engineers get this automatically with pyATS installation script).
Cisco only make sure to request permission to bitbucket.
Installation & Upgrade
Within your virtual environment:
If you dont have pyats installed, this will install both pyats and genie:
pip install pyats[library]
Or run this if pyats is already install in your environment:
pip install genie
Note
For Cisco employee, you might need to source the proxy first source /auto/pyats/bin/lab_proxy.csh (or .sh if bash)
This will install the follow packages:
Genie packages
Description
genie
Genie main package
genie.libs.conf
Libraries containing Conf objects
genie.libs.ops
Libraries containing Ops objects
genie.libs.sdk
Libraries containing Triggers, Verification and harness related
genie.libs.parser
Libraries containing all the parsers
genie.libs.robot
Robot Library to interact with Genie
genie.libs.filetransferutils
Library for file transfer operations on device
genie.telemetry
Infrastructure for Telemetry
You are good to go explore Genie
Code Structure
Genie code base is divided into two sections:
Infrastructure
Feature libraries & SDK
Infrastructure
The infrastructure is the core and baseclass of Genie and is released via pip packages. For any question contact us.
Feature libraries & SDK
The feature libraries & SDK are user-community owned and developed. When installing Genie, all the libraries are automatically installed with the latest version. To contribute to the library, do the following:
Contribute to Genie Parser
git clone git@wwwin-github.cisco.com:pyATS/genieparser.git.git
cd genielibs
make develop
Contribute to Genie Libs
git clone git@wwwin-github.cisco.com:pyATS/genielibs.git.git
cd genielibs
make develop
Once this steps are done, you can develop any changes and send pull request. Here are some rough steps. No exact steps can be given as every scenario is different. Make sure you are familiar with git.
git checkout -b <branch name>
# Do the modifications on the file(s)
git add <file>
git commit -m "some message explaining the change"
git push origin branch_name
Note
Make sure to understand how develop mode works for setuptools.
genie.libs.parser
code can be found in genieparser/src/genie/libs/parser/
Genie.libs
code is divided in 4 main parts
pkgs/ops-pkg/src/genie/libs/ops/
- Operational state objectpkgs/conf-sdk/src/genie/libs/sdk/
- Triggers and Verificationspkgs/conf-pkg/src/genie/libs/conf/
- Configuring device with Python objectpkgs/conf-robot/src/genie/libs/robot/
- RobotFramework libraries for Genie
Support Mailer
For support, question and training contact us.