Skip to content

Conversation

@justinc1
Copy link
Collaborator

The module does work with list of NICs (the items input parameter). It is natural to also return a list of NICs.

Reverts db9dff7

Draft: until at least one more person agrees for vm_nic module records is ok, and record is not.

@justinc1 justinc1 requested a review from PolonaM April 13, 2023 07:34
type: list
elements: str
sample: 192.0.2.1
records:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Here the "type" needs to be list? Also the second line under "description" is not needed anymore

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

List is ok, a single NIC can have multiple IP addresses.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Hm, I can see now that it is not clear that this question is meant for "records"

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removed the second line from "description", thank you for noticing.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

And type: list, elements: dict.

assert success is True
assert results == {
"changed": False,
"records": {},
Copy link
Collaborator

@PolonaM PolonaM Apr 13, 2023

Choose a reason for hiding this comment

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

Should there be an empty list for the "records"? In the case of ensure_absent() an empty list is returned

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I guess we have incorrectly mocked return values. I do not want to extend this PR with fixing unittests.

@justinc1 justinc1 force-pushed the fix-vm-nic-records branch from 81110c5 to 60f329e Compare April 13, 2023 09:02
The module does work with list of NICs (the items input parameter).
It is natural to also return a list of NICs.

Reverts db9dff7

Signed-off-by: Justin Cinkelj <justin.cinkelj@xlab.si>
@justinc1 justinc1 force-pushed the fix-vm-nic-records branch from 60f329e to 23f7e29 Compare April 13, 2023 09:03
@justinc1 justinc1 marked this pull request as ready for review April 13, 2023 09:17
@justinc1 justinc1 merged commit 299efc6 into main Apr 13, 2023
@justinc1 justinc1 deleted the fix-vm-nic-records branch April 13, 2023 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants