Initial commit
This commit is contained in:
commit
6bf433c9a9
20 changed files with 1162 additions and 0 deletions
24
Public/GpfsPolicy.ps1
Normal file
24
Public/GpfsPolicy.ps1
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
function Get-GpfsPolicy {
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[Parameter(Mandatory, Position = 0)]
|
||||
[string]$FilesystemName
|
||||
)
|
||||
|
||||
Invoke-GpfsApiRequest -Method GET -Endpoint "filesystems/$FilesystemName/policies"
|
||||
}
|
||||
|
||||
function Set-GpfsPolicy {
|
||||
[CmdletBinding(SupportsShouldProcess)]
|
||||
param(
|
||||
[Parameter(Mandatory, Position = 0)]
|
||||
[string]$FilesystemName,
|
||||
|
||||
[Parameter(Mandatory)]
|
||||
[hashtable]$Settings
|
||||
)
|
||||
|
||||
if ($PSCmdlet.ShouldProcess($FilesystemName, 'Apply policy')) {
|
||||
Invoke-GpfsApiRequest -Method PUT -Endpoint "filesystems/$FilesystemName/policies" -Body $Settings
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue