Skip to content
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

cli: add devel make-mime subcommand #518

Merged
merged 6 commits into from
Aug 17, 2020

Conversation

raharper
Copy link
Collaborator

@raharper raharper commented Aug 4, 2020

Cloud-init documents an in-source-tree tool, make-mime.py used to
help users create multi-part mime user-data. This tool is not shipped
in the cloud-init install and unavailable at runtime. This patch
takes tools/make-mime.py and makes the functionality available via
the devel subcommand.

The primary interface of --attach file:content-type is still present.
The cli now adds:

-l, --list-types Print out a list of supported content-types
-f, --force Ignore errors for unsupported content-types

The tool will now exit with an error if the supplied content-type
is not supported (or more likely a typo:
x-shell-script vs. x-shellscript)

@TheRealFalcon TheRealFalcon self-assigned this Aug 10, 2020
Copy link
Member

@TheRealFalcon TheRealFalcon left a comment

Choose a reason for hiding this comment

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

If we're going to have this subcommand, I don't think it makes sense to keep the utility in tools/make-mime.py. We should probably remove that one and update the docs accordingly.

cloudinit/cmd/devel/make_mime.py Outdated Show resolved Hide resolved
@raharper
Copy link
Collaborator Author

If we're going to have this subcommand, I don't think it makes sense to keep the utility in tools/make-mime.py. We should probably remove that one and update the docs accordingly.

Sure.

Cloud-init documents an in-source-tree tool, make-mime.py used to
help users create multi-part mime user-data.  This tool is not shipped
in the cloud-init install and unavailable at runtime.  This patch
takes tools/make-mime.py and makes the functionality available via
the devel subcommand.

The primary interface of --attach file:content-type is still present.
The cli now adds:

 -l, --list-types  Print out a list of supported content-types
 -f, --force       Ignore errors for unsupported content-types

The tool will now raise a RunTime error if the supplied content-type
is not supported (or more likely a typo:
  x-shell-script vs.  x-shellscript)
@raharper raharper force-pushed the feature/add-make-mime branch from daea04f to e83512e Compare August 12, 2020 15:04
@mitechie mitechie merged commit a4b6b96 into canonical:master Aug 17, 2020
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