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

Updates for 9.4 #26

Open
justinrocketscientist opened this issue Nov 5, 2021 · 0 comments
Open

Updates for 9.4 #26

justinrocketscientist opened this issue Nov 5, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@justinrocketscientist
Copy link

Describe the problem

CxOverwatch doesn't fully support 9.3 without slight mod

Proposed solution

Change engine's WSDL to include 2 things:

  • Check for 9.3 and 9.4 (or change code to convert to numeric value and compare if greater than 9.3

  • Check if the apiUri includes a slash at the end and/or remove the slash that exists infront of swagger/index.html by default.
    Sample working code below for one test environment:

    Try to reach the specific engine's WSDL

    [Object] GetEngineWSDL ([String] $name, [String]$apiUri) {
    [Object] $resp = $null
    for ($i = 0; $i -lt $script:config.monitor.retries; $i++) {
    try {
    if($this.cxVersion.StartsWith("9.3") -or $this.cxVersion.StartsWith("9.4")){
    $resp = Invoke-WebRequest -UseBasicParsing -Uri "${apiUri}swagger/index.html" -TimeoutSec $script:config.monitor.apiResponseTimeoutSeconds
    break
    } else{
    $resp = Invoke-WebRequest -UseBasicParsing -Uri $apiUri -TimeoutSec $script:config.monitor.apiResponseTimeoutSeconds
    break
    }
    } catch {
    $resp = $.Exception.Response
    $this.io.Log("ERROR: Checking engine $name - $apiUri : [$($
    .Exception.Message)]")
    if ($i -lt $script:config.mnitor.retries) {
    $this.io.Log("Attempting again...")
    }
    }
    }
    return $resp
    }

Additional details

N/A

@justinrocketscientist justinrocketscientist added the enhancement New feature or request label Nov 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant