1import os 2 3# 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/' 18TIME_MANAGER_URI = OPENBMC_BASE_URI + 'TimeManager/' 19 20# State Manager base variables. 21BMC_REBOOT_TRANS = 'xyz.openbmc_project.State.BMC.Transition.Reboot' 22 23HOST_POWEROFF_TRANS = 'xyz.openbmc_project.State.Host.Transition.Off' 24HOST_POWERON_TRANS = 'xyz.openbmc_project.State.Host.Transition.On' 25HOST_REBOOT_TRANS = 'xyz.openbmc_project.State.Host.Transition.Reboot' 26HOST_POWEROFF_STATE = 'xyz.openbmc_project.State.Host.HostState.Off' 27HOST_POWERON_STATE = 'xyz.openbmc_project.State.Host.HostState.Running' 28 29CHASSIS_POWEROFF_TRANS = 'xyz.openbmc_project.State.Chassis.Transition.Off' 30CHASSIS_POWERON_TRANS = 'xyz.openbmc_project.State.Chassis.Transition.On' 31CHASSIS_POWEROFF_STATE = 'xyz.openbmc_project.State.Chassis.PowerState.Off' 32CHASSIS_POWERON_STATE = 'xyz.openbmc_project.State.Chassis.PowerState.On' 33 34# State Manager URI variables. 35BMC_STATE_URI = '/xyz/openbmc_project/state/bmc0/' 36HOST_STATE_URI = '/xyz/openbmc_project/state/host0/' 37CHASSIS_STATE_URI = '/xyz/openbmc_project/state/chassis0/' 38 39# Logging URI variables 40BMC_LOGGING_URI = '/xyz/openbmc_project/logging/' 41BMC_LOGGING_ENTRY = BMC_LOGGING_URI + 'entry/' 42 43# Software manager version 44SOFTWARE_VERSION_URI = '/xyz/openbmc_project/software/' 45ACTIVE = 'xyz.openbmc_project.Software.Activation.Activations.Active' 46 47# Inventory URI 48HOST_INVENTORY_URI = '/xyz/openbmc_project/inventory/' 49 50# Led URI variable 51LED_GROUPS_URI = '/xyz/openbmc_project/led/groups/' 52LED_PHYSICAL_URI = '/xyz/openbmc_project/led/physical/' 53 54 55''' 56 QEMU HTTPS variable: 57 58 By default lib/resource.txt AUTH URI construct is as 59 ${AUTH_URI} https://${OPENBMC_HOST}${AUTH_SUFFIX} 60 ${AUTH_SUFFIX} is populated here by default EMPTY else 61 the port from the OS environment 62''' 63 64 65def get_port_https(): 66 # defaulted to empty string 67 l_suffix = '' 68 try: 69 l_https_port = os.getenv('HTTPS_PORT') 70 if l_https_port: 71 l_suffix = ':' + l_https_port 72 except: 73 print "Environment variable HTTPS_PORT not set,\ 74 using default HTTPS port" 75 return l_suffix 76 77AUTH_SUFFIX = { 78 "https_port": [get_port_https()], 79} 80 81# Update the ':Port number' to this variable 82AUTH_SUFFIX = AUTH_SUFFIX['https_port'][0] 83 84# Here contains a list of valid Properties bases on fru_type after a boot. 85INVENTORY_ITEMS = { 86 "CPU": [ 87 "Custom Field 1", 88 "Custom Field 2", 89 "Custom Field 3", 90 "Custom Field 4", 91 "Custom Field 5", 92 "Custom Field 6", 93 "Custom Field 7", 94 "Custom Field 8", 95 "FRU File ID", 96 "Manufacturer", 97 "Name", 98 "Part Number", 99 "Serial Number", 100 "fault", 101 "fru_type", 102 "is_fru", 103 "present", 104 "version", 105 ], 106 107 "DIMM": [ 108 "Asset Tag", 109 "Custom Field 1", 110 "Custom Field 2", 111 "Custom Field 3", 112 "Custom Field 4", 113 "Custom Field 5", 114 "Custom Field 6", 115 "Custom Field 7", 116 "Custom Field 8", 117 "FRU File ID", 118 "Manufacturer", 119 "Model Number", 120 "Name", 121 "Serial Number", 122 "Version", 123 "fault", 124 "fru_type", 125 "is_fru", 126 "present", 127 "version", 128 ], 129 "MEMORY_BUFFER": [ 130 "Custom Field 1", 131 "Custom Field 2", 132 "Custom Field 3", 133 "Custom Field 4", 134 "Custom Field 5", 135 "Custom Field 6", 136 "Custom Field 7", 137 "Custom Field 8", 138 "FRU File ID", 139 "Manufacturer", 140 "Name", 141 "Part Number", 142 "Serial Number", 143 "fault", 144 "fru_type", 145 "is_fru", 146 "present", 147 "version", 148 ], 149 "FAN": [ 150 "fault", 151 "fru_type", 152 "is_fru", 153 "present", 154 "version", 155 ], 156 "DAUGHTER_CARD": [ 157 "Custom Field 1", 158 "Custom Field 2", 159 "Custom Field 3", 160 "Custom Field 4", 161 "Custom Field 5", 162 "Custom Field 6", 163 "Custom Field 7", 164 "Custom Field 8", 165 "FRU File ID", 166 "Manufacturer", 167 "Name", 168 "Part Number", 169 "Serial Number", 170 "fault", 171 "fru_type", 172 "is_fru", 173 "present", 174 "version", 175 ], 176 "BMC": [ 177 "fault", 178 "fru_type", 179 "is_fru", 180 "manufacturer", 181 "present", 182 "version", 183 ], 184 "MAIN_PLANAR": [ 185 "Custom Field 1", 186 "Custom Field 2", 187 "Custom Field 3", 188 "Custom Field 4", 189 "Custom Field 5", 190 "Custom Field 6", 191 "Custom Field 7", 192 "Custom Field 8", 193 "Part Number", 194 "Serial Number", 195 "Type", 196 "fault", 197 "fru_type", 198 "is_fru", 199 "present", 200 "version", 201 ], 202 "SYSTEM": [ 203 "Custom Field 1", 204 "Custom Field 2", 205 "Custom Field 3", 206 "Custom Field 4", 207 "Custom Field 5", 208 "Custom Field 6", 209 "Custom Field 7", 210 "Custom Field 8", 211 "FRU File ID", 212 "Manufacturer", 213 "Model Number", 214 "Name", 215 "Serial Number", 216 "Version", 217 "fault", 218 "fru_type", 219 "is_fru", 220 "present", 221 "version", 222 ], 223 "CORE": [ 224 "fault", 225 "fru_type", 226 "is_fru", 227 "present", 228 "version", 229 ], 230} 231