Skip to content
Snippets Groups Projects
Commit 07a4b0de authored by Nigel Kukard's avatar Nigel Kukard
Browse files

Added unset shaper state functions

parent 0cc57efa
No related branches found
No related tags found
No related merge requests found
......@@ -60,6 +60,7 @@ our (@ISA,@EXPORT,@EXPORT_OK);
removePoolAttribute
getPoolShaperState
setPoolShaperState
unsetPoolShaperState
isPoolIDValid
isPoolReady
......@@ -70,6 +71,7 @@ our (@ISA,@EXPORT,@EXPORT_OK);
getPoolMembersByIP
getPoolMemberMatchPriority
setPoolMemberShaperState
unsetPoolMemberShaperState
getPoolMemberShaperState
getPoolMemberMatchPriority
setPoolMemberAttribute
......@@ -1996,6 +1998,23 @@ sub setPoolShaperState
}
# Function to unset pools shaper state
sub unsetPoolShaperState
{
my ($pid,$state) = @_;
# Check pool exists first
if (!isPoolIDValid($pid)) {
return;
}
$pools->{$pid}->{'.shaper_state'} ^= $state;
return $pools->{$pid}->{'.shaper_state'};
}
# Function to get shaper state for a pool
sub getPoolShaperState
{
......@@ -2408,6 +2427,23 @@ sub setPoolMemberShaperState
}
# Function to unset pool member shaper state
sub unsetPoolMemberShaperState
{
my ($pmid,$state) = @_;
# Check pool member exists first
if (!isPoolMemberIDValid($pmid)) {
return;
}
$poolMembers->{$pmid}->{'.shaper_state'} ^= $state;
return $poolMembers->{$pmid}->{'.shaper_state'};
}
# Function to get shaper state for a pool
sub getPoolMemberShaperState
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment