George Keishing | fbeaecc | 2016-08-16 05:24:31 -0500 | [diff] [blame] | 1 | import os |
| 2 | |
| 3 | ''' |
| 4 | QEMU HTTPS variable: |
| 5 | |
| 6 | By default lib/resource.txt AUTH URI construct is as |
| 7 | ${AUTH_URI} https://${OPENBMC_HOST}${AUTH_SUFFIX} |
| 8 | ${AUTH_SUFFIX} is populated here by default EMPTY else |
| 9 | the port from the OS environment |
| 10 | ''' |
| 11 | def get_port_https(): |
| 12 | # defaulted to empty string |
| 13 | l_suffix = '' |
| 14 | try: |
| 15 | l_https_port = os.getenv('HTTPS_PORT') |
| 16 | if l_https_port: |
| 17 | l_suffix = ':' + l_https_port |
| 18 | except: |
| 19 | print "Environment variable HTTPS_PORT not set,using default HTTPS port" |
| 20 | return l_suffix |
| 21 | |
| 22 | AUTH_SUFFIX={ |
| 23 | "https_port":[get_port_https()], |
| 24 | } |
| 25 | |
| 26 | # Update the ':Port number' to this variable |
| 27 | AUTH_SUFFIX = AUTH_SUFFIX['https_port'][0] |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 28 | |
| 29 | # Here contains a list of valid Properties bases on fru_type after a boot. |
| 30 | INVENTORY_ITEMS={ |
| 31 | "CPU": [ |
| 32 | "Custom Field 1", |
| 33 | "Custom Field 2", |
| 34 | "Custom Field 3", |
| 35 | "Custom Field 4", |
| 36 | "Custom Field 5", |
| 37 | "Custom Field 6", |
| 38 | "Custom Field 7", |
| 39 | "Custom Field 8", |
| 40 | "FRU File ID", |
| 41 | "Manufacturer", |
| 42 | "Name", |
| 43 | "Part Number", |
| 44 | "Serial Number", |
| 45 | "fault", |
| 46 | "fru_type", |
| 47 | "is_fru", |
| 48 | "present", |
| 49 | "version", |
| 50 | ], |
| 51 | |
| 52 | "DIMM": [ |
| 53 | "Asset Tag", |
| 54 | "Custom Field 1", |
| 55 | "Custom Field 2", |
| 56 | "Custom Field 3", |
| 57 | "Custom Field 4", |
| 58 | "Custom Field 5", |
| 59 | "Custom Field 6", |
| 60 | "Custom Field 7", |
| 61 | "Custom Field 8", |
| 62 | "FRU File ID", |
| 63 | "Manufacturer", |
| 64 | "Model Number", |
| 65 | "Name", |
| 66 | "Serial Number", |
| 67 | "Version", |
| 68 | "fault", |
| 69 | "fru_type", |
| 70 | "is_fru", |
| 71 | "present", |
| 72 | "version", |
| 73 | ], |
| 74 | "MEMORY_BUFFER": [ |
| 75 | "Custom Field 1", |
| 76 | "Custom Field 2", |
| 77 | "Custom Field 3", |
| 78 | "Custom Field 4", |
| 79 | "Custom Field 5", |
| 80 | "Custom Field 6", |
| 81 | "Custom Field 7", |
| 82 | "Custom Field 8", |
| 83 | "FRU File ID", |
| 84 | "Manufacturer", |
| 85 | "Name", |
| 86 | "Part Number", |
| 87 | "Serial Number", |
| 88 | "fault", |
| 89 | "fru_type", |
| 90 | "is_fru", |
| 91 | "present", |
| 92 | "version", |
| 93 | ], |
| 94 | "FAN": [ |
| 95 | "fault", |
| 96 | "fru_type", |
| 97 | "is_fru", |
| 98 | "present", |
| 99 | "version", |
| 100 | ], |
| 101 | "DAUGHTER_CARD": [ |
| 102 | "Custom Field 1", |
| 103 | "Custom Field 2", |
| 104 | "Custom Field 3", |
| 105 | "Custom Field 4", |
| 106 | "Custom Field 5", |
| 107 | "Custom Field 6", |
| 108 | "Custom Field 7", |
| 109 | "Custom Field 8", |
| 110 | "FRU File ID", |
| 111 | "Manufacturer", |
| 112 | "Name", |
| 113 | "Part Number", |
| 114 | "Serial Number", |
| 115 | "fault", |
| 116 | "fru_type", |
| 117 | "is_fru", |
| 118 | "present", |
| 119 | "version", |
| 120 | ], |
| 121 | "BMC": [ |
| 122 | "fault", |
| 123 | "fru_type", |
| 124 | "is_fru", |
| 125 | "manufacturer", |
| 126 | "present", |
| 127 | "version", |
| 128 | ], |
| 129 | "MAIN_PLANAR": [ |
| 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 | "Part Number", |
| 139 | "Serial Number", |
| 140 | "Type", |
| 141 | "fault", |
| 142 | "fru_type", |
| 143 | "is_fru", |
| 144 | "present", |
| 145 | "version", |
| 146 | ], |
| 147 | "SYSTEM": [ |
| 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 | "Model Number", |
| 159 | "Name", |
| 160 | "Serial Number", |
| 161 | "Version", |
| 162 | "fault", |
| 163 | "fru_type", |
| 164 | "is_fru", |
| 165 | "present", |
| 166 | "version", |
| 167 | ], |
| 168 | "CORE": [ |
| 169 | "fault", |
| 170 | "fru_type", |
| 171 | "is_fru", |
| 172 | "present", |
| 173 | "version", |
| 174 | ], |
| 175 | } |