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
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ Sections with "(Upcoming)" describe changes on the roadmap for CIJOE.
Changes on the `master` branch, from the latest version tag up to and including
HEAD can be subject to a git rebase.

## 0.9.67

Gathering facts is part of `cijoe.core.facts`: a script gathers the common facts
about a target with `cijoe.core.facts.gather()`, the sections being
`cijoe.core.facts.SECTIONS`, rather than importing them from the
`core.facts_gather` script.

## 0.9.66

A machine is described as a target, `[cijoe.targets.<name>.ssh]`, with
Expand Down
3 changes: 2 additions & 1 deletion docs/source/facts/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ whose tools the target lacks, or that it has no way of gathering on that family:
- Linux, FreeBSD
* - ``nvme``
- ``<controller>``: ``bdf``, ``serial``, ``namespaces``, each with
``nsid``, ``bdev``, ``cdev``
its ``bdev`` or ``cdev``, or both, and its ``nsid`` where the kernel
or nvme-cli gives it
- Linux, FreeBSD, Windows, by ``PhysicalDrive<n>``
* - ``gpu``
- a list of the PCI functions of class display or accelerator, as in
Expand Down
4 changes: 1 addition & 3 deletions src/cijoe/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

import cijoe.core
from cijoe.core.command import Cijoe, default_output_path
from cijoe.core.facts import Facts
from cijoe.core.facts import SECTIONS, Facts, gather
from cijoe.core.resources import (
Config,
Task,
Expand Down Expand Up @@ -602,8 +602,6 @@ def gather_initiator(cijoe: Cijoe):
if not sections:
return

from cijoe.core.scripts.facts_gather import SECTIONS, gather

unknown = [s for s in sections if s not in SECTIONS]
if unknown:
log.error(f"cijoe.facts.initiator: unknown sections({', '.join(unknown)})")
Expand Down
2 changes: 1 addition & 1 deletion src/cijoe/core/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.9.66"
__version__ = "0.9.67"
7 changes: 7 additions & 0 deletions src/cijoe/core/facts.py → src/cijoe/core/facts/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
Every write saves the whole set to 'facts.toml' in the output directory, so the
report shows what was observed, and a later run can start from it with
'--facts'. A fact never overrides config, and config never sets a fact.

gather() records the common facts about a target, its SECTIONS; see
cijoe.core.facts.gathering.
"""

import copy
Expand All @@ -26,6 +29,10 @@

import tomli_w

from cijoe.core.facts.gathering import SECTIONS, gather

__all__ = ["Facts", "TargetFacts", "SECTIONS", "gather"]

if sys.version_info >= (3, 11):
import tomllib # Python 3.11 and newer
else:
Expand Down
Loading
Loading