8.9 Vault object

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.

Error Return:
0

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.

Error Return:
0

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

User Responsibility: None

int
HostOK(LegionIdType VIdType, char *VaultName,
LegionIdType HIdType, char *HostName
);

Ask the vault whether or not a certain host is compatible with it.

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.

Error Return:
-1

User Responsibility: None

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.

Error Return:
NULL

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

User Responsibility: None

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 LOID.
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.

Error Return:
NULL

User Responsibility:
The user is responsible for "free"ing the memory returned by this
function.

Directory of Legion 1.8 Manuals
[Home] [General] [Documentation] [Software]
[Testbeds] [Et Cetera] [Map/Search]

Free JavaScripts provided by The JavaScript Source

legion@Virginia.edu
http://legion.virginia.edu/