feat(discovery): support multiple SMD groups during static discovery#53
Merged
feat(discovery): support multiple SMD groups during static discovery#53
Conversation
6dc0c87 to
e1591d8
Compare
Contributor
|
Looks like everything works and the deprecated message is shown properly from my testing. |
davidallendj
approved these changes
Sep 2, 2025
Add a 'groups' directive in the static discovery specification that allows nodes to be members of multiple groups. These groups are deduplicated and created in SMD during discovery. Deprecate the 'group' directive in the static discovery specification. As of this commit, 'groups' will still work, but a deprecation warning is printed if it is used in a node definition. If both 'group' and 'groups' are specified, the 'group' entry is merged with the 'groups' list as if it were another entry in the list. The 'group' directive will be removed in a future release. Signed-off-by: Devon Bautista <17506592+synackd@users.noreply.github.com>
Deduplication maps for BMC managers and Systems were declared within the loop that iterates over each node, which is where duplication checks happen. This is obviously futile, so the declarations are moved outside of the loop so that the checks occur properly. Most testing has used a single unique BMC per node, which is probably why this was not caught earlier. Signed-off-by: Devon Bautista <17506592+synackd@users.noreply.github.com>
e1591d8 to
ada0f41
Compare
Collaborator
Author
|
Rebased and checks are passing. Hitting merge. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #32
Changes
groupsdirective to static discovery specification to specify a list of groups to add a node to during discovery.groupdirective in static discovery specification.groupand remove it from examplesgroups, the group specified is merged with thegroupslistgroupwill be removed in a future release ofochamiTesting
Write a
nodes.yamlthat includes combinations ofgroupsandgroupand attempt static discovery viaochami discover static -f yaml -d @nodes.yaml.groupsonly:Result:
node01should be added to groupsgroup1andgroup2, which get added to SMD.grouponly:Result:
node01should be added to groupgroup1, which gets added to SMD. Theochamicommand should display a warning thatgroupwas used fornode01and that it is deprecated.groupandgroups:CASE 1:
groupis also a member ofgroupsResult:
node01should be added to groupsgroup1andgroup2, which get added to SMD. Theochamicommand should display a warning thatgroupwas used fornode01and that it is deprecated.CASE 2:
groupis not a member ofgroupsResult:
node01should be added to groupsgroup1,group2, andgroup3, which get added to SMD. Theochamicommand should display a warning thatgroupwas used fornode01and that it is deprecated.Notes
--discovery-version 1so that the creation ofEthernetInterfaces for typeNodeworks during discovery.