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

Set-RubrikBlackout still uses internal API #679

Closed
hughdeloughry opened this issue Aug 27, 2020 · 1 comment · Fixed by #687
Closed

Set-RubrikBlackout still uses internal API #679

hughdeloughry opened this issue Aug 27, 2020 · 1 comment · Fixed by #687
Assignees

Comments

@hughdeloughry
Copy link

Since v5.1 blackout_window has moved from internal to v1 API tree

The powershell cmdlet Set-RubrikBlackout still uses internal:

`> Set-RubrikBlackout -set:$false
Invoke-WebRequest : Undefined API
At C:\Program Files\WindowsPowerShell\Modules\Rubrik\5.0.3\Private\Invoke-RubrikWebRequest.ps1:27 char:23

  • ... $result = Invoke-WebRequest -UseBasicParsing -TimeoutSec $rubrikOpt ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException
    • FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand`

Stray-server:
2020-08-27T09:41:53.549+0000 INFO <.akka-akka.actor.default-dispatcher-37> [spray.SprayServer] PATCH https://192.168.75.200/api/internal/blackout_window -> 404 Not Found 2020-08-27T09:48:14.139+0000 DEBUG <.akka-akka.actor.default-dispatcher-3> [server.HttpServerConnection] Dispatching PATCH request to https://192.168.75.200/api/internal/blackout_window to handler Actor[akka://akka/system/IO-TCP/selectors/$a/71147#-1048708777] 2020-08-27T09:48:14.139+0000 DEBUG <.akka-akka.actor.default-dispatcher-12> [spray.SprayServer] Request minus entity: HttpRequest(PATCH,https://192.168.75.200/api/internal/blackout_window,List(Remote-Address: 192.168.80.155, User-Agent: RubrikPowerShellSDK-5.0.3--5.1.18362.752--platform--Win32NT--platform_version--Microsoft Windows 10 Pro18363, Host: 192.168.75.200, Content-Length: 42, Connection: Keep-Alive),Empty,HTTP/1.1) 2020-08-27T09:48:14.139+0000 INFO <.akka-akka.actor.default-dispatcher-12> [spray.SprayServer] PATCH https://192.168.75.200/api/internal/blackout_window -> 404 Not Found

powershell module version:
`> Get-Module -ListAvailable Rubrik

Directory: C:\Program Files\WindowsPowerShell\Modules

ModuleType Version Name ExportedCommands


Script 5.0.3 Rubrik {Connect-Rubrik, Disconnect-Rubrik, Export-RubrikDatabase, Export-RubrikReport...}
`

@jaapbrasser
Copy link
Contributor

Thanks for reporting this Hugh, I have fixed this in #687 and also added the Get-RubrikBlackout cmdlet additionally

@jaapbrasser jaapbrasser self-assigned this Sep 7, 2020
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 a pull request may close this issue.

2 participants