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