Merge pull request #20 from wcarroll/azure-pipelines
Set up CI with Azure Pipelines [skip ci]
This commit is contained in:
@@ -1,23 +1,39 @@
|
|||||||
|
$moduleName = "ZertoApiWrapper"
|
||||||
$moduleFileName = "ZertoApiWrapper.psm1"
|
$moduleFileName = "ZertoApiWrapper.psm1"
|
||||||
$filePath = (Split-Path -Parent $MyInvocation.MyCommand.Path) -replace 'Tests', 'ZertoApiWrapper'
|
$filePath = (Split-Path -Parent $MyInvocation.MyCommand.Path) -replace 'Tests', 'ZertoApiWrapper'
|
||||||
$fileName = (Split-Path -Leaf $MyInvocation.MyCommand.Path ) -replace '.Tests.', '.'
|
$docsPath = (Split-Path -Parent $MyInvocation.MyCommand.Path) -replace 'Tests[\\\/]Public', 'docs'
|
||||||
$modulePath = $filePath -replace "Public", ""
|
$modulePath = $filePath -replace "Public", ""
|
||||||
Import-Module $modulePath\$moduleFileName -Force
|
|
||||||
|
|
||||||
$userName = "zerto\build"
|
Import-Module $modulePath\$moduleFileName
|
||||||
$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"
|
|
||||||
|
|
||||||
Describe "File Tests" {
|
Describe "File Tests" {
|
||||||
$commands = Get-Command -Module ZertoApiWrapper | Select-Object -ExpandProperty Name
|
Remove-Module $moduleName -Force
|
||||||
|
Import-Module $modulePath\$moduleFileName
|
||||||
|
$commands = Get-Command -Module $moduleName | Select-Object -ExpandProperty Name
|
||||||
foreach ($command in $commands) {
|
foreach ($command in $commands) {
|
||||||
|
$externalHelpFile = "{0}/{1}.md" -f $docsPath, $command
|
||||||
$path = "{0}/{1}.ps1" -f $filePath, $command
|
$path = "{0}/{1}.ps1" -f $filePath, $command
|
||||||
it "$command is backed by a file with the same name" {
|
context "$command File Tests" {
|
||||||
$path | should exist
|
it "$command is backed by a file with the same name" {
|
||||||
|
$path | should exist
|
||||||
|
}
|
||||||
|
it "$command file has openbraces on the same line as the statement" {
|
||||||
|
$content = Get-Content -Path $path
|
||||||
|
$openingBracesExist = $content | Where-Object {$_.Trim() -eq '{'}
|
||||||
|
if ($openingBracesExist) {
|
||||||
|
Write-Warning "Found the following opening brances on their own line:"
|
||||||
|
foreach ($openingBrace in $openingBracesExist) {
|
||||||
|
Write-Warning "Opening Brace on it's own line - $openingBrace"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$openingBracesExist | should benullorempty
|
||||||
|
}
|
||||||
|
it "$command has an external help file" {
|
||||||
|
$externalHelpFile | should exist
|
||||||
|
}
|
||||||
|
it "$command has the External Help File Defined" {
|
||||||
|
Get-Content -Path $path -First 1 | should be "<# .ExternalHelp ./en-us/ZertoApiWrapper-help.xml #>"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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'
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,17 +1,44 @@
|
|||||||
task . InstallDependencies, Analyze
|
#Requires -Modules 'InvokeBuild'
|
||||||
|
|
||||||
task InstallDependencies {
|
. '.\ZertoApiWrapper.settings.ps1'
|
||||||
Install-Module Pester -Force
|
# import-module "$BuildRoot\ZertoApiWrapper\ZertoApiWrapper.psd1" -Verbose -Force
|
||||||
Install-Module PSScriptAnalyzer -Force
|
|
||||||
|
<# [CmdletBinding()]
|
||||||
|
param([switch]$Install,
|
||||||
|
[string]$Configuration = (property Configuration Release))
|
||||||
|
$targetDir = "temp/$Configuration/ZertoApiWrapper" #>
|
||||||
|
|
||||||
|
task . Analyze, FileTests
|
||||||
|
|
||||||
|
<# Synopsis: Ensure platyPS is installed #>
|
||||||
|
task CheckPlatyPSInstalled {
|
||||||
|
if ($null -eq (Get-Module -List platyPS)) {
|
||||||
|
Install-Module -Scope CurrentUser -Repository PSGallery -Name platyPS
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task Analyze {
|
<# Synopsis: Ensure Pester is installed #>
|
||||||
|
task CheckPesterInstalled {
|
||||||
|
if ($null -eq (Get-Module -List Pester)) {
|
||||||
|
Install-Module -Scope CurrentUser -Repository PSGallery -Name Pester
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
<# Synopsis: Ensure PSScriptAnalyzer is installed #>
|
||||||
|
task CheckPSScriptAnalyzerInstalled {
|
||||||
|
if ($null -eq (Get-Module -List PSScriptAnalyzer)) {
|
||||||
|
Install-Module -Scope CurrentUser -Repository PSGallery -Name PSScriptAnalyzer
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
<# Synopsis: Analyze ZertoApiWrapper functions for Code Violations #>
|
||||||
|
task Analyze CheckPSScriptAnalyzerInstalled, CheckPesterInstalled, CheckPlatyPSInstalled, {
|
||||||
$scriptAnalyzerParams = @{
|
$scriptAnalyzerParams = @{
|
||||||
Path = "$BuildRoot\ZertoApiWrapper\"
|
Path = "$BuildRoot\ZertoApiWrapper\"
|
||||||
Severity = @('Error', 'Warning')
|
Severity = @('Error', 'Warning')
|
||||||
Recurse = $true
|
Recurse = $true
|
||||||
Verbose = $false
|
Verbose = $false
|
||||||
ExcludeRule = 'PSUseDeclaredVarsMoreThanAssignments'
|
ExcludeRule = @('PSUseDeclaredVarsMoreThanAssignments', 'PSUseShouldProcessForStateChangingFunctions', 'PSUseToExportFieldsInManifest')
|
||||||
}
|
}
|
||||||
$saresults = Invoke-ScriptAnalyzer @scriptAnalyzerParams
|
$saresults = Invoke-ScriptAnalyzer @scriptAnalyzerParams
|
||||||
|
|
||||||
@@ -21,3 +48,25 @@ task Analyze {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
task FileTests CheckPesterInstalled, {
|
||||||
|
$testResultsFile = "$BuildRoot\Tests\Public\TestResults.xml"
|
||||||
|
Invoke-Pester -Script "$BuildRoot\Tests\Public\ZertoApiWrapper.Tests.ps1" -OutputFile $testResultsFile -PassThru
|
||||||
|
}
|
||||||
|
|
||||||
|
$buildMamlParams = @{
|
||||||
|
Inputs = { Get-ChildItem docs\*.md }
|
||||||
|
Outputs = ".\ZertoApiWrapper\Public\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 UpdateMarkdownHelp CheckPlatyPSInstalled, {
|
||||||
|
remove-module ZertoApiWrapper -force -ErrorAction SilentlyContinue
|
||||||
|
Import-Module .\ZertoApiWrapper\ZertoApiWrapper.psm1 -Force
|
||||||
|
Update-MarkDownHelp -Path docs -AlphabeticParamsOrder
|
||||||
|
}
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ function Import-ZertoVpg {
|
|||||||
$importedSettings.VpgSettingsIdentifier = $vpgSettingsIdentifier
|
$importedSettings.VpgSettingsIdentifier = $vpgSettingsIdentifier
|
||||||
$uri = "{0}/{1}" -f $baseUri, $vpgSettingsIdentifier
|
$uri = "{0}/{1}" -f $baseUri, $vpgSettingsIdentifier
|
||||||
Invoke-ZertoRestRequest -uri $uri -method "PUT" -body $($importedSettings | convertto-json -Depth 10)
|
Invoke-ZertoRestRequest -uri $uri -method "PUT" -body $($importedSettings | convertto-json -Depth 10)
|
||||||
$vpgSettingsIdentifier | Save-ZertoVpgSettings
|
$vpgSettingsIdentifier | Save-ZertoVpgSetting
|
||||||
if ($settingsFile.Count -gt 1) {
|
if ($settingsFile.Count -gt 1) {
|
||||||
Start-Sleep 5
|
Start-Sleep 5
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
<# .ExternalHelp ./en-us/ZertoApiWrapper-help.xml #>
|
<# .ExternalHelp ./en-us/ZertoApiWrapper-help.xml #>
|
||||||
function Save-ZertoVpgSettings {
|
function Save-ZertoVpgSetting {
|
||||||
[cmdletbinding(
|
[cmdletbinding(
|
||||||
SupportsShouldProcess = $true
|
SupportsShouldProcess = $true
|
||||||
)]
|
)]
|
||||||
@@ -5977,35 +5977,35 @@
|
|||||||
<command:examples>
|
<command:examples>
|
||||||
<command:example>
|
<command:example>
|
||||||
<maml:title>-------------------------- Example 1 --------------------------</maml:title>
|
<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>
|
<dev:remarks>
|
||||||
<maml:para>Returns all current settings for vpgSettingsIdentifier "MySettingsIdentifier"</maml:para>
|
<maml:para>Returns all current settings for vpgSettingsIdentifier "MySettingsIdentifier"</maml:para>
|
||||||
</dev:remarks>
|
</dev:remarks>
|
||||||
</command:example>
|
</command:example>
|
||||||
<command:example>
|
<command:example>
|
||||||
<maml:title>-------------------------- Example 2 --------------------------</maml:title>
|
<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>
|
<dev:remarks>
|
||||||
<maml:para>Returns all current vm level settings for the vmIdentifier "MyVmId" in vpgSettingsIdentifier "MySettingsIdentifier"</maml:para>
|
<maml:para>Returns all current vm level settings for the vmIdentifier "MyVmId" in vpgSettingsIdentifier "MySettingsIdentifier"</maml:para>
|
||||||
</dev:remarks>
|
</dev:remarks>
|
||||||
</command:example>
|
</command:example>
|
||||||
<command:example>
|
<command:example>
|
||||||
<maml:title>-------------------------- Example 3 --------------------------</maml:title>
|
<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>
|
<dev:remarks>
|
||||||
<maml:para>Returns current vm level settings for volumes for vmId "MyVmId" in vpgSettingsIdentifier "MySettingsIdentifier"</maml:para>
|
<maml:para>Returns current vm level settings for volumes for vmId "MyVmId" in vpgSettingsIdentifier "MySettingsIdentifier"</maml:para>
|
||||||
</dev:remarks>
|
</dev:remarks>
|
||||||
</command:example>
|
</command:example>
|
||||||
<command:example>
|
<command:example>
|
||||||
<maml:title>-------------------------- Example 4 --------------------------</maml:title>
|
<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>
|
<dev:remarks>
|
||||||
<maml:para>Returns current vm level settings for nics for vmId "MyVmId" in vpgSettingsIdentifier "MySettingsIdentifier"</maml:para>
|
<maml:para>Returns current vm level settings for nics for vmId "MyVmId" in vpgSettingsIdentifier "MySettingsIdentifier"</maml:para>
|
||||||
</dev:remarks>
|
</dev:remarks>
|
||||||
</command:example>
|
</command:example>
|
||||||
<command:example>
|
<command:example>
|
||||||
<maml:title>-------------------------- Example 5 --------------------------</maml:title>
|
<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>
|
<dev:remarks>
|
||||||
<maml:para>Returns current basic settings for vpgSettingsIdentifier "MySettingsIdentifier"</maml:para>
|
<maml:para>Returns current basic settings for vpgSettingsIdentifier "MySettingsIdentifier"</maml:para>
|
||||||
</dev:remarks>
|
</dev:remarks>
|
||||||
@@ -10656,9 +10656,9 @@
|
|||||||
</command:command>
|
</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: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:details>
|
||||||
<command:name>Save-ZertoVpgSettings</command:name>
|
<command:name>Save-ZertoVpgSetting</command:name>
|
||||||
<command:verb>Save</command:verb>
|
<command:verb>Save</command:verb>
|
||||||
<command:noun>ZertoVpgSettings</command:noun>
|
<command:noun>ZertoVpgSetting</command:noun>
|
||||||
<maml:description>
|
<maml:description>
|
||||||
<maml:para>Commits the updated Vpg Settings with the configured Vpg Settings Identifier</maml:para>
|
<maml:para>Commits the updated Vpg Settings with the configured Vpg Settings Identifier</maml:para>
|
||||||
</maml:description>
|
</maml:description>
|
||||||
@@ -10668,8 +10668,8 @@
|
|||||||
</maml:description>
|
</maml:description>
|
||||||
<command:syntax>
|
<command:syntax>
|
||||||
<command:syntaxItem>
|
<command:syntaxItem>
|
||||||
<maml:name>Save-ZertoVpgSettings</maml:name>
|
<maml:name>Save-ZertoVpgSetting</maml:name>
|
||||||
<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:name>vpgSettingsIdentifier</maml:name>
|
||||||
<maml:Description>
|
<maml:Description>
|
||||||
<maml:para>VpgSettings Identifier to save</maml:para>
|
<maml:para>VpgSettings Identifier to save</maml:para>
|
||||||
@@ -10706,7 +10706,7 @@
|
|||||||
</command:syntaxItem>
|
</command:syntaxItem>
|
||||||
</command:syntax>
|
</command:syntax>
|
||||||
<command:parameters>
|
<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:name>vpgSettingsIdentifier</maml:name>
|
||||||
<maml:Description>
|
<maml:Description>
|
||||||
<maml:para>VpgSettings Identifier to save</maml:para>
|
<maml:para>VpgSettings Identifier to save</maml:para>
|
||||||
@@ -10771,7 +10771,7 @@
|
|||||||
<command:examples>
|
<command:examples>
|
||||||
<command:example>
|
<command:example>
|
||||||
<maml:title>-------------------------- Example 1 --------------------------</maml:title>
|
<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>
|
<dev:remarks>
|
||||||
<maml:para>Commits vpg settings with vpg settings identifier "MyVpgSettingsIdentifier"</maml:para>
|
<maml:para>Commits vpg settings with vpg settings identifier "MyVpgSettingsIdentifier"</maml:para>
|
||||||
</dev:remarks>
|
</dev:remarks>
|
||||||
@@ -10780,7 +10780,7 @@
|
|||||||
<command:relatedLinks>
|
<command:relatedLinks>
|
||||||
<maml:navigationLink>
|
<maml:navigationLink>
|
||||||
<maml:linkText>Online Version:</maml:linkText>
|
<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:navigationLink>
|
<maml:navigationLink>
|
||||||
<maml:linkText>Zerto REST API VPG Settings End Point Documentation</maml:linkText>
|
<maml:linkText>Zerto REST API VPG Settings End Point Documentation</maml:linkText>
|
||||||
|
|||||||
@@ -0,0 +1,64 @@
|
|||||||
|
# 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
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
- job: Build_PS_Win2016
|
||||||
|
pool:
|
||||||
|
vmImage: vs2017-win2016
|
||||||
|
steps:
|
||||||
|
- powershell: |
|
||||||
|
.\build.ps1 -Verbose
|
||||||
|
displayName: 'Build and Test'
|
||||||
|
- task: PublishTestResults@2
|
||||||
|
inputs:
|
||||||
|
testRunner: 'NUnit'
|
||||||
|
testResultsFiles: '**/Public/TestResults.xml'
|
||||||
|
testRunTitle: 'PS_Win2016'
|
||||||
|
displayName: 'Publish Test Results'
|
||||||
|
|
||||||
|
- job: Build_PSCore_Ubuntu1604
|
||||||
|
|
||||||
|
pool:
|
||||||
|
vmImage: ubuntu-16.04
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- script: |
|
||||||
|
curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
|
||||||
|
curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | sudo tee /etc/apt/sources.list.d/microsoft.list
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y powershell
|
||||||
|
displayName: 'Install PowerShell Core'
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
pwsh -c '.\build.ps1'
|
||||||
|
displayName: 'Build and Test'
|
||||||
|
|
||||||
|
- task: PublishTestResults@2
|
||||||
|
inputs:
|
||||||
|
testRunner: 'NUnit'
|
||||||
|
testResultsFiles: '**/Public/TestResults.xml'
|
||||||
|
testRunTitle: 'PSCore_Ubuntu1604'
|
||||||
|
displayName: 'Publish Test Results'
|
||||||
|
|
||||||
|
- job: Build_PSCore_MacOS1013
|
||||||
|
pool:
|
||||||
|
vmImage: xcode9-macos10.13
|
||||||
|
steps:
|
||||||
|
- script: |
|
||||||
|
brew update
|
||||||
|
brew tap caskroom/cask
|
||||||
|
brew cask install powershell
|
||||||
|
displayName: 'Install PowerShell Core'
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
pwsh -c '.\build.ps1'
|
||||||
|
displayName: 'Build and Test'
|
||||||
|
|
||||||
|
- task: PublishTestResults@2
|
||||||
|
inputs:
|
||||||
|
testRunner: 'NUnit'
|
||||||
|
testResultsFiles: '**/Public/TestResults.xml'
|
||||||
|
testRunTitle: 'PSCore_MacOS1013'
|
||||||
|
displayName: 'Publish Test Results'
|
||||||
@@ -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 .
|
||||||
@@ -118,35 +118,35 @@ It is important to note that only once a VPG settings object has been created, w
|
|||||||
|
|
||||||
### Example 1
|
### Example 1
|
||||||
```powershell
|
```powershell
|
||||||
PS C:\> Get-ZertoVpgSettings -vpgSettingsIdentifier "MySettingsIdentifier"
|
PS C:\> Get-ZertoVpgSetting -vpgSettingsIdentifier "MySettingsIdentifier"
|
||||||
```
|
```
|
||||||
|
|
||||||
Returns all current settings for vpgSettingsIdentifier "MySettingsIdentifier"
|
Returns all current settings for vpgSettingsIdentifier "MySettingsIdentifier"
|
||||||
|
|
||||||
### Example 2
|
### Example 2
|
||||||
```powershell
|
```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"
|
Returns all current vm level settings for the vmIdentifier "MyVmId" in vpgSettingsIdentifier "MySettingsIdentifier"
|
||||||
|
|
||||||
### Example 3
|
### Example 3
|
||||||
```powershell
|
```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"
|
Returns current vm level settings for volumes for vmId "MyVmId" in vpgSettingsIdentifier "MySettingsIdentifier"
|
||||||
|
|
||||||
### Example 4
|
### Example 4
|
||||||
```powershell
|
```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"
|
Returns current vm level settings for nics for vmId "MyVmId" in vpgSettingsIdentifier "MySettingsIdentifier"
|
||||||
|
|
||||||
### Example 5
|
### Example 5
|
||||||
```powershell
|
```powershell
|
||||||
PS C:\> Get-ZertoVpgSettings -vpgSettingsIdentifier "MySettingsIdentifier" -basic
|
PS C:\> Get-ZertoVpgSetting -vpgSettingsIdentifier "MySettingsIdentifier" -basic
|
||||||
```
|
```
|
||||||
|
|
||||||
Returns current basic settings for vpgSettingsIdentifier "MySettingsIdentifier"
|
Returns current basic settings for vpgSettingsIdentifier "MySettingsIdentifier"
|
||||||
|
|||||||
@@ -150,8 +150,7 @@ Accept wildcard characters: False
|
|||||||
```
|
```
|
||||||
|
|
||||||
### CommonParameters
|
### CommonParameters
|
||||||
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
|
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).
|
||||||
For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
|
|
||||||
|
|
||||||
## INPUTS
|
## INPUTS
|
||||||
|
|
||||||
|
|||||||
@@ -1,92 +1,92 @@
|
|||||||
---
|
---
|
||||||
external help file: ZertoApiWrapper-help.xml
|
external help file: ZertoApiWrapper-help.xml
|
||||||
Module Name: ZertoApiWrapper
|
Module Name: ZertoApiWrapper
|
||||||
online version: https://github.com/wcarroll/ZertoApiWrapper/blob/master/docs/Save-ZertoVpgSettings.md
|
online version: https://github.com/wcarroll/ZertoApiWrapper/blob/master/docs/Save-ZertoVpgSetting.md
|
||||||
schema: 2.0.0
|
schema: 2.0.0
|
||||||
---
|
---
|
||||||
|
|
||||||
# Save-ZertoVpgSettings
|
# Save-ZertoVpgSetting
|
||||||
|
|
||||||
## SYNOPSIS
|
## SYNOPSIS
|
||||||
Commits the updated Vpg Settings with the configured Vpg Settings Identifier
|
Commits the updated Vpg Settings with the configured Vpg Settings Identifier
|
||||||
|
|
||||||
## SYNTAX
|
## SYNTAX
|
||||||
|
|
||||||
```
|
```
|
||||||
Save-ZertoVpgSettings [-vpgSettingsIdentifier] <String> [-WhatIf] [-Confirm] [<CommonParameters>]
|
Save-ZertoVpgSetting [-vpgSettingsIdentifier] <String> [-WhatIf] [-Confirm] [<CommonParameters>]
|
||||||
```
|
```
|
||||||
|
|
||||||
## DESCRIPTION
|
## DESCRIPTION
|
||||||
Commits the updated Vpg Settings with the configured Vpg Settings Identifier
|
Commits the updated Vpg Settings with the configured Vpg Settings Identifier
|
||||||
|
|
||||||
## EXAMPLES
|
## EXAMPLES
|
||||||
|
|
||||||
### Example 1
|
### Example 1
|
||||||
```powershell
|
```powershell
|
||||||
PS C:> Save-ZertoVpgSettings -vpgSettingsIdentifier "MyVpgSettingsIdentifier"
|
PS C:> Save-ZertoVpgSetting -vpgSettingsIdentifier "MyVpgSettingsIdentifier"
|
||||||
```
|
```
|
||||||
|
|
||||||
Commits vpg settings with vpg settings identifier "MyVpgSettingsIdentifier"
|
Commits vpg settings with vpg settings identifier "MyVpgSettingsIdentifier"
|
||||||
|
|
||||||
## PARAMETERS
|
## PARAMETERS
|
||||||
|
|
||||||
### -vpgSettingsIdentifier
|
### -vpgSettingsIdentifier
|
||||||
VpgSettings Identifier to save
|
VpgSettings Identifier to save
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
Type: String
|
Type: String
|
||||||
Parameter Sets: (All)
|
Parameter Sets: (All)
|
||||||
Aliases: vpgSettingsId
|
Aliases: vpgSettingsId
|
||||||
|
|
||||||
Required: True
|
Required: True
|
||||||
Position: 0
|
Position: 1
|
||||||
Default value: None
|
Default value: None
|
||||||
Accept pipeline input: True (ByPropertyName, ByValue)
|
Accept pipeline input: True (ByPropertyName, ByValue)
|
||||||
Accept wildcard characters: False
|
Accept wildcard characters: False
|
||||||
```
|
```
|
||||||
|
|
||||||
### -Confirm
|
### -Confirm
|
||||||
Prompts you for confirmation before running the cmdlet.
|
Prompts you for confirmation before running the cmdlet.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
Type: SwitchParameter
|
Type: SwitchParameter
|
||||||
Parameter Sets: (All)
|
Parameter Sets: (All)
|
||||||
Aliases: cf
|
Aliases: cf
|
||||||
|
|
||||||
Required: False
|
Required: False
|
||||||
Position: Named
|
Position: Named
|
||||||
Default value: None
|
Default value: None
|
||||||
Accept pipeline input: False
|
Accept pipeline input: False
|
||||||
Accept wildcard characters: False
|
Accept wildcard characters: False
|
||||||
```
|
```
|
||||||
|
|
||||||
### -WhatIf
|
### -WhatIf
|
||||||
Shows what would happen if the cmdlet runs.
|
Shows what would happen if the cmdlet runs.
|
||||||
The cmdlet is not run.
|
The cmdlet is not run.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
Type: SwitchParameter
|
Type: SwitchParameter
|
||||||
Parameter Sets: (All)
|
Parameter Sets: (All)
|
||||||
Aliases: wi
|
Aliases: wi
|
||||||
|
|
||||||
Required: False
|
Required: False
|
||||||
Position: Named
|
Position: Named
|
||||||
Default value: None
|
Default value: None
|
||||||
Accept pipeline input: False
|
Accept pipeline input: False
|
||||||
Accept wildcard characters: False
|
Accept wildcard characters: False
|
||||||
```
|
```
|
||||||
|
|
||||||
### CommonParameters
|
### 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
|
## INPUTS
|
||||||
|
|
||||||
### System.String
|
### System.String
|
||||||
## OUTPUTS
|
## OUTPUTS
|
||||||
|
|
||||||
### System.Object
|
### System.Object
|
||||||
## NOTES
|
## NOTES
|
||||||
|
|
||||||
## RELATED LINKS
|
## 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#)
|
[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