Skip to main content

OpenSwitch Development Tool

Project description

OpenSwitch Development Tool
===========================

.. image:: https://img.shields.io/pypi/v/opx.svg
:target: https://pypi.python.org/pypi/opx

.. image:: https://img.shields.io/pypi/l/opx.svg
:target: https://pypi.python.org/pypi/opx

.. image:: https://img.shields.io/pypi/pyversions/opx.svg
:target: https://pypi.python.org/pypi/opx

.. contents:: **Table of Contents**
:backlinks: none

Installation
------------

.. code-block:: bash

$ pip install opx

Requirements
~~~~~~~~~~~~

- `Docker <https://docs.docker.com/engine/installation/>`_
- `Git <https://git-scm.com/>`_
- `Repo <https://source.android.com/setup/downloading#installing-repo>`_

Getting Started
---------------

.. code-block:: bash

# initialize your workspace
$ opx init

# build all packages
$ opx build

# enter a development shell and build a package however you like
$ opx shell
opx@XXXXXXXXXXXX:/mnt$ cd opx-logging
opx@XXXXXXXXXXXX:/mnt$ mk-build-deps --root-cmd sudo --install --remove
opx@XXXXXXXXXXXX:/mnt$ dpkg-buildpackage -us -uc
opx@XXXXXXXXXXXX:/mnt$ fakeroot debian/rules binary
opx@XXXXXXXXXXXX:/mnt$ exit

# assemble an installer
$ opx assemble --dist 2.2

# remove persistent container
$ opx remove

# you can also choose to remove the container when a command finishes
$ opx assemble --dist 2.2 --rm

# clean up workspace completely
$ rm -rf opx-*/ .repo
$ opx cleanup

New Features (Over `opx-build <https://github.com/open-switch/opx-build>`_)
---------------------------------

* Persistent containers (if inside a workspace)

.. code-block:: bash

$ opx shell
opx@XXXXXXXXXXXX:/mnt$ echo foo > /bar
opx@XXXXXXXXXXXX:/mnt$ exit
$ opx shell
opx@XXXXXXXXXXXX:/mnt$ cat /bar
foo

* Build then tag repository for publishing

.. code-block:: bash

$ opx release opx-logging

* Build and sort packages for easy sharing/publishing

.. code-block:: bash

$ opx build opx-logging --sort
$ tree ./pkg
./pkg
└── opx-logging/
├── libopx-logging1_2.1.0_amd64.deb
├── libopx-logging-dev_2.1.0_amd64.deb
├── opx-logging_2.1.0_amd64.build
├── opx-logging_2.1.0_amd64.deb
├── opx-logging_2.1.0.dsc
├── opx-logging_2.1.0.tar.gz
└── python-opx-logging_2.1.0_amd64.deb

Command Line Completion
-----------------------

Run the command corresponding with your shell. Add to your shell startup file for persistent autocomplete.

.. code-block:: bash

# bash
$ eval "$(_OPX_COMPLETE=source-bash opx)"

# zsh
$ eval "$(_OPX_COMPLETE=source-zsh opx)"

# fish
$ eval (env _OPX_COMPLETE=source-fish opx)

Planned Features
----------------

* Port ``opx_build`` from shell to python
* Port ``opx_rel_pkgasm`` from python script to module
* Port ``opx_get_packages`` from python script to module
* Port ``opx_bld_basics`` from python script to module

License
-------

opx is distributed under the terms of the
`MIT License <https://choosealicense.com/licenses/mit>`_.


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

opx-0.0.4.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

opx-0.0.4-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

Details for the file opx-0.0.4.tar.gz.

File metadata

  • Download URL: opx-0.0.4.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for opx-0.0.4.tar.gz
Algorithm Hash digest
SHA256 4a0259c75b73462b3109f3ca5dbf8745244fe376f70c2d1bf9aac855472eeeaa
MD5 c9b7f96eecb03d78ada9b949cf1096e5
BLAKE2b-256 22975ad16888a3a339ae0726221b733c10a015dd4a2a0ec74dc4c593d02c1b00

See more details on using hashes here.

File details

Details for the file opx-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: opx-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 15.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for opx-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 796c7129d2eb91719123b4f0e6749292ef7d39fcf6ca4b123f4ee99d61294edc
MD5 8df35703068d4bb9d773d0369fa8bca9
BLAKE2b-256 c167333b3a3f099a4046cd3d36181fae22f35ef7640361f7427d384175094946

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page