blob: ab6ab985e1da04245b25a319d7dfc0f659595ddb [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 Keishingfbeaecc2016-08-16 05:24:31 -050046'''
47 QEMU HTTPS variable:
48
49 By default lib/resource.txt AUTH URI construct is as
50 ${AUTH_URI} https://${OPENBMC_HOST}${AUTH_SUFFIX}
51 ${AUTH_SUFFIX} is populated here by default EMPTY else
52 the port from the OS environment
53'''
George Keishingcf910442016-12-08 03:12:59 -060054
55
George Keishingfbeaecc2016-08-16 05:24:31 -050056def get_port_https():
57 # defaulted to empty string
58 l_suffix = ''
59 try:
60 l_https_port = os.getenv('HTTPS_PORT')
61 if l_https_port:
George Keishingcf910442016-12-08 03:12:59 -060062 l_suffix = ':' + l_https_port
George Keishingfbeaecc2016-08-16 05:24:31 -050063 except:
George Keishingcf910442016-12-08 03:12:59 -060064 print "Environment variable HTTPS_PORT not set,\
65 using default HTTPS port"
George Keishingfbeaecc2016-08-16 05:24:31 -050066 return l_suffix
67
George Keishingcf910442016-12-08 03:12:59 -060068AUTH_SUFFIX = {
69 "https_port": [get_port_https()],
George Keishingfbeaecc2016-08-16 05:24:31 -050070}
71
72# Update the ':Port number' to this variable
73AUTH_SUFFIX = AUTH_SUFFIX['https_port'][0]
Chris Austenb29d2e82016-06-07 12:25:35 -050074
75# Here contains a list of valid Properties bases on fru_type after a boot.
George Keishingcf910442016-12-08 03:12:59 -060076INVENTORY_ITEMS = {
Chris Austenb29d2e82016-06-07 12:25:35 -050077 "CPU": [
78 "Custom Field 1",
79 "Custom Field 2",
80 "Custom Field 3",
81 "Custom Field 4",
82 "Custom Field 5",
83 "Custom Field 6",
84 "Custom Field 7",
85 "Custom Field 8",
86 "FRU File ID",
87 "Manufacturer",
88 "Name",
89 "Part Number",
90 "Serial Number",
91 "fault",
92 "fru_type",
93 "is_fru",
94 "present",
95 "version",
96 ],
97
98 "DIMM": [
99 "Asset Tag",
100 "Custom Field 1",
101 "Custom Field 2",
102 "Custom Field 3",
103 "Custom Field 4",
104 "Custom Field 5",
105 "Custom Field 6",
106 "Custom Field 7",
107 "Custom Field 8",
108 "FRU File ID",
109 "Manufacturer",
110 "Model Number",
111 "Name",
112 "Serial Number",
113 "Version",
114 "fault",
115 "fru_type",
116 "is_fru",
117 "present",
118 "version",
119 ],
120 "MEMORY_BUFFER": [
121 "Custom Field 1",
122 "Custom Field 2",
123 "Custom Field 3",
124 "Custom Field 4",
125 "Custom Field 5",
126 "Custom Field 6",
127 "Custom Field 7",
128 "Custom Field 8",
129 "FRU File ID",
130 "Manufacturer",
131 "Name",
132 "Part Number",
133 "Serial Number",
134 "fault",
135 "fru_type",
136 "is_fru",
137 "present",
138 "version",
139 ],
140 "FAN": [
141 "fault",
142 "fru_type",
143 "is_fru",
144 "present",
145 "version",
146 ],
147 "DAUGHTER_CARD": [
148 "Custom Field 1",
149 "Custom Field 2",
150 "Custom Field 3",
151 "Custom Field 4",
152 "Custom Field 5",
153 "Custom Field 6",
154 "Custom Field 7",
155 "Custom Field 8",
156 "FRU File ID",
157 "Manufacturer",
158 "Name",
159 "Part Number",
160 "Serial Number",
161 "fault",
162 "fru_type",
163 "is_fru",
164 "present",
165 "version",
166 ],
167 "BMC": [
168 "fault",
169 "fru_type",
170 "is_fru",
171 "manufacturer",
172 "present",
173 "version",
174 ],
175 "MAIN_PLANAR": [
176 "Custom Field 1",
177 "Custom Field 2",
178 "Custom Field 3",
179 "Custom Field 4",
180 "Custom Field 5",
181 "Custom Field 6",
182 "Custom Field 7",
183 "Custom Field 8",
184 "Part Number",
185 "Serial Number",
186 "Type",
187 "fault",
188 "fru_type",
189 "is_fru",
190 "present",
191 "version",
192 ],
193 "SYSTEM": [
194 "Custom Field 1",
195 "Custom Field 2",
196 "Custom Field 3",
197 "Custom Field 4",
198 "Custom Field 5",
199 "Custom Field 6",
200 "Custom Field 7",
201 "Custom Field 8",
202 "FRU File ID",
203 "Manufacturer",
204 "Model Number",
205 "Name",
206 "Serial Number",
207 "Version",
208 "fault",
209 "fru_type",
210 "is_fru",
211 "present",
212 "version",
213 ],
214 "CORE": [
215 "fault",
216 "fru_type",
217 "is_fru",
218 "present",
219 "version",
220 ],
221}