Skip to content
Merged
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
36 changes: 36 additions & 0 deletions PowerFGT/Private/Confirm.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,42 @@ Function Confirm-FGTFirewallPolicy {

}

Function Confirm-FGTFirewallLocalInPolicy {

Param (
[Parameter (Mandatory = $true)]
[object]$argument
)

#Check if it looks like an Firewall Local InPolicy element

if ( -not ( $argument | get-member -name policyid -Membertype Properties)) {
throw "Element specified does not contain a policyid property."
}
#No uuid before 6.4.x
#if ( -not ( $argument | get-member -name uuid -Membertype Properties)) {
# throw "Element specified does not contain an uuid property."
#}
if ( -not ( $argument | get-member -name intf -Membertype Properties)) {
throw "Element specified does not contain a intf property."
}
if ( -not ( $argument | get-member -name srcaddr -Membertype Properties)) {
throw "Element specified does not contain a srcaddr property."
}
if ( -not ( $argument | get-member -name dstaddr -Membertype Properties)) {
throw "Element specified does not contain a dstaddr property."
}
if ( -not ( $argument | get-member -name action -Membertype Properties)) {
throw "Element specified does not contain an action property."
}
if ( -not ( $argument | get-member -name status -Membertype Properties)) {
throw "Element specified does not contain a status property."
}

$true

}

Function Confirm-FGTFirewallProxyPolicy {

Param (
Expand Down
Loading
Loading