Giter Club home page Giter Club logo

Comments (5)

texroemer avatar texroemer commented on September 27, 2024 1

Hi @nsbender

Dell OEM attribute URIs are not supported on iDRAC 7/8, only iDRAC9. If you run GET on URI "redfish/v1/Managers/iDRAC.Embedded.1" you will not see Oem/Dell/DellAttributes.

To get and set these attributes on iDRAC 7/8 you'll need to leverage iDRAC Server Configuration Profile (SCP) feature.

See example below where i will export all iDRAC and System attributes, modify a few attributes in the SCP file and then import to apply the changes.

C:\Python310>python ExportSystemConfigurationLocalREDFISH.py -ip 192.168.0.120 -u root -p calvin --target IDRAC,System

- Job ID "JID_826158706786" successfully created for ExportSystemConfiguration method

- INFO, "Exporting Server Configuration Profile.", percent complete: 10
- INFO, "Exporting Server Configuration Profile.", percent complete: 10
- INFO, "Exporting Server Configuration Profile.", percent complete: 10
- INFO, "Exporting Server Configuration Profile.", percent complete: 10
- INFO, "Exporting Server Configuration Profile.", percent complete: 10
- INFO, "Exporting Server Configuration Profile.", percent complete: 10
- INFO, "Exporting Server Configuration Profile.", percent complete: 10
- INFO, "Exporting Server Configuration Profile.", percent complete: 10
- INFO, "Exporting Server Configuration Profile.", percent complete: 10

- Export locally job ID JID_826158706786 successfully completed.
- PASS, final detailed job status results for job ID JID_826158706786 -

('@odata.context', '/redfish/v1/$metadata#DellJob.DellJob')
('@odata.id', '/redfish/v1/Managers/iDRAC.Embedded.1/Jobs/JID_826158706786')
('@odata.type', '#DellJob.v1_0_1.DellJob')
('CompletionTime', '2023-04-27T12:18:36')
('Description', 'Job Instance')
('EndTime', None)
('Id', 'JID_826158706786')
('JobState', 'Completed')
('JobType', 'ExportConfiguration')
('Message', 'Successfully exported Server Configuration Profile')
('MessageArgs', [])
('MessageId', 'SYS043')
('Name', 'Export Configuration')
('PercentComplete', 100)
('StartTime', 'TIME_NOW')
('TargetSettingsURI', None)

- Exported attributes also saved in file: 2023-4-27_12943_export.xml

C:\Python310>python ImportSystemConfigurationLocalFilenameREDFISH.py -ip 192.168.0.120 -u root -p calvin --target IDRAC,System --filename 2023-4-27_12943_export.xml

- PASS, JID_826165719276 successfully created for ImportSystemConfiguration method

- INFO, "Analyzing iDRAC, System or Lifecycle Controller configuration for changes to be applied.", percent complete: 10
- PASS, job ID JID_826165719276 successfully marked completed

- Detailed configuration changes and job results for "JID_826165719276"

{'Oem': {'Dell': {'@odata.type': '#DellManager.v1_0_0.ServerConfigurationProfileResults',
                  'DisplayValue': 'Power Supply Redundancy Policy',
                  'ErrCode': '0',
                  'Name': 'ServerPwr.1#PSRedPolicy',
                  'NewValue': 'Input Power Redundant',
                  'OldValue': 'Not Redundant'}},
 'Severity': 'OK'}
{'Oem': {'Dell': {'@odata.type': '#DellManager.v1_0_0.ServerConfigurationProfileResults',
                  'DisplayValue': 'Plugin Type',
                  'ErrCode': '0',
                  'Name': 'VirtualConsole.1#PluginType',
                  'NewValue': 'HTML5',
                  'OldValue': 'Java'}},
 'Severity': 'OK'}
{'Message': 'Successfully imported and applied Server Configuration Profile.',
 'MessageArgs': [],
 '[email protected]': 0,
 'MessageId': 'SYS053'}

- JID_826165719276 completed in: 0:00:16

Thanks
Tex

from idrac-redfish-scripting.

nsbender avatar nsbender commented on September 27, 2024

Excellent thanks for taking the time to reply, this is very helpful!

from idrac-redfish-scripting.

nsbender avatar nsbender commented on September 27, 2024

I did run into this when running the above script. Any insight on whether this is an iDRAC version issue? The host in question is on 2.83.83.83

PS C:\Users\user\Downloads\iDRAC-Redfish-Scripting-master\Redfish Python> Python .\ExportSystemConfigurationLocalREDFISH.py -ip <IP> -u USERID -p mypass --target IDRAC,SYSTEM
- FAIL, POST command failed to export system configuration, status code 400 returned
- Error details: {'_content': b'{\n  "error": {\n    "code": "Base.1.0.GeneralError",\n    "message": "A general error has occurred. See ExtendedInfo for more information.",\n    "@Message.ExtendedInfo": [\n      {\n        "@odata.type" : "#Message.v1_0_0.Message",\n        "MessageId": "Base.1.0.InternalError",\n        "Message": "failed, No sufficient Privileges for user to perform requested operation."\n    }\n    ]\n  }\n}\n', '_content_consumed': True, '_next': None, 'status_code': 400, 'headers': {'Strict-Transport-Security': 'max-age=63072000', 'OData-Version': '4.0', 'Vary': 'Accept-Encoding', 'Keep-Alive': 'timeout=60, max=199', 'X-Frame-Options': 'SAMEORIGIN', 'Content-Type': 'application/json;odata.metadata=minimal;charset=utf-8', 'Server': 'iDRAC/8', 'Date': 'Thu, 27 Apr 2023 19:20:09 GMT', 'Cache-Control': 'no-cache', 'Content-Length': '389', 'Connection': 'Keep-Alive', 'Access-Control-Allow-Origin': '*', 'Accept-Ranges': 'bytes'}, 'raw': <urllib3.response.HTTPResponse object at 0x000001A0C19DB670>, 'url': 'https://<IP>/redfish/v1/Managers/iDRAC.Embedded.1/Actions/Oem/EID_674_Manager.ExportSystemConfiguration', 'encoding': 'utf-8', 'history': [], 'reason': 'Bad Request', 'cookies': <RequestsCookieJar[]>, 'elapsed': datetime.timedelta(microseconds=925460), 'request': <PreparedRequest [POST]>, 'connection': <requests.adapters.HTTPAdapter object at 0x000001A0BF93BC10>}
PS C:\Users\user\Downloads\iDRAC-Redfish-Scripting-master\Redfish Python> Python .\ExportSystemConfigurationLocalREDFISH.py -ip <IP> -u USERID -p mypass --target IDRAC
- FAIL, POST command failed to export system configuration, status code 400 returned
- Error details: {'_content': b'{\n  "error": {\n    "code": "Base.1.0.GeneralError",\n    "message": "A general error has occurred. See ExtendedInfo for more information.",\n    "@Message.ExtendedInfo": [\n      {\n        "@odata.type" : "#Message.v1_0_0.Message",\n        "MessageId": "Base.1.0.InternalError",\n        "Message": "failed, No sufficient Privileges for user to perform requested operation."\n    }\n    ]\n  }\n}\n', '_content_consumed': True, '_next': None, 'status_code': 400, 'headers': {'Strict-Transport-Security': 'max-age=63072000', 'OData-Version': '4.0', 'Vary': 'Accept-Encoding', 'Keep-Alive': 'timeout=60, max=199', 'X-Frame-Options': 'SAMEORIGIN', 'Content-Type': 'application/json;odata.metadata=minimal;charset=utf-8', 'Server': 'iDRAC/8', 'Date': 'Thu, 27 Apr 2023 19:20:52 GMT', 'Cache-Control': 'no-cache', 'Content-Length': '389', 'Connection': 'Keep-Alive', 'Access-Control-Allow-Origin': '*', 'Accept-Ranges': 'bytes'}, 'raw': <urllib3.response.HTTPResponse object at 0x0000023CE60BB670>, 'url': 'https://<IP>/redfish/v1/Managers/iDRAC.Embedded.1/Actions/Oem/EID_674_Manager.ExportSystemConfiguration', 'encoding': 'utf-8', 'history': [], 'reason': 'Bad Request', 'cookies': <RequestsCookieJar[]>, 'elapsed': datetime.timedelta(microseconds=904332), 'request': <PreparedRequest [POST]>, 'connection': <requests.adapters.HTTPAdapter object at 0x0000023CE60D3FD0>}
PS C:\Users\user\Downloads\iDRAC-Redfish-Scripting-master\Redfish Python> Python .\ExportSystemConfigurationLocalREDFISH.py -ip <IP> -u USERID -p mypass --target System
- FAIL, POST command failed to export system configuration, status code 400 returned
- Error details: {'_content': b'{\n  "error": {\n    "code": "Base.1.0.GeneralError",\n    "message": "A general error has occurred. See ExtendedInfo for more information.",\n    "@Message.ExtendedInfo": [\n      {\n        "@odata.type" : "#Message.v1_0_0.Message",\n        "MessageId": "Base.1.0.InternalError",\n        "Message": "failed, No sufficient Privileges for user to perform requested operation."\n    }\n    ]\n  }\n}\n', '_content_consumed': True, '_next': None, 'status_code': 400, 'headers': {'Strict-Transport-Security': 'max-age=63072000', 'OData-Version': '4.0', 'Vary': 'Accept-Encoding', 'Keep-Alive': 'timeout=60, max=199', 'X-Frame-Options': 'SAMEORIGIN', 'Content-Type': 'application/json;odata.metadata=minimal;charset=utf-8', 'Server': 'iDRAC/8', 'Date': 'Thu, 27 Apr 2023 19:20:58 GMT', 'Cache-Control': 'no-cache', 'Content-Length': '389', 'Connection': 'Keep-Alive', 'Access-Control-Allow-Origin': '*', 'Accept-Ranges': 'bytes'}, 'raw': <urllib3.response.HTTPResponse object at 0x00000282145EB670>, 'url': 'https://<IP>/redfish/v1/Managers/iDRAC.Embedded.1/Actions/Oem/EID_674_Manager.ExportSystemConfiguration', 'encoding': 'utf-8', 'history': [], 'reason': 'Bad Request', 'cookies': <RequestsCookieJar[]>, 'elapsed': datetime.timedelta(microseconds=856135), 'request': <PreparedRequest [POST]>, 'connection': <requests.adapters.HTTPAdapter object at 0x00000282124EBC10>}

from idrac-redfish-scripting.

texroemer avatar texroemer commented on September 27, 2024

The user you're using does not have admin privileges and you must have admin rights to use SCP feature. This information is also stated in the iDRAC user guide (see image below).

image

Thanks
Tex

from idrac-redfish-scripting.

nsbender avatar nsbender commented on September 27, 2024

Yep, youre right! I should have noticed that from the 400 response. It's working now with another account just fine. Thanks again Tex!

from idrac-redfish-scripting.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.