Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add RADIUS Server configuration (Add/Get/Set/Remove) #47

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
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
70 changes: 70 additions & 0 deletions PowerArubaCX/Private/Confirm.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,74 @@ function Confirm-ArubaCXVrfs {
throw "Element specified does not contain a ssh_enable property."
}
$true
}

function Confirm-ArubaCXTacacsServer {

Param (
[Parameter (Mandatory = $true)]
[object]$argument
)
#Check if it looks like a TACACS server element

if ( -not ( $argument | Get-Member -name auth_type -Membertype Properties)) {
throw "Element specified does not contain an auth_type property."
}
if ( -not ( $argument | Get-Member -name default_group_priority -Membertype Properties)) {
throw "Element specified does not contain a default_group_priority property."
}
if ( -not ( $argument | Get-Member -name group -Membertype Properties)) {
throw "Element specified does not contain a group property."
}
if ( -not ( $argument | Get-Member -name passkey -Membertype Properties)) {
throw "Element specified does not contain a passkey property."
}
if ( -not ( $argument | Get-Member -name timeout -Membertype Properties)) {
throw "Element specified does not contain a timeout property."
}
if ( -not ( $argument | Get-Member -name tracking_enable -Membertype Properties)) {
throw "Element specified does not contain a tracking_enable property."
}
if ( -not ( $argument | Get-Member -name user_group_priority -Membertype Properties)) {
throw "Element specified does not contain an user_group_priority property."
}
$true
}

function Confirm-ArubaCXRadiusServer {

Param (
[Parameter (Mandatory = $true)]
[object]$argument
)
#Check if it looks like a TACACS server element

if ( -not ( $argument | Get-Member -name auth_type -Membertype Properties)) {
throw "Element specified does not contain an auth_type property."
}
if ( -not ( $argument | Get-Member -name default_group_priority -Membertype Properties)) {
throw "Element specified does not contain a default_group_priority property."
}
if ( -not ( $argument | Get-Member -name group -Membertype Properties)) {
throw "Element specified does not contain a group property."
}
if ( -not ( $argument | Get-Member -name passkey -Membertype Properties)) {
throw "Element specified does not contain a passkey property."
}
if ( -not ( $argument | Get-Member -name clearpass -Membertype Properties)) {
throw "Element specified does not contain a clearpass property."
}
if ( -not ( $argument | Get-Member -name timeout -Membertype Properties)) {
throw "Element specified does not contain a timeout property."
}
if ( -not ( $argument | Get-Member -name retries -Membertype Properties)) {
throw "Element specified does not contain a retries property."
}
if ( -not ( $argument | Get-Member -name tracking_enable -Membertype Properties)) {
throw "Element specified does not contain a tracking_enable property."
}
if ( -not ( $argument | Get-Member -name user_group_priority -Membertype Properties)) {
throw "Element specified does not contain an user_group_priority property."
}
$true
}
Loading