Skip to content

xapi,network: add type hints#402

Open
glehmann wants to merge 9 commits intogln/misc-typehintsfrom
gln/xapi-network-typehints
Open

xapi,network: add type hints#402
glehmann wants to merge 9 commits intogln/misc-typehintsfrom
gln/xapi-network-typehints

Conversation

@glehmann
Copy link
Member

This allows more validation both in the CI and when writing the tests in our IDEs.

This work was mostly done with AI, validated by the code checkers, and manually cleaned up by me.

@glehmann glehmann requested review from a team as code owners February 15, 2026 22:02
@glehmann glehmann force-pushed the gln/xapi-network-typehints branch from b3d821d to 7b59763 Compare February 15, 2026 22:06
Copy link
Contributor

@semarie semarie left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks

logging.info(f"Check that the host certificate exists on host {h}")
cert_uuid = hostA1.xe('certificate-list', {'host': h.uuid, 'type': 'host_internal'}, minimal=True)
assert len(cert_uuid) > 0, f"A host_internal certificate must exist on host {h}"
yield hostA1
Copy link
Contributor

Choose a reason for hiding this comment

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

I agree that yielding hostA1 is the intented purpose of the fixture.

The current code relies only on the side effect to ensuring that TLS verification is enabled (using assert), but it could be changed (later) to really use the fixture (instead of marking it used and use hostA1).

Fine with me as it.

Copy link
Contributor

@olivierh-pro olivierh-pro left a comment

Choose a reason for hiding this comment

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

Nice Job !

@glehmann glehmann force-pushed the gln/xapi-network-typehints branch from 7b59763 to 50754ce Compare February 16, 2026 09:39
@gduperrey gduperrey requested a review from a team February 16, 2026 09:45
@stormi
Copy link
Member

stormi commented Feb 16, 2026

Do the changes require running a few tests to verify everything works well, or are they riskless?

@glehmann glehmann force-pushed the gln/xapi-network-typehints branch 2 times, most recently from 4c9b247 to 7b6389e Compare February 17, 2026 21:40
@glehmann glehmann force-pushed the gln/misc-typehints branch 2 times, most recently from 1488c49 to 99bce99 Compare February 19, 2026 21:29
@glehmann glehmann force-pushed the gln/xapi-network-typehints branch from 7b6389e to 6c7b248 Compare February 19, 2026 21:29
@glehmann glehmann force-pushed the gln/xapi-network-typehints branch from 6c7b248 to 1c70a06 Compare February 19, 2026 21:49
@glehmann glehmann force-pushed the gln/xapi-network-typehints branch from 1c70a06 to e712aec Compare March 2, 2026 22:23
@glehmann glehmann force-pushed the gln/misc-typehints branch from 47c708a to ba07031 Compare March 2, 2026 22:23
glehmann added 9 commits March 9, 2026 21:51
Signed-off-by: Gaëtan Lehmann <gaetan.lehmann@vates.tech>
Signed-off-by: Gaëtan Lehmann <gaetan.lehmann@vates.tech>
Signed-off-by: Gaëtan Lehmann <gaetan.lehmann@vates.tech>
Signed-off-by: Gaëtan Lehmann <gaetan.lehmann@vates.tech>
Signed-off-by: Gaëtan Lehmann <gaetan.lehmann@vates.tech>
Signed-off-by: Gaëtan Lehmann <gaetan.lehmann@vates.tech>
Signed-off-by: Gaëtan Lehmann <gaetan.lehmann@vates.tech>
Signed-off-by: Gaëtan Lehmann <gaetan.lehmann@vates.tech>
Signed-off-by: Gaëtan Lehmann <gaetan.lehmann@vates.tech>
@glehmann glehmann force-pushed the gln/xapi-network-typehints branch from e712aec to b383dfa Compare March 9, 2026 20:53
@glehmann glehmann force-pushed the gln/misc-typehints branch from ba07031 to 4a34482 Compare March 9, 2026 20:53
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.

4 participants