Initial commit

This commit is contained in:
Laurence Horrocks-Barlow 2026-05-19 00:35:27 +01:00
commit 6bf433c9a9
20 changed files with 1162 additions and 0 deletions

53
Public/GpfsFilesystem.ps1 Normal file
View file

@ -0,0 +1,53 @@
function Get-GpfsFilesystem {
[CmdletBinding(DefaultParameterSetName = 'All')]
param(
[Parameter(Mandatory, ParameterSetName = 'ByName', Position = 0)]
[string]$FilesystemName
)
if ($PSCmdlet.ParameterSetName -eq 'ByName') {
Invoke-GpfsApiRequest -Method GET -Endpoint "filesystems/$FilesystemName"
}
else {
Invoke-GpfsApiRequest -Method GET -Endpoint 'filesystems'
}
}
function New-GpfsFilesystem {
[CmdletBinding(SupportsShouldProcess)]
param(
[Parameter(Mandatory)]
[hashtable]$Settings
)
if ($PSCmdlet.ShouldProcess('filesystem', 'Create')) {
Invoke-GpfsApiRequest -Method POST -Endpoint 'filesystems' -Body $Settings
}
}
function Set-GpfsFilesystem {
[CmdletBinding(SupportsShouldProcess)]
param(
[Parameter(Mandatory, Position = 0)]
[string]$FilesystemName,
[Parameter(Mandatory)]
[hashtable]$Settings
)
if ($PSCmdlet.ShouldProcess($FilesystemName, 'Update filesystem')) {
Invoke-GpfsApiRequest -Method PUT -Endpoint "filesystems/$FilesystemName" -Body $Settings
}
}
function Remove-GpfsFilesystem {
[CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'High')]
param(
[Parameter(Mandatory, Position = 0)]
[string]$FilesystemName
)
if ($PSCmdlet.ShouldProcess($FilesystemName, 'Remove filesystem')) {
Invoke-GpfsApiRequest -Method DELETE -Endpoint "filesystems/$FilesystemName"
}
}