Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,5 +151,31 @@ Of course, you may still need KVM (or some other kind of alternate connection to
- It will automatically run Windows Setup as the VHD OS is prepared. When asked, provide your country, language, keyboard, and other preferences.
- Something goes wrong in the reboot/customization process, and you are not able to RDP to the HOST after some time.

## Template Validator

Test-TemplateCapability [-CapabilitiesPath] <String> [-TemplateDirectory] <String> [-TemplatePattern] <String> [-OutputPath] <String>

Parameter Description
CapabilitiesPath - Full Directory path to the Json that has Azure Stack TP2 capabillities ex: AzureStackCapabilitiesTP2.json
TemplateDirectory - Path to directory containing templates to validate ex: ".\Templates"
TemplatePattern - Pattern to select templates. Performs PowerShell -like comparison over all files contained in TemplateDirectory including subfile paths. ex: "*\azuredeploy.json"
OutputPath - Output filename with path for the validation output. Supports plain txt, html, and xlsx file extensions

#Usage Instructions
Copy contents to C:\TemplateValidator and run the below script

```powershell
Import-Module ".\TemplateValidator.psm1"
Import-module ".\CapabilityParser.dll"
Test-TemplateCapability -CapabilitiesPath "C:\TemplateValidator\AzureStackCapabilitiesTP2.json" -TemplateDirectory ".\Templates" `
-TemplatePattern "*\azuredeploy.json" -OutputPath ".\TemplateValidationResults.html" -Verbose
```

# To Perform Compute Resource Provider Images and Extensions validation use as below
```powershell
Test-TemplateCapability -CapabilitiesPath "C:\TemplateValidator\AzureStackCapabilitiesTP2.json" -TemplateDirectory ".\Templates" `
-TemplatePattern "*\azuredeploy.json" -OutputPath ".\TemplateValidationResults.html" -ProcessImageExtensions $True -Verbose
```

---
_This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments._
Binary file added TemplateValidator/AzureStackCapabilitiesTP2.json
Binary file not shown.
Binary file added TemplateValidator/CapabilityParser.dll
Binary file not shown.
Binary file added TemplateValidator/Newtonsoft.Json.dll
Binary file not shown.
25 changes: 25 additions & 0 deletions TemplateValidator/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
## Template Validator

Test-TemplateCapability [-CapabilitiesPath] <String> [-TemplateDirectory] <String> [-TemplatePattern] <String> [-OutputPath] <String>

Parameter Description
CapabilitiesPath - Full Directory path to the Json that has Azure Stack TP2 capabillities ex: AzureStackCapabilitiesTP2.json
TemplateDirectory - Path to directory containing templates to validate ex: ".\Templates"
TemplatePattern - Pattern to select templates. Performs PowerShell -like comparison over all files contained in TemplateDirectory including subfile paths. ex: "*\azuredeploy.json"
OutputPath - Output filename with path for the validation output. Supports plain txt, html, and xlsx file extensions

#Usage Instructions
Copy contents to C:\TemplateValidator and run the below script

```powershell
Import-Module ".\TemplateValidator.psm1"
Import-module ".\CapabilityParser.dll"
Test-TemplateCapability -CapabilitiesPath "C:\TemplateValidator\AzureStackCapabilitiesTP2.json" -TemplateDirectory ".\Templates" `
-TemplatePattern "*\azuredeploy.json" -OutputPath ".\TemplateValidationResults.html" -Verbose
```

# To Perform Compute Resource Provider Images and Extensions validation use as below
```powershell
Test-TemplateCapability -CapabilitiesPath "C:\TemplateValidator\AzureStackCapabilitiesTP2.json" -TemplateDirectory ".\Templates" `
-TemplatePattern "*\azuredeploy.json" -OutputPath ".\TemplateValidationResults.html" -ProcessImageExtensions $True -Verbose
```
Binary file not shown.
Loading