Bug 713507

Summary: RFE: Query Repositories by "Notes" field
Product: [Retired] Pulp Reporter: Jordan OMara <jomara>
Component: z_otherAssignee: Sayli Karmarkar <skarmark>
Status: CLOSED CURRENTRELEASE QA Contact: Preethi Thomas <pthomas>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: athomas, cperry, skarmark, tsanders
Target Milestone: ---Keywords: FutureFeature, Triaged
Target Release: Sprint 26   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-24 20:13:39 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

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.