-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adding support for module manifest schema #621
Conversation
seedfarmer/mgmt/build_info.py
Outdated
elif "module" == type.lower(): | ||
return ModuleManifest.model_json_schema() | ||
else: | ||
return None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor nitpick: We could just raise an error here, and that way wouldn't need to change the return type of the function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmmm...will check
seedfarmer/cli_groups/_list_group.py
Outdated
if type not in ["deployment", "module"]: | ||
print_bolded(message="Only 'deployment' or 'module' can be passed in", color="yellow") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use click.Choice to perform this validation for us.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will research
@@ -67,4 +67,4 @@ def test_get_build_params(mocker): | |||
@pytest.mark.mgmt | |||
@pytest.mark.mgmt_build_info | |||
def test_validate_group_parameters(): | |||
bi.get_manifest_schema() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we maybe want another unit test here for type="module"
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep....can do
Issue #, if available:
#612
Description of changes:
Adding support to fetch only the module manifest schema
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.