blob: 972a69fd1f71b15a35f053f2951557954d62df8d [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/'
39
George Keishing505d5b42017-02-21 11:01:54 -060040# Logging URI variables
George Keishinga71dd202017-02-24 00:49:40 -060041BMC_LOGGING_URI = '/xyz/openbmc_project/logging/'
42BMC_LOGGING_ENTRY = BMC_LOGGING_URI + 'entry/'
George Keishing505d5b42017-02-21 11:01:54 -060043
George Keishingab5157b2017-02-09 12:24:25 -060044# Software manager version
Saqib Khanbb8b63f2017-05-24 10:58:01 -050045SOFTWARE_VERSION = '/xyz/openbmc_project/software/'
George Keishingab5157b2017-02-09 12:24:25 -060046ACTIVE = 'xyz.openbmc_project.Software.Activation.Activations.Active'
Saqib Khanbb8b63f2017-05-24 10:58:01 -050047READY = 'xyz.openbmc_project.Software.Activation.Activations.Ready'
48INVALID = 'xyz.openbmc_project.Software.Activation.Activations.Invalid'
49ACTIVATING = 'xyz.openbmc_project.Software.Activation.Activations.Activating'
50NOTREADY = 'xyz.openbmc_project.Software.Activation.Activations.NotReady'
51FAILED = 'xyz.openbmc_project.Software.Activation.Activations.Failed'
52
53SOFTWARE_ACTIVATION = 'xyz.openbmc_project.Software.Activation'
54REQUESTED_ACTIVATION = SOFTWARE_ACTIVATION + '.RequestedActivations'
55REQUESTED_ACTIVE = REQUESTED_ACTIVATION + '.Active'
56REQUESTED_NONE = REQUESTED_ACTIVATION + '.None'
57
58SOFTWARE_PURPOSE = 'xyz.openbmc_project.Software.Version.VersionPurpose'
59VERSION_PURPOSE_HOST = SOFTWARE_PURPOSE + '.Host'
60VERSION_PURPOSE_BMC = SOFTWARE_PURPOSE + '.BMC'
61VERSION_PURPOSE_SYSTEM = SOFTWARE_PURPOSE + '.System'
George Keishingab5157b2017-02-09 12:24:25 -060062
George Keishingc8166ed2017-02-24 03:53:38 -060063# Inventory URI
64HOST_INVENTORY_URI = '/xyz/openbmc_project/inventory/'
65
Rahul Maheshwari7258aec2017-02-02 04:46:38 -060066# Led URI variable
67LED_GROUPS_URI = '/xyz/openbmc_project/led/groups/'
Rahul Maheshwaric8898e12017-03-30 23:30:01 -050068LED_PHYSICAL_URI = '/xyz/openbmc_project/led/physical/'
Rahul Maheshwari7258aec2017-02-02 04:46:38 -060069
70
George Keishingfbeaecc2016-08-16 05:24:31 -050071'''
72 QEMU HTTPS variable:
73
74 By default lib/resource.txt AUTH URI construct is as
75 ${AUTH_URI} https://${OPENBMC_HOST}${AUTH_SUFFIX}
76 ${AUTH_SUFFIX} is populated here by default EMPTY else
77 the port from the OS environment
78'''
George Keishingcf910442016-12-08 03:12:59 -060079
80
George Keishingfbeaecc2016-08-16 05:24:31 -050081def get_port_https():
82 # defaulted to empty string
83 l_suffix = ''
84 try:
85 l_https_port = os.getenv('HTTPS_PORT')
86 if l_https_port:
George Keishingcf910442016-12-08 03:12:59 -060087 l_suffix = ':' + l_https_port
George Keishingfbeaecc2016-08-16 05:24:31 -050088 except:
George Keishingcf910442016-12-08 03:12:59 -060089 print "Environment variable HTTPS_PORT not set,\
90 using default HTTPS port"
George Keishingfbeaecc2016-08-16 05:24:31 -050091 return l_suffix
92
George Keishingcf910442016-12-08 03:12:59 -060093AUTH_SUFFIX = {
94 "https_port": [get_port_https()],
George Keishingfbeaecc2016-08-16 05:24:31 -050095}
96
97# Update the ':Port number' to this variable
98AUTH_SUFFIX = AUTH_SUFFIX['https_port'][0]
Chris Austenb29d2e82016-06-07 12:25:35 -050099
100# Here contains a list of valid Properties bases on fru_type after a boot.
George Keishingcf910442016-12-08 03:12:59 -0600101INVENTORY_ITEMS = {
Chris Austenb29d2e82016-06-07 12:25:35 -0500102 "CPU": [
103 "Custom Field 1",
104 "Custom Field 2",
105 "Custom Field 3",
106 "Custom Field 4",
107 "Custom Field 5",
108 "Custom Field 6",
109 "Custom Field 7",
110 "Custom Field 8",
111 "FRU File ID",
112 "Manufacturer",
113 "Name",
114 "Part Number",
115 "Serial Number",
116 "fault",
117 "fru_type",
118 "is_fru",
119 "present",
120 "version",
121 ],
122
123 "DIMM": [
124 "Asset Tag",
125 "Custom Field 1",
126 "Custom Field 2",
127 "Custom Field 3",
128 "Custom Field 4",
129 "Custom Field 5",
130 "Custom Field 6",
131 "Custom Field 7",
132 "Custom Field 8",
133 "FRU File ID",
134 "Manufacturer",
135 "Model Number",
136 "Name",
137 "Serial Number",
138 "Version",
139 "fault",
140 "fru_type",
141 "is_fru",
142 "present",
143 "version",
144 ],
145 "MEMORY_BUFFER": [
146 "Custom Field 1",
147 "Custom Field 2",
148 "Custom Field 3",
149 "Custom Field 4",
150 "Custom Field 5",
151 "Custom Field 6",
152 "Custom Field 7",
153 "Custom Field 8",
154 "FRU File ID",
155 "Manufacturer",
156 "Name",
157 "Part Number",
158 "Serial Number",
159 "fault",
160 "fru_type",
161 "is_fru",
162 "present",
163 "version",
164 ],
165 "FAN": [
166 "fault",
167 "fru_type",
168 "is_fru",
169 "present",
170 "version",
171 ],
172 "DAUGHTER_CARD": [
173 "Custom Field 1",
174 "Custom Field 2",
175 "Custom Field 3",
176 "Custom Field 4",
177 "Custom Field 5",
178 "Custom Field 6",
179 "Custom Field 7",
180 "Custom Field 8",
181 "FRU File ID",
182 "Manufacturer",
183 "Name",
184 "Part Number",
185 "Serial Number",
186 "fault",
187 "fru_type",
188 "is_fru",
189 "present",
190 "version",
191 ],
192 "BMC": [
193 "fault",
194 "fru_type",
195 "is_fru",
196 "manufacturer",
197 "present",
198 "version",
199 ],
200 "MAIN_PLANAR": [
201 "Custom Field 1",
202 "Custom Field 2",
203 "Custom Field 3",
204 "Custom Field 4",
205 "Custom Field 5",
206 "Custom Field 6",
207 "Custom Field 7",
208 "Custom Field 8",
209 "Part Number",
210 "Serial Number",
211 "Type",
212 "fault",
213 "fru_type",
214 "is_fru",
215 "present",
216 "version",
217 ],
218 "SYSTEM": [
219 "Custom Field 1",
220 "Custom Field 2",
221 "Custom Field 3",
222 "Custom Field 4",
223 "Custom Field 5",
224 "Custom Field 6",
225 "Custom Field 7",
226 "Custom Field 8",
227 "FRU File ID",
228 "Manufacturer",
229 "Model Number",
230 "Name",
231 "Serial Number",
232 "Version",
233 "fault",
234 "fru_type",
235 "is_fru",
236 "present",
237 "version",
238 ],
239 "CORE": [
240 "fault",
241 "fru_type",
242 "is_fru",
243 "present",
244 "version",
245 ],
246}