This file is indexed.

/usr/share/pyshared/cobbler/field_info.py is in python-cobbler 2.2.2-0ubuntu33.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
"""
Describes additional properties of cobbler fields otherwise
defined in item_*.py.  These values are common to all versions
of the fields, so they don't have to be repeated in each file.

Copyright 2009, Red Hat, Inc
Michael DeHaan <mdehaan@redhat.com>

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301  USA
"""

# fields that display as a text area in the web app
# note: not the same as a text field, this is the big one.

USES_TEXTAREA = [
   "comment",
   "mgmt_parameters",
   "template_files",
   "fetchable_files",
   "boot_files"
]

# fields that use a multi select in the web app

USES_MULTI_SELECT = [
   "repos",
   "mgmt_classes",
   "packages",
   "files",
]

# fields that use a select in the web app

USES_SELECT = [
   "profile",
   "distro",
   "image",
   "virt_type",
   "arch",
   "*interface_type",
   "parent",
   "breed",
   "os_version",
   "status",
]

# fields that should use the checkbox in the web app

USES_CHECKBOX = [
   "enable_menu",
   "*netboot_enabled",
   "netboot_enabled",
   "*static",
   "*management",
   "management",
   "ipv6_autoconfiguration",
   "keep_updated",
   "mirror_locally",
   "virt_auto_boot",
   "*repos_enabled",
   "repos_enabled",
   "*ldap_enabled",
   "ldap_enabled",
   "*monit_enabled",
   "monit_enabled"
]

# select killed the radio button
# we should not make anything use a radio button, we hate radio buttons.

USES_RADIO = [
]

# this is the map of what color to color code each field type.
# it may also be used to expand/collapse certain web elements as a set.

BLOCK_MAPPINGS = {
   "virt_ram"        : "Virtualization",
   "virt_disk"       : "Virtualization",
   "virt_cpus"       : "Virtualization",
   "virt_bridge"     : "Virtualization",
   "virt_path"       : "Virtualization",
   "virt_file_size"  : "Virtualization",
   "virt_disk_driver": "Virtualization",
   "virt_type"       : "Virtualization",
   "virt_auto_boot"  : "Virtualization",
   "virt_host"       : "Virtualization",
   "virt_group"      : "Virtualization",
   "virt_guests"     : "Virtualization",
   "*virt_ram"       : "Virtualization",
   "*virt_disk"      : "Virtualization",
   "*virt_path"      : "Virtualization",
   "*virt_cpus"      : "Virtualization",
   "*virt_bridge"    : "Networking",
   "*virt_type"      : "Virtualization",
   "*virt_file_size" : "Virtualization",
   "*virt_disk_driver" : "Virtualization",
   "power_id"        : "Power",
   "power_address"   : "Power",
   "power_user"      : "Power",
   "power_pass"      : "Power",
   "power_type"      : "Power",
   "address"         : "Networking", # from network
   "cidr"            : "Networking", # ditto
   "broadcast"       : "Networking", # ..
   "reserved"        : "Networking", # ..
   "*mac_address"    : "Networking",
   "network_widget_c": "Networking",
   "*mtu"            : "Networking",
   "*ip_address"     : "Networking",
   "*dhcp_tag"       : "Networking",
   "*static"         : "Networking",
   "*interface_type" : "Networking",
   "*interface_master" : "Networking",
   "*bonding_opts"   : "Networking",
   "*bridge_opts"    : "Networking",
   "*management"     : "Networking",
   "*dns_name"       : "Networking",
   "*static_routes"  : "Networking",
   "*netmask"        : "Networking",
   "*ipv6_address"   : "Networking",
   "*ipv6_secondaries"      : "Networking",
   "*ipv6_mtu"              : "Networking",
   "*ipv6_static_routes"    : "Networking",
   "*ipv6_default_gateway"  : "Networking",
   "hostname"               : "Networking (Global)",
   "gateway"                : "Networking (Global)",
   "name_servers"           : "Networking (Global)",
   "name_servers_search"    : "Networking (Global)",
   "ipv6_default_device"    : "Networking (Global)",
   "ipv6_autoconfiguration" : "Networking (Global)",
   "proxy"                  : "General",
   "repos"                  : "General",
   "dhcp_tag"               : "Advanced",
   "mgmt_classes"           : "Management",
   "mgmt_parameters"        : "Management",
   "template_files"         : "Management",
   "boot_files"             : "Management",
   "fetchable_files"        : "Management",
   "network_widget_a"       : "Networking",
   "network_widget_b"       : "Networking",
   "server"                 : "Advanced",
   "redhat_management_key"  : "Management",
   "redhat_management_server" : "Management",
   "createrepo_flags"         : "Advanced",
   "environment"              : "Advanced",
   "mirror_locally"           : "Advanced",
   "priority"                 : "Advanced",
   "yumopts"                  : "Advanced",
   "packages" : "Resources",
   "files"    : "Resources",
   "repos_enabled" : "Management",
   "ldap_enabled"  : "Management",
   "ldap_type"     : "Management",
   "monit_enabled" : "Management",
}
   
# Certain legacy fields need to have different CLI options than the direct translation of their
# name in the FIELDS data structure.  We should not add any more of these under any conditions.
 
ALTERNATE_OPTIONS = {
   "ks_meta"             : "--ksmeta",
   "kernel_options"      : "--kopts",
   "kernel_options_post" : "--kopts-post",
}

# Deprecated fields that have been renamed, but we need to account for them appearing in older 
# datastructs that may not have been saved since the code change

DEPRECATED_FIELDS = {
   "subnet"         : "netmask",
   "bonding"        : "interface_type",
   "bonding_master" : "interface_master",
}