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

Get-FGTMonitorSystemConfigBackup with vdom argument does not give return config for only that vdom #271

Open
johan-kummeneje-complior opened this issue Oct 14, 2024 · 2 comments

Comments

@johan-kummeneje-complior

When using the Get-FGTMonitorSystemConfigBackup command with -vdom vdomX it will return the full config.

This is easily fixed as the scope just needs to be changed from global to vdom if vdom is given on commandline.

$scope=global
if ( $PsBoundParameters.ContainsKey('vdom') ) {
$invokeParams.add( 'vdom', $vdom )
$scope="vdom"
}

#before 7.6.x, config/backup is available with get method and using paramater
if ($connection.version -lt "7.6.0") {
$method = "get"
$uri = 'api/v2/monitor/system/config/backup?scope=$scope'
$body = ""
}
else {
$method = "post"
$uri = 'api/v2/monitor/system/config/backup'
$body = @{
"scope" = "$scope"
}
}

@alagoutte
Copy link
Contributor

Hi @johan-kummeneje-complior

thanks for the report ! Can you push a PR with the fix ?

@johan-kummeneje-complior
Copy link
Author

Pull request #272 is created.

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

No branches or pull requests

2 participants