Commit 3d87544
committed
vpd-tool: User options for fixSystemVpd command
This commit implements user options for fixSystemVpd command, to fix
any mismatch found between source and destination keyword’s value.
User can select ‘use backup data’ as an option to update all system
backplane keyword’s value with backup keyword’s value or can select
‘use system backplane data’ to update all backup keyword’s value.
Output:
‘’’
User selecting Exit option:
root@p10bmc:/tmp# ./vpd-tool --fixSystemVPD
Enter 1 => If you choose the data on backup for all mismatching record-keyword pairs
Enter 2 => If you choose the data on primary for all mismatching record-keyword pairs
Enter 3 => If you wish to explore more options
Enter 0 => To exit successfully : 0
===============================================================================================================================================================================================
Exit successfully
User selecting option1, but there is no mismatch of keywords found in the system:
root@p10bmc:/tmp# ./vpd-tool --fixSystemVPD
Enter 1 => If you choose the data on backup for all mismatching record-keyword pairs
Enter 2 => If you choose the data on primary for all mismatching record-keyword pairs
Enter 3 => If you wish to explore more options
Enter 0 => To exit successfully : 1
===============================================================================================================================================================================================
No mismatch found for any of the above mentioned record-keyword pair. Exit successfully.
User selecting option2, but there is no mismatch of keywords found in the system:
root@p10bmc:/tmp# ./vpd-tool --fixSystemVPD
Enter 1 => If you choose the data on backup for all mismatching record-keyword pairs
Enter 2 => If you choose the data on primary for all mismatching record-keyword pairs
Enter 3 => If you wish to explore more options
Enter 0 => To exit successfully : 2
===============================================================================================================================================================================================
No mismatch found for any of the above mentioned record-keyword pair. Exit successfully.
User selecting non existing option:
root@p10bmc:/tmp# ./vpd-tool_option12 --fixSystemVPD
Enter 1 => If you choose the data on backup for all mismatching record-keyword pairs
Enter 2 => If you choose the data on primary for all mismatching record-keyword pairs
Enter 3 => If you wish to explore more options
Enter 0 => To exit successfully : 4
===============================================================================================================================================================================================
Provide a valid option. Retry.
Enter 1 => If you choose the data on backup for all mismatching record-keyword pairs
Enter 2 => If you choose the data on primary for all mismatching record-keyword pairs
Enter 3 => If you wish to explore more options
Enter 0 => To exit successfully :
User selecting option2, where system has mismatch keyword's value for VSYS BR keyword:
root@p10bmc:/tmp# vpd-tool -O /system/chassis/motherboard -R VSYS -K BR -r
{
"/system/chassis/motherboard": {
"BR": "12"
}
}
root@p10bmc:/tmp# vpd-tool -O /sys/bus/i2c/drivers/at24/8-0050/eeprom -R VSYS -K BR -r -H
{
"/sys/bus/i2c/drivers/at24/8-0050/eeprom": {
"BR": "S0"
}
}
root@p10bmc:/tmp# ./vpd-tool --fixSystemVPD
Enter 1 => If you choose the data on backup for all mismatching record-keyword pairs
Enter 2 => If you choose the data on primary for all mismatching record-keyword pairs
Enter 3 => If you wish to explore more options
Enter 0 => To exit successfully : 2
===============================================================================================================================================================================================
Data updated successfully
Data updated successfully for all mismatching record-keyword pairs by choosing their corresponding data from primary VPD. Exit successfully.
root@p10bmc:/tmp# vpd-tool -O /system/chassis/motherboard -R VSYS -K BR -r
{
"/system/chassis/motherboard": {
"BR": "S0"
}
}
root@p10bmc:/tmp# vpd-tool -O /sys/bus/i2c/drivers/at24/8-0050/eeprom -R VSYS -K BR -r -H
{
"/sys/bus/i2c/drivers/at24/8-0050/eeprom": {
"BR": "S0"
}
}
User selecting option1, where system has mismatch keyword's value for VSYS BR keyword:
root@p10bmc:/tmp# vpd-tool -O /system/chassis/motherboard -R VSYS -K BR -r
{
"/system/chassis/motherboard": {
"BR": "S0"
}
}
root@p10bmc:/tmp# vpd-tool -O /sys/bus/i2c/drivers/at24/8-0050/eeprom -R VSYS -K BR -r -H
{
"/sys/bus/i2c/drivers/at24/8-0050/eeprom": {
"BR": "12"
}
}
root@p10bmc:/tmp# ./vpd-tool --fixSystemVPD
Enter 1 => If you choose the data on backup for all mismatching record-keyword pairs
Enter 2 => If you choose the data on primary for all mismatching record-keyword pairs
Enter 3 => If you wish to explore more options
Enter 0 => To exit successfully : 1
===============================================================================================================================================================================================
Data updated successfully
Data updated successfully for all mismatching record-keyword pairs by choosing their corresponding data from backup. Exit successfully.
root@p10bmc:/tmp# vpd-tool -O /system/chassis/motherboard -R VSYS -K BR -r
{
"/system/chassis/motherboard": {
"BR": "S0"
}
}
root@p10bmc:/tmp# vpd-tool -O /sys/bus/i2c/drivers/at24/8-0050/eeprom -R VSYS -K BR -r -H
{
"/sys/bus/i2c/drivers/at24/8-0050/eeprom": {
"BR": "S0"
}
}
‘’’
Signed-off-by: Anupama B R <[email protected]>1 parent 720f4d0 commit 3d87544
2 files changed
+153
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
143 | 162 | | |
144 | 163 | | |
145 | 164 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
254 | 254 | | |
255 | 255 | | |
256 | 256 | | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
261 | 269 | | |
262 | | - | |
263 | | - | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
264 | 296 | | |
265 | 297 | | |
266 | 298 | | |
| |||
797 | 829 | | |
798 | 830 | | |
799 | 831 | | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
800 | 928 | | |
0 commit comments