blob: 1146cabf31c416216770ba80d0a4916e2481cf74 [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/'
18
19
George Keishingfbeaecc2016-08-16 05:24:31 -050020'''
21 QEMU HTTPS variable:
22
23 By default lib/resource.txt AUTH URI construct is as
24 ${AUTH_URI} https://${OPENBMC_HOST}${AUTH_SUFFIX}
25 ${AUTH_SUFFIX} is populated here by default EMPTY else
26 the port from the OS environment
27'''
George Keishingcf910442016-12-08 03:12:59 -060028
29
George Keishingfbeaecc2016-08-16 05:24:31 -050030def get_port_https():
31 # defaulted to empty string
32 l_suffix = ''
33 try:
34 l_https_port = os.getenv('HTTPS_PORT')
35 if l_https_port:
George Keishingcf910442016-12-08 03:12:59 -060036 l_suffix = ':' + l_https_port
George Keishingfbeaecc2016-08-16 05:24:31 -050037 except:
George Keishingcf910442016-12-08 03:12:59 -060038 print "Environment variable HTTPS_PORT not set,\
39 using default HTTPS port"
George Keishingfbeaecc2016-08-16 05:24:31 -050040 return l_suffix
41
George Keishingcf910442016-12-08 03:12:59 -060042AUTH_SUFFIX = {
43 "https_port": [get_port_https()],
George Keishingfbeaecc2016-08-16 05:24:31 -050044}
45
46# Update the ':Port number' to this variable
47AUTH_SUFFIX = AUTH_SUFFIX['https_port'][0]
Chris Austenb29d2e82016-06-07 12:25:35 -050048
49# Here contains a list of valid Properties bases on fru_type after a boot.
George Keishingcf910442016-12-08 03:12:59 -060050INVENTORY_ITEMS = {
Chris Austenb29d2e82016-06-07 12:25:35 -050051 "CPU": [
52 "Custom Field 1",
53 "Custom Field 2",
54 "Custom Field 3",
55 "Custom Field 4",
56 "Custom Field 5",
57 "Custom Field 6",
58 "Custom Field 7",
59 "Custom Field 8",
60 "FRU File ID",
61 "Manufacturer",
62 "Name",
63 "Part Number",
64 "Serial Number",
65 "fault",
66 "fru_type",
67 "is_fru",
68 "present",
69 "version",
70 ],
71
72 "DIMM": [
73 "Asset Tag",
74 "Custom Field 1",
75 "Custom Field 2",
76 "Custom Field 3",
77 "Custom Field 4",
78 "Custom Field 5",
79 "Custom Field 6",
80 "Custom Field 7",
81 "Custom Field 8",
82 "FRU File ID",
83 "Manufacturer",
84 "Model Number",
85 "Name",
86 "Serial Number",
87 "Version",
88 "fault",
89 "fru_type",
90 "is_fru",
91 "present",
92 "version",
93 ],
94 "MEMORY_BUFFER": [
95 "Custom Field 1",
96 "Custom Field 2",
97 "Custom Field 3",
98 "Custom Field 4",
99 "Custom Field 5",
100 "Custom Field 6",
101 "Custom Field 7",
102 "Custom Field 8",
103 "FRU File ID",
104 "Manufacturer",
105 "Name",
106 "Part Number",
107 "Serial Number",
108 "fault",
109 "fru_type",
110 "is_fru",
111 "present",
112 "version",
113 ],
114 "FAN": [
115 "fault",
116 "fru_type",
117 "is_fru",
118 "present",
119 "version",
120 ],
121 "DAUGHTER_CARD": [
122 "Custom Field 1",
123 "Custom Field 2",
124 "Custom Field 3",
125 "Custom Field 4",
126 "Custom Field 5",
127 "Custom Field 6",
128 "Custom Field 7",
129 "Custom Field 8",
130 "FRU File ID",
131 "Manufacturer",
132 "Name",
133 "Part Number",
134 "Serial Number",
135 "fault",
136 "fru_type",
137 "is_fru",
138 "present",
139 "version",
140 ],
141 "BMC": [
142 "fault",
143 "fru_type",
144 "is_fru",
145 "manufacturer",
146 "present",
147 "version",
148 ],
149 "MAIN_PLANAR": [
150 "Custom Field 1",
151 "Custom Field 2",
152 "Custom Field 3",
153 "Custom Field 4",
154 "Custom Field 5",
155 "Custom Field 6",
156 "Custom Field 7",
157 "Custom Field 8",
158 "Part Number",
159 "Serial Number",
160 "Type",
161 "fault",
162 "fru_type",
163 "is_fru",
164 "present",
165 "version",
166 ],
167 "SYSTEM": [
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 "FRU File ID",
177 "Manufacturer",
178 "Model Number",
179 "Name",
180 "Serial Number",
181 "Version",
182 "fault",
183 "fru_type",
184 "is_fru",
185 "present",
186 "version",
187 ],
188 "CORE": [
189 "fault",
190 "fru_type",
191 "is_fru",
192 "present",
193 "version",
194 ],
195}