Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-test-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ jobs:
owner: ${{ github.repository_owner }}
- uses: actions/setup-python@v5
with:
python-version: "3.7"
python-version: "3.9"
- name: Install PSA with CIM models ${{ matrix.cim-models.label }}
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
Expand Down
19 changes: 7 additions & 12 deletions docs/cim_tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,12 @@ An add-on is said to be CIM compatible if it fulfils the following two criteria:

## CIM Data Models Package (`splunk-cim-models`)

CIM data model definitions are provided by the separate
[`splunk-cim-models`](https://github.com/splunk/psa-cim-models) package.
This lets you update or pin CIM definitions independently of `pytest-splunk-addon` itself.
CIM data model definitions are maintained separately from `pytest-splunk-addon`.
They must be installed from an approved internal source; do not install
`splunk-cim-models` by package name from public PyPI.

**Install for CIM testing:**

```console
pip install splunk-cim-models
```

Or, during development, install the latest from the repository:
For authorized internal development, install the required definitions directly
from the repository:

```console
pip install git+https://github.com/splunk/psa-cim-models.git@cim-6
Expand All @@ -35,8 +30,8 @@ The package exposes:
| `DATAMODEL_SCHEMA_PATH` | Path to `DatamodelSchema.json` (JSON schema for validating custom data model files) |
| `datamodels` | Dict mapping CIM version strings to recommended fields per model |

If `splunk-cim-models` is not installed, any test run that exercises CIM functionality
will raise an `ImportError` with a message pointing to the package.
If the CIM data models are not installed, any test run that exercises CIM functionality
will raise an `ImportError` with a message pointing to the required package.

______________________________________________________________________

Expand Down
7 changes: 2 additions & 5 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,8 @@ $ poetry install

This installs `splunk-cim-models` automatically as a dev dependency (from the `cim-6` branch of
[psa-cim-models](https://github.com/splunk/psa-cim-models)). In CI or when installing from
PyPI, install `splunk-cim-models` separately before running CIM tests:

```
$ pip install splunk-cim-models
```
PyPI, use the same approved Git-based source before running CIM tests. Do not install
`splunk-cim-models` by package name from public PyPI.

### Working with `splunk-cim-models`

Expand Down
8 changes: 3 additions & 5 deletions docs/how_to_use.md
Original file line number Diff line number Diff line change
Expand Up @@ -464,8 +464,6 @@ def splunk_setup(splunk):
- Provide the path to the directory having all the data models by adding `--splunk_dm_path path_to_dir` to the pytest command.
- The test cases will now be generated for the data models provided to the plugin and not for the [default data models](https://github.com/splunk/psa-cim-models/tree/cim-6/splunk_cim_models/data_models) bundled in `splunk-cim-models`.

> **_NOTE:_** CIM data model definitions are provided by the [`splunk-cim-models`](https://github.com/splunk/psa-cim-models) package. Install it separately before running CIM tests:
>
> ```console
> pip install splunk-cim-models
> ```
> **_NOTE:_** CIM data model definitions are provided separately from
> `pytest-splunk-addon`. Before running CIM tests, install them from an approved
> internal source. Do not install `splunk-cim-models` by package name from public PyPI.
13 changes: 2 additions & 11 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ which allows the user to test [knowledge objects](https://docs.splunk.com/Splexi
- Splunk App or Add-on package
- Splunk instance with App or Add-on installed (Not required if using Docker)
- Docker (Not required if using external Splunk instance)
- [`splunk-cim-models`](https://github.com/splunk/psa-cim-models) — required for [CIM Compatibility Tests](./cim_tests.md) (not installed automatically)

## Support

Expand All @@ -23,16 +22,8 @@ pytest-splunk-addon can be installed via pip from PyPI:
pip3 install pytest-splunk-addon
```

To run **CIM compatibility tests** you also need the CIM data models package:

```console
pip3 install splunk-cim-models
```

`splunk-cim-models` is versioned independently of `pytest-splunk-addon` so that CIM
definitions can be updated without a full PSA release. See the
[CIM Compatibility Tests](./cim_tests.md) page for details on how the two packages
interact and how to pin or override data model definitions.
To run **CIM compatibility tests**, see the [CIM Compatibility Tests](./cim_tests.md)
page for the required CIM data model setup.

## Features

Expand Down
Loading