GithubHelp home page GithubHelp logo

isabella232 / sonic-utilities Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sonic-net/sonic-utilities

0.0 0.0 0.0 4.25 MB

Command line utilities for the SONiC project

License: Other

Shell 3.31% Python 95.98% Awk 0.08% HTML 0.63% Makefile 0.01%

sonic-utilities's Introduction

Total alerts Language grade: Python

Build

SONiC: Software for Open Networking in the Cloud

sonic-utilities

Command-line utilities for SONiC

This repository produces two packages, as follows:

sonic-utilities

A Python wheel package, containing all the Python source code for the command-line utilities

Setting up a build/test environment

The sonic-utilities package depends on a number of other packages, many of which are available via PyPI, but some are part of the SONiC codebase. When building/testing the package, setuptools/pip will attempt to install the packages available from PyPI. However, you will need to manually build and install the SONiC dependencies before attempting to build or test the package.

Currently, this list of dependencies is as follows:

  • libyang_1.0.73_amd64.deb
  • libyang-cpp_1.0.73_amd64.deb
  • python3-yang_1.0.73_amd64.deb
  • redis_dump_load-1.1-py3-none-any.whl
  • swsssdk-2.0.1-py3-none-any.whl
  • sonic_py_common-1.0-py3-none-any.whl
  • sonic_config_engine-1.0-py3-none-any.whl
  • sonic_yang_mgmt-1.0-py3-none-any.whl
  • sonic_yang_models-1.0-py3-none-any.whl

A convenient alternative is to let the SONiC build system configure a build enviroment for you. This can be done by cloning the sonic-buildimage repo, building the sonic-utilities package inside the Debian Buster slave container, and staying inside the container once the build finishes. During the build process, the SONiC build system will build and install all the necessary dependencies inside the container. After following the instructions to clone and initialize the sonic-buildimage repo, this can be done as follows:

  1. Configure the build environment for an ASIC type (any type will do, here we use generic)

    make configure PLATFORM=generic
    
  2. Build the sonic-utilities Python wheel package inside the Buster slave container, and tell the build system to keep the container alive when finished

    make NOJESSIE=1 NOSTRETCH=1 KEEP_SLAVE_ON=yes target/python-wheels/sonic_utilities-1.2-py3-none-any.whl
    
  3. When the build finishes, your prompt will change to indicate you are inside the slave container. Change into the src/sonic-utilities/ directory

    user@911799f161a0:/sonic$ cd src/sonic-utilities/
    
  4. You can now make changes to the sonic-utilities source and build the package or run unit tests with the commands below. When finished, you can exit the container by calling exit.

To build

python3 setup.py bdist_wheel

To run unit tests

python3 setup.py test

sonic-utilities-data

A Debian package, containing data files needed by the utilities (bash_completion files, Jinja2 templates, etc.)

To build

Instructions for building the sonic-utilities-data package can be found in sonic-utilities-data/README.md


Contribution guide

All contributors must sign a contribution license agreement (CLA) before contributions can be accepted. This process is now automated via a GitHub bot when submitting new pull request. If the contributor has not yet signed a CLA, the bot will create a comment on the pull request containing a link to electronically sign the CLA.

GitHub Workflow

We're following basic GitHub Flow. If you have no idea what we're talking about, check out GitHub's official guide. Note that merge is only performed by the repository maintainer.

Guide for performing commits:

  • Isolate each commit to one component/bugfix/issue/feature
  • Use a standard commit message format:
[component/folder touched]: Description intent of your changes

[List of changes]

Signed-off-by: Your Name [email protected]

For example:

swss-common: Stabilize the ConsumerTable

* Fixing autoreconf
* Fixing unit-tests by adding checkers and initialize the DB before start
* Adding the ability to select from multiple channels
* Health-Monitor - The idea of the patch is that if something went wrong with the notification channel,
  we will have the option to know about it (Query the LLEN table length).

  Signed-off-by: John Doe [email protected]
  • Each developer should fork this repository and add the team as a Contributor
  • Push your changes to your private fork and do "pull-request" to this repository
  • Use a pull request to do code review
  • Use issues to keep track of what is going on

sonic-utilities's People

Contributors

jleveque avatar yxieca avatar lguohan avatar pavel-shirshov avatar taoyl-ms avatar sihuihan88 avatar wendani avatar tsvanduyn avatar prsunny avatar qiluo-msft avatar blueve avatar mykolaf avatar renukamanavalan avatar abdosi avatar nazariig avatar daall avatar tahmed-dev avatar shlomibitton avatar jipanyang avatar keboliu avatar marian-pritsak avatar neethajohn avatar stcheng avatar arlakshm avatar judyjoseph avatar andriymoroz-mlnx avatar akhileshsamineni avatar dzhangalibaba avatar smaheshm avatar zhenggen-xu 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.