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

Modify the CLI to work with multiple content types #1328

Closed
bowlofeggs opened this issue Mar 3, 2017 · 3 comments
Closed

Modify the CLI to work with multiple content types #1328

bowlofeggs opened this issue Mar 3, 2017 · 3 comments
Labels
Client Issues with the bodhi command line interface tool High priority These issues are higher priority than normal Refactor Issues that are a refactor to improve maintainability for Bodhi RFE Requests for Enhancement

Comments

@bowlofeggs
Copy link
Contributor

We will need to modify the CLI to handle multiple content types, once #1327 is done.

@bowlofeggs bowlofeggs added Client Issues with the bodhi command line interface tool Gibson High priority These issues are higher priority than normal Refactor Issues that are a refactor to improve maintainability for Bodhi RFE Requests for Enhancement labels Mar 3, 2017
@bowlofeggs bowlofeggs added this to the Multi-type support (Bodhi 3.0.0?) milestone Mar 3, 2017
@lmacken lmacken mentioned this issue Mar 3, 2017
10 tasks
@ralphbean
Copy link
Contributor

It's unclear to me what needs to happen here.

This should inherit the new output stuff added in #1327 which will display the content-type.

Maybe all we need is a cli switch to search for stuff by content-type?

@ralphbean
Copy link
Contributor

Should be straightforward:

diff --git a/bodhi/client/__init__.py b/bodhi/client/__init__.py
index a03e6a5..6b99d4e 100644
--- a/bodhi/client/__init__.py
+++ b/bodhi/client/__init__.py
@@ -236,6 +236,8 @@ def edit(user, password, url, **kwargs):
               help='Query only critical path packages')
 @click.option('--cves', help='Query by CVE id')
 @click.option('--packages', help='Query by package name(s)')
+@click.option('--content-type', help='Query updates based on content type',
+              type=click.Choice(['rpm', 'module']))  # And someday, container.
 @click.option('--pushed', is_flag=True, default=None,
               help='Filter by pushed updates')
 @click.option('--pushed-since',
diff --git a/bodhi/tests/client/test___init__.py b/bodhi/tests/client/test___init__.py
index 6c24a1a..6982284 100644
--- a/bodhi/tests/client/test___init__.py
+++ b/bodhi/tests/client/test___init__.py
@@ -156,6 +156,7 @@ class TestQuery(unittest.TestCase):
             params={
                 'approved_since': None, 'status': None, 'locked': None,
                 'builds': u'nodejs-grunt-wrap-0.3.0-2.fc25', 'releases': None,
+                'content_type': None,
                 'submitted_since': None, 'suggest': None, 'request': None, 'bugs': None,
                 'staging': False, 'modified_since': None, 'pushed': None, 'pushed_since': None,
                 'user': None, 'critpath': None, 'updateid': None, 'packages': None, 'type': None,

@bowlofeggs
Copy link
Contributor Author

bowlofeggs commented Jun 7, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client Issues with the bodhi command line interface tool High priority These issues are higher priority than normal Refactor Issues that are a refactor to improve maintainability for Bodhi RFE Requests for Enhancement
Projects
None yet
Development

No branches or pull requests

2 participants