https://github.com/opiproject/pydpu
Python library and cli to communicate with DPUs and IPUs
https://github.com/opiproject/pydpu
Last synced: 12 months ago
JSON representation
Python library and cli to communicate with DPUs and IPUs
- Host: GitHub
- URL: https://github.com/opiproject/pydpu
- Owner: opiproject
- License: apache-2.0
- Created: 2023-02-03T18:07:11.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-05-28T23:20:08.000Z (about 2 years ago)
- Last Synced: 2024-05-29T13:52:11.286Z (about 2 years ago)
- Language: Python
- Size: 729 KB
- Stars: 5
- Watchers: 2
- Forks: 8
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# pydpu
[](https://github.com/opiproject/pydpu/blob/main/LICENSE)
[](https://hub.docker.com/r/opiproject/pydpu)
[](https://pypi.org/project/pydpu/)
[](https://github.com/psf/black)
[](https://codecov.io/gh/opiproject/pydpu)
[](https://github.com/opiproject/pydpu/actions/workflows/linters.yml)
[](https://github.com/opiproject/pydpu/actions/workflows/codeql.yml)
[](https://securityscorecards.dev/viewer/?platform=github.com&org=opiproject&repo=pydpu)
[](https://github.com/opiproject/pydpu/actions/workflows/docker.yaml)
[](https://github.com/opiproject/pydpu/actions/workflows/python.yaml)
[](https://github.com/opiproject/pydpu)
[](https://github.com/opiproject/pydpu/graphs/contributors)
Python library and cli to communicate with DPUs and IPUs
## I Want To Contribute
This project welcomes contributions and suggestions. We are happy to have the Community involved via submission of **Issues and Pull Requests** (with substantive content or even just fixes). We are hoping for the documents, test framework, etc. to become a community process with active engagement. PRs can be reviewed by by any number of people, and a maintainer may accept.
See [CONTRIBUTING](https://github.com/opiproject/opi/blob/main/CONTRIBUTING.md) and [GitHub Basic Process](https://github.com/opiproject/opi/blob/main/doc-github-rules.md) for more details.
## Installation
There are several ways of running this CLI.
### Docker
```sh
docker pull opiproject/pydpu:
```
You can specify a version like `0.1.1` or use `latest` to get the most up-to-date version.
Run latest version of the CLI in a container:
```sh
docker run -it --rm --network=host opiproject/pydpu:latest --help
```
Replace `--help` with any `pydpu` command, without `pydpu` itself.
### PyPI
```sh
pip install pydpu
```
## Usage
### Version
To get version, run:
```sh
$ pydpu --version
dpu, version 0.1.1
```
### Redfish
To communicate over redfish, run:
```sh
pydpu --address=10.10.10.10 redfish --username root --password 0penBmc test
```
### Inventory
To get inventory, run:
```sh
pydpu --address=localhost:50151 inventory get
```
### Ipsec
To create a tunnel, run:
```sh
pydpu --address=localhost:50151 ipsec create-tunnel
```
To get statistics, run:
```sh
pydpu --address=localhost:50151 ipsec stats
```
### Storage
To create a subsystem, run:
```sh
pydpu --address=localhost:50151 storage subsystem
```
To create a controller, run:
```sh
pydpu --address=localhost:50151 storage controller
```
To create a namespace, run:
```sh
pydpu --address=localhost:50151 storage namespace
```
### Evpn
To create a logical bridge, run:
```sh
pydpu --address=localhost:50151 evpn bridge
```
To create a bridge port, run:
```sh
pydpu --address=localhost:50151 evpn port
```
To create a vrf, run:
```sh
pydpu --address=localhost:50151 evpn vrf
```
To create a svi, run:
```sh
pydpu --address=localhost:50151 evpn svi
```
## Packaging
This project uses [poetry](https://python-poetry.org/) to manage dependencies, build, etc.
## Releasing new versions
```sh
# Make sure you have dev dependencies installed
$ poetry install --group dev
# Use bump2version to update version strings and create a new tag
$ bump2version
# Push new tag
$ git push --tags
# Create GitHub release
$ gh release create v$(poetry version -s) --generate-notes
```