Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement vpd-tool object dump #512

Draft
wants to merge 2 commits into
base: 1110
Choose a base branch
from

Conversation

souvik1914581
Copy link

This commit implements object dump functionality in vpd-tool.
For a given Object path, the object dump functionality prints the
following properties in a JSON format to the console:
1. Present property, Pretty Name, Location Code, Sub Model
2. SN, PN, CC, FN, DR keywords under VINI record

Test:
Tested on a rainier2s2u system
root@p10bmc:~# ./vpd-tool -o -O \
/xyz/openbmc_project/inventory/system/chassis/motherboard
[
    {
        "/xyz/openbmc_project/inventory/system/chassis/motherboard": {
            "CC": "2E2D",
            "DR": "SYSTEM BACKPLANE",
            "FN": "02WG676",
            "LocationCode": "U78DA.ND0.WZS0042-P0",
            "PN": "02WG678",
            "Present": "true",
            "PrettyName": "System backplane",
            "SN": "Y131UF07302T"
        }
    }
]

root@p10bmc:~# ./vpd-tool -o -O \
/xyz/openbmc_project/inventory/system/chassis/motherboard/vdd_vrm0
[
    {
        "/xyz/openbmc_project/inventory/
        system/chassis/motherboard/vdd_vrm0": {
            "CC": "2E32",
            "DR": "CPU POWER CARD  ",
            "FN": "02CM285",
            "LocationCode": "U78DA.ND0.WZS0042-P0-C14",
            "PN": "02CM286",
            "Present": "true",
            "PrettyName": "Voltage regulator module for
                system processor module 0",
            "SN": "YH30A005M11C"
        }
    }
]

root@rain104bmctest:# ./vpd-tool -o -O "InvalidObjectPath"
root@rain104bmctest:# echo $?
255

Note: This commit does not include changes to add "type" and "TYPE" properties to the object dump. These will be added when inventory json is parsed by vpd-tool.

Screenshots below show old vpd-tool --dumpObject output vs. new vpd-tool --dumpObject output:

Screenshot 2024-11-20 at 11 37 07 PM Screenshot 2024-11-20 at 11 38 46 PM

@souvik1914581 souvik1914581 marked this pull request as draft December 2, 2024 06:43
souvik1914581 pushed a commit to souvik1914581/openpower-vpd-parser that referenced this pull request Dec 2, 2024
This commit implements object dump functionality in vpd-tool.
For a given Object path, the object dump functionality prints the
following properties in a JSON format to the console:
1. Present property, Pretty Name, Location Code, Sub Model
2. SN, PN, CC, FN, DR keywords under VINI record

Test:
Tested on a rainier2s2u system
'''
root@p10bmc:~# ./vpd-tool -o -O \
/xyz/openbmc_project/inventory/system/chassis/motherboard
[
    {
        "/xyz/openbmc_project/inventory/system/chassis/motherboard": {
            "CC": "2E2D",
            "DR": "SYSTEM BACKPLANE",
            "FN": "02WG676",
            "LocationCode": "U78DA.ND0.WZS0042-P0",
            "PN": "02WG678",
            "Present": "true",
            "PrettyName": "System backplane",
            "SN": "Y131UF07302T"
        }
    }
]

root@p10bmc:~# ./vpd-tool -o -O \
/xyz/openbmc_project/inventory/system/chassis/motherboard/vdd_vrm0
[
    {
        "/xyz/openbmc_project/inventory/
	system/chassis/motherboard/vdd_vrm0": {
            "CC": "2E32",
            "DR": "CPU POWER CARD  ",
            "FN": "02CM285",
            "LocationCode": "U78DA.ND0.WZS0042-P0-C14",
            "PN": "02CM286",
            "Present": "true",
            "PrettyName": "Voltage regulator module for
		system processor module 0",
            "SN": "YH30A005M11C"
        }
    }
]

root@rain104bmctest:~# ./vpd-tool -o -O "InvalidObjectPath"
root@rain104bmctest:~# echo $?
255

'''

Change-Id: I4b44bdb03429f7f3341ca0c79317d616f1de3a4f
Signed-off-by: Souvik Roy <[email protected]>
@souvik1914581 souvik1914581 force-pushed the sr_vpdToolDumpObjectPR branch from 28fc79c to f4dcbcf Compare December 2, 2024 06:45
souvik1914581 pushed a commit to souvik1914581/openpower-vpd-parser that referenced this pull request Dec 2, 2024
This commit implements object dump functionality in vpd-tool.
For a given Object path, the object dump functionality prints the
following properties in a JSON format to the console:
1. Present property, Pretty Name, Location Code, Sub Model
2. SN, PN, CC, FN, DR keywords under VINI record

Test:
Tested on a rainier2s2u system
'''
root@p10bmc:~# ./vpd-tool -o -O \
/xyz/openbmc_project/inventory/system/chassis/motherboard
[
    {
        "/xyz/openbmc_project/inventory/system/chassis/motherboard": {
            "CC": "2E2D",
            "DR": "SYSTEM BACKPLANE",
            "FN": "02WG676",
            "LocationCode": "U78DA.ND0.WZS0042-P0",
            "PN": "02WG678",
            "Present": "true",
            "PrettyName": "System backplane",
            "SN": "Y131UF07302T"
        }
    }
]

root@p10bmc:~# ./vpd-tool -o -O \
/xyz/openbmc_project/inventory/system/chassis/motherboard/vdd_vrm0
[
    {
        "/xyz/openbmc_project/inventory/
	system/chassis/motherboard/vdd_vrm0": {
            "CC": "2E32",
            "DR": "CPU POWER CARD  ",
            "FN": "02CM285",
            "LocationCode": "U78DA.ND0.WZS0042-P0-C14",
            "PN": "02CM286",
            "Present": "true",
            "PrettyName": "Voltage regulator module for
		system processor module 0",
            "SN": "YH30A005M11C"
        }
    }
]

root@rain104bmctest:~# ./vpd-tool -o -O "InvalidObjectPath"
root@rain104bmctest:~# echo $?
255

'''

Change-Id: I4b44bdb03429f7f3341ca0c79317d616f1de3a4f
Signed-off-by: Souvik Roy <[email protected]>
@souvik1914581 souvik1914581 force-pushed the sr_vpdToolDumpObjectPR branch from f4dcbcf to 8820139 Compare December 2, 2024 16:02
souvik1914581 pushed a commit to souvik1914581/openpower-vpd-parser that referenced this pull request Dec 2, 2024
This commit implements object dump functionality in vpd-tool.
For a given Object path, the object dump functionality prints the
following properties in a JSON format to the console:
1. Present property, Pretty Name, Location Code, Sub Model
2. SN, PN, CC, FN, DR keywords under VINI record

Test:
Tested on a rainier2s2u system
'''
root@p10bmc:~# ./vpd-tool -o -O \
/xyz/openbmc_project/inventory/system/chassis/motherboard
[
    {
        "/xyz/openbmc_project/inventory/system/chassis/motherboard": {
            "CC": "2E2D",
            "DR": "SYSTEM BACKPLANE",
            "FN": "02WG676",
            "LocationCode": "U78DA.ND0.WZS0042-P0",
            "PN": "02WG678",
            "Present": "true",
            "PrettyName": "System backplane",
            "SN": "Y131UF07302T"
        }
    }
]

root@p10bmc:~# ./vpd-tool -o -O \
/xyz/openbmc_project/inventory/system/chassis/motherboard/vdd_vrm0
[
    {
        "/xyz/openbmc_project/inventory/
	system/chassis/motherboard/vdd_vrm0": {
            "CC": "2E32",
            "DR": "CPU POWER CARD  ",
            "FN": "02CM285",
            "LocationCode": "U78DA.ND0.WZS0042-P0-C14",
            "PN": "02CM286",
            "Present": "true",
            "PrettyName": "Voltage regulator module for
		system processor module 0",
            "SN": "YH30A005M11C"
        }
    }
]

root@rain104bmctest:~# ./vpd-tool -o -O "InvalidObjectPath"
root@rain104bmctest:~# echo $?
255

'''

Change-Id: I4b44bdb03429f7f3341ca0c79317d616f1de3a4f
Signed-off-by: Souvik Roy <[email protected]>
@souvik1914581 souvik1914581 force-pushed the sr_vpdToolDumpObjectPR branch from 8820139 to dc19839 Compare December 2, 2024 16:06
souvik1914581 pushed a commit to souvik1914581/openpower-vpd-parser that referenced this pull request Dec 5, 2024
This commit implements object dump functionality in vpd-tool.
For a given Object path, the object dump functionality prints the
following properties in a JSON format to the console:
1. Present property, Pretty Name, Location Code, Sub Model
2. SN, PN, CC, FN, DR keywords under VINI record

Test:
Tested on a rainier2s2u system
'''
root@p10bmc:~# ./vpd-tool -o -O \
/xyz/openbmc_project/inventory/system/chassis/motherboard
[
    {
        "/xyz/openbmc_project/inventory/system/chassis/motherboard": {
            "CC": "2E2D",
            "DR": "SYSTEM BACKPLANE",
            "FN": "02WG676",
            "LocationCode": "U78DA.ND0.WZS0042-P0",
            "PN": "02WG678",
            "Present": "true",
            "PrettyName": "System backplane",
            "SN": "Y131UF07302T"
        }
    }
]

root@p10bmc:~# ./vpd-tool -o -O \
/xyz/openbmc_project/inventory/system/chassis/motherboard/vdd_vrm0
[
    {
        "/xyz/openbmc_project/inventory/
	system/chassis/motherboard/vdd_vrm0": {
            "CC": "2E32",
            "DR": "CPU POWER CARD  ",
            "FN": "02CM285",
            "LocationCode": "U78DA.ND0.WZS0042-P0-C14",
            "PN": "02CM286",
            "Present": "true",
            "PrettyName": "Voltage regulator module for
		system processor module 0",
            "SN": "YH30A005M11C"
        }
    }
]

root@rain104bmctest:~# ./vpd-tool -o -O "InvalidObjectPath"
root@rain104bmctest:~# echo $?
255

'''

Change-Id: I4b44bdb03429f7f3341ca0c79317d616f1de3a4f
Signed-off-by: Souvik Roy <[email protected]>
@souvik1914581 souvik1914581 force-pushed the sr_vpdToolDumpObjectPR branch from dc19839 to 33598b7 Compare December 5, 2024 07:11
souvik1914581 pushed a commit to souvik1914581/openpower-vpd-parser that referenced this pull request Dec 6, 2024
This commit implements object dump functionality in vpd-tool.
For a given Object path, the object dump functionality prints the
following properties in a JSON format to the console:
1. Present property, Pretty Name, Location Code, Sub Model
2. SN, PN, CC, FN, DR keywords under VINI record

Test:
Tested on a rainier2s2u system
'''
root@p10bmc:~# ./vpd-tool -o -O \
/xyz/openbmc_project/inventory/system/chassis/motherboard
[
    {
        "/xyz/openbmc_project/inventory/system/chassis/motherboard": {
            "CC": "2E2D",
            "DR": "SYSTEM BACKPLANE",
            "FN": "02WG676",
            "LocationCode": "U78DA.ND0.WZS0042-P0",
            "PN": "02WG678",
            "Present": "true",
            "PrettyName": "System backplane",
            "SN": "Y131UF07302T"
        }
    }
]

root@p10bmc:~# ./vpd-tool -o -O \
/xyz/openbmc_project/inventory/system/chassis/motherboard/vdd_vrm0
[
    {
        "/xyz/openbmc_project/inventory/
	system/chassis/motherboard/vdd_vrm0": {
            "CC": "2E32",
            "DR": "CPU POWER CARD  ",
            "FN": "02CM285",
            "LocationCode": "U78DA.ND0.WZS0042-P0-C14",
            "PN": "02CM286",
            "Present": "true",
            "PrettyName": "Voltage regulator module for
		system processor module 0",
            "SN": "YH30A005M11C"
        }
    }
]

root@rain104bmctest:~# ./vpd-tool -o -O "InvalidObjectPath"
root@rain104bmctest:~# echo $?
255

'''

Change-Id: I4b44bdb03429f7f3341ca0c79317d616f1de3a4f
Signed-off-by: Souvik Roy <[email protected]>
@souvik1914581 souvik1914581 force-pushed the sr_vpdToolDumpObjectPR branch from 33598b7 to f587ebb Compare December 6, 2024 04:30
souvik1914581 pushed a commit to souvik1914581/openpower-vpd-parser that referenced this pull request Dec 6, 2024
This commit implements object dump functionality in vpd-tool.
For a given Object path, the object dump functionality prints the
following properties in a JSON format to the console:
1. Present property, Pretty Name, Location Code, Sub Model
2. SN, PN, CC, FN, DR keywords under VINI record

Test:
Tested on a rainier2s2u system
'''
root@p10bmc:~# ./vpd-tool -o -O \
/xyz/openbmc_project/inventory/system/chassis/motherboard
[
    {
        "/xyz/openbmc_project/inventory/system/chassis/motherboard": {
            "CC": "2E2D",
            "DR": "SYSTEM BACKPLANE",
            "FN": "02WG676",
            "LocationCode": "U78DA.ND0.WZS0042-P0",
            "PN": "02WG678",
            "Present": "true",
            "PrettyName": "System backplane",
            "SN": "Y131UF07302T"
        }
    }
]

root@p10bmc:~# ./vpd-tool -o -O \
/xyz/openbmc_project/inventory/system/chassis/motherboard/vdd_vrm0
[
    {
        "/xyz/openbmc_project/inventory/
	system/chassis/motherboard/vdd_vrm0": {
            "CC": "2E32",
            "DR": "CPU POWER CARD  ",
            "FN": "02CM285",
            "LocationCode": "U78DA.ND0.WZS0042-P0-C14",
            "PN": "02CM286",
            "Present": "true",
            "PrettyName": "Voltage regulator module for
		system processor module 0",
            "SN": "YH30A005M11C"
        }
    }
]

root@rain104bmctest:~# ./vpd-tool -o -O "InvalidObjectPath"
root@rain104bmctest:~# echo $?
255

'''

Change-Id: I4b44bdb03429f7f3341ca0c79317d616f1de3a4f
Signed-off-by: Souvik Roy <[email protected]>
@souvik1914581 souvik1914581 force-pushed the sr_vpdToolDumpObjectPR branch 2 times, most recently from e08c439 to 2512302 Compare December 6, 2024 06:50
souvik1914581 pushed a commit to souvik1914581/openpower-vpd-parser that referenced this pull request Dec 6, 2024
This commit implements object dump functionality in vpd-tool.
For a given Object path, the object dump functionality prints the
following properties in a JSON format to the console:
1. Present property, Pretty Name, Location Code, Sub Model
2. SN, PN, CC, FN, DR keywords under VINI record

Test:
Tested on a rainier2s2u system
'''
root@p10bmc:~# ./vpd-tool -o -O \
/xyz/openbmc_project/inventory/system/chassis/motherboard
[
    {
        "/xyz/openbmc_project/inventory/system/chassis/motherboard": {
            "CC": "2E2D",
            "DR": "SYSTEM BACKPLANE",
            "FN": "02WG676",
            "LocationCode": "U78DA.ND0.WZS0042-P0",
            "PN": "02WG678",
            "Present": "true",
            "PrettyName": "System backplane",
            "SN": "Y131UF07302T"
        }
    }
]

root@p10bmc:~# ./vpd-tool -o -O \
/xyz/openbmc_project/inventory/system/chassis/motherboard/vdd_vrm0
[
    {
        "/xyz/openbmc_project/inventory/
	system/chassis/motherboard/vdd_vrm0": {
            "CC": "2E32",
            "DR": "CPU POWER CARD  ",
            "FN": "02CM285",
            "LocationCode": "U78DA.ND0.WZS0042-P0-C14",
            "PN": "02CM286",
            "Present": "true",
            "PrettyName": "Voltage regulator module for
		system processor module 0",
            "SN": "YH30A005M11C"
        }
    }
]

root@rain104bmctest:~# ./vpd-tool -o -O "InvalidObjectPath"
root@rain104bmctest:~# echo $?
255

'''

Change-Id: I4b44bdb03429f7f3341ca0c79317d616f1de3a4f
Signed-off-by: Souvik Roy <[email protected]>
souvik1914581 pushed a commit to souvik1914581/openpower-vpd-parser that referenced this pull request Dec 6, 2024
This commit implements object dump functionality in vpd-tool.
For a given Object path, the object dump functionality prints the
following properties in a JSON format to the console:
1. Present property, Pretty Name, Location Code, Sub Model
2. SN, PN, CC, FN, DR keywords under VINI record

Test:
Tested on a rainier2s2u system
'''
root@p10bmc:~# ./vpd-tool -o -O \
/xyz/openbmc_project/inventory/system/chassis/motherboard
[
    {
        "/xyz/openbmc_project/inventory/system/chassis/motherboard": {
            "CC": "2E2D",
            "DR": "SYSTEM BACKPLANE",
            "FN": "02WG676",
            "LocationCode": "U78DA.ND0.WZS0042-P0",
            "PN": "02WG678",
            "Present": "true",
            "PrettyName": "System backplane",
            "SN": "Y131UF07302T"
        }
    }
]

root@p10bmc:~# ./vpd-tool -o -O \
/xyz/openbmc_project/inventory/system/chassis/motherboard/vdd_vrm0
[
    {
        "/xyz/openbmc_project/inventory/
	system/chassis/motherboard/vdd_vrm0": {
            "CC": "2E32",
            "DR": "CPU POWER CARD  ",
            "FN": "02CM285",
            "LocationCode": "U78DA.ND0.WZS0042-P0-C14",
            "PN": "02CM286",
            "Present": "true",
            "PrettyName": "Voltage regulator module for
		system processor module 0",
            "SN": "YH30A005M11C"
        }
    }
]

root@rain104bmctest:~# ./vpd-tool -o -O "InvalidObjectPath"
root@rain104bmctest:~# echo $?
255

'''

Change-Id: I4b44bdb03429f7f3341ca0c79317d616f1de3a4f
Signed-off-by: Souvik Roy <[email protected]>
@souvik1914581 souvik1914581 force-pushed the sr_vpdToolDumpObjectPR branch from 2512302 to 4aa262e Compare December 6, 2024 09:31
souvik1914581 pushed a commit to souvik1914581/openpower-vpd-parser that referenced this pull request Dec 6, 2024
This commit implements object dump functionality in vpd-tool.
For a given Object path, the object dump functionality prints the
following properties in a JSON format to the console:
1. Present property, Pretty Name, Location Code, Sub Model
2. SN, PN, CC, FN, DR keywords under VINI record

Test:
Tested on a rainier2s2u system
'''
root@p10bmc:~# ./vpd-tool -o -O \
/xyz/openbmc_project/inventory/system/chassis/motherboard
[
    {
        "/xyz/openbmc_project/inventory/system/chassis/motherboard": {
            "CC": "2E2D",
            "DR": "SYSTEM BACKPLANE",
            "FN": "02WG676",
            "LocationCode": "U78DA.ND0.WZS0042-P0",
            "PN": "02WG678",
            "Present": "true",
            "PrettyName": "System backplane",
            "SN": "Y131UF07302T"
        }
    }
]

root@p10bmc:~# ./vpd-tool -o -O \
/xyz/openbmc_project/inventory/system/chassis/motherboard/vdd_vrm0
[
    {
        "/xyz/openbmc_project/inventory/
	system/chassis/motherboard/vdd_vrm0": {
            "CC": "2E32",
            "DR": "CPU POWER CARD  ",
            "FN": "02CM285",
            "LocationCode": "U78DA.ND0.WZS0042-P0-C14",
            "PN": "02CM286",
            "Present": "true",
            "PrettyName": "Voltage regulator module for
		system processor module 0",
            "SN": "YH30A005M11C"
        }
    }
]

root@rain104bmctest:~# ./vpd-tool -o -O "InvalidObjectPath"
root@rain104bmctest:~# echo $?
255

'''

Change-Id: I4b44bdb03429f7f3341ca0c79317d616f1de3a4f
Signed-off-by: Souvik Roy <[email protected]>
@souvik1914581 souvik1914581 force-pushed the sr_vpdToolDumpObjectPR branch from 4aa262e to 8333809 Compare December 6, 2024 09:42
souvik1914581 pushed a commit to souvik1914581/openpower-vpd-parser that referenced this pull request Dec 6, 2024
This commit implements object dump functionality in vpd-tool.
For a given Object path, the object dump functionality prints the
following properties in a JSON format to the console:
1. Present property, Pretty Name, Location Code, Sub Model
2. SN, PN, CC, FN, DR keywords under VINI record

Test:
Tested on a rainier2s2u system
'''
root@p10bmc:~# ./vpd-tool -o -O \
/xyz/openbmc_project/inventory/system/chassis/motherboard
[
    {
        "/xyz/openbmc_project/inventory/system/chassis/motherboard": {
            "CC": "2E2D",
            "DR": "SYSTEM BACKPLANE",
            "FN": "02WG676",
            "LocationCode": "U78DA.ND0.WZS0042-P0",
            "PN": "02WG678",
            "Present": "true",
            "PrettyName": "System backplane",
            "SN": "Y131UF07302T"
        }
    }
]

root@p10bmc:~# ./vpd-tool -o -O \
/xyz/openbmc_project/inventory/system/chassis/motherboard/vdd_vrm0
[
    {
        "/xyz/openbmc_project/inventory/
	system/chassis/motherboard/vdd_vrm0": {
            "CC": "2E32",
            "DR": "CPU POWER CARD  ",
            "FN": "02CM285",
            "LocationCode": "U78DA.ND0.WZS0042-P0-C14",
            "PN": "02CM286",
            "Present": "true",
            "PrettyName": "Voltage regulator module for
		system processor module 0",
            "SN": "YH30A005M11C"
        }
    }
]

root@rain104bmctest:~# ./vpd-tool -o -O "InvalidObjectPath"
root@rain104bmctest:~# echo $?
255

'''

Change-Id: I4b44bdb03429f7f3341ca0c79317d616f1de3a4f
Signed-off-by: Souvik Roy <[email protected]>
@souvik1914581 souvik1914581 force-pushed the sr_vpdToolDumpObjectPR branch from 8333809 to 9a252eb Compare December 6, 2024 09:50
souvik1914581 pushed a commit to souvik1914581/openpower-vpd-parser that referenced this pull request Dec 6, 2024
This commit implements object dump functionality in vpd-tool.
For a given Object path, the object dump functionality prints the
following properties in a JSON format to the console:
1. Present property, Pretty Name, Location Code, Sub Model
2. SN, PN, CC, FN, DR keywords under VINI record

Test:
Tested on a rainier2s2u system
'''
root@p10bmc:~# ./vpd-tool -o -O \
/xyz/openbmc_project/inventory/system/chassis/motherboard
[
    {
        "/xyz/openbmc_project/inventory/system/chassis/motherboard": {
            "CC": "2E2D",
            "DR": "SYSTEM BACKPLANE",
            "FN": "02WG676",
            "LocationCode": "U78DA.ND0.WZS0042-P0",
            "PN": "02WG678",
            "Present": "true",
            "PrettyName": "System backplane",
            "SN": "Y131UF07302T"
        }
    }
]

root@p10bmc:~# ./vpd-tool -o -O \
/xyz/openbmc_project/inventory/system/chassis/motherboard/vdd_vrm0
[
    {
        "/xyz/openbmc_project/inventory/
	system/chassis/motherboard/vdd_vrm0": {
            "CC": "2E32",
            "DR": "CPU POWER CARD  ",
            "FN": "02CM285",
            "LocationCode": "U78DA.ND0.WZS0042-P0-C14",
            "PN": "02CM286",
            "Present": "true",
            "PrettyName": "Voltage regulator module for
		system processor module 0",
            "SN": "YH30A005M11C"
        }
    }
]

root@rain104bmctest:~# ./vpd-tool -o -O "InvalidObjectPath"
root@rain104bmctest:~# echo $?
255

'''

Change-Id: I4b44bdb03429f7f3341ca0c79317d616f1de3a4f
Signed-off-by: Souvik Roy <[email protected]>
@souvik1914581 souvik1914581 force-pushed the sr_vpdToolDumpObjectPR branch from 9a252eb to 6231fc3 Compare December 6, 2024 10:12
souvik1914581 pushed a commit to souvik1914581/openpower-vpd-parser that referenced this pull request Dec 6, 2024
This commit implements object dump functionality in vpd-tool.
For a given Object path, the object dump functionality prints the
following properties in a JSON format to the console:
1. Present property, Pretty Name, Location Code, Sub Model
2. SN, PN, CC, FN, DR keywords under VINI record

Test:
Tested on a rainier2s2u system
'''
root@p10bmc:~# ./vpd-tool -o -O \
/xyz/openbmc_project/inventory/system/chassis/motherboard
[
    {
        "/xyz/openbmc_project/inventory/system/chassis/motherboard": {
            "CC": "2E2D",
            "DR": "SYSTEM BACKPLANE",
            "FN": "02WG676",
            "LocationCode": "U78DA.ND0.WZS0042-P0",
            "PN": "02WG678",
            "Present": "true",
            "PrettyName": "System backplane",
            "SN": "Y131UF07302T"
        }
    }
]

root@p10bmc:~# ./vpd-tool -o -O \
/xyz/openbmc_project/inventory/system/chassis/motherboard/vdd_vrm0
[
    {
        "/xyz/openbmc_project/inventory/
	system/chassis/motherboard/vdd_vrm0": {
            "CC": "2E32",
            "DR": "CPU POWER CARD  ",
            "FN": "02CM285",
            "LocationCode": "U78DA.ND0.WZS0042-P0-C14",
            "PN": "02CM286",
            "Present": "true",
            "PrettyName": "Voltage regulator module for
		system processor module 0",
            "SN": "YH30A005M11C"
        }
    }
]

root@rain104bmctest:~# ./vpd-tool -o -O "InvalidObjectPath"
root@rain104bmctest:~# echo $?
255

'''

Change-Id: I4b44bdb03429f7f3341ca0c79317d616f1de3a4f
Signed-off-by: Souvik Roy <[email protected]>
@souvik1914581 souvik1914581 force-pushed the sr_vpdToolDumpObjectPR branch from 6231fc3 to 2e8e1b0 Compare December 6, 2024 10:15
souvik1914581 pushed a commit to souvik1914581/openpower-vpd-parser that referenced this pull request Dec 6, 2024
This commit implements object dump functionality in vpd-tool.
For a given Object path, the object dump functionality prints the
following properties in a JSON format to the console:
1. Present property, Pretty Name, Location Code, Sub Model
2. SN, PN, CC, FN, DR keywords under VINI record

Test:
Tested on a rainier2s2u system
'''
root@p10bmc:~# ./vpd-tool -o -O \
/xyz/openbmc_project/inventory/system/chassis/motherboard
[
    {
        "/xyz/openbmc_project/inventory/system/chassis/motherboard": {
            "CC": "2E2D",
            "DR": "SYSTEM BACKPLANE",
            "FN": "02WG676",
            "LocationCode": "U78DA.ND0.WZS0042-P0",
            "PN": "02WG678",
            "Present": "true",
            "PrettyName": "System backplane",
            "SN": "Y131UF07302T"
        }
    }
]

root@p10bmc:~# ./vpd-tool -o -O \
/xyz/openbmc_project/inventory/system/chassis/motherboard/vdd_vrm0
[
    {
        "/xyz/openbmc_project/inventory/
	system/chassis/motherboard/vdd_vrm0": {
            "CC": "2E32",
            "DR": "CPU POWER CARD  ",
            "FN": "02CM285",
            "LocationCode": "U78DA.ND0.WZS0042-P0-C14",
            "PN": "02CM286",
            "Present": "true",
            "PrettyName": "Voltage regulator module for
		system processor module 0",
            "SN": "YH30A005M11C"
        }
    }
]

root@rain104bmctest:~# ./vpd-tool -o -O "InvalidObjectPath"
root@rain104bmctest:~# echo $?
255

'''

Change-Id: I4b44bdb03429f7f3341ca0c79317d616f1de3a4f
Signed-off-by: Souvik Roy <[email protected]>
@souvik1914581 souvik1914581 force-pushed the sr_vpdToolDumpObjectPR branch from 2e8e1b0 to 897af33 Compare December 6, 2024 10:19
souvik1914581 pushed a commit to souvik1914581/openpower-vpd-parser that referenced this pull request Dec 6, 2024
This commit implements object dump functionality in vpd-tool.
For a given Object path, the object dump functionality prints the
following properties in a JSON format to the console:
1. Present property, Pretty Name, Location Code, Sub Model
2. SN, PN, CC, FN, DR keywords under VINI record

Test:
Tested on a rainier2s2u system
'''
root@p10bmc:~# ./vpd-tool -o -O \
/xyz/openbmc_project/inventory/system/chassis/motherboard
[
    {
        "/xyz/openbmc_project/inventory/system/chassis/motherboard": {
            "CC": "2E2D",
            "DR": "SYSTEM BACKPLANE",
            "FN": "02WG676",
            "LocationCode": "U78DA.ND0.WZS0042-P0",
            "PN": "02WG678",
            "Present": "true",
            "PrettyName": "System backplane",
            "SN": "Y131UF07302T"
        }
    }
]

root@p10bmc:~# ./vpd-tool -o -O \
/xyz/openbmc_project/inventory/system/chassis/motherboard/vdd_vrm0
[
    {
        "/xyz/openbmc_project/inventory/
	system/chassis/motherboard/vdd_vrm0": {
            "CC": "2E32",
            "DR": "CPU POWER CARD  ",
            "FN": "02CM285",
            "LocationCode": "U78DA.ND0.WZS0042-P0-C14",
            "PN": "02CM286",
            "Present": "true",
            "PrettyName": "Voltage regulator module for
		system processor module 0",
            "SN": "YH30A005M11C"
        }
    }
]

root@rain104bmctest:~# ./vpd-tool -o -O "InvalidObjectPath"
root@rain104bmctest:~# echo $?
255

'''

Change-Id: I4b44bdb03429f7f3341ca0c79317d616f1de3a4f
Signed-off-by: Souvik Roy <[email protected]>
@souvik1914581 souvik1914581 force-pushed the sr_vpdToolDumpObjectPR branch from 897af33 to aae7dbf Compare December 6, 2024 10:24
souvik1914581 pushed a commit to souvik1914581/openpower-vpd-parser that referenced this pull request Dec 6, 2024
This commit implements object dump functionality in vpd-tool.
For a given Object path, the object dump functionality prints the
following properties in a JSON format to the console:
1. Present property, Pretty Name, Location Code, Sub Model
2. SN, PN, CC, FN, DR keywords under VINI record

Test:
Tested on a rainier2s2u system
'''
root@p10bmc:~# ./vpd-tool -o -O \
/xyz/openbmc_project/inventory/system/chassis/motherboard
[
    {
        "/xyz/openbmc_project/inventory/system/chassis/motherboard": {
            "CC": "2E2D",
            "DR": "SYSTEM BACKPLANE",
            "FN": "02WG676",
            "LocationCode": "U78DA.ND0.WZS0042-P0",
            "PN": "02WG678",
            "Present": "true",
            "PrettyName": "System backplane",
            "SN": "Y131UF07302T"
        }
    }
]

root@p10bmc:~# ./vpd-tool -o -O \
/xyz/openbmc_project/inventory/system/chassis/motherboard/vdd_vrm0
[
    {
        "/xyz/openbmc_project/inventory/
	system/chassis/motherboard/vdd_vrm0": {
            "CC": "2E32",
            "DR": "CPU POWER CARD  ",
            "FN": "02CM285",
            "LocationCode": "U78DA.ND0.WZS0042-P0-C14",
            "PN": "02CM286",
            "Present": "true",
            "PrettyName": "Voltage regulator module for
		system processor module 0",
            "SN": "YH30A005M11C"
        }
    }
]

root@rain104bmctest:~# ./vpd-tool -o -O "InvalidObjectPath"
root@rain104bmctest:~# echo $?
255

'''

Change-Id: I4b44bdb03429f7f3341ca0c79317d616f1de3a4f
Signed-off-by: Souvik Roy <[email protected]>
@souvik1914581 souvik1914581 force-pushed the sr_vpdToolDumpObjectPR branch from aae7dbf to 6ce020e Compare December 6, 2024 10:55
Souvik Roy added 2 commits December 9, 2024 03:18
This commit implements vpd-tool --dumpObject stub and some associated
utility methods and constants for the same.
This commit allows user to provide --dumpObject command line option to
vpd-tool.
Note: This commit does not include actual implementation of
--dumpObject.

Change-Id: I821777237a3080d390e2bba151cd685ef8994bf9
Signed-off-by: Souvik Roy <[email protected]>
This commit implements object dump functionality in vpd-tool.
For a given Object path, the object dump functionality prints the
following properties in a JSON format to the console:
1. Present property, Pretty Name, Location Code, Sub Model
2. SN, PN, CC, FN, DR keywords under VINI record

Test:
Tested on a rainier2s2u system
'''
root@p10bmc:~# ./vpd-tool -o -O \
/xyz/openbmc_project/inventory/system/chassis/motherboard
[
    {
        "/xyz/openbmc_project/inventory/system/chassis/motherboard": {
            "CC": "2E2D",
            "DR": "SYSTEM BACKPLANE",
            "FN": "02WG676",
            "LocationCode": "U78DA.ND0.WZS0042-P0",
            "PN": "02WG678",
            "Present": "true",
            "PrettyName": "System backplane",
            "SN": "Y131UF07302T"
        }
    }
]

root@p10bmc:~# ./vpd-tool -o -O \
/xyz/openbmc_project/inventory/system/chassis/motherboard/vdd_vrm0
[
    {
        "/xyz/openbmc_project/inventory/
	system/chassis/motherboard/vdd_vrm0": {
            "CC": "2E32",
            "DR": "CPU POWER CARD  ",
            "FN": "02CM285",
            "LocationCode": "U78DA.ND0.WZS0042-P0-C14",
            "PN": "02CM286",
            "Present": "true",
            "PrettyName": "Voltage regulator module for
		system processor module 0",
            "SN": "YH30A005M11C"
        }
    }
]

root@rain104bmctest:~# ./vpd-tool -o -O "InvalidObjectPath"
root@rain104bmctest:~# echo $?
255

'''

Change-Id: I4b44bdb03429f7f3341ca0c79317d616f1de3a4f
Signed-off-by: Souvik Roy <[email protected]>
@souvik1914581 souvik1914581 force-pushed the sr_vpdToolDumpObjectPR branch from 6ce020e to 81ce0e4 Compare December 9, 2024 09:19
@souvik1914581 souvik1914581 changed the base branch from P11_Dev to 1110 December 9, 2024 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant