Skip to content

cli: add devel make-mime subcommand#518

Merged
mitechie merged 6 commits into
canonical:masterfrom
raharper:feature/add-make-mime
Aug 17, 2020
Merged

cli: add devel make-mime subcommand#518
mitechie merged 6 commits into
canonical:masterfrom
raharper:feature/add-make-mime

Conversation

@raharper
Copy link
Copy Markdown
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
Copy Markdown
Contributor

@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.

Comment thread cloudinit/cmd/devel/make_mime.py Outdated
@raharper
Copy link
Copy Markdown
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