Bug 853137

Summary: non-intuitive package-group remove behavior in cli
Product: [Retired] Pulp Reporter: dgao
Component: user-experienceAssignee: Michael Hrivnak <mhrivnak>
Status: CLOSED WONTFIX QA Contact: Preethi Thomas <pthomas>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 2.0.6CC: skarmark
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-09-12 15:42:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description dgao 2012-08-30 14:58:12 UTC
When attempting to remove package group, if filters (--match,etc..) are not specified the command does not go through. What should happen is that if a filter is not provided, all of the package groups within the repo should be deleted.


[root@pulp-nightly log]# pulp-admin repo units package-group --repo-id="foo"
Created:       2012-08-30T10:58:15
Id:            503f7f877240e4321600037f
Metadata:      
  Conditional Package Names: 
  Default:                   False
  Default Package Names:     /tmp/patb-0.1-1.noarch.rpm
  Description:               bar
  Display Order:             0
  Id:                        bar
  Langonly:                  None
  Mandatory Package Names:   None
  Name:                      bar
  Optional Package Names:    None
  Repo Id:                   foo
  Translated Description:    
  Translated Name:           
  User Visible:              False
Owner Id:      SYSTEM
Owner Type:    user
Repo Id:       foo
Unit Id:       f9cd70f4-96ac-4d2d-ac3f-4d295fafd5c4
Unit Type Id:  package_group
Updated:       2012-08-30T10:58:15

[root@pulp-nightly log]# pulp-admin repo remove package-group --repo-id="foo"
Command: package-group
Description: remove package groups from a repository

Available Arguments:

  --filters    - filters provided as JSON in mongo syntax. This will override any options specified from the 'Filters'
                 section below.
  --repo-id    - (required) identifies the repository to search within
  --after, -a  - matches units added to the source repository on or after the given time; specified as a timestamp in
                 iso8601 format
  --before, -b - matches units added to the source repository on or before the given time; specified as a timestamp in
                 iso8601 format

Filters
  These are basic filtering options that will be AND'd together. These will be ignored if --filters= is specified. Any
  option may be specified multiple times. The value for each option should be a field name and value to match against,
  specified as "name=value". Example: $ pulp-admin repo search --gt='content_unit_count=0' 

  --str-eq - match where a named attribute equals a string value exactly.
  --int-eq - match where a named attribute equals an int value exactly.
  --match  - for a named attribute, match a regular expression using the mongo regex engine.
  --in     - for a named attribute, match where value is in the provided list of values, expressed as one row of CSV
  --not    - field and expression to omit when determining units for inclusion
  --gt     - matches resources whose value for the specified field is greater than the given value
  --gte    - matches resources whose value for the specified field is greater than or equal to the given value
  --lt     - matches resources whose value for the specified field is less than the given value
  --lte    - matches resources whose value for the specified field is less than or equal to the given value