Commit 896d5768 authored by Leigh Stoller's avatar Leigh Stoller

Add set/get for the slice name field.

parent 9b895f95
......@@ -306,6 +306,7 @@ 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 name($) { return field($_[0], "name"); }
sub registered($) { return field($_[0], "registered"); }
sub isplaceholder($) { return field($_[0], "isplaceholder"); }
sub monitor_pid($) { return field($_[0], "monitor_pid"); }
......@@ -1082,6 +1083,23 @@ sub SetFirewallFlag($$)
return 0;
}
#
# Set the name field.
#
sub SetName($$)
{
my ($self, $name) = @_;
my $uuid = $self->uuid();
my $safe_name = DBQuoteSpecial($name);
DBQueryWarn("update geni_slices set name=$safe_name " .
"where uuid='$uuid'")
or return -1;
$self->{'SLICE'}->{'name'} = $name;
return 0;
}
#
# Set the registered field.
#
......
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