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

[PR #7081/fe3eec01 backport][stable-6] Follow DMTF redfish deprecation on StorageControllers #7092

Conversation

patchback[bot]
Copy link

@patchback patchback bot commented Aug 11, 2023

This is a backport of PR #7081 as merged into main (fe3eec0).

Get controller information from "Controllers" field instead of "StorageControllers" which is deprecated

cf. page 9 of https://www.dmtf.org/sites/default/files/Redfish_Release_2022.1_Overview.pdf

SUMMARY

get_storage_controller_inventory now use Controllers field as main key to obtain storage controllers properties. And if Controllers is not available , get_storage_controller_inventory will use the deprecated key StorageControllers

Fixes #7080

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

redfish_utils

ADDITIONAL INFORMATION

On the same HPe server, i had empty array:

TASK [ansible.builtin.debug] ***********************************************************************************************************************************
ok: [localhost] => {                                                            
    "controllers_inventory": {                                                  
        "ansible_facts": {           
            "discovered_interpreter_python": "/usr/bin/python3"
        },                                                                      
        "changed": false,                                                       
        "failed": false,                                                        
        "redfish_facts": {                                                      
            "storage_controller": {                                             
                "entries": [                                                    
                    [                                                           
                        {                                                       
                            "system_uri": "/redfish/v1/Systems/1/"
                        },       
                        [     
                            {
                                "CacheSummary": {
                                    "PersistentCacheSizeMiB": 3856,
                                    "Status": {
                                        "Health": "OK",
                                        "State": "Disabled"
                                    },
                                    "TotalCacheSizeMiB": 4096
                                },
                                "FirmwareVersion": "5.32",                                                                                                      
                                "Id": "0",                                                                                                                      
                                "Identifiers": [
                                    {                                           
                                        "DurableName": "51402EC019A26FC0",
                                        "DurableNameFormat": "NAA"
                                    }
                                ],
                                "Location": {
                                    "PartLocation": {
                                        "LocationOrdinalValue": 0,
                                        "LocationType": "Slot",
                                        "ServiceLabel": "Slot=0"
                                    }
                                },
                                "Manufacturer": "HPE",
                                "Model": "HPE Smart Array P816i-a SR Gen10",
                                "Name": "HPE Smart Array P816i-a SR Gen10",
                                "PartNumber": "869085-004",
                                "SerialNumber": "PZXNU0BRHH501M ",
                                "SpeedGbps": 12.0,
                                "Status": {
                                    "Health": "OK",
                                    "State": "Enabled"
                                }
                            },
                            {
                                "CacheSummary": {
                                    "PersistentCacheSizeMiB": 0,
                                    "Status": {
                                        "Health": "OK",
                                        "State": "Disabled"
                                    },
                                    "TotalCacheSizeMiB": 128
                                },
                                "FirmwareVersion": "5.32",
                                "Id": "0",
                                "Identifiers": [
                                    {
                                        "DurableName": "51402EC015A28DC0",
                                        "DurableNameFormat": "NAA"
                                    }
                                ],
                                "Location": {
                                    "PartLocation": {
                                        "LocationOrdinalValue": 4,
                                        "LocationType": "Slot",
                                        "ServiceLabel": "Slot=4"
                                    }
                                },
                                "Manufacturer": "HPE",
                                "Model": "HPE Smart Array E208i-p SR Gen10",
                                "Name": "HPE Smart Array E208i-p SR Gen10",
                                "PartNumber": "804397-001",
                                "SerialNumber": "PEYHL0B52GX0QG ",
                                "SpeedGbps": 12.0,
                                "Status": {
                                    "Health": "OK",
                                    "State": "Enabled"
                                }
                            }
                        ]
                    ]
                ],
                "ret": true
            }
        }
    }
}

* Get controller information from "Controllers" field instead of "StorageControllers" which is deprecated

* Add changelog fragment

* Changelog fragment writing guide formatting

* For consistency, get_disk_inventory and get_volume_inventory use Controllers key instead of StorageControllers to obtain controller name

---------

Co-authored-by: Pierre-yves FONTANIERE <pyf@cc.in2p3.fr>
(cherry picked from commit fe3eec0)
@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added backport bug This issue/PR relates to a bug module_utils module_utils new_contributor Help guide this first time contributor plugins plugin (any type) labels Aug 11, 2023
@felixfontein felixfontein merged commit 4205a94 into stable-6 Aug 11, 2023
@felixfontein felixfontein deleted the patchback/backports/stable-6/fe3eec01225eee30ebc3f5dddde1e4e34547aa31/pr-7081 branch August 11, 2023 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug module_utils module_utils new_contributor Help guide this first time contributor plugins plugin (any type)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants