-
Notifications
You must be signed in to change notification settings - Fork 0
v0.3.0 #36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
v0.3.0 #36
Changes from all commits
4469114
ab084eb
bfcdd4e
f49dc30
afcc905
7b20758
ab38e3f
9bd079c
67ee438
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| Repository: Tideway (BMC Discovery API client) | ||
|
|
||
| Mission | ||
| - Add or adjust API helpers using the top-level REST wrappers in `tideway/main.py` (`Appliance.get/post/patch/put/delete`). Do not call `requests` or `discoRequests` directly from feature modules, except the explicit non-standard schema endpoints (`/about`, swagger/openapi) which are intentionally direct in `main.py`. | ||
| - Preserve parameter handling: set `self.params[...]` before calling a wrapper; the appliance layer resets params after each request. | ||
| - Maintain existing deprecation warnings; when adding aliases, warn with `DeprecationWarning` and point to the preferred helper. | ||
|
|
||
| Uploads and special payloads | ||
| - Use `Appliance.post(..., files=..., content_type=...)` for multipart uploads (TKU/knowledge, Kerberos keytabs/ccaches). Do not reintroduce `discoRequests` helpers in new code. | ||
| - When a response needs a specific MIME type (e.g., licensing CSV/raw), pass `response="application/zip"` or similar via the wrapper. | ||
|
|
||
| Style and safety | ||
| - Keep code ASCII-only unless the file already uses Unicode. Keep comments minimal and clarifying, not redundant. | ||
| - Do not remove or overwrite user changes; avoid destructive git commands. | ||
|
|
||
| Validation | ||
| - Preferred quick check: `python3 -m compileall tideway`. |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -6,14 +6,14 @@ Simplified Python library for BMC Discovery API Interface that makes use of the | |||||
| ```python | ||||||
| >>> import tideway | ||||||
| >>> tw = tideway.appliance('appliance-hostname','auth-token') | ||||||
| >>> tw.about().url | ||||||
| >>> tw.api_about.url | ||||||
| 'https://appliance-hostname/api/about' | ||||||
| >>> tw.about().status_code | ||||||
| >>> tw.api_about.status_code | ||||||
| 200 | ||||||
| >>> tw.about().text | ||||||
| >>> tw.api_about.text | ||||||
| { | ||||||
| "api_versions": [ | ||||||
| "1.0","1.1","1.2","1.3","1.4","1.5","1.6","1.7","1.8","1.9","1.10","1.11","1.12","1.13","1.14" | ||||||
| "1.0","1.1","1.2","1.3","1.4","1.5","1.6","1.7","1.8","1.9","1.10","1.11","1.12","1.13","1.14","1.15","1.16" | ||||||
| ], | ||||||
| "component": "REST API", | ||||||
| "version":"DaaS", | ||||||
|
|
@@ -26,6 +26,8 @@ Tideway follows BMC Discovery's well-structured and documented REST API which ca | |||||
|
|
||||||
| Tideway removes the extra layer of manually constructing a URL and parameters for python requests allowing you to query API supported features of Discovery seamlessly and faster than if you were to navigate via the GUI. | ||||||
|
|
||||||
| Example notebook: [`notebooks/admin_api_examples.ipynb`](https://github.com/traversys/Tideway/blob/main/notebooks/admin_api_examples.ipynb) (download via `curl -O https://raw.githubusercontent.com/traversys/Tideway/main/notebooks/admin_api_examples.ipynb`) | ||||||
|
||||||
| Example notebook: [`notebooks/admin_api_examples.ipynb`](https://github.com/traversys/Tideway/blob/main/notebooks/admin_api_examples.ipynb) (download via `curl -O https://raw.githubusercontent.com/traversys/Tideway/main/notebooks/admin_api_examples.ipynb`) | |
| Example notebook: [`notebooks/admin_api.ipynb`](https://github.com/traversys/Tideway/blob/main/notebooks/admin_api.ipynb) (download via `curl -O https://raw.githubusercontent.com/traversys/Tideway/main/notebooks/admin_api.ipynb`) |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -32,5 +32,5 @@ Upon initiation the following parameters can be used: | |||||
| | - | - | - | - | - | ||||||
| | target | Required | String | | The Hostname, FQDN or IP Address of the Discovery instance. | ||||||
| | token | Required | String | | The authentication token of the API user. It is not necessary to include the "bearer" pre-text. | ||||||
| | api_version | | String | "1.5" | This should be the supported version of the API. Discovery 22.2 supports API versions up to 1.5 (outpost 1.0). | ||||||
| | ssl_verify | | Boolean | False | Choose whether to query the API using a valid SSL certificate. If you are using self-signed HTTPS then you should leave this with the default value. | ||||||
| | api_version | | String | "1.16" | This should be the supported version of the API. Discovery 25.x supports API versions up to 1.16 (outpost 1.0). | ||||||
| | ssl_verify | | Boolean | False | Choose whether to query the API using a valid SSL certificate. If you are using self-signed HTTPS then you should leave this with the default value. | ||||||
|
||||||
| | ssl_verify | | Boolean | False | Choose whether to query the API using a valid SSL certificate. If you are using self-signed HTTPS then you should leave this with the default value. | |
| | ssl_verify | | Boolean | True | Choose whether to verify the API's HTTPS certificate against a trusted CA bundle. For self-signed HTTPS, prefer configuring a trusted CA/certificate; only set this to `False` for exceptional, short-lived testing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The example notebook link points to
notebooks/admin_api_examples.ipynb, but the repository only containsnotebooks/admin_api.ipynb, so this URL will 404 for users trying to download the example. Update the link and filename to match the actual notebook path.