-
Notifications
You must be signed in to change notification settings - Fork 120
/
constants.py
70 lines (59 loc) · 3.04 KB
/
constants.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Copyright (c) 2012 Red Hat, Inc.
#
# This software is licensed to you under the GNU General Public
# License as published by the Free Software Foundation; either version
# 2 of the License (GPLv2) or (at your option) any later version.
# There is NO WARRANTY for this software, express or implied,
# including the implied warranties of MERCHANTABILITY,
# NON-INFRINGEMENT, or FITNESS FOR A PARTICULAR PURPOSE. You should
# have received a copy of GPLv2 along with this software; if not, see
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
# -- progress states ----------------------------------------------------------
STATE_NOT_STARTED = 'NOT_STARTED'
STATE_RUNNING = 'IN_PROGRESS'
STATE_COMPLETE = 'FINISHED'
STATE_FAILED = 'FAILED'
STATE_SKIPPED = 'SKIPPED'
COMPLETE_STATES = (STATE_COMPLETE, STATE_FAILED, STATE_SKIPPED)
# Used as a note on a repository to indicate it is a Puppet repository
REPO_NOTE_RPM = 'rpm-repo'
REPO_NOTE_ISO = 'iso-repo'
PUBLISHED_DISTRIBUTION_FILES_KEY = 'published_distributions'
# Importer configuration key names
CONFIG_COPY_CHILDREN = 'copy_children'
CONFIG_FEED_URL = 'feed_url'
CONFIG_MAX_SPEED = 'max_speed'
CONFIG_NUM_THREADS = 'num_threads'
# The default number of threads to be used with downloading ISOs. We should convert the RPM code to
# use this same value.
CONFIG_NUM_THREADS_DEFAULT = 5
CONFIG_PROXY_PASSWORD = 'proxy_password'
CONFIG_PROXY_PORT = 'proxy_port'
CONFIG_PROXY_URL = 'proxy_url'
CONFIG_PROXY_USER = 'proxy_user'
CONFIG_REMOVE_MISSING_UNITS = 'remove_missing_units'
CONFIG_REMOVE_MISSING_UNITS_DEFAULT = False
CONFIG_SSL_CA_CERT = 'ssl_ca_cert'
CONFIG_SSL_CLIENT_CERT = 'ssl_client_cert'
CONFIG_SSL_CLIENT_KEY = 'ssl_client_key'
CONFIG_VALIDATE_DOWNLOADS = 'validate_downloads'
CONFIG_VALIDATE_DOWNLOADS_DEFAULT = True
# Distributor configuration key names
CONFIG_SERVE_HTTP = 'serve_http'
CONFIG_SERVE_HTTPS = 'serve_https'
EXPORT_HTTP_DIR="/var/lib/pulp/published/http/exports"
EXPORT_HTTPS_DIR="/var/lib/pulp/published/https/exports"
ISO_HTTP_DIR = "/var/lib/pulp/published/http/isos"
ISO_HTTPS_DIR = "/var/lib/pulp/published/https/isos"
ISO_MANIFEST_FILENAME = 'PULP_MANIFEST'
# There is no clean way to get the distribution storage location outside of the unit;
# we need this path when initializing grinder so the treeinfo file gets compied and
# symlinked to the right path. Once we have a nicer way of getting this path replace this
DISTRIBUTION_STORAGE_PATH = '/var/lib/pulp/content/distribution/'
# During publish we need to lookup and make sure the treeinfo exists; since the treeinfo
# can be '.treeinfo' or 'treeinfo' (in cdn case) we need to check which one exists
TREE_INFO_LIST = ['.treeinfo', 'treeinfo']
# Profiler configuration key name
CONFIG_APPLICABILITY_REPORT_STYLE = 'report_style'
APPLICABILITY_REPORT_STYLE_BY_UNITS = 'by_units'
APPLICABILITY_REPORT_STYLE_BY_CONSUMERS = 'by_consumers'