@@ -38,24 +38,25 @@ itself, a fixture, or even an instance of Pulp 2.
3838Remote GET Response::
3939
4040 {
41- "pulp_created ": "2019-04-29T15:58:01.196433Z" ,
42- "pulp_href ": "/pulp/api/v3/remotes/python/python/1962b474-1545-4de1-adf4-4bf211679752/" ,
43- "pulp_last_updated ": "2019-04-29T15:58:01.196446Z" ,
44- "download_concurrency": 20 ,
41+ "ca_cert ": null ,
42+ "client_cert ": null ,
43+ "client_key ": null ,
44+ "download_concurrency": 10 ,
4545 "excludes": [],
4646 "includes": [
47- {
48- "name": "shelf-reader",
49- "version_specifier": ""
50- }
47+ "shelf-reader"
5148 ],
5249 "name": "bar",
53- "policy": "immediate",
50+ "password": null,
51+ "policy": "on_demand",
5452 "prereleases": false,
55- "proxy_url": "",
56- "ssl_validation": true,
53+ "proxy_url": null,
54+ "pulp_created": "2020-10-15T22:08:07.943369Z",
55+ "pulp_href": "/pulp/api/v3/remotes/python/python/bbcfa980-ea53-425c-b03b-17c9c2867bba/",
56+ "pulp_last_updated": "2020-10-15T22:08:07.943404Z",
57+ "tls_validation": true,
5758 "url": "https://pypi.org/",
58- "validate ": true
59+ "username ": null
5960 }
6061
6162Reference: `Python Remote Usage <../restapi.html#tag/remotes >`_
@@ -71,13 +72,10 @@ about will be synced::
7172 name='complex-remote' \
7273 url='https://pypi.org/' \
7374 includes:='[
74- { "name": "django",
75- "version_specifier": "~=2.0,!=2.0.1",
76- },
77- {"name": "pip-tools",
78- "version_specifier": ">=1.12,<=2.0"},
79- {"name": "scipy"},
80- {"name": "shelf-reader"}
75+ "django~=2.0,!=2.0.1",
76+ "pip-tools>=1.12,<=2.0",
77+ "scipy",
78+ "shelf-reader"
8179 ]'
8280
8381You can also use version specifiers to "exclude" certain versions of a project, like so::
@@ -86,16 +84,34 @@ You can also use version specifiers to "exclude" certain versions of a project,
8684 name='complex-remote' \
8785 url='https://pypi.org/' \
8886 includes:='[
89- {"name": " django", "version_specifier": ""} ,
90- {"name": " scipy", "version_specifier": ""}
87+ " django",
88+ " scipy"
9189 ]' \
9290 excludes:='[
93- {"name": " django", "version_specifier": " ~=1.0"} ,
94- {"name": " scipy"}
91+ " django~=1.0",
92+ " scipy"
9593 ]'
9694
9795Reference: `Python Remote Usage <../restapi.html#tag/remotes >`_
9896
97+ Creating a remote to sync all of PyPi
98+ _____________________________________
99+
100+ A remote can be setup to sync all of PyPi by not specifying any included packages like so::
101+
102+ $ http POST $BASE_ADDR/pulp/api/v3/remotes/python/python/ \
103+ name='PyPi-mirror' \
104+ url='https://pypi.org/' \
105+ excludes:='[
106+ "django~=1.0",
107+ "scipy"
108+ ]'
109+
110+ By not setting the "includes" field Pulp will ask PyPi for all of its available packages to sync, minus the ones from
111+ the excludes field. Default Python remotes are created with syncing policy "on_demand" because the most common
112+ Python remotes involve syncing with PyPi which requires terabytes of disk space. This can be changed by
113+ modifying the "policy" field.
114+
99115Sync repository foo with remote
100116-------------------------------
101117
0 commit comments