Skip to main content

OpenSwitch Development Tool

Project description

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

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

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

opx is distributed on `PyPI <https://pypi.org>`_ as a universal
wheel and is available on Linux/macOS and Windows and supports
Python 3.5+ and PyPy.

.. 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
$ 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 --remove-container

# 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

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.3.tar.gz (7.6 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.3-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for opx-0.0.3.tar.gz
Algorithm Hash digest
SHA256 4899f7086a200dd1c811cae8e59a4921390201e9d48481ddd3f55d00d12632d7
MD5 05513231e084649dc870298d9cfbea19
BLAKE2b-256 d6d54695cf3ddd365c4233a96311ca9991fe58fff0c46822e3f6856e15b68e63

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for opx-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0cdf2e5635d8929c12050f8645b9997ea4714c3781f2fba3fb8170b8fd2dd1a6
MD5 486ac356cf7c6a8a7fd3e03d985be960
BLAKE2b-256 639ae3c88b4d7331f7ae8fc82c3b83b5744fa5b11b7b7a227c6c9faf44d23908

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