python-doniclient 1.0.3__tar.gz → 1.2.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. python_doniclient-1.2.1/.github/dependabot.yml +7 -0
  2. python_doniclient-1.2.1/.github/workflows/ci.yml +31 -0
  3. python_doniclient-1.2.1/.github/workflows/publish.yml +45 -0
  4. python_doniclient-1.2.1/.stestr.conf +3 -0
  5. python_doniclient-1.2.1/.vscode/launch.json +29 -0
  6. python_doniclient-1.2.1/.vscode/settings.json +10 -0
  7. python_doniclient-1.2.1/AUTHORS +12 -0
  8. python_doniclient-1.2.1/CONTRIBUTING.md +14 -0
  9. python_doniclient-1.2.1/ChangeLog +191 -0
  10. python_doniclient-1.2.1/PKG-INFO +113 -0
  11. python_doniclient-1.2.1/README.md +90 -0
  12. {python-doniclient-1.0.3 → python_doniclient-1.2.1}/doniclient/osc/cli.py +193 -58
  13. {python-doniclient-1.0.3 → python_doniclient-1.2.1}/doniclient/osc/common.py +11 -0
  14. {python-doniclient-1.0.3 → python_doniclient-1.2.1}/doniclient/tests/osc/fakes.py +8 -0
  15. python_doniclient-1.2.1/doniclient/tests/osc/test_hardware.py +337 -0
  16. {python-doniclient-1.0.3 → python_doniclient-1.2.1}/doniclient/v1/resource_fields.py +0 -1
  17. python_doniclient-1.2.1/pyproject.toml +67 -0
  18. python_doniclient-1.2.1/python_doniclient.egg-info/PKG-INFO +113 -0
  19. python_doniclient-1.2.1/python_doniclient.egg-info/SOURCES.txt +35 -0
  20. python_doniclient-1.2.1/python_doniclient.egg-info/dependency_links.txt +1 -0
  21. python_doniclient-1.2.1/python_doniclient.egg-info/entry_points.txt +16 -0
  22. python_doniclient-1.2.1/python_doniclient.egg-info/not-zip-safe +1 -0
  23. python_doniclient-1.2.1/python_doniclient.egg-info/pbr.json +1 -0
  24. python_doniclient-1.2.1/python_doniclient.egg-info/requires.txt +4 -0
  25. python_doniclient-1.2.1/python_doniclient.egg-info/top_level.txt +1 -0
  26. python_doniclient-1.2.1/setup.cfg +7 -0
  27. python_doniclient-1.2.1/setup.py +3 -0
  28. python_doniclient-1.2.1/tox.ini +18 -0
  29. python-doniclient-1.0.3/PKG-INFO +0 -33
  30. python-doniclient-1.0.3/README.md +0 -5
  31. python-doniclient-1.0.3/doniclient/tests/osc/test_hardware.py +0 -168
  32. python-doniclient-1.0.3/pyproject.toml +0 -71
  33. python-doniclient-1.0.3/setup.py +0 -61
  34. {python-doniclient-1.0.3 → python_doniclient-1.2.1}/doniclient/__init__.py +0 -0
  35. {python-doniclient-1.0.3 → python_doniclient-1.2.1}/doniclient/osc/__init__.py +0 -0
  36. {python-doniclient-1.0.3 → python_doniclient-1.2.1}/doniclient/osc/availability.py +0 -0
  37. {python-doniclient-1.0.3 → python_doniclient-1.2.1}/doniclient/osc/plugin.py +0 -0
  38. {python-doniclient-1.0.3 → python_doniclient-1.2.1}/doniclient/tests/__init__.py +0 -0
  39. {python-doniclient-1.0.3 → python_doniclient-1.2.1}/doniclient/tests/osc/__init__.py +0 -0
  40. {python-doniclient-1.0.3 → python_doniclient-1.2.1}/doniclient/tests/v1/__init__.py +0 -0
  41. {python-doniclient-1.0.3 → python_doniclient-1.2.1}/doniclient/v1/client.py +0 -0
@@ -0,0 +1,7 @@
1
+ version: 2
2
+ updates:
3
+ # Maintain dependencies for GitHub Actions
4
+ - package-ecosystem: "github-actions"
5
+ directory: "/"
6
+ schedule:
7
+ interval: "monthly"
@@ -0,0 +1,31 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - 'chameleoncloud/*'
7
+ pull_request:
8
+ workflow_call:
9
+
10
+ permissions:
11
+ contents: read
12
+
13
+ jobs:
14
+ test:
15
+ strategy:
16
+ fail-fast: false
17
+ matrix:
18
+ python-version:
19
+ - "3.9"
20
+ - "3.10"
21
+ - "3.11"
22
+ - "3.12"
23
+ name: Python ${{ matrix.python-version }}
24
+ runs-on: ubuntu-24.04
25
+ steps:
26
+ - uses: actions/checkout@v7
27
+ - uses: actions/setup-python@v6
28
+ with:
29
+ python-version: ${{ matrix.python-version }}
30
+ - run: python -m pip install tox
31
+ - run: tox -e py
@@ -0,0 +1,45 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ permissions:
8
+ contents: read
9
+
10
+ jobs:
11
+ test:
12
+ uses: ./.github/workflows/ci.yml
13
+
14
+ build:
15
+ needs: test
16
+ runs-on: ubuntu-24.04
17
+ steps:
18
+ - uses: actions/checkout@v7
19
+ with:
20
+ # pbr takes the version from the release tag, so it needs tags
21
+ fetch-depth: 0
22
+ - uses: actions/setup-python@v6
23
+ with:
24
+ python-version: "3.12"
25
+ - run: python -m pip install build
26
+ - run: python -m build
27
+ - uses: actions/upload-artifact@v7
28
+ with:
29
+ name: python-package-distributions
30
+ path: dist/
31
+
32
+ publish:
33
+ needs: build
34
+ runs-on: ubuntu-24.04
35
+ environment:
36
+ name: pypi
37
+ url: https://pypi.org/p/python-doniclient
38
+ permissions:
39
+ id-token: write
40
+ steps:
41
+ - uses: actions/download-artifact@v8
42
+ with:
43
+ name: python-package-distributions
44
+ path: dist/
45
+ - uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,3 @@
1
+ [DEFAULT]
2
+ test_path=${TESTS_DIR:-./doniclient/tests}
3
+ top_dir=./
@@ -0,0 +1,29 @@
1
+ {
2
+ // Use IntelliSense to learn about possible attributes.
3
+ // Hover to view descriptions of existing attributes.
4
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5
+ "version": "0.2.0",
6
+ "configurations": [
7
+ {
8
+ "name": "Debug Unit Test",
9
+ "type": "python",
10
+ "request": "launch",
11
+ "purpose": ["debug-test"],
12
+ "justMyCode": false,
13
+ },
14
+ {
15
+ "name": "Hardware List",
16
+ "type": "python",
17
+ "request": "launch",
18
+ "cwd": "${workspaceFolder}",
19
+ "program": ".venv/bin/openstack",
20
+ "args": [
21
+ "hardware",
22
+ "list",
23
+ "--long"
24
+ ],
25
+ "justMyCode": false,
26
+ "envFile": "${workspaceFolder}/debug.env",
27
+ },
28
+ ]
29
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "python.testing.unittestArgs": [
3
+ "-v",
4
+ "-s",
5
+ "./doniclient",
6
+ "-p",
7
+ "test*.py"
8
+ ],
9
+ "python.testing.unittestEnabled": true,
10
+ }
@@ -0,0 +1,12 @@
1
+ Anish Reddy <2anishreddy@gmail.com>
2
+ Anish Reddy Ravula <2anishreddy@gmail.com>
3
+ Jason <diurnalist@gmail.com>
4
+ Jason Anderson <796413+diurnalist@users.noreply.github.com>
5
+ Jason Anderson <jasonanderson@uchicago.edu>
6
+ Mark Powers <markpowers@uchicago.edu>
7
+ Michael Sherman <shermanm@uchicago.edu>
8
+ Mike <msherman64@gmail.com>
9
+ Mike <shermanm@uchicago.edu>
10
+ Soufiane Jounaid <38963565+JOUNAIDSoufiane@users.noreply.github.com>
11
+ dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
12
+ github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@@ -0,0 +1,14 @@
1
+ # Contributing
2
+
3
+ ## Testing
4
+
5
+ Run the tests using `tox -e py`
6
+
7
+
8
+ ## Publishing new versions
9
+
10
+ Releases are published to PyPI by the [publish workflow](.github/workflows/publish.yml), using PyPI trusted publishing. The version comes from the git tag (via pbr), so there is no version to edit before releasing.
11
+
12
+ To release, create a GitHub release with a new tag named `vX.Y.Z`, and set its target to the branch you are releasing from. Publishing the release runs the tests, builds the package and uploads it to PyPI.
13
+
14
+ Use tags like `v1.1.0rc1` for pre-releases. GitHub's pre-release checkbox doesn't change the version uploaded to PyPI.
@@ -0,0 +1,191 @@
1
+ CHANGES
2
+ =======
3
+
4
+ v1.2.1
5
+ ------
6
+
7
+ * version from git tags
8
+ * Wip/cleanup ci publish (#121)
9
+ * ci: publish stestr results as junit
10
+ * ci: test python 3.10 through 3.12
11
+ * ci: run unit tests in a python version matrix
12
+ * Bump actions/checkout from 6 to 7
13
+
14
+ v1.2.0
15
+ ------
16
+
17
+ * bump requirements and python for 2025.1
18
+
19
+ v1.1.0
20
+ ------
21
+
22
+ * bump requirements and python for 2024.1
23
+
24
+ v1.0.4
25
+ ------
26
+
27
+ * add publish workflow
28
+ * clean up CI noise
29
+ * feat: remove poetry, update deps and tox
30
+ * Soufianej pyyaml upgrade to fix python sources build error (#110)
31
+ * Unset feature (#105)
32
+ * refactor of prop\_flag\_group (#108)
33
+ * Update the readme with the command usage
34
+ * hardware list to show last\_error from each worker
35
+ * add "name\_or\_uuid" support to "sync" command
36
+ * fix ordering of worker-task columns (#103)
37
+ * Show and filter by worker\_state and type (#102)
38
+ * Set and delete using name of HW (#100)
39
+ * create set \`mgmt\_addr\` instead of \`management\_address\` in error
40
+ * fix unittest for hardware show
41
+ * [ci] fix configuration for local untitests
42
+ * fix pyyaml dependency issue
43
+ * Bump up version to 5.6.2 for xena constraints (#99)
44
+
45
+ v1.0.3
46
+ ------
47
+
48
+ * bump version for release
49
+ * ensure CI checks are useful (#87)
50
+ * allow setting local egress property for devices (#85)
51
+ * Add test cases for "hardware set"
52
+ * update formatter
53
+ * bump release version
54
+ * add --long flag to list all columns
55
+ * add vscode debug config
56
+ * Update python to 3.7 minimum, neeeded fpo xena
57
+ * upgrade dependencies for xena
58
+ * allow retrieval of infomation by name (#57)
59
+ * 0.5.2
60
+ * fix bug w/ patch command
61
+
62
+ v0.5.1
63
+ ------
64
+
65
+ * 0.5.1
66
+ * fixup hardware type parsing
67
+ * add contributor guide
68
+
69
+ v0.5.0
70
+ ------
71
+
72
+ * 0.5.0
73
+ * Add support for device hwtype
74
+ * bump version
75
+ * ensure 'set' takes a uuid
76
+ * Allow json input of arbitrary arguments, refactor cli (#49)
77
+ * rename package to python-doniclient (#48)
78
+ * hotfix release, syntax error in cli.py
79
+
80
+ v0.4.0
81
+ ------
82
+
83
+ * 0.4.0
84
+ * add support for setting deploy kernel and ramdisk
85
+ * allow import to continue on conflict
86
+ * fix properties path and delete logic for update
87
+
88
+ v0.3.0
89
+ ------
90
+
91
+ * 0.3.0
92
+ * Apply suggestions from code review
93
+ * Change workers column to use yaml formatter
94
+ * Fix parameter formatting
95
+ * Add workers to serializer if exists in data
96
+
97
+ v0.2.5
98
+ ------
99
+
100
+ * 0.2.5
101
+ * Invert openstack constraints
102
+
103
+ v0.2.4
104
+ ------
105
+
106
+ * 0.2.4
107
+ * Make hardware formatter generic
108
+ * Format properties field in a nicer way
109
+ * Add dependency on PyYAML
110
+ * Fix listing of own hardware
111
+
112
+ v0.2.3
113
+ ------
114
+
115
+ * Bugfix/ci (#12)
116
+
117
+ v0.2.2
118
+ ------
119
+
120
+ * add author and bump version
121
+ * add extra network info keys to interface command
122
+
123
+ v0.2.1
124
+ ------
125
+
126
+ * 0.2.1
127
+ * Fix bug with hardware create
128
+
129
+ v0.2.0
130
+ ------
131
+
132
+ * 0.2.0
133
+ * Add sub commands for managing availability windows
134
+ * Move \_format\_iface
135
+ * quickfix to add upper-constraint behavior
136
+ * add description
137
+
138
+ v0.1.4
139
+ ------
140
+
141
+ * 0.1.4
142
+ * Downgrade to Train release versions
143
+ * Bugfix/initial release (#6)
144
+ * make dependabot less chatty
145
+
146
+ v0.1.1
147
+ ------
148
+
149
+ * 0.1.1
150
+ * Use requirements from Train release
151
+
152
+ v0.1
153
+ ----
154
+
155
+ * update create helptext
156
+ * fix creation of availability windows
157
+ * add tz to parsed dates
158
+ * add more update parser robustness
159
+ * handle edge cases for update
160
+ * add date parsing to update method
161
+ * clean up help and parsing for windows
162
+ * add dateutil dependency
163
+ * add delete and sync, some refactoring
164
+ * add syc call
165
+ * add delete call
166
+ * improve handling of iface updates
167
+ * fix handling of top level variables
168
+ * add handling for interface list
169
+ * update calls succeed for subset of fields (#3)
170
+ * add bits for jsonpatch
171
+ * handle dry run
172
+ * create hardware works
173
+ * add create function
174
+ * removed osc\_lib.api due to url parsing issues
175
+ * list and export work, find has a weird http/s bug
176
+ * separate osc client and doni client
177
+ * change create name
178
+ * get single works
179
+ * use command.Lister for standard output formatting
180
+ * fix auth and implement list and export
181
+ * add unittest stubs for methods
182
+ * add openstackclient as extras dep
183
+ * add osc entrypoints
184
+ * rename files following ironicclient
185
+ * Add openstack client deps
186
+ * add lint and test settings
187
+ * Bump pytest from 5.4.3 to 6.2.2 (#1)
188
+ * add gh actions
189
+ * add dev dependencies
190
+ * inital commit
191
+ * Initial commit
@@ -0,0 +1,113 @@
1
+ Metadata-Version: 2.4
2
+ Name: python-doniclient
3
+ Version: 1.2.1
4
+ Summary: This is a plugin for the openstack commandline client, to enable support for the Doni hardware inventory project
5
+ Author-email: Chameleon Cloud <contact@chameleoncloud.org>
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Repository, https://github.com/ChameleonCloud/python-doniclient
8
+ Classifier: Environment :: OpenStack
9
+ Classifier: Intended Audience :: Information Technology
10
+ Classifier: Intended Audience :: System Administrators
11
+ Classifier: Operating System :: POSIX :: Linux
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.9
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Requires-Python: >=3.9
18
+ Description-Content-Type: text/markdown
19
+ Requires-Dist: osc-lib
20
+ Requires-Dist: python-dateutil
21
+ Requires-Dist: PyYAML>=5.4.1
22
+ Requires-Dist: keystoneauth1
23
+
24
+ # ChameleonCloud Python Doniclient CLI
25
+
26
+ ![ChameleonCloud Logo](https://www.chameleoncloud.org/static/images/logo.png)
27
+
28
+ Welcome to the ChameleonCloud Python Doniclient CLI repository! This command-line interface (CLI) provides a convenient way to interact with ChameleonCloud's Doni hardware inventory project, enabling you to manage and automate various hardware-related tasks.
29
+
30
+ ## Table of Contents
31
+
32
+ - [Installation](#installation)
33
+ - [Authentication](#authentication)
34
+ - [Usage](#usage)
35
+ - [Testing](#testing)
36
+ - [Contributing](#contributing)
37
+
38
+ ## Installation
39
+
40
+ You can install the ChameleonCloud Python Doniclient CLI using pip:
41
+
42
+ ```bash
43
+ pip install python-doniclient
44
+ ```
45
+
46
+ ### Cython sources issue
47
+ if you encounter an error message citing cython sources, please run the following to downgrade cython to a compatible version and use PyYaml 6.0+
48
+ ```pip install "cython<3.0.0"```
49
+
50
+ ## Authentication
51
+ Environment variables are the primary authentication method. Please refer to the [documentation on OpenRC scripts](https://chameleoncloud.readthedocs.io/en/latest/technical/cli.html#the-openstack-rc-script) to learn more about how to download and source your authentication credentials for the CLI;
52
+
53
+ ## Usage
54
+ To use the CLI, you can run the `openstack hardware` command followed by the desired subcommand. `openstack hardware --help` shows all the subcommands available. Here's a basic usage examples:
55
+
56
+ ### List all hardware in the Doni database.
57
+
58
+ ```bash
59
+ openstack hardware list
60
+ ```
61
+
62
+ Options:
63
+
64
+ - --all: List hardware from all owners (requires admin rights).
65
+ - --long: Include all columns in the output.
66
+ - --worker-type <worker_type>: Filter by worker type.
67
+ - --worker-state <worker_state>: Filter by worker state (choices: PENDING, IN_PROGRESS, ERROR, STEADY).
68
+
69
+ For more details on specific commands and their options use --help or -h
70
+
71
+ ### Create hardware in the Doni database
72
+
73
+ ```bash
74
+ openstack hardware create --name <hardware_name> --hardware-type <hardware_type> --property <property_name>=<property_value>
75
+ ```
76
+
77
+ ### List specific hardware item in Doni using name or uuid.
78
+
79
+ ```bash
80
+ openstack hardware get <hardware_uuid>
81
+ ```
82
+
83
+ ```bash
84
+ openstack hardware get <hardware_name>
85
+ ```
86
+
87
+ ### Set properties and name of an existing hardware item.
88
+
89
+ ```bash
90
+ openstack hardware set <hardware_uuid> --name <new_hardware_name> --property <property_name>=<new_property_value>
91
+ ```
92
+
93
+ Sets new name and property for the item `<hardware_uuid>`
94
+
95
+ ```bash
96
+ openstack hardware set <hardware_name> --property <property_name>=<new_property_value>
97
+ ```
98
+
99
+ Sets property for the item `<hardware_name`
100
+
101
+ ### Unset properties of an existing hardware item.
102
+
103
+ ```bash
104
+ openstack hardware unset <hardware_uuid> --property <property_name>
105
+ ```
106
+
107
+ Unsets property `<property_name>` for the item `<hardware_uuid`
108
+
109
+ ```bash
110
+ openstack hardware update <hardware_name> --property <property_name>=<new_property_value>
111
+ ```
112
+
113
+ Unsets property `<property_name>` for the item `<hardware_name>`
@@ -0,0 +1,90 @@
1
+ # ChameleonCloud Python Doniclient CLI
2
+
3
+ ![ChameleonCloud Logo](https://www.chameleoncloud.org/static/images/logo.png)
4
+
5
+ Welcome to the ChameleonCloud Python Doniclient CLI repository! This command-line interface (CLI) provides a convenient way to interact with ChameleonCloud's Doni hardware inventory project, enabling you to manage and automate various hardware-related tasks.
6
+
7
+ ## Table of Contents
8
+
9
+ - [Installation](#installation)
10
+ - [Authentication](#authentication)
11
+ - [Usage](#usage)
12
+ - [Testing](#testing)
13
+ - [Contributing](#contributing)
14
+
15
+ ## Installation
16
+
17
+ You can install the ChameleonCloud Python Doniclient CLI using pip:
18
+
19
+ ```bash
20
+ pip install python-doniclient
21
+ ```
22
+
23
+ ### Cython sources issue
24
+ if you encounter an error message citing cython sources, please run the following to downgrade cython to a compatible version and use PyYaml 6.0+
25
+ ```pip install "cython<3.0.0"```
26
+
27
+ ## Authentication
28
+ Environment variables are the primary authentication method. Please refer to the [documentation on OpenRC scripts](https://chameleoncloud.readthedocs.io/en/latest/technical/cli.html#the-openstack-rc-script) to learn more about how to download and source your authentication credentials for the CLI;
29
+
30
+ ## Usage
31
+ To use the CLI, you can run the `openstack hardware` command followed by the desired subcommand. `openstack hardware --help` shows all the subcommands available. Here's a basic usage examples:
32
+
33
+ ### List all hardware in the Doni database.
34
+
35
+ ```bash
36
+ openstack hardware list
37
+ ```
38
+
39
+ Options:
40
+
41
+ - --all: List hardware from all owners (requires admin rights).
42
+ - --long: Include all columns in the output.
43
+ - --worker-type <worker_type>: Filter by worker type.
44
+ - --worker-state <worker_state>: Filter by worker state (choices: PENDING, IN_PROGRESS, ERROR, STEADY).
45
+
46
+ For more details on specific commands and their options use --help or -h
47
+
48
+ ### Create hardware in the Doni database
49
+
50
+ ```bash
51
+ openstack hardware create --name <hardware_name> --hardware-type <hardware_type> --property <property_name>=<property_value>
52
+ ```
53
+
54
+ ### List specific hardware item in Doni using name or uuid.
55
+
56
+ ```bash
57
+ openstack hardware get <hardware_uuid>
58
+ ```
59
+
60
+ ```bash
61
+ openstack hardware get <hardware_name>
62
+ ```
63
+
64
+ ### Set properties and name of an existing hardware item.
65
+
66
+ ```bash
67
+ openstack hardware set <hardware_uuid> --name <new_hardware_name> --property <property_name>=<new_property_value>
68
+ ```
69
+
70
+ Sets new name and property for the item `<hardware_uuid>`
71
+
72
+ ```bash
73
+ openstack hardware set <hardware_name> --property <property_name>=<new_property_value>
74
+ ```
75
+
76
+ Sets property for the item `<hardware_name`
77
+
78
+ ### Unset properties of an existing hardware item.
79
+
80
+ ```bash
81
+ openstack hardware unset <hardware_uuid> --property <property_name>
82
+ ```
83
+
84
+ Unsets property `<property_name>` for the item `<hardware_uuid`
85
+
86
+ ```bash
87
+ openstack hardware update <hardware_name> --property <property_name>=<new_property_value>
88
+ ```
89
+
90
+ Unsets property `<property_name>` for the item `<hardware_name>`