Skip to content

NMS-8122: Provisioning docs - #9000

Merged
joseanesONMS merged 6 commits into
developfrom
jira/NMS-8122-provisioning-docs
Oct 22, 2026
Merged

joseanesONMS merged 6 commits into
developfrom
jira/NMS-8122-provisioning-docs

Conversation

@joseanesONMS

@joseanesONMS joseanesONMS commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Documents the provisioning handlers, adapters and node labels, split out of #8984; content checked against the code on develop, one commit per ticket.

Ticket Topic Page(s) added/changed Source of truth
NMS-15076 File handler needs an absolute path reference/…/handlers/file.adoc FileRequisitionProvider.java, ConfigurationHelper.ts
NMS-14428 Karaf command for the SNMP metadata adapter reference/…/adapters/snmp-metadata.adoc SnmpMetadataProvisioningAdapterCommand.java
NMS-8122 How the node label is chosen operation/…/provisioning/node-label.adoc (new) DefaultProvisionService.java, NodeLabelDaoImpl.java
NMS-15009 Setting a node's parent for path outages operation/…/provisioning/directed-discovery.adoc, path-outages.adoc model-import.xsd, DefaultProvisionService.setNodeParentAndDependencies

Corrections to existing docs (separate NMS-8122: Fix … commits, each can be dropped on its own)

Topic Change Source of truth
Import handlers File URL example uses an absolute path Provisioner.java, FileRequisitionProvider.java

The docs build adds no warnings (develop's two existing ones remain).

External References

The file handler page did not say how the path is resolved; FileRequisitionProvider opens it with new File(path) and the external requisition UI rejects paths that do not start with a slash. The page now states that the path must be absolute and warns against using etc/imports as a source directory.
… adapter

The SNMP metadata adapter page did not mention opennms:snmp-metadata-provisioning-adapter. The new section covers its node selection options, dry-run versus persist behavior, and caveats, taken from SnmpMetadataProvisioningAdapterCommand and SnmpMetadataProvisioningAdapter.
The docs did not explain how Provisiond picks a node label or what the label source flag means. The new Node Labels page covers requisition, discovered, and manually changed labels, based on DefaultProvisionService, ScanResource, SaveOrUpdateOperation, and NodeLabelDaoImpl.
The path outages page showed one example but provisioning had no procedure for defining node parents. The new section in Directed Discovery covers the UI and requisition attributes, parent lookup rules, and critical interface selection from CoreImportActivities and DefaultProvisionService, and cross-links with path outages.
… introduction

Provisioner.doImport() opens file: URLs with new File(URI) and FileRequisitionProvider uses new File(path), so neither expands ${OPENNMS_HOME}; the example now uses an absolute path and points to the file handler page for the etc/imports warning.
dino2gnt
dino2gnt previously approved these changes Oct 22, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm glad this is actually getting documented. Good work.

@marshallmassengill marshallmassengill left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor tweak for clarity.

If the lookup returns a hostname, that hostname becomes the label (source `H`).
Otherwise, the IP address becomes the label (source `A`).
. During the node scan, if the label source is still `A` and the SNMP agent returns a non-empty `sysName`, the `sysName` becomes the label (source `S`).
. On each later scan, if the label source is `H` or `A`, Provisiond repeats the reverse DNS lookup for the node's primary interface and sets the label to the hostname (source `H`) or to the IP address (source `A`).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
. On each later scan, if the label source is `H` or `A`, Provisiond repeats the reverse DNS lookup for the node's primary interface and sets the label to the hostname (source `H`) or to the IP address (source `A`).
. On each later scan, if the label source is `H` or `A`, Provisiond repeats the reverse DNS lookup for the node's primary interface (or, if it has none, one of its interfaces) and sets the label to the hostname (source `H`) or to the IP address (source `A`).

…rface

DefaultProvisionService.updateNodeHostname falls back to the node's first IP interface when there is no primary one, so the rescan wording now says so.
@joseanesONMS

Copy link
Copy Markdown
Contributor Author

@marshallmassengill Applied in c6bb289; it matches DefaultProvisionService.updateNodeHostname, which falls back to the first interface.

@marshallmassengill marshallmassengill left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@joseanesONMS
joseanesONMS merged commit 84763ae into develop Oct 22, 2026
6 checks passed
@joseanesONMS
joseanesONMS deleted the jira/NMS-8122-provisioning-docs branch October 22, 2026 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants