Skip to content
This repository was archived by the owner on Sep 1, 2026. It is now read-only.

vdk-core: adjust defined type for configuration values - #684

Merged
antoniivanov merged 2 commits into
mainfrom
person/aivanov/vdk-core-config
Jan 28, 2022
Merged

vdk-core: adjust defined type for configuration values#684
antoniivanov merged 2 commits into
mainfrom
person/aivanov/vdk-core-config

Conversation

@antoniivanov

Copy link
Copy Markdown
Contributor

Variable can be added (has its type defined) by one plugin after its
value is set by 2nd plugin. In that cases the value would not be cast
to the correct type nor validated. This moves that casting/validation at
the point of definition (when #add is called) if value is already set
for same config key.

Testing Done: see unit tests

Signed-off-by: Antoni Ivanov aivanov@vmware.com

Variable can be added (has its type defined) by one plugin after its
value is set by 2nd plugin.   In that cases the value would not be cast
to the correct type nor validated. This moves that casting/validation at
the point of definition (when #add is called) if value is already set
for same config key.

Testing Done: see unit tests

Signed-off-by: Antoni Ivanov <aivanov@vmware.com>
Comment thread projects/vdk-core/src/vdk/internal/core/config.py Outdated
Comment thread projects/vdk-core/src/vdk/internal/core/config.py Outdated
@antoniivanov
antoniivanov enabled auto-merge (squash) January 28, 2022 15:34
@antoniivanov
antoniivanov merged commit 5361d14 into main Jan 28, 2022
@antoniivanov
antoniivanov deleted the person/aivanov/vdk-core-config branch January 28, 2022 15:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants