Each plugin can have a .conf file that applies to the plugin as a whole. There isn't one for the yum importer, but if there was the proxy information could be set there instead of on a per repo basis. This bug is to add that file and have it included in the RPM.
Added empty conf files for the plugins in case we need to tell users to edit them in the future. I'd have liked to add comments about possible values, but comments aren't supported in JSON. If the proxy_* properties are in the file, they will be used by the plugin automatically.
build: 2.0.6-0.3.beta
The conf file is in /usr/lib/pulp/plugins/importers/yum_importer, it's called yum_importer.conf. It's intentionally empty, which is an unfortunate side effect of JSON. Also be careful with the syntax since JSON is kinda fragile. If that's invalid, I'm not sure exactly where in pulp.log it will blow up, but it won't be too pretty. The field names you'll care about are: proxy_url proxy_port proxy_user proxy_pass Realistically, you don't have to worry about an authenticated proxy. If any one of these fields is accessed, they all can be. Here's an example for the contents of that file: { "proxy_url" : "http://localhost/", "proxy_port" : "12345" } A few quick notes: - I forget in JSON if you can omit the quotes on the port to make it an integer. Try both if you're seeing oddities. - Not sure if this will be an issue for you, but in Python you can have a trailing comma on the last item in a dict like this (after the "12345"). This isn't allowed in JSON and always bites me, so I figured I'd mention it. If you really want to go crazy, you can set a value in here and a different value for the repo in the CLI. The repo-level config should override, just for that repo, the values in this file.
verified [root@preethi-el6-pulp ~]# rpm -q pulp-server pulp-server-2.0.6-0.9.beta.noarch [root@preethi-el6-pulp ~]# [root@preethi-el6-pulp ~]# cat /usr/lib/pulp/plugins/importers/yum_importer/yum_importer.conf { "proxy_url" : "http://localhost/", "proxy_port" : "12345" } [root@preethi-el6-pulp ~]# pulp-admin rpm repo sync run --repo-id testerrata +----------------------------------------------------------------------+ Synchronizing Repository [testerrata] +----------------------------------------------------------------------+ This command may be exited by pressing ctrl+c without affecting the actual operation on the server. Downloading metadata... [\] ... failed [root@preethi-el6-pulp ~]vi /usr/lib/pulp/plugins/importers/yum_importer/yum_importer.conf [root@preethi-el6-pulp ~]# service httpd restartStopping httpd: [ OK ] Starting httpd: [Tue Nov 27 08:45:00 2012] [warn] NameVirtualHost *:80 has no VirtualHosts [ OK ] [root@preethi-el6-pulp ~]# cat /usr/lib/pulp/plugins/importers/yum_importer/yum_importer.conf { } [root@preethi-el6-pulp ~]# pulp-admin rpm repo sync run --repo-id testerrata+----------------------------------------------------------------------+ Synchronizing Repository [testerrata] +----------------------------------------------------------------------+ This command may be exited by pressing ctrl+c without affecting the actual operation on the server. Downloading metadata... [-] ... completed Downloading repository content... [==================================================] 100% RPMs: 0/0 items Delta RPMs: 0/0 items Tree Files: 0/0 items Files: 0/0 items ... completed Importing errata... [-] ... completed Importing package groups/categories... [-] ... completed Publishing packages... [==================================================] 100% Packages: 0/0 items ... completed Publishing distributions... [==================================================] 100% Distributions: 3/3 items ... completed Generating metadata [\] ... completed Publishing repository over HTTPS [-] ... completed Publishing repository over HTTP [-] ... skipped
*** Bug 866621 has been marked as a duplicate of this bug. ***
Pulp 2.0 released.