Commit 1f708e2e authored by Leigh B. Stoller's avatar Leigh B. Stoller

Add urn() method to cons up a URN for tickets.

parent c00529e0
......@@ -22,6 +22,7 @@ use GeniCredential;
use GeniCertificate;
use emutil qw(TBGetUniqueIndex);
use GeniUtil;
use GeniHRN;
use English;
use XML::Simple;
use XML::LibXML;
......@@ -200,6 +201,15 @@ sub stored($) { return field($_[0], "stored"); }
sub slice_uuid($) { return field($_[0], "slice_uuid"); }
sub LOCKED($) { return $_[0]->{'LOCKED'}; }
# Return the URN.
sub urn($)
{
my ($self) = @_;
return GeniHRN::Generate("@OURDOMAIN@", "ticket", $self->idx());
}
#
# Stringify for output.
#
......
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