Commit 925819c9 authored by Leigh B. Stoller's avatar Leigh B. Stoller

Add method to set the firewall flag on a slice.

parent 5780e2ea
......@@ -129,6 +129,7 @@ sub shutdown($) { return field($_[0], "shutdown"); }
sub expires($) { return field($_[0], "expires"); }
sub sa_uuid($) { return field($_[0], "sa_uuid"); }
sub exptidx($) { return field($_[0], "exptidx"); }
sub needsfirewall($) { return field($_[0], "needsfirewall"); }
sub cert($) { return $_[0]->{'CERT'}->cert(); }
sub GetCertificate($) { return $_[0]->{'CERT'}; }
sub LOCKED($) { return $_[0]->{'LOCKED'}; }
......@@ -598,6 +599,27 @@ sub SetShutdown($$)
return 0;
}
#
# Set the needsfirewall field.
#
sub SetFirewallFlag($$)
{
my ($self, $needsfirewall) = @_;
my $uuid = $self->uuid();
$needsfirewall = ($needsfirewall ? 1 : 0);
my $query_result =
DBQueryWarn("update geni_slices set needsfirewall='$needsfirewall' " .
"where uuid='$uuid'");
return -1
if (!$query_result);
$self->{'SLICE'}->{'needsfirewall'} = $needsfirewall;
return 0;
}
#
# Delete all slices for an authority.
#
......
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