blob: e975b3591b7c7d44dcdb956a8d5e571df800ae8c [file] [log] [blame]
George Keishingfbeaecc2016-08-16 05:24:31 -05001import os
2
George Keishingcf910442016-12-08 03:12:59 -06003# Enable when ready with openbmc/openbmc-test-automation#203
4# replace with new path /xyz/openbmc_project
5OPENBMC_BASE_URI = '/org/openbmc/'
6OPENBMC_BASE_DBUS = 'org.openbmc'
7
8# REST URI base endpoint paths
9CONTROL_URI = OPENBMC_BASE_URI + 'control/'
10SENSORS_URI = OPENBMC_BASE_URI + 'sensors/'
11RECORDS_URI = OPENBMC_BASE_URI + 'records/'
12BUTTONS_URI = OPENBMC_BASE_URI + 'buttons/'
13SETTINGS_URI = OPENBMC_BASE_URI + 'settings/'
14WATCHDOG_URI = OPENBMC_BASE_URI + 'watchdog/'
15INVENTORY_URI = OPENBMC_BASE_URI + 'inventory/'
16USER_MANAGER_URI = OPENBMC_BASE_URI + 'UserManager/'
17NETWORK_MANAGER_URI = OPENBMC_BASE_URI + 'NetworkManager/'
Rahul Maheshwarif8785902016-12-12 01:23:13 -060018TIME_MANAGER_URI = OPENBMC_BASE_URI + 'TimeManager/'
Prashanth Kattie79c5402017-06-08 07:40:49 -050019XYZ_NETWORK_MANAGER = '/xyz/openbmc_project/network/'
George Keishingcf910442016-12-08 03:12:59 -060020
George Keishingbec365b2017-01-19 01:28:41 -060021# State Manager base variables.
Rahul Maheshwari2f8de6c2017-01-17 07:00:22 -060022BMC_REBOOT_TRANS = 'xyz.openbmc_project.State.BMC.Transition.Reboot'
23
George Keishingbec365b2017-01-19 01:28:41 -060024HOST_POWEROFF_TRANS = 'xyz.openbmc_project.State.Host.Transition.Off'
25HOST_POWERON_TRANS = 'xyz.openbmc_project.State.Host.Transition.On'
Rahul Maheshwarif7ead242017-02-14 01:59:42 -060026HOST_REBOOT_TRANS = 'xyz.openbmc_project.State.Host.Transition.Reboot'
George Keishingbec365b2017-01-19 01:28:41 -060027HOST_POWEROFF_STATE = 'xyz.openbmc_project.State.Host.HostState.Off'
28HOST_POWERON_STATE = 'xyz.openbmc_project.State.Host.HostState.Running'
29
30CHASSIS_POWEROFF_TRANS = 'xyz.openbmc_project.State.Chassis.Transition.Off'
31CHASSIS_POWERON_TRANS = 'xyz.openbmc_project.State.Chassis.Transition.On'
32CHASSIS_POWEROFF_STATE = 'xyz.openbmc_project.State.Chassis.PowerState.Off'
33CHASSIS_POWERON_STATE = 'xyz.openbmc_project.State.Chassis.PowerState.On'
34
35# State Manager URI variables.
George Keishing3c332e02017-02-23 22:10:18 -060036BMC_STATE_URI = '/xyz/openbmc_project/state/bmc0/'
George Keishingbec365b2017-01-19 01:28:41 -060037HOST_STATE_URI = '/xyz/openbmc_project/state/host0/'
38CHASSIS_STATE_URI = '/xyz/openbmc_project/state/chassis0/'
Sridevi Ramesh0a7c0aa2017-06-26 13:03:02 -050039HOST_WATCHDOG_URI = '/xyz/openbmc_project/watchdog/host0/'
George Keishingbec365b2017-01-19 01:28:41 -060040
George Keishing505d5b42017-02-21 11:01:54 -060041# Logging URI variables
George Keishinga71dd202017-02-24 00:49:40 -060042BMC_LOGGING_URI = '/xyz/openbmc_project/logging/'
43BMC_LOGGING_ENTRY = BMC_LOGGING_URI + 'entry/'
George Keishing505d5b42017-02-21 11:01:54 -060044
George Keishingab5157b2017-02-09 12:24:25 -060045# Software manager version
George Keishingff1e3ec2017-07-20 01:58:21 -050046SOFTWARE_VERSION_URI = '/xyz/openbmc_project/software/'
George Keishingab5157b2017-02-09 12:24:25 -060047ACTIVE = 'xyz.openbmc_project.Software.Activation.Activations.Active'
Saqib Khanbb8b63f2017-05-24 10:58:01 -050048READY = 'xyz.openbmc_project.Software.Activation.Activations.Ready'
49INVALID = 'xyz.openbmc_project.Software.Activation.Activations.Invalid'
50ACTIVATING = 'xyz.openbmc_project.Software.Activation.Activations.Activating'
51NOTREADY = 'xyz.openbmc_project.Software.Activation.Activations.NotReady'
52FAILED = 'xyz.openbmc_project.Software.Activation.Activations.Failed'
53
54SOFTWARE_ACTIVATION = 'xyz.openbmc_project.Software.Activation'
55REQUESTED_ACTIVATION = SOFTWARE_ACTIVATION + '.RequestedActivations'
56REQUESTED_ACTIVE = REQUESTED_ACTIVATION + '.Active'
57REQUESTED_NONE = REQUESTED_ACTIVATION + '.None'
58
59SOFTWARE_PURPOSE = 'xyz.openbmc_project.Software.Version.VersionPurpose'
60VERSION_PURPOSE_HOST = SOFTWARE_PURPOSE + '.Host'
61VERSION_PURPOSE_BMC = SOFTWARE_PURPOSE + '.BMC'
62VERSION_PURPOSE_SYSTEM = SOFTWARE_PURPOSE + '.System'
George Keishingab5157b2017-02-09 12:24:25 -060063
George Keishingc8166ed2017-02-24 03:53:38 -060064# Inventory URI
65HOST_INVENTORY_URI = '/xyz/openbmc_project/inventory/'
66
Rahul Maheshwari7258aec2017-02-02 04:46:38 -060067# Led URI variable
68LED_GROUPS_URI = '/xyz/openbmc_project/led/groups/'
Rahul Maheshwaric8898e12017-03-30 23:30:01 -050069LED_PHYSICAL_URI = '/xyz/openbmc_project/led/physical/'
Rahul Maheshwari7258aec2017-02-02 04:46:38 -060070
George Keishing1059b222017-07-21 13:24:43 -050071# Host control URI variables.
72CONTROL_HOST_URI = '/xyz/openbmc_project/control/host0/'
Rahul Maheshwari7258aec2017-02-02 04:46:38 -060073
Rahul Maheshwari23b18fb2017-08-01 00:30:26 -050074# Dump URI variable
75DUMP_URI = '/xyz/openbmc_project/dump/'
76DUMP_ENTRY_URI = DUMP_URI + 'entry/'
77
George Keishingfbeaecc2016-08-16 05:24:31 -050078'''
79 QEMU HTTPS variable:
80
81 By default lib/resource.txt AUTH URI construct is as
82 ${AUTH_URI} https://${OPENBMC_HOST}${AUTH_SUFFIX}
83 ${AUTH_SUFFIX} is populated here by default EMPTY else
84 the port from the OS environment
85'''
George Keishingcf910442016-12-08 03:12:59 -060086
87
George Keishingfbeaecc2016-08-16 05:24:31 -050088def get_port_https():
89 # defaulted to empty string
90 l_suffix = ''
91 try:
92 l_https_port = os.getenv('HTTPS_PORT')
93 if l_https_port:
George Keishingcf910442016-12-08 03:12:59 -060094 l_suffix = ':' + l_https_port
George Keishingfbeaecc2016-08-16 05:24:31 -050095 except:
George Keishingcf910442016-12-08 03:12:59 -060096 print "Environment variable HTTPS_PORT not set,\
97 using default HTTPS port"
George Keishingfbeaecc2016-08-16 05:24:31 -050098 return l_suffix
99
George Keishingcf910442016-12-08 03:12:59 -0600100AUTH_SUFFIX = {
101 "https_port": [get_port_https()],
George Keishingfbeaecc2016-08-16 05:24:31 -0500102}
103
104# Update the ':Port number' to this variable
105AUTH_SUFFIX = AUTH_SUFFIX['https_port'][0]
Chris Austenb29d2e82016-06-07 12:25:35 -0500106
107# Here contains a list of valid Properties bases on fru_type after a boot.
George Keishingcf910442016-12-08 03:12:59 -0600108INVENTORY_ITEMS = {
Chris Austenb29d2e82016-06-07 12:25:35 -0500109 "CPU": [
110 "Custom Field 1",
111 "Custom Field 2",
112 "Custom Field 3",
113 "Custom Field 4",
114 "Custom Field 5",
115 "Custom Field 6",
116 "Custom Field 7",
117 "Custom Field 8",
118 "FRU File ID",
119 "Manufacturer",
120 "Name",
121 "Part Number",
122 "Serial Number",
123 "fault",
124 "fru_type",
125 "is_fru",
126 "present",
127 "version",
128 ],
129
130 "DIMM": [
131 "Asset Tag",
132 "Custom Field 1",
133 "Custom Field 2",
134 "Custom Field 3",
135 "Custom Field 4",
136 "Custom Field 5",
137 "Custom Field 6",
138 "Custom Field 7",
139 "Custom Field 8",
140 "FRU File ID",
141 "Manufacturer",
142 "Model Number",
143 "Name",
144 "Serial Number",
145 "Version",
146 "fault",
147 "fru_type",
148 "is_fru",
149 "present",
150 "version",
151 ],
152 "MEMORY_BUFFER": [
153 "Custom Field 1",
154 "Custom Field 2",
155 "Custom Field 3",
156 "Custom Field 4",
157 "Custom Field 5",
158 "Custom Field 6",
159 "Custom Field 7",
160 "Custom Field 8",
161 "FRU File ID",
162 "Manufacturer",
163 "Name",
164 "Part Number",
165 "Serial Number",
166 "fault",
167 "fru_type",
168 "is_fru",
169 "present",
170 "version",
171 ],
172 "FAN": [
173 "fault",
174 "fru_type",
175 "is_fru",
176 "present",
177 "version",
178 ],
179 "DAUGHTER_CARD": [
180 "Custom Field 1",
181 "Custom Field 2",
182 "Custom Field 3",
183 "Custom Field 4",
184 "Custom Field 5",
185 "Custom Field 6",
186 "Custom Field 7",
187 "Custom Field 8",
188 "FRU File ID",
189 "Manufacturer",
190 "Name",
191 "Part Number",
192 "Serial Number",
193 "fault",
194 "fru_type",
195 "is_fru",
196 "present",
197 "version",
198 ],
199 "BMC": [
200 "fault",
201 "fru_type",
202 "is_fru",
203 "manufacturer",
204 "present",
205 "version",
206 ],
207 "MAIN_PLANAR": [
208 "Custom Field 1",
209 "Custom Field 2",
210 "Custom Field 3",
211 "Custom Field 4",
212 "Custom Field 5",
213 "Custom Field 6",
214 "Custom Field 7",
215 "Custom Field 8",
216 "Part Number",
217 "Serial Number",
218 "Type",
219 "fault",
220 "fru_type",
221 "is_fru",
222 "present",
223 "version",
224 ],
225 "SYSTEM": [
226 "Custom Field 1",
227 "Custom Field 2",
228 "Custom Field 3",
229 "Custom Field 4",
230 "Custom Field 5",
231 "Custom Field 6",
232 "Custom Field 7",
233 "Custom Field 8",
234 "FRU File ID",
235 "Manufacturer",
236 "Model Number",
237 "Name",
238 "Serial Number",
239 "Version",
240 "fault",
241 "fru_type",
242 "is_fru",
243 "present",
244 "version",
245 ],
246 "CORE": [
247 "fault",
248 "fru_type",
249 "is_fru",
250 "present",
251 "version",
252 ],
253}