Giter Club home page Giter Club logo

Comments (8)

texroemer avatar texroemer commented on September 27, 2024 1

Hi @jgranduel

Get-IdracLifecycleLogsREDFISH cmdlet has been updated with similar argument support to compared to python script. Please see cmdlet help text and examples for more details.

Thanks
Tex

from idrac-redfish-scripting.

texroemer avatar texroemer commented on September 27, 2024

Hi @jgranduel

Yes plan is to update the cmdlet to be in sync with python script. I just made multiple changes to the python script, will update the cmdlet and let you know once it's ready.

Thanks
Tex

from idrac-redfish-scripting.

jgranduel avatar jgranduel commented on September 27, 2024

Hi,

I installed IdracRedfishSupport version 22.5.0.0 along version 22.3.0.0 (Install-Module -Name IdracRedfishSupport -Force).

Unfortunately I cannot make it work, but it works with version 22.3:

Get-IdracLifecycleLogsREDFISH -idrac_ip <IP> -idrac_username root -Verbose -OutVariable l

PowerShell credential request
Enter iDRAC username and password to run cmdlet
User: root
Password for user root: ************

- FAIL, either incorrect parameter(s) used or missing required parameters(s), please see help or examples for more information.

Some other suggestions:

  • When -idrac_username option is used and a value provied, the username is still requested when password is missing.
  • how to get the examples ? would you precise help <cmdlet> -examples option should be used maybe ? Well, it's pure PowerShell knowledge, so maybe not!
  • could you define a group for get_all, start_date and end_date?
  • could you provide a parameter set for option get_severity for tabbing possible values?

Thanks!

from idrac-redfish-scripting.

texroemer avatar texroemer commented on September 27, 2024

Hi @jgranduel

Fixed the bug where it prompts you to enter username again if you pass in username argument for Get-Credential.

image

To get examples leverage Get-Help and -examples for each cmdlet.

image

For get_severity argument you need to see help text for supported possible values.

image

Thanks
Tex

from idrac-redfish-scripting.

jgranduel avatar jgranduel commented on September 27, 2024

Hi,
for possible values for get_severity, I added [ValidateSet("critical","warning", "informational")]

    [ValidateSet("critical", "warning", "informational")]
    [Parameter(Mandatory=$False)]
    [string]$get_severity

to the parameters for the sake of completion...

from idrac-redfish-scripting.

texroemer avatar texroemer commented on September 27, 2024

@jgranduel
Thanks for clearing up the ask for possible values reported, changes have been made and checked in. Please try out latest version and let me know.

Thanks
Tex

from idrac-redfish-scripting.

jgranduel avatar jgranduel commented on September 27, 2024

I've tried latest version (22.9.0.0). A few things don't work for me:

 > get-idracLifecycleLogsREDFISH -idrac_ip <IP>  -idrac_username root

- FAIL, either incorrect parameter(s) used or missing required parameters(s), please see help or examples for more information.

Option get_all doesn't return anything (but works fine with Python) :

-  get-idracLifecycleLogsREDFISH -idrac_ip <IP>  -idrac_username root -get_all -Verbose

- INFO, getting Lifecycle Logs for iDRAC <IP> This may take a few minutes to complete depending on log file size

VERBOSE: HTTP/1.1 GET with 0-byte payload
VERBOSE: received 365-byte response of content type application/json

- INFO, cmdlet execution complete. Note: If needed, execute cmdlet again and redirect output to a file.

The URL that's built is this one as you know: https://<IP>/redfish/v1/Managers/iDRAC.Embedded.1/LogServices/Lclog/Entries?$skip=0, but doesn't work in my version:

curl -s -k -uroot:$($idracCreds.GetNetworkCredential().Password) 'https://<IP>/redfish/v1/Managers/iDRAC.Embedded.1/LogServices/Lclog/Entries?$skip=0' | jq
{
  "error": {
    "code": "Base.1.0.GeneralError",
    "message": "A general error has occurred. See ExtendedInfo for more information.",
    "@Message.ExtendedInfo": [
      {
        "@odata.type": "#Message.v1_0_0.Message",
        "MessageId": "Base.1.0.InternalError",
        "Message": "not supported, Query parameter skip not supported"
      }
    ]
  }
}

Equivalent result with Invoke-WebRequest of course.

  • no category is recognized (perhaps only for version 9+?)
- get-idracLifecycleLogsREDFISH -idrac_ip <IP> -idrac_username root -get_category updates -Verbose

- INFO, getting 'updates' category entries from LC logs. This may take a few minutes to complete depending on LC log size
VERBOSE: HTTP/1.1 GET with 0-byte payload
VERBOSE: received 532-byte response of content type application/json
- WARNING, no 'updates' category entries detected in LC logs

same for audit, configuration, storage and so on.

Maybe precising iDRAC version in .SYNOPSIS would help in telling which features and options are supported? redfish/v1/Managers/iDRAC.Embedded.1/LogServices/Lclog/Entries is not supported I think.

I compared with Python version, and indeed there is the distinction between new and old iDRAC versions in PowerShell as there is in Python, ie using Entries. If PowerShell is not intended to be used with version 8, which is understandable, add it into documentation, please.

Thanks!

from idrac-redfish-scripting.

texroemer avatar texroemer commented on September 27, 2024

I added code to the PS cmdlet to handle both iDRAC 8 and iDRAC 9, cmdlet posted to GitHub and PSGallery. Also note that for iDRAC 8 arguments get date range or specific group entries are not supported. I added a check in the cmdlet to error out gracefully for these arguments.

Thanks
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.