The following section contains functions which are used to make calls directly on host objects.
CLegionVaultReservation
MakeReservationFromVault(LegionIdType VIdType,
char *VaultName, LegionIdType HIdType,
char *ReqHostNm);
Ask a vault to make a reservation for either an instantiation, or an activation.
Parameters:
VIdType = A Flag indicating whether VaultName is a
context path name, or a LOID.
VaultName= The name of the vault that will make the
reservation.
HIdType = A Flag indicating whether ReqHostName is
a context path name, or a LOID.
ReqHostName = The name of the host to be paired up with
this vault reservation.
Return Values:
The CLegionVaultReservation that represents the
VaultReservation just made.
User Responsibility:
User is responsible for destroying the vault reservation
when done.
CLegionVaultReservationRecord
CheckVaultReservation(LegionIdType VIdType,
char *VaultName, CLegionVaultReservation VtRes);
Check on the status of a vault reservation previously made.
Parameters:
HIdType = A Flag indicating whether VaultName is a
context path name or a LOID.
VaultName= The name of the vault that will check the
reservation.
VtRes = The Vault reservation previously made.
Return Values:
A CLegionVaultReservationRecord containing the status of
the reservation.
User Responsibility:
User is responsible for destroying the vault reservation
record when done.
int
CancelVaultReservation(LegionIdType VIdType,
char *VaultName, CLegionVaultReservation VtRes);
Cancel a previously made vault reservation.
Parameters:
HIdType = A Flag indicating whether VaultName is a
context path name or a LOID.
VaultName= The name of the vault that will cancel the
reservation.
VtRes = The Vault reservation previously made.
Return Values:
1 on Success
0 on Failure
int
HostOK(LegionIdType VIdType, char *VaultName,
LegionIdType HIdType, char *HostName);
Ask the vault if a certain host is compatible with it or not.
Parameters:
VIdType = A Flag indicating whether VaultName is a
context path name or a LOID.
VaultName= The name of the vault that will check the host.
HIdType = A Flag indicating whether HostName is a
context path name or a LOID.
HostName= The name of the host to check for compatibility.
Return Values:
0 if the host is not OK.
1 if the host is OK.
char**
GetCompatibleHosts(LegionIdType VIdType, char *VaultName);
Ask the vault to return a list of hosts that are compatible with it.
Parameters:
VIdType = A Flag indicating whether VaultName is a
context path name or a LOID.
VaultName= The name of the vault to check.
Return Values:
A NULL terminated list of LOIDs. Each LOID represents one
host that is compatible with the given vault.
User Responsibility:
The user is responsible for "free"ing each LOID, as well as
for "free"ing the list itself.
int
TransferOPRsAndDestroySelf(LegionIdType VIdType,
char *VaultName);
Ask the vault to transfer all of its OPRs to another vault, and then to die.
Parameters:
VIdType = A Flag indicating whether VaultName is a
context path name or a LOID.
VaultName= The name of the vault to talk to.
Return Values:
1 on Success
0 on Failure
char*
ChangeOPROwner(LegionIdType VIdType, char *VaultName,
LegionIdType OOIdType, char *OrigOwnerNm,
LegionIdType NOIdType, char *NewOwnerNm);
Change the owner of a certain OPR that the vault is managing.
Parameters:
VIdType = A Flag indicating whether VaultName is a
context path name or a LOID.
VaultName= The name of the vault to talk with.
OOIdType= A Flag indicating whether OrigOwnerNm is
a context path name or a L
OrigOwnerNm= The name of the Original owner of the
OPR.
NOIdType= A Flag indicating whether NewOwnerNm is
a context path name or a LOID.
NewOwnerNm= The name of the New owner of the OPR.
Return Values:
The LOID of the OPR's owner.
User Responsibility:
The user is responsible for "free"ing the memory returned by
this function.