Merge branch 'master' into TestingBranch
This commit is contained in:
@@ -1,2 +1,4 @@
|
||||
|
||||
*.zip
|
||||
temp/*
|
||||
Tests/Public/TestResults.xml
|
||||
|
||||
@@ -631,8 +631,8 @@ to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
ZertoApiWrapper
|
||||
Copyright (C) 2019 Wes Carroll
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail.
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
ZertoApiWrapper Copyright (C) 2019 Wes Carroll
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
|
||||
PowerShell Core wrapper for Zerto Virtual Manager API
|
||||
|
||||
## Current Build Status
|
||||
|
||||
[](https://dev.azure.com/wescarroll/ZertoApiWrapper/_build/latest?definitionId=1&branchName=master)
|
||||
|
||||
## Legal Disclaimer
|
||||
|
||||
This script is an example script and is not supported under any Zerto support program or service. The author and Zerto further disclaim all implied warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose.
|
||||
|
||||
@@ -2,15 +2,9 @@ $moduleName = "ZertoApiWrapper"
|
||||
$moduleFileName = "ZertoApiWrapper.psm1"
|
||||
$filePath = (Split-Path -Parent $MyInvocation.MyCommand.Path) -replace 'Tests', 'ZertoApiWrapper'
|
||||
$docsPath = (Split-Path -Parent $MyInvocation.MyCommand.Path) -replace 'Tests[\\\/]Public', 'docs'
|
||||
$fileName = (Split-Path -Leaf $MyInvocation.MyCommand.Path ) -replace '.Tests.', '.'
|
||||
$modulePath = $filePath -replace "Public", ""
|
||||
$userName = "zerto\build"
|
||||
$password = ConvertTo-SecureString -String "ZertoBuild" -AsPlainText -Force
|
||||
$credential = New-Object -TypeName System.Management.Automation.PSCredential($userName, $password)
|
||||
|
||||
# $credential = Import-Clixml -Path C:\ZertoScripts\Creds.xml
|
||||
$zertoServer = "192.168.1.100"
|
||||
$zertoPort = "7669"
|
||||
Import-Module $modulePath\$moduleFileName
|
||||
|
||||
Import-Module $modulePath\$moduleFileName
|
||||
|
||||
@@ -42,7 +36,14 @@ Describe "File Tests" {
|
||||
it "$command has the External Help File Defined" {
|
||||
Get-Content -Path $path -First 1 | should be "<# .ExternalHelp ./en-us/ZertoApiWrapper-help.xml #>"
|
||||
}
|
||||
it "$command external Help file is filled out" {
|
||||
$stubExist = Get-Content -Path $externalHelpFile | Where-Object {$_.Trim() -like '*{{*}}*'}
|
||||
if ($stubExist) {
|
||||
Write-Warning "Found a stub in the Markdown File $externalHelpFile"
|
||||
Write-Warning "$stubExist"
|
||||
}
|
||||
$stubExist | should benullorempty
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
@{
|
||||
psake = @{
|
||||
Name = 'InvokeBuild'
|
||||
DependencyType = 'PSGalleryModule'
|
||||
Parameters = @{
|
||||
Repository = 'PSGallery'
|
||||
SkipPublisherCheck = $true
|
||||
}
|
||||
Target = 'CurrentUser'
|
||||
Version = '5.4.3'
|
||||
Tags = 'Bootstrap'
|
||||
}
|
||||
|
||||
Pester = @{
|
||||
Name = 'Pester'
|
||||
DependencyType = 'PSGalleryModule'
|
||||
Parameters = @{
|
||||
Repository = 'PSGallery'
|
||||
SkipPublisherCheck = $true
|
||||
}
|
||||
Target = 'CurrentUser'
|
||||
Version = '4.6.0'
|
||||
Tags = 'Bootstrap'
|
||||
}
|
||||
|
||||
PSScriptAnalyzer = @{
|
||||
Name = 'PSScriptAnalyzer'
|
||||
DependencyType = 'PSGalleryModule'
|
||||
Parameters = @{
|
||||
Repository = 'PSGallery'
|
||||
SkipPublisherCheck = $true
|
||||
}
|
||||
Target = 'CurrentUser'
|
||||
Version = '1.17.1'
|
||||
Tags = 'Bootstrap'
|
||||
}
|
||||
|
||||
Platyps = @{
|
||||
Name = 'Platyps'
|
||||
DependencyType = 'PSGalleryModule'
|
||||
Parameters = @{
|
||||
Repository = 'PSGallery'
|
||||
SkipPublisherCheck = $true
|
||||
}
|
||||
Target = 'CurrentUser'
|
||||
Version = '0.12.0'
|
||||
Tags = 'Bootstrap'
|
||||
}
|
||||
|
||||
}
|
||||
+93
-31
@@ -6,10 +6,13 @@
|
||||
<# [CmdletBinding()]
|
||||
param([switch]$Install,
|
||||
[string]$Configuration = (property Configuration Release))
|
||||
|
||||
$targetDir = "temp/$Configuration/ZertoApiWrapper" #>
|
||||
|
||||
task . Analyze
|
||||
$versionMajor = '0'
|
||||
$versionMinor = '1'
|
||||
$versionBuild = "{0}" -f $(get-date -format 'yyyyMMdd')
|
||||
|
||||
task . AnalyzeSourceFiles, CreateModule
|
||||
|
||||
<# Synopsis: Ensure platyPS is installed #>
|
||||
task CheckPlatyPSInstalled {
|
||||
@@ -33,13 +36,28 @@ task CheckPSScriptAnalyzerInstalled {
|
||||
}
|
||||
|
||||
<# Synopsis: Analyze ZertoApiWrapper functions for Code Violations #>
|
||||
task Analyze CheckPSScriptAnalyzerInstalled, CheckPesterInstalled, CheckPlatyPSInstalled, {
|
||||
task AnalyzeSourceFiles CheckPSScriptAnalyzerInstalled, {
|
||||
$scriptAnalyzerParams = @{
|
||||
Path = "$BuildRoot\ZertoApiWrapper\"
|
||||
Severity = @('Error', 'Warning')
|
||||
Recurse = $true
|
||||
Verbose = $false
|
||||
ExcludeRule = @('PSUseDeclaredVarsMoreThanAssignments', 'PSUseShouldProcessForStateChangingFunctions')
|
||||
ExcludeRule = @('PSUseDeclaredVarsMoreThanAssignments', 'PSUseShouldProcessForStateChangingFunctions', 'PSUseToExportFieldsInManifest')
|
||||
}
|
||||
$saresults = Invoke-ScriptAnalyzer @scriptAnalyzerParams
|
||||
if ($saResults) {
|
||||
$saResults | Format-Table
|
||||
throw "One or more PSScriptAnalyzer errors/warnings were found"
|
||||
}
|
||||
}
|
||||
|
||||
task AnalyzeBuiltFiles CheckPSScriptAnalyzerInstalled, {
|
||||
$scriptAnalyzerParams = @{
|
||||
Path = "$BuildRoot\temp\"
|
||||
Severity = @('Error', 'Warning')
|
||||
Recurse = $true
|
||||
Verbose = $false
|
||||
ExcludeRule = @('PSUseDeclaredVarsMoreThanAssignments', 'PSUseShouldProcessForStateChangingFunctions', 'PSUseToExportFieldsInManifest')
|
||||
}
|
||||
$saresults = Invoke-ScriptAnalyzer @scriptAnalyzerParams
|
||||
|
||||
@@ -49,42 +67,86 @@ task Analyze CheckPSScriptAnalyzerInstalled, CheckPesterInstalled, CheckPlatyPSI
|
||||
}
|
||||
}
|
||||
|
||||
$buildMamlParams = @{
|
||||
Inputs = { Get-ChildItem docs/*.md }
|
||||
Outputs = "$targetDir/en-us/ZertoApiWrapper-help.xml"
|
||||
task FileTests CheckPesterInstalled, {
|
||||
$testResultsFile = "$BuildRoot\Tests\Public\TestResults.xml"
|
||||
$script:results = Invoke-Pester -Script "$BuildRoot\Tests\Public\ZertoApiWrapper.Tests.ps1" -OutputFile $testResultsFile -PassThru
|
||||
$FailureMessage = '{0} Unit test(s) failed. Aborting build' -f $results.FailedCount
|
||||
assert ($results.FailedCount -eq 0) $FailureMessage
|
||||
}
|
||||
|
||||
task BuildMamlHelp @buildMamlParams {
|
||||
$buildMamlParams = @{
|
||||
Inputs = { Get-ChildItem docs\*.md }
|
||||
Outputs = "$BuildRoot\temp\en-us\ZertoApiWrapper-help.xml"
|
||||
}
|
||||
|
||||
task BuildMamlHelp CheckPlatyPSInstalled, {
|
||||
if (Test-Path $buildMamlParams.Outputs) {
|
||||
Remove-Item $buildMamlParams.Outputs
|
||||
}
|
||||
platyPS\New-ExternalHelp .\docs -Force -OutputPath $buildMamlParams.Outputs
|
||||
}
|
||||
|
||||
task FileTests CheckPesterInstalled, {
|
||||
Invoke-Pester "$BuildRoot\Tests\Public\ZertoApiWrapper.Tests.ps1" -Show Fails
|
||||
task UpdateMarkdownHelp CheckPlatyPSInstalled, {
|
||||
remove-module ZertoApiWrapper -force -ErrorAction SilentlyContinue
|
||||
Import-Module .\ZertoApiWrapper\ZertoApiWrapper.psm1 -Force
|
||||
Update-MarkDownHelp -Path docs -AlphabeticParamsOrder
|
||||
}
|
||||
|
||||
task UpdateModuleFunctions {
|
||||
$functionsToExportPath = "$BuildRoot\ZertoApiWrapper\Public\"
|
||||
Update-ModuleManifest -Path "$BuildRoot\ZertoApiWrapper\ZertoApiWrapper.psd1" -FunctionsToExport $(Get-ChildItem -Path $functionsToExportPath -File).name.Replace('.ps1', '')
|
||||
task CreatePsd1ForRelease CleanTemp, {
|
||||
$functionsToExport = Get-ChildItem -Path 'ZertoApiWrapper\Public\*.ps1' | ForEach-Object { $_.BaseName }
|
||||
$ManifestParams = @{
|
||||
Path = "$BuildRoot\temp\ZertoApiWrapper.psd1"
|
||||
RootModule = 'ZertoApiWrapper.psm1'
|
||||
ModuleVersion = '{0}.{1}.{2}' -f $versionMajor, $versionMinor, $versionBuild
|
||||
GUID = '4c0b9e17-141b-4dd5-8549-fb21cccaa325'
|
||||
Author = 'Wes Carroll'
|
||||
CompanyName = 'Zerto'
|
||||
Copyright = '(c) {0} Wes Carroll. All rights reserved.' -f $(Get-Date -format 'yyyy')
|
||||
Description = 'PowerShell Core Wrapper Module for Zerto Virtual Manager API'
|
||||
PowerShellVersion = '6.0.0'
|
||||
ProjectUri = 'https://github.com/wcarroll/ZertoApiWrapper'
|
||||
LicenseUri = 'https://github.com/wcarroll/ZertoApiWrapper/blob/master/LICENSE'
|
||||
Tags = @("Zerto", "Automation")
|
||||
FunctionsToExport = $functionsToExport
|
||||
CmdletsToExport = @()
|
||||
VariablesToExport = @()
|
||||
AliasesToExport = @()
|
||||
}
|
||||
New-ModuleManifest @ManifestParams
|
||||
}
|
||||
|
||||
task UpdateVersion {
|
||||
try {
|
||||
$moduleManifestFile = "$BuildRoot\ZertoApiWrapper\ZertoApiWrapper.psd1"
|
||||
$manifestContent = Get-Content $moduleManifestFile -Raw
|
||||
[version]$version = [regex]::matches($manifestContent, "ModuleVersion\s=\s\'(?<version>(\d+\.)?(\d+\.)?(\*|\d+))") | ForEach-Object {$_.groups['version'].value}
|
||||
$newVersion = "{0}.{1}.{2}" -f $version.Major, $version.Minor, ($version.Build + 1)
|
||||
task CleanTemp {
|
||||
if (-not $(Test-Path "$BuildRoot\temp")) {
|
||||
New-Item -Path $BuildRoot -Name "temp" -ItemType "Directory"
|
||||
}
|
||||
Remove-Item -Recurse -Path "$BuildRoot\temp\*"
|
||||
}
|
||||
|
||||
$replacements = @{
|
||||
"ModuleVersion = '.*'" = "ModuleVersion = '$newVersion'"
|
||||
}
|
||||
|
||||
$replacements.GetEnumerator() | ForEach-Object {
|
||||
$manifestContent = $manifestContent -replace $_.Key, $_.Value
|
||||
}
|
||||
|
||||
$manifestContent | Set-Content -Path "$moduleManifestFile"
|
||||
} catch {
|
||||
Write-Error -Message $_.Exception.Message
|
||||
$host.SetShouldExit($LastExitCode)
|
||||
task CreatePsm1ForRelease CreatePsd1ForRelease, {
|
||||
$emptyLine = ""
|
||||
$psm1Path = "$BuildRoot\temp\ZertoApiWrapper.psm1"
|
||||
$lines = '#------------------------------------------------------------#'
|
||||
$Public = @( Get-ChildItem -Path $PSScriptRoot\ZertoApiWrapper\Public\*.ps1 -ErrorAction SilentlyContinue )
|
||||
$Private = @( Get-ChildItem -Path $PSScriptRoot\ZertoApiWrapper\Private\*.ps1 -ErrorAction SilentlyContinue )
|
||||
Add-Content -Path $psm1Path -Value $lines
|
||||
Add-Content -Path $psm1Path -Value "#---------------------Private Functions----------------------#"
|
||||
Add-Content -Path $psm1Path -Value $lines
|
||||
Add-Content -Path $psm1Path -Value $emptyLine
|
||||
foreach ($file in $private) {
|
||||
Add-Content -Path $psm1Path -Value $(Get-Content -Path $file.Fullname -Raw)
|
||||
Add-Content -Path $psm1Path -Value $emptyLine
|
||||
}
|
||||
Add-Content -Path $psm1Path -Value $lines
|
||||
Add-Content -Path $psm1Path -Value "#----------------------Public Functions----------------------#"
|
||||
Add-Content -Path $psm1Path -Value $lines
|
||||
Add-Content -Path $psm1Path -Value $emptyLine
|
||||
foreach ($file in $public) {
|
||||
Add-Content -Path $psm1Path -Value $(Get-Content -Path $file.Fullname -Raw)
|
||||
Add-Content -Path $psm1Path -Value $emptyLine
|
||||
}
|
||||
}
|
||||
|
||||
task CreateModule CleanTemp, FileTests, CreatePsd1ForRelease, CreatePsm1ForRelease, AnalyzeBuiltFiles, BuildMamlHelp, {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ function Import-ZertoVpg {
|
||||
$importedSettings.VpgSettingsIdentifier = $vpgSettingsIdentifier
|
||||
$uri = "{0}/{1}" -f $baseUri, $vpgSettingsIdentifier
|
||||
Invoke-ZertoRestRequest -uri $uri -method "PUT" -body $($importedSettings | convertto-json -Depth 10)
|
||||
$vpgSettingsIdentifier | Save-ZertoVpgSettings
|
||||
$vpgSettingsIdentifier | Save-ZertoVpgSetting
|
||||
if ($settingsFile.Count -gt 1) {
|
||||
Start-Sleep 5
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<# .ExternalHelp ./en-us/ZertoApiWrapper-help.xml #>
|
||||
function Save-ZertoVpgSettings {
|
||||
function Save-ZertoVpgSetting {
|
||||
[cmdletbinding(
|
||||
SupportsShouldProcess = $true
|
||||
)]
|
||||
@@ -3859,11 +3859,11 @@
|
||||
<command:verb>Get</command:verb>
|
||||
<command:noun>ZertoVirtualizationSite</command:noun>
|
||||
<maml:description>
|
||||
<maml:para>{{Fill in the Synopsis}}</maml:para>
|
||||
<maml:para>Returns information about the hypervisor site where the API is run and all the sites paired with this site. The information returned can be tailored to specific information about the resources managed at a specified site.</maml:para>
|
||||
</maml:description>
|
||||
</command:details>
|
||||
<maml:description>
|
||||
<maml:para>{{Fill in the Description}}</maml:para>
|
||||
<maml:para>Returns information about the hypervisor site where the API is run and all the sites paired with this site. The information returned can be tailored to specific information about the resources managed at a specified site.</maml:para>
|
||||
</maml:description>
|
||||
<command:syntax>
|
||||
<command:syntaxItem>
|
||||
@@ -4302,9 +4302,30 @@
|
||||
<command:examples>
|
||||
<command:example>
|
||||
<maml:title>-------------------------- Example 1 --------------------------</maml:title>
|
||||
<dev:code>PS C:\> {{ Add example code here }}</dev:code>
|
||||
<dev:code>PS C:\> Get-ZertoVirtualizationSite -siteIdentifier "MySiteIdentifier"</dev:code>
|
||||
<dev:remarks>
|
||||
<maml:para>{{ Add example description here }}</maml:para>
|
||||
<maml:para>Returns information about the site with identifier "MySiteIdentifier"</maml:para>
|
||||
</dev:remarks>
|
||||
</command:example>
|
||||
<command:example>
|
||||
<maml:title>-------------------------- Example 2 --------------------------</maml:title>
|
||||
<dev:code>PS C:\> Get-ZertoVirtualizationSite -siteIdentifier "MySiteIdentifier" -datastoreClusters</dev:code>
|
||||
<dev:remarks>
|
||||
<maml:para>Returns information about datastore clusters at site with site identifier "MySiteidentifier"</maml:para>
|
||||
</dev:remarks>
|
||||
</command:example>
|
||||
<command:example>
|
||||
<maml:title>-------------------------- Example 3 --------------------------</maml:title>
|
||||
<dev:code>PS C:\> Get-ZertoVirtualizationSite -siteIdentifier "MySiteIdentifier" -datastores</dev:code>
|
||||
<dev:remarks>
|
||||
<maml:para>Returns information about datastores at site with site identifier "MySiteidentifier"</maml:para>
|
||||
</dev:remarks>
|
||||
</command:example>
|
||||
<command:example>
|
||||
<maml:title>-------------------------- Example 4 --------------------------</maml:title>
|
||||
<dev:code>PS C:\> Get-ZertoVirtualizationSite -siteIdentifier "MySiteIdentifier" -devices</dev:code>
|
||||
<dev:remarks>
|
||||
<maml:para>Returns information about devices at site with site identifier "MySiteidentifier"</maml:para>
|
||||
</dev:remarks>
|
||||
</command:example>
|
||||
</command:examples>
|
||||
@@ -5977,35 +5998,35 @@
|
||||
<command:examples>
|
||||
<command:example>
|
||||
<maml:title>-------------------------- Example 1 --------------------------</maml:title>
|
||||
<dev:code>PS C:\> Get-ZertoVpgSettings -vpgSettingsIdentifier "MySettingsIdentifier"</dev:code>
|
||||
<dev:code>PS C:\> Get-ZertoVpgSetting -vpgSettingsIdentifier "MySettingsIdentifier"</dev:code>
|
||||
<dev:remarks>
|
||||
<maml:para>Returns all current settings for vpgSettingsIdentifier "MySettingsIdentifier"</maml:para>
|
||||
</dev:remarks>
|
||||
</command:example>
|
||||
<command:example>
|
||||
<maml:title>-------------------------- Example 2 --------------------------</maml:title>
|
||||
<dev:code>PS C:\> Get-ZertoVpgSettings -vpgSettingsIdentifier "MySettingsIdentifier" -vmIdentifier "MyVmId"</dev:code>
|
||||
<dev:code>PS C:\> Get-ZertoVpgSetting -vpgSettingsIdentifier "MySettingsIdentifier" -vmIdentifier "MyVmId"</dev:code>
|
||||
<dev:remarks>
|
||||
<maml:para>Returns all current vm level settings for the vmIdentifier "MyVmId" in vpgSettingsIdentifier "MySettingsIdentifier"</maml:para>
|
||||
</dev:remarks>
|
||||
</command:example>
|
||||
<command:example>
|
||||
<maml:title>-------------------------- Example 3 --------------------------</maml:title>
|
||||
<dev:code>PS C:\> Get-ZertoVpgSettings -vpgSettingsIdentifier "MySettingsIdentifier" -vmIdentifier "MyVmId" -volumes</dev:code>
|
||||
<dev:code>PS C:\> Get-ZertoVpgSetting -vpgSettingsIdentifier "MySettingsIdentifier" -vmIdentifier "MyVmId" -volumes</dev:code>
|
||||
<dev:remarks>
|
||||
<maml:para>Returns current vm level settings for volumes for vmId "MyVmId" in vpgSettingsIdentifier "MySettingsIdentifier"</maml:para>
|
||||
</dev:remarks>
|
||||
</command:example>
|
||||
<command:example>
|
||||
<maml:title>-------------------------- Example 4 --------------------------</maml:title>
|
||||
<dev:code>PS C:\> Get-ZertoVpgSettings -vpgSettingsIdentifier "MySettingsIdentifier" -nics</dev:code>
|
||||
<dev:code>PS C:\> Get-ZertoVpgSetting -vpgSettingsIdentifier "MySettingsIdentifier" -nics</dev:code>
|
||||
<dev:remarks>
|
||||
<maml:para>Returns current vm level settings for nics for vmId "MyVmId" in vpgSettingsIdentifier "MySettingsIdentifier"</maml:para>
|
||||
</dev:remarks>
|
||||
</command:example>
|
||||
<command:example>
|
||||
<maml:title>-------------------------- Example 5 --------------------------</maml:title>
|
||||
<dev:code>PS C:\> Get-ZertoVpgSettings -vpgSettingsIdentifier "MySettingsIdentifier" -basic</dev:code>
|
||||
<dev:code>PS C:\> Get-ZertoVpgSetting -vpgSettingsIdentifier "MySettingsIdentifier" -basic</dev:code>
|
||||
<dev:remarks>
|
||||
<maml:para>Returns current basic settings for vpgSettingsIdentifier "MySettingsIdentifier"</maml:para>
|
||||
</dev:remarks>
|
||||
@@ -10656,9 +10677,9 @@
|
||||
</command:command>
|
||||
<command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
|
||||
<command:details>
|
||||
<command:name>Save-ZertoVpgSettings</command:name>
|
||||
<command:name>Save-ZertoVpgSetting</command:name>
|
||||
<command:verb>Save</command:verb>
|
||||
<command:noun>ZertoVpgSettings</command:noun>
|
||||
<command:noun>ZertoVpgSetting</command:noun>
|
||||
<maml:description>
|
||||
<maml:para>Commits the updated Vpg Settings with the configured Vpg Settings Identifier</maml:para>
|
||||
</maml:description>
|
||||
@@ -10668,8 +10689,8 @@
|
||||
</maml:description>
|
||||
<command:syntax>
|
||||
<command:syntaxItem>
|
||||
<maml:name>Save-ZertoVpgSettings</maml:name>
|
||||
<command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="vpgSettingsId">
|
||||
<maml:name>Save-ZertoVpgSetting</maml:name>
|
||||
<command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="1" aliases="vpgSettingsId">
|
||||
<maml:name>vpgSettingsIdentifier</maml:name>
|
||||
<maml:Description>
|
||||
<maml:para>VpgSettings Identifier to save</maml:para>
|
||||
@@ -10706,7 +10727,7 @@
|
||||
</command:syntaxItem>
|
||||
</command:syntax>
|
||||
<command:parameters>
|
||||
<command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="vpgSettingsId">
|
||||
<command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="1" aliases="vpgSettingsId">
|
||||
<maml:name>vpgSettingsIdentifier</maml:name>
|
||||
<maml:Description>
|
||||
<maml:para>VpgSettings Identifier to save</maml:para>
|
||||
@@ -10771,7 +10792,7 @@
|
||||
<command:examples>
|
||||
<command:example>
|
||||
<maml:title>-------------------------- Example 1 --------------------------</maml:title>
|
||||
<dev:code>PS C:> Save-ZertoVpgSettings -vpgSettingsIdentifier "MyVpgSettingsIdentifier"</dev:code>
|
||||
<dev:code>PS C:> Save-ZertoVpgSetting -vpgSettingsIdentifier "MyVpgSettingsIdentifier"</dev:code>
|
||||
<dev:remarks>
|
||||
<maml:para>Commits vpg settings with vpg settings identifier "MyVpgSettingsIdentifier"</maml:para>
|
||||
</dev:remarks>
|
||||
@@ -10780,7 +10801,7 @@
|
||||
<command:relatedLinks>
|
||||
<maml:navigationLink>
|
||||
<maml:linkText>Online Version:</maml:linkText>
|
||||
<maml:uri>https://github.com/wcarroll/ZertoApiWrapper/blob/master/docs/Save-ZertoVpgSettings.md</maml:uri>
|
||||
<maml:uri>https://github.com/wcarroll/ZertoApiWrapper/blob/master/docs/Save-ZertoVpgSetting.md</maml:uri>
|
||||
</maml:navigationLink>
|
||||
<maml:navigationLink>
|
||||
<maml:linkText>Zerto REST API VPG Settings End Point Documentation</maml:linkText>
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
# Starter pipeline
|
||||
# Start with a minimal pipeline that you can customize to build and deploy your code.
|
||||
# Add steps that build, run tests, deploy, and more:
|
||||
# https://aka.ms/yaml
|
||||
|
||||
name: $(TeamProject)_$(BuildDefinitionName)_$(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.rr)
|
||||
|
||||
jobs:
|
||||
- job: Build_PS_Win2016
|
||||
timeoutInMinutes: 10
|
||||
cancelTimeoutInMinutes: 2
|
||||
pool:
|
||||
vmImage: vs2017-win2016
|
||||
steps:
|
||||
- script: |
|
||||
pwsh -c ".\build.ps1 -Verbose"
|
||||
displayName: 'Build and Test'
|
||||
- task: PublishTestResults@2
|
||||
inputs:
|
||||
testRunner: 'NUnit'
|
||||
testResultsFiles: '**/Public/TestResults.xml'
|
||||
testRunTitle: 'PS_Win2016'
|
||||
displayName: 'Publish Test Results'
|
||||
condition: always()
|
||||
|
||||
- job: Build_PSCore_Ubuntu1604
|
||||
timeoutInMinutes: 10
|
||||
cancelTimeoutInMinutes: 2
|
||||
pool:
|
||||
vmImage: ubuntu-16.04
|
||||
steps:
|
||||
- script: |
|
||||
pwsh -c '.\build.ps1 -verbose'
|
||||
displayName: 'Build and Test'
|
||||
- task: PublishTestResults@2
|
||||
inputs:
|
||||
testRunner: 'NUnit'
|
||||
testResultsFiles: '**/Public/TestResults.xml'
|
||||
testRunTitle: 'PSCore_Ubuntu1604'
|
||||
displayName: 'Publish Test Results'
|
||||
condition: always()
|
||||
|
||||
- job: Build_PSCore_MacOS1013
|
||||
timeoutInMinutes: 10
|
||||
cancelTimeoutInMinutes: 2
|
||||
pool:
|
||||
vmImage: xcode9-macos10.13
|
||||
steps:
|
||||
- script: |
|
||||
pwsh -c '.\build.ps1 -verbose'
|
||||
displayName: 'Build and Test'
|
||||
- task: PublishTestResults@2
|
||||
inputs:
|
||||
testRunner: 'NUnit'
|
||||
testResultsFiles: '**/Public/TestResults.xml'
|
||||
testRunTitle: 'PSCore_MacOS1013'
|
||||
displayName: 'Publish Test Results'
|
||||
condition: always()
|
||||
@@ -0,0 +1,16 @@
|
||||
# Bootstrap the environment
|
||||
$null = Get-PackageProvider -Name NuGet -ForceBootstrap
|
||||
|
||||
if (-not (Get-Module -Name PSDepend -ListAvailable)) {
|
||||
Install-Module -Name PSDepend -Scope CurrentUser -Force -Confirm:$false
|
||||
}
|
||||
|
||||
Import-Module -Name PSDepend
|
||||
Invoke-PSDepend `
|
||||
-Path $PSScriptRoot `
|
||||
-Force `
|
||||
-Import `
|
||||
-Install `
|
||||
-Tags 'Bootstrap'
|
||||
|
||||
Invoke-Build .
|
||||
@@ -8,7 +8,8 @@ schema: 2.0.0
|
||||
# Get-ZertoVirtualizationSite
|
||||
|
||||
## SYNOPSIS
|
||||
{{Fill in the Synopsis}}
|
||||
|
||||
Returns information about the hypervisor site where the API is run and all the sites paired with this site. The information returned can be tailored to specific information about the resources managed at a specified site.
|
||||
|
||||
## SYNTAX
|
||||
|
||||
@@ -68,16 +69,38 @@ Get-ZertoVirtualizationSite -siteIdentifier <String> [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
{{Fill in the Description}}
|
||||
|
||||
Returns information about the hypervisor site where the API is run and all the sites paired with this site. The information returned can be tailored to specific information about the resources managed at a specified site.
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### Example 1
|
||||
```powershell
|
||||
PS C:\> {{ Add example code here }}
|
||||
PS C:\> Get-ZertoVirtualizationSite -siteIdentifier "MySiteIdentifier"
|
||||
```
|
||||
|
||||
{{ Add example description here }}
|
||||
Returns information about the site with identifier "MySiteIdentifier"
|
||||
|
||||
### Example 2
|
||||
```powershell
|
||||
PS C:\> Get-ZertoVirtualizationSite -siteIdentifier "MySiteIdentifier" -datastoreClusters
|
||||
```
|
||||
|
||||
Returns information about datastore clusters at site with site identifier "MySiteidentifier"
|
||||
|
||||
### Example 3
|
||||
```powershell
|
||||
PS C:\> Get-ZertoVirtualizationSite -siteIdentifier "MySiteIdentifier" -datastores
|
||||
```
|
||||
|
||||
Returns information about datastores at site with site identifier "MySiteidentifier"
|
||||
|
||||
### Example 4
|
||||
```powershell
|
||||
PS C:\> Get-ZertoVirtualizationSite -siteIdentifier "MySiteIdentifier" -devices
|
||||
```
|
||||
|
||||
Returns information about devices at site with site identifier "MySiteidentifier"
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
|
||||
@@ -118,35 +118,35 @@ It is important to note that only once a VPG settings object has been created, w
|
||||
|
||||
### Example 1
|
||||
```powershell
|
||||
PS C:\> Get-ZertoVpgSettings -vpgSettingsIdentifier "MySettingsIdentifier"
|
||||
PS C:\> Get-ZertoVpgSetting -vpgSettingsIdentifier "MySettingsIdentifier"
|
||||
```
|
||||
|
||||
Returns all current settings for vpgSettingsIdentifier "MySettingsIdentifier"
|
||||
|
||||
### Example 2
|
||||
```powershell
|
||||
PS C:\> Get-ZertoVpgSettings -vpgSettingsIdentifier "MySettingsIdentifier" -vmIdentifier "MyVmId"
|
||||
PS C:\> Get-ZertoVpgSetting -vpgSettingsIdentifier "MySettingsIdentifier" -vmIdentifier "MyVmId"
|
||||
```
|
||||
|
||||
Returns all current vm level settings for the vmIdentifier "MyVmId" in vpgSettingsIdentifier "MySettingsIdentifier"
|
||||
|
||||
### Example 3
|
||||
```powershell
|
||||
PS C:\> Get-ZertoVpgSettings -vpgSettingsIdentifier "MySettingsIdentifier" -vmIdentifier "MyVmId" -volumes
|
||||
PS C:\> Get-ZertoVpgSetting -vpgSettingsIdentifier "MySettingsIdentifier" -vmIdentifier "MyVmId" -volumes
|
||||
```
|
||||
|
||||
Returns current vm level settings for volumes for vmId "MyVmId" in vpgSettingsIdentifier "MySettingsIdentifier"
|
||||
|
||||
### Example 4
|
||||
```powershell
|
||||
PS C:\> Get-ZertoVpgSettings -vpgSettingsIdentifier "MySettingsIdentifier" -nics
|
||||
PS C:\> Get-ZertoVpgSetting -vpgSettingsIdentifier "MySettingsIdentifier" -nics
|
||||
```
|
||||
|
||||
Returns current vm level settings for nics for vmId "MyVmId" in vpgSettingsIdentifier "MySettingsIdentifier"
|
||||
|
||||
### Example 5
|
||||
```powershell
|
||||
PS C:\> Get-ZertoVpgSettings -vpgSettingsIdentifier "MySettingsIdentifier" -basic
|
||||
PS C:\> Get-ZertoVpgSetting -vpgSettingsIdentifier "MySettingsIdentifier" -basic
|
||||
```
|
||||
|
||||
Returns current basic settings for vpgSettingsIdentifier "MySettingsIdentifier"
|
||||
|
||||
@@ -150,8 +150,7 @@ Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### CommonParameters
|
||||
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
|
||||
For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
|
||||
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
|
||||
|
||||
## INPUTS
|
||||
|
||||
|
||||
@@ -1,92 +1,92 @@
|
||||
---
|
||||
external help file: ZertoApiWrapper-help.xml
|
||||
Module Name: ZertoApiWrapper
|
||||
online version: https://github.com/wcarroll/ZertoApiWrapper/blob/master/docs/Save-ZertoVpgSettings.md
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# Save-ZertoVpgSettings
|
||||
|
||||
## SYNOPSIS
|
||||
Commits the updated Vpg Settings with the configured Vpg Settings Identifier
|
||||
|
||||
## SYNTAX
|
||||
|
||||
```
|
||||
Save-ZertoVpgSettings [-vpgSettingsIdentifier] <String> [-WhatIf] [-Confirm] [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
Commits the updated Vpg Settings with the configured Vpg Settings Identifier
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### Example 1
|
||||
```powershell
|
||||
PS C:> Save-ZertoVpgSettings -vpgSettingsIdentifier "MyVpgSettingsIdentifier"
|
||||
```
|
||||
|
||||
Commits vpg settings with vpg settings identifier "MyVpgSettingsIdentifier"
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -vpgSettingsIdentifier
|
||||
VpgSettings Identifier to save
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases: vpgSettingsId
|
||||
|
||||
Required: True
|
||||
Position: 0
|
||||
Default value: None
|
||||
Accept pipeline input: True (ByPropertyName, ByValue)
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Confirm
|
||||
Prompts you for confirmation before running the cmdlet.
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases: cf
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -WhatIf
|
||||
Shows what would happen if the cmdlet runs.
|
||||
The cmdlet is not run.
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases: wi
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### CommonParameters
|
||||
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
|
||||
|
||||
## INPUTS
|
||||
|
||||
### System.String
|
||||
## OUTPUTS
|
||||
|
||||
### System.Object
|
||||
## NOTES
|
||||
|
||||
## RELATED LINKS
|
||||
|
||||
[Zerto REST API VPG Settings End Point Documentation](http://s3.amazonaws.com/zertodownload_docs/Latest/Zerto%20Virtual%20Replication%20Zerto%20Virtual%20Manager%20%28ZVM%29%20-%20vSphere%20Online%20Help/RestfulAPIs/StatusAPIs.5.108.html#)
|
||||
---
|
||||
external help file: ZertoApiWrapper-help.xml
|
||||
Module Name: ZertoApiWrapper
|
||||
online version: https://github.com/wcarroll/ZertoApiWrapper/blob/master/docs/Save-ZertoVpgSetting.md
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# Save-ZertoVpgSetting
|
||||
|
||||
## SYNOPSIS
|
||||
Commits the updated Vpg Settings with the configured Vpg Settings Identifier
|
||||
|
||||
## SYNTAX
|
||||
|
||||
```
|
||||
Save-ZertoVpgSetting [-vpgSettingsIdentifier] <String> [-WhatIf] [-Confirm] [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
Commits the updated Vpg Settings with the configured Vpg Settings Identifier
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### Example 1
|
||||
```powershell
|
||||
PS C:> Save-ZertoVpgSetting -vpgSettingsIdentifier "MyVpgSettingsIdentifier"
|
||||
```
|
||||
|
||||
Commits vpg settings with vpg settings identifier "MyVpgSettingsIdentifier"
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -vpgSettingsIdentifier
|
||||
VpgSettings Identifier to save
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases: vpgSettingsId
|
||||
|
||||
Required: True
|
||||
Position: 1
|
||||
Default value: None
|
||||
Accept pipeline input: True (ByPropertyName, ByValue)
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Confirm
|
||||
Prompts you for confirmation before running the cmdlet.
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases: cf
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -WhatIf
|
||||
Shows what would happen if the cmdlet runs.
|
||||
The cmdlet is not run.
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases: wi
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### CommonParameters
|
||||
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
|
||||
|
||||
## INPUTS
|
||||
|
||||
### System.String
|
||||
## OUTPUTS
|
||||
|
||||
### System.Object
|
||||
## NOTES
|
||||
|
||||
## RELATED LINKS
|
||||
|
||||
[Zerto REST API VPG Settings End Point Documentation](http://s3.amazonaws.com/zertodownload_docs/Latest/Zerto%20Virtual%20Replication%20Zerto%20Virtual%20Manager%20%28ZVM%29%20-%20vSphere%20Online%20Help/RestfulAPIs/StatusAPIs.5.108.html#)
|
||||
Reference in New Issue
Block a user