Commit 37749d5f authored by Leigh B Stoller's avatar Leigh B Stoller

Add routines for firewalls and linkdelays.

parent f3d69919
......@@ -395,6 +395,17 @@ sub GetBandwidth($)
return $result;
}
sub GetLinkProperties($)
{
my ($link) = @_;
my @result = ();
if (! IsVersion0($link)) {
@result = FindNodes("n:property", $link)->get_nodelist();
}
return @result;
}
sub GetMask($$)
{
my ($ifaceref, $node) = @_;
......@@ -758,6 +769,14 @@ sub GetDelayPipes($)
return @result;
}
sub GetLinkDelayPipes($)
{
my ($link) = @_;
my @result = FindNodesNS("n:sliver_type_shaping/n:pipe", $link,
$DELAY_NS)->get_nodelist();
return @result;
}
sub HasXenSettings($)
{
my ($node) = @_;
......@@ -828,6 +847,33 @@ sub GetXenSettings($)
return $result;
}
sub HasFirewallSettings($)
{
my ($node) = @_;
my @settings = FindNodesNS("n:firewall", $node, $EMULAB_NS);
return 1
if (@settings);
return 0;
}
sub GetFirewallSettings($)
{
my ($node) = @_;
my $result = {};
my $settings = FindNodesNS("n:firewall", $node, $EMULAB_NS)->pop();
return undef
if (!defined($settings));
my $tmp = GetText("style", $settings);
$result->{"style"} = $tmp
if (defined($tmp));
return $result;
}
sub HasTagSetting($)
{
my ($link) = @_;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment