blob: feed8bc7c4abb4cfbeee2a4f1ebad008a7f9a8a3 [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
45SOFTWARE_VERSION_URI = '/xyz/openbmc_project/software/'
46ACTIVE = 'xyz.openbmc_project.Software.Activation.Activations.Active'
47
George Keishingc8166ed2017-02-24 03:53:38 -060048# Inventory URI
49HOST_INVENTORY_URI = '/xyz/openbmc_project/inventory/'
50
Rahul Maheshwari7258aec2017-02-02 04:46:38 -060051# Led URI variable
52LED_GROUPS_URI = '/xyz/openbmc_project/led/groups/'
Rahul Maheshwaric8898e12017-03-30 23:30:01 -050053LED_PHYSICAL_URI = '/xyz/openbmc_project/led/physical/'
Rahul Maheshwari7258aec2017-02-02 04:46:38 -060054
55
George Keishingfbeaecc2016-08-16 05:24:31 -050056'''
57 QEMU HTTPS variable:
58
59 By default lib/resource.txt AUTH URI construct is as
60 ${AUTH_URI} https://${OPENBMC_HOST}${AUTH_SUFFIX}
61 ${AUTH_SUFFIX} is populated here by default EMPTY else
62 the port from the OS environment
63'''
George Keishingcf910442016-12-08 03:12:59 -060064
65
George Keishingfbeaecc2016-08-16 05:24:31 -050066def get_port_https():
67 # defaulted to empty string
68 l_suffix = ''
69 try:
70 l_https_port = os.getenv('HTTPS_PORT')
71 if l_https_port:
George Keishingcf910442016-12-08 03:12:59 -060072 l_suffix = ':' + l_https_port
George Keishingfbeaecc2016-08-16 05:24:31 -050073 except:
George Keishingcf910442016-12-08 03:12:59 -060074 print "Environment variable HTTPS_PORT not set,\
75 using default HTTPS port"
George Keishingfbeaecc2016-08-16 05:24:31 -050076 return l_suffix
77
George Keishingcf910442016-12-08 03:12:59 -060078AUTH_SUFFIX = {
79 "https_port": [get_port_https()],
George Keishingfbeaecc2016-08-16 05:24:31 -050080}
81
82# Update the ':Port number' to this variable
83AUTH_SUFFIX = AUTH_SUFFIX['https_port'][0]
Chris Austenb29d2e82016-06-07 12:25:35 -050084
85# Here contains a list of valid Properties bases on fru_type after a boot.
George Keishingcf910442016-12-08 03:12:59 -060086INVENTORY_ITEMS = {
Chris Austenb29d2e82016-06-07 12:25:35 -050087 "CPU": [
88 "Custom Field 1",
89 "Custom Field 2",
90 "Custom Field 3",
91 "Custom Field 4",
92 "Custom Field 5",
93 "Custom Field 6",
94 "Custom Field 7",
95 "Custom Field 8",
96 "FRU File ID",
97 "Manufacturer",
98 "Name",
99 "Part Number",
100 "Serial Number",
101 "fault",
102 "fru_type",
103 "is_fru",
104 "present",
105 "version",
106 ],
107
108 "DIMM": [
109 "Asset Tag",
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 "Model Number",
121 "Name",
122 "Serial Number",
123 "Version",
124 "fault",
125 "fru_type",
126 "is_fru",
127 "present",
128 "version",
129 ],
130 "MEMORY_BUFFER": [
131 "Custom Field 1",
132 "Custom Field 2",
133 "Custom Field 3",
134 "Custom Field 4",
135 "Custom Field 5",
136 "Custom Field 6",
137 "Custom Field 7",
138 "Custom Field 8",
139 "FRU File ID",
140 "Manufacturer",
141 "Name",
142 "Part Number",
143 "Serial Number",
144 "fault",
145 "fru_type",
146 "is_fru",
147 "present",
148 "version",
149 ],
150 "FAN": [
151 "fault",
152 "fru_type",
153 "is_fru",
154 "present",
155 "version",
156 ],
157 "DAUGHTER_CARD": [
158 "Custom Field 1",
159 "Custom Field 2",
160 "Custom Field 3",
161 "Custom Field 4",
162 "Custom Field 5",
163 "Custom Field 6",
164 "Custom Field 7",
165 "Custom Field 8",
166 "FRU File ID",
167 "Manufacturer",
168 "Name",
169 "Part Number",
170 "Serial Number",
171 "fault",
172 "fru_type",
173 "is_fru",
174 "present",
175 "version",
176 ],
177 "BMC": [
178 "fault",
179 "fru_type",
180 "is_fru",
181 "manufacturer",
182 "present",
183 "version",
184 ],
185 "MAIN_PLANAR": [
186 "Custom Field 1",
187 "Custom Field 2",
188 "Custom Field 3",
189 "Custom Field 4",
190 "Custom Field 5",
191 "Custom Field 6",
192 "Custom Field 7",
193 "Custom Field 8",
194 "Part Number",
195 "Serial Number",
196 "Type",
197 "fault",
198 "fru_type",
199 "is_fru",
200 "present",
201 "version",
202 ],
203 "SYSTEM": [
204 "Custom Field 1",
205 "Custom Field 2",
206 "Custom Field 3",
207 "Custom Field 4",
208 "Custom Field 5",
209 "Custom Field 6",
210 "Custom Field 7",
211 "Custom Field 8",
212 "FRU File ID",
213 "Manufacturer",
214 "Model Number",
215 "Name",
216 "Serial Number",
217 "Version",
218 "fault",
219 "fru_type",
220 "is_fru",
221 "present",
222 "version",
223 ],
224 "CORE": [
225 "fault",
226 "fru_type",
227 "is_fru",
228 "present",
229 "version",
230 ],
231}