Bug 713507 - RFE: Query Repositories by "Notes" field
Summary: RFE: Query Repositories by "Notes" field
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: z_other
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: Sprint 26
Assignee: Sayli Karmarkar
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-06-15 15:23 UTC by Jordan OMara
Modified: 2015-03-23 01:10 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-02-24 20:13:39 UTC


Attachments (Terms of Use)

Comment 1 Sayli Karmarkar 2011-07-26 17:20:24 UTC
Done. 

$ sudo pulp-admin repo list --notes="{'test-key':'test-value'}"
+------------------------------------------+
       List of Available Repositories
+------------------------------------------+

Id                 	test-repo2               
Name               	test-repo2               
Feed URL           	None                     
Feed Type          	None                     
Content Type       	yum                      
Feed Certs         	CA:No   Cert:No
Consumer Certs     	CA:No   Cert:No
Architecture       	noarch                   
Sync Schedule      	None                     
Packages           	0                        
Files              	0                        
Distributions      	None                     
Publish            	True                     
Clones             	[]                       
Groups             	['test-grp']             
Filters            	[]                       
Notes              	{'test-key': 'test-value'}


Id                 	test-repo1               
Name               	test-repo1               
Feed URL           	None                     
Feed Type          	None                     
Content Type       	yum                      
Feed Certs         	CA:No   Cert:No
Consumer Certs     	CA:No   Cert:No
Architecture       	noarch                   
Sync Schedule      	None                     
Packages           	0                        
Files              	0                        
Distributions      	None                     
Publish            	True                     
Clones             	[]                       
Groups             	None                     
Filters            	[]                       
Notes              	{'test-key': 'test-value'}


You can also combine multiple query parametes like groupid and notes:

$ sudo pulp-admin repo list --notes="{'test-key':'test-value'}" --groupid=test-grp
+------------------------------------------+
       List of Available Repositories
+------------------------------------------+

Id                 	test-repo2               
Name               	test-repo2               
Feed URL           	None                     
Feed Type          	None                     
Content Type       	yum                      
Feed Certs         	CA:No   Cert:No
Consumer Certs     	CA:No   Cert:No
Architecture       	noarch                   
Sync Schedule      	None                     
Packages           	0                        
Files              	0                        
Distributions      	None                     
Publish            	True                     
Clones             	[]                       
Groups             	['test-grp']             
Filters            	[]                       
Notes              	{'test-key': 'test-value'}

Comment 2 Jay Dobies 2011-07-29 20:44:04 UTC
Fixed in 0.218

Comment 3 Preethi Thomas 2011-08-17 14:30:06 UTC
verified
[root@preethi ~]# rpm -q pulp
pulp-0.0.224-1.fc14.noarch

[root@preethi ~]# pulp-admin repo list --help
Usage: pulp-admin <options> repo list <options>

Options:
  -h, --help         show this help message and exit
  --groupid=GROUPID  filter repositories by group id
  --notes=NOTES      filter repositories by notes; notes should be in a
                     dictionary form inside a string
[root@preethi ~]# pulp-admin repo list --notes
Usage: pulp-admin <options> repo list <options>

pulp-admin: error: --notes option requires an argument
[root@preethi ~]# pulp-admin repo list --notes="{'test_key':'test_value'}"
+------------------------------------------+
       List of Available Repositories
+------------------------------------------+

Id                 	katello                  
Name               	katello                  
Feed URL           	http://repos.fedorapeople.org/repos/katello/katello/fedora-14/x86_64/
Feed Type          	remote                   
Content Type       	yum                      
Feed Certs         	CA:No   Cert:No
Consumer Certs     	CA:No   Cert:No
Architecture       	noarch                   
Sync Schedule      	None                     
Packages           	0                        
Files              	0                        
Distributions      	None                     
Publish            	True                     
Clones             	[]                       
Groups             	None                     
Filters            	[]                       
Notes              	{'test_key': 'test_value'}

Comment 4 Preethi Thomas 2012-02-24 20:13:39 UTC
Pulp v1.0 is released
Closed Current Release.


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