Bug 847091 - The "repo units" command doesn't correctly use the --fields argument
Summary: The "repo units" command doesn't correctly use the --fields argument
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: user-experience
Version: 2.0.6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: Sprint 40
Assignee: Michael Hrivnak
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-08-09 16:40 UTC by Jay Dobies
Modified: 2013-09-09 16:26 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-01-09 17:03:54 UTC
Embargoed:


Attachments (Terms of Use)

Description Jay Dobies 2012-08-09 16:40:27 UTC
The crux of the problem is that this changed to display all of the unit association information instead of just the metadata. The --fields argument applies to just the metadata, so it's filtering correctly, however the command itself is displaying too much data:

╭─[jdob]─[hinterlands]─[~]─[]─●
╰─➤ pulp-admin repo units rpm --repo-id avengers --fields name
Created:       2012-08-09T12:18:11
Id:            5023e2c38a905b04ed00001a
Metadata:      
  Name: capt
Owner Id:      SYSTEM
Owner Type:    user
Repo Id:       avengers
Unit Id:       c7c67c33-0011-42cf-9650-42dc219bfc00
Unit Type Id:  rpm
Updated:       2012-08-09T12:18:11


It's only showing "name" in metadata, but it looks broken since we still have all the association cruft around it.

I think we need the following changes:

* By default, only display the metadata on a unit, regardless of whether or not --fields is specified.
* Add an extra flag to allow the user to display the association metadata as well.

My rationale is that I don't think most users care about that association data on a regular basis; that's an exception case when they want to see that. They more care about the units themselves. We've heard complaints in the past that there's too much info, so a "--fields name" view of just the names is pretty important towards making eyeballing a repo's contents feasible.

Comment 1 Preethi Thomas 2012-09-27 15:17:25 UTC
failing this
[root@pulp-master ~]# rpm -q pulp-rpm-server
pulp-rpm-server-0.0.328-1.fc17.noarch

So if you give a field that doesn't exist, the output is some whitespace

I am copying the output below. The empty white space after the command is at it displayed in the output

[root@pulp-master ~]# pulp-admin repo units rpm --repo-id pulp --fields test






































































[root@pulp-master ~]#

Comment 2 Jay Dobies 2012-09-27 16:28:33 UTC
I filed a bug to revisit this module entirely because I saw this as well. I can't find that bug now, but this should get addressed along side that reworking of the module.

Comment 3 Jeff Ortel 2012-10-05 21:43:06 UTC
build: 0.331

Comment 4 Preethi Thomas 2012-10-11 20:06:29 UTC
still not fixed
[root@pulp-master ~]# rpm -q pulp-rpm-server
pulp-rpm-server-0.0.331-1.fc17.noarch
[root@pulp-master ~]# 

[root@pulp-master ~]#  pulp-admin rpm repo content rpm --repo-id pulp --fields test




































[root@pulp-master ~]#

Comment 5 Michael Hrivnak 2012-10-15 15:03:01 UTC
False alarm. The fix was not actually in build 0.331, so please retest with the next build.

Comment 6 Jeff Ortel 2012-10-17 16:20:59 UTC
build: 0.332

Comment 7 Preethi Thomas 2012-11-06 12:30:52 UTC
verified
[root@preethi ~]# rpm -q pulp-rpm-server
pulp-rpm-server-0.0.335-1.fc17.noarch
[root@preethi ~]# 

[root@preethi ~]# pulp-admin rpm repo content rpm --repo-id pulp --fields name,arch
Arch:         noarch
Name:         gofer

Arch:         noarch
Name:         gofer-package

Arch:         noarch
Name:         grinder

Arch:         x86_64
Name:         m2crypto

Arch:         x86_64
Name:         m2crypto-debuginfo

Arch:         x86_64
Name:         mod_wsgi

Arch:         x86_64
Name:         mod_wsgi-debuginfo

Arch:         noarch
Name:         pulp-admin-client

Arch:         noarch
Name:         pulp-agent

Arch:         noarch
Name:         pulp-builtins-admin-extensions

Arch:         noarch
Name:         pulp-builtins-consumer-extensions

Arch:         noarch
Name:         pulp-consumer-client

Arch:         noarch
Name:         pulp-rpm-admin-client

Arch:         noarch
Name:         pulp-rpm-admin-extensions

Arch:         noarch
Name:         pulp-rpm-agent

Arch:         noarch
Name:         pulp-rpm-consumer-client

Arch:         noarch
Name:         pulp-rpm-consumer-extensions

Arch:         noarch
Name:         pulp-rpm-handlers

Arch:         noarch
Name:         pulp-rpm-plugins

Arch:         noarch
Name:         pulp-rpm-server

Arch:         noarch
Name:         pulp-rpm-yumplugins

Arch:         noarch
Name:         pulp-selinux

Arch:         noarch
Name:         pulp-server

Arch:         noarch
Name:         python-gofer

Arch:         noarch
Name:         python-isodate

Arch:         noarch
Name:         python-oauth2

Arch:         noarch
Name:         python-okaara

Arch:         noarch
Name:         python-pulp-agent-lib

Arch:         noarch
Name:         python-pulp-bindings

Arch:         noarch
Name:         python-pulp-client-lib

Arch:         noarch
Name:         python-pulp-common

Arch:         noarch
Name:         python-pulp-rpm-common

Arch:         noarch
Name:         python-qpid

Arch:         noarch
Name:         python-rhsm

Arch:         noarch
Name:         python-webpy


[root@preethi ~]#

Comment 8 Preethi Thomas 2013-01-09 17:03:54 UTC
Pulp v2.0 released


Note You need to log in before you can comment on or make changes to this bug.