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

Make handling of schema-name more friendly in CLI #840

Merged
merged 1 commit into from
Aug 12, 2020

Conversation

kevin-bates
Copy link
Member

For single-schema namespaces, the CLI tool will default the schema name so it doesn't need to be set. For multi-schema namespaces, the available options will be presented if no schema-name is provided or an invalid schema-name is used. Note: schema-name only comes into play when installing metadata. It is not an option for 'list' or 'remove' subcommands.

Fixes #836

Here are some "screen scrapes"...

$ elyra-metadata install runtime-images
'--name' is a required parameter.

Install a metadata instance into namespace 'runtime-images'.

Options
-------

--replace
	Replace existing instance
--schema_name=<string>
	The schema_name of the metadata instance to install (defaults to 'runtime-image')
--name=<string>
	The name of the metadata instance to install
...

Since no current namespaces have multiple schemas, I've added another test schema to the metadata-tests namespace:

$ elyra-metadata install metadata-tests
'--schema_name' is a required parameter and must be one of the following values: ['metadata-test2', 'metadata-test'].

Install a metadata instance into namespace 'metadata-tests'.

Options
-------

--replace
	Replace existing instance
--schema_name=<string>
	The schema_name of the metadata instance to install.  Must be one of: ['metadata-test2', 'metadata-test']
--name=<string>
	The name of the metadata instance to install

and with an invalid schema name...

$ elyra-metadata install metadata-tests -schema_name=invalid-name
'--schema_name' is a required parameter and must be one of the following values: ['metadata-test2', 'metadata-test'].

Install a metadata instance into namespace 'metadata-tests'.

Options
-------

--replace
	Replace existing instance
--schema_name=<string>
	The schema_name of the metadata instance to install.  Must be one of: ['metadata-test2', 'metadata-test']
--name=<string>
	The name of the metadata instance to install

Developer's Certificate of Origin 1.1

   By making a contribution to this project, I certify that:

   (a) The contribution was created in whole or in part by me and I
       have the right to submit it under the Apache License 2.0; or

   (b) The contribution is based upon previous work that, to the best
       of my knowledge, is covered under an appropriate open source
       license and I have the right under that license to submit that
       work with modifications, whether created in whole or in part
       by me, under the same open source license (unless I am
       permitted to submit under a different license), as indicated
       in the file; or

   (c) The contribution was provided directly to me by some other
       person who certified (a), (b) or (c) and I have not modified
       it.

   (d) I understand and agree that this project and the contribution
       are public and that a record of the contribution (including all
       personal information I submit with it, including my sign-off) is
       maintained indefinitely and may be redistributed consistent with
       this project or the open source license(s) involved.

@lresende lresende merged commit eb12349 into elyra-ai:master Aug 12, 2020
@kevin-bates kevin-bates deleted the default-schema-name branch September 1, 2020 20:44
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.

elyra-metadata CLI [usability]: Is it possible to simplify the install command [+help]?
2 participants