Implements support for geni records TODO: Use existing PLC database methods? or keep this separate?
The GeniRecord class implements a Geni Record.
For more information about this class, see The GeniRecord Class.
The GeniRecord class implements a Geni Record. A GeniRecord is a tuple (Name, GID, Type, Info). Name specifies the HRN of the object GID is the GID of the object Type is user | sa | ma | slice | component Info is comprised of the following sub-fields pointer = a pointer to the record in the PL database pl_info = planetlab-specific info (when talking to client) geni_info = geni-specific info (when talking to client) The pointer is interpreted depending on the type of the record. For example, if the type=="user", then pointer is assumed to be a person_id that indexes into the persons table. A given HRN may have more than one record, provided that the records are of different types. For example, planetlab.us.arizona may have both an SA and a MA record, but cannot have two SA records.
Return the record in the form of a dictionary
Dump the record to stdout
Returns a list of field names in this record. pl_info, geni_info are not included because they are not part of the record that is stored in the database, but are rather computed values from other entities
Given a field name ("name", "gid", ...) return the value of that field.
Given a list of field names, return a list of values for those fields.
Return the geni_info of the record, or an empty dictionary if none exists
Return the GID of the record, in the form of a GID object TODO: not the best name for the function, because we have things called gidObjects in the Cred
Return a key that uniquely identifies this record among all records in Geni. This key is used to uniquely identify the record in the Geni database.
Return the name (HRN) of the record
Return the pl_info of the record, or an empty dictionary if none exists
Return the pointer of the record. The pointer is an integer that may be used to look up the record in the PLC database. The evaluation of pointer depends on the type of the record
Return the type of the record
Set the geni info the record
Set the GID of the record
Set the name of the record
Set the PLC info of the record
Set the pointer of the record
Set the type of the record