For the complete documentation index, see llms.txt. This page is also available as Markdown.

Initial Configuration

Before running any test, edit CustomProvider.psd1 and configure the following values:

Value
Description
Example

CommandPath

Full path to the script executable.

C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe

CommandArgs

Arguments required by the executable.

-File "C:\Scripts\Proxmox.ps1"

CustomSettings

Hashtable containing any custom provider settings required by the script.

@{ token='secret' }

A practical way to validate a new custom provider implementation is to use the framework in the following order:

  1. Run Test-Connect.ps1 to verify initialization and connectivity.

  2. Run Test-GuestsList.ps1 and Test-GuestsGet.ps1 to confirm guest discovery and guest details.

  3. Run Test-GuestsControl.ps1 to validate start, stop, reset, restart, suspend, or delete behavior.

  4. If template support is implemented, run Test-GuestsConvert.ps1, Test-GuestsClone.ps1, and Test-TasksGet.ps1.

  5. If linked clones or versioning support is implemented, validate snapshot create, exists, revert (only for template versioning), and delete operations.

  6. Finally, run the high-level workflow tests such as Test-CreateTemplate.ps1, Test-EnterMaintenance.ps1, Test-ExitMaintenance.ps1, and Test-CreateHost.ps1 to simulate how RAS will use the provider in real scenarios.

The tests are grouped into logical categories based on functionality:

  • Connection & Session

  • Guest Operations

  • Template & Clone Operations

  • Snapshot Operations

  • Task Monitoring

  • End-to-End (High-Level) Workflows

Connection & Session Tests

Script
Purpose
Description
Parameters

Test-Connect.ps1

Initialize connection

Starts the provider, initializes protocol, validates custom settings

None

Test-Disconnect.ps1

Disconnect session

Ensures provider cleans up and shuts down properly

None

Guest Operations

Script

Purpose

Description

Parameters

Test-GuestsList.ps1

List VMs

Retrieves all guest IDs from provider

None

Test-GuestsGet.ps1

Get VM details

Retrieves detailed information about a specific VM

GuestID (Required)

Test-GuestsControl.ps1

Control VM state

Executes power/state operations on a VM

GuestID (Required), Control (Required)

Template & Clone Operations

Script

Purpose

Description

Parameters

Test-GuestsConvert.ps1

Convert VM/template

Converts VM ↔ template

GuestID (Required), IsTemplate (Optional)

Test-GuestsClone.ps1

Clone VM

Creates a new VM from template

GuestID (Required), CloneName (Required), SnapshotName (Optional)

Snapshot Operations

Script
Purpose
Description
Parameters

Test-GuestsSnapshotsCreate.ps1

Create snapshot

GuestID (Required), SnapshotName (Required)

Task ID

Test-GuestsSnapshotsDelete.ps1

Delete snapshot

GuestID (Required), SnapshotName (Required)

Task ID

Test-GuestsSnapshotsExists.ps1

Check snapshot

GuestID (Required), SnapshotName (Required)

True / False

Test-GuestsSnapshotsRevert.ps1

Revert snapshot

GuestID (Required), SnapshotName (Required)

Task ID

Task Monitoring

Script
Purpose
Description
Parameters

Test-TasksGet.ps1

Check task status

Retrieves status of async operation

TaskID (Required)

End-to-End Workflow Tests

Script
Purpose
Description
Parameters

Test-CreateTemplate.ps1

Create template

Converts VM to template and handles snapshots/versions

GuestID (Required)

Test-EnterMaintenance.ps1

Template → VM

Converts template to VM, may revert version

GuestID (Required), TemplateVersionID (Optional)

Test-ExitMaintenance.ps1

VM → Template

Converts VM back to template, may create new version

GuestID (Required), TemplateVersionID (Optional)

Test-CreateHost.ps1

Create host

Creates VM from template

GuestID (Required), CloneName (Required), TemplateVersionID (Optional)

Last updated