blob: a597165b3dee820236cb8aa85bb123f827913b82 [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/'
George Keishingcf910442016-12-08 03:12:59 -060019
George Keishingbec365b2017-01-19 01:28:41 -060020# State Manager base variables.
Rahul Maheshwari2f8de6c2017-01-17 07:00:22 -060021BMC_REBOOT_TRANS = 'xyz.openbmc_project.State.BMC.Transition.Reboot'
22
George Keishingbec365b2017-01-19 01:28:41 -060023HOST_POWEROFF_TRANS = 'xyz.openbmc_project.State.Host.Transition.Off'
24HOST_POWERON_TRANS = 'xyz.openbmc_project.State.Host.Transition.On'
25HOST_POWEROFF_STATE = 'xyz.openbmc_project.State.Host.HostState.Off'
26HOST_POWERON_STATE = 'xyz.openbmc_project.State.Host.HostState.Running'
27
28CHASSIS_POWEROFF_TRANS = 'xyz.openbmc_project.State.Chassis.Transition.Off'
29CHASSIS_POWERON_TRANS = 'xyz.openbmc_project.State.Chassis.Transition.On'
30CHASSIS_POWEROFF_STATE = 'xyz.openbmc_project.State.Chassis.PowerState.Off'
31CHASSIS_POWERON_STATE = 'xyz.openbmc_project.State.Chassis.PowerState.On'
32
33# State Manager URI variables.
George Keishing3c332e02017-02-23 22:10:18 -060034BMC_STATE_URI = '/xyz/openbmc_project/state/bmc0/'
George Keishingbec365b2017-01-19 01:28:41 -060035HOST_STATE_URI = '/xyz/openbmc_project/state/host0/'
36CHASSIS_STATE_URI = '/xyz/openbmc_project/state/chassis0/'
37
George Keishing505d5b42017-02-21 11:01:54 -060038# Logging URI variables
George Keishinga71dd202017-02-24 00:49:40 -060039BMC_LOGGING_URI = '/xyz/openbmc_project/logging/'
40BMC_LOGGING_ENTRY = BMC_LOGGING_URI + 'entry/'
George Keishing505d5b42017-02-21 11:01:54 -060041
George Keishingab5157b2017-02-09 12:24:25 -060042# Software manager version
43SOFTWARE_VERSION_URI = '/xyz/openbmc_project/software/'
44ACTIVE = 'xyz.openbmc_project.Software.Activation.Activations.Active'
45
George Keishingc8166ed2017-02-24 03:53:38 -060046# Inventory URI
47HOST_INVENTORY_URI = '/xyz/openbmc_project/inventory/'
48
George Keishingfbeaecc2016-08-16 05:24:31 -050049'''
50 QEMU HTTPS variable:
51
52 By default lib/resource.txt AUTH URI construct is as
53 ${AUTH_URI} https://${OPENBMC_HOST}${AUTH_SUFFIX}
54 ${AUTH_SUFFIX} is populated here by default EMPTY else
55 the port from the OS environment
56'''
George Keishingcf910442016-12-08 03:12:59 -060057
58
George Keishingfbeaecc2016-08-16 05:24:31 -050059def get_port_https():
60 # defaulted to empty string
61 l_suffix = ''
62 try:
63 l_https_port = os.getenv('HTTPS_PORT')
64 if l_https_port:
George Keishingcf910442016-12-08 03:12:59 -060065 l_suffix = ':' + l_https_port
George Keishingfbeaecc2016-08-16 05:24:31 -050066 except:
George Keishingcf910442016-12-08 03:12:59 -060067 print "Environment variable HTTPS_PORT not set,\
68 using default HTTPS port"
George Keishingfbeaecc2016-08-16 05:24:31 -050069 return l_suffix
70
George Keishingcf910442016-12-08 03:12:59 -060071AUTH_SUFFIX = {
72 "https_port": [get_port_https()],
George Keishingfbeaecc2016-08-16 05:24:31 -050073}
74
75# Update the ':Port number' to this variable
76AUTH_SUFFIX = AUTH_SUFFIX['https_port'][0]
Chris Austenb29d2e82016-06-07 12:25:35 -050077
78# Here contains a list of valid Properties bases on fru_type after a boot.
George Keishingcf910442016-12-08 03:12:59 -060079INVENTORY_ITEMS = {
Chris Austenb29d2e82016-06-07 12:25:35 -050080 "CPU": [
81 "Custom Field 1",
82 "Custom Field 2",
83 "Custom Field 3",
84 "Custom Field 4",
85 "Custom Field 5",
86 "Custom Field 6",
87 "Custom Field 7",
88 "Custom Field 8",
89 "FRU File ID",
90 "Manufacturer",
91 "Name",
92 "Part Number",
93 "Serial Number",
94 "fault",
95 "fru_type",
96 "is_fru",
97 "present",
98 "version",
99 ],
100
101 "DIMM": [
102 "Asset Tag",
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 "Model Number",
114 "Name",
115 "Serial Number",
116 "Version",
117 "fault",
118 "fru_type",
119 "is_fru",
120 "present",
121 "version",
122 ],
123 "MEMORY_BUFFER": [
124 "Custom Field 1",
125 "Custom Field 2",
126 "Custom Field 3",
127 "Custom Field 4",
128 "Custom Field 5",
129 "Custom Field 6",
130 "Custom Field 7",
131 "Custom Field 8",
132 "FRU File ID",
133 "Manufacturer",
134 "Name",
135 "Part Number",
136 "Serial Number",
137 "fault",
138 "fru_type",
139 "is_fru",
140 "present",
141 "version",
142 ],
143 "FAN": [
144 "fault",
145 "fru_type",
146 "is_fru",
147 "present",
148 "version",
149 ],
150 "DAUGHTER_CARD": [
151 "Custom Field 1",
152 "Custom Field 2",
153 "Custom Field 3",
154 "Custom Field 4",
155 "Custom Field 5",
156 "Custom Field 6",
157 "Custom Field 7",
158 "Custom Field 8",
159 "FRU File ID",
160 "Manufacturer",
161 "Name",
162 "Part Number",
163 "Serial Number",
164 "fault",
165 "fru_type",
166 "is_fru",
167 "present",
168 "version",
169 ],
170 "BMC": [
171 "fault",
172 "fru_type",
173 "is_fru",
174 "manufacturer",
175 "present",
176 "version",
177 ],
178 "MAIN_PLANAR": [
179 "Custom Field 1",
180 "Custom Field 2",
181 "Custom Field 3",
182 "Custom Field 4",
183 "Custom Field 5",
184 "Custom Field 6",
185 "Custom Field 7",
186 "Custom Field 8",
187 "Part Number",
188 "Serial Number",
189 "Type",
190 "fault",
191 "fru_type",
192 "is_fru",
193 "present",
194 "version",
195 ],
196 "SYSTEM": [
197 "Custom Field 1",
198 "Custom Field 2",
199 "Custom Field 3",
200 "Custom Field 4",
201 "Custom Field 5",
202 "Custom Field 6",
203 "Custom Field 7",
204 "Custom Field 8",
205 "FRU File ID",
206 "Manufacturer",
207 "Model Number",
208 "Name",
209 "Serial Number",
210 "Version",
211 "fault",
212 "fru_type",
213 "is_fru",
214 "present",
215 "version",
216 ],
217 "CORE": [
218 "fault",
219 "fru_type",
220 "is_fru",
221 "present",
222 "version",
223 ],
224}