8.8 Legion host object

The following section contains functions which are used to make calls directly on host objects.

CLegionHostReservation
MakeReservationFromHost(LegionIdType HIdType,
char *HostName,
LegionIdType VIdType,
char *ReqVltName
);

Ask a host to make a reservation for either an instantiation, or an activation.

Parameters:
HIdType A flag indicating whether HostName is a context path
name or a LOID.
HostName= The name of the host with which the reservation
should be made.
VIdType = A flag indicating whether ReqVltName is a context
path name or a LOID.
ReqVltName = The name of the vault to be paired up with this
host reservation.

Return Values:
The CLegionHostReservation that represents the
HostReservation just made.

Error Return:
0

User Responsibility:
User is responsible for destroying the host reservation when
done.

CLegionHostReservationRecord
CheckHostReservation(LegionIdType HIdType, char *HostName,
CLegionHostReservation HstRes
);
Check on the status of a host reservation previously made.

Parameters:
HIdType = A flag indicating whether HostName is a context path
name or a LOID.
HostName = The name of the host that will check the reservation.
HstRes = The previously made host reservation.

Return Values:
A CLegionHostReservationRecord containing the status of the
reservation.

Error Return:
0

User Responsibility:
User is responsible for destroying the host reservation record
when done.

int
CancelHostReservation(LegionIdType HIdType,
char *HostName, CLegionHostReservation HstRes
);
Cancel a previously made host reservation.

Parameters:
HIdType = A flag indicating whether HostName is a context path
name or a LOID.
HostName= The name of the host that will cancel the reservation.
HstRes = The previously made host reservation.

Return Values:
1 on Success
0 on Failure

User Responsibility: None

int
GetImplArchFromHost(LegionIdType HIdType, char *HostName);
Retrieve the implementation architecture for a given host.

Parameters:
HIdType = A flag indicating whether HostName is a context path
name or a LOID.
HostName= The name of the host to get the arch from.

Return Values:
The architecture of the given host.

Error Return:
-1

User Responsibility: None

int
KillObject(LegionIdType HIdType, char *HostName
CLegionBinding binding, int actId
);

Kill an object running on a host.

Parameters:
HIdType = A flag indicating whether HostName is a context path
name or a LOID.
HostName = The name of the host to kill the object on.
binding = The binding to the object that you wish to kill.
actId = The host's activation id for the object to kill.

Return Values:
1 on Success
0 on Failure

User Responsibility: None

int
HostDeactivateObject(LegionIdType HIdType, char *HostName,
CLegionBinding binding, int actId
);

Ask the host to deactivate an object it is running.

Parameters:
HIdType = A flag indicating whether HostName is a context path
name or a LOID.
HostName= The name of the host to deactivate the object on.
binding = The binding to the object that you wish to deactivate.
actId = The host's activation id for the object to deactivate.

Return Values:
1 on Success
0 on Failure

User Responsibility: None

CLegionHostObjectStatus*
ListObjects(LegionIdType HIdType, char *HostName);

Ask the host to return a list of objects that it is currently managing.

Parameters:
HIdType = A flag indicating whether HostName is a context path
name or a LOID.
HostName = The name of the host to acquire the list from.

Return Values:
A NULL terminated list of CLegionHostObjectStatus's. Each
array'selement represents the status of one object currently
being managed by a host.

Error Return:
NULL

User Responsibility:
The user is responsible for destroying each
CLegionHostObjectStatus in the list, as well as for "free"ing
the list itself.

char**
GetCompatibileVaults(LegionIdType HIdType, char *HostName);

Ask the host to return a list of vaults that are compatible with it.

Parameters:
HIdType = A flag indicating whether HostName is a context path
name or a LOID.
HostName= The name of the host to check.

Return Values:
A NULL terminated list of LOIDs. Each LOID represents one vault
that is compatible with the given host.

Error Return:
NULL

User Responsibility:
The user is responsible for "free"ing each LOID, as well as for
"free"ing the list itself.

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

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

Parameters:
HIdType = A flag indicating whether HostName is a context path
name or a LOID.
HostName= The name of the host to check the vault with.
VIdType = A flag indicating whether VaultName is a context path
name or a LOID.
VaultName= The name of the vault to check for compatibility with.

Return Values:
0 if the vault is not OK.
1 if the vault is OK.

Error Return:
-1

User Responsibility: None

int
GetObjectStatus(LegionIdType HIdType, char *HostName,
CLegionBinding Binding
);

Ask the host for the status of one of its objects.

Parameters:
HIdType = A flag indicating whether HostName is a context path
name or a LOID.
HostName= The name of the host to check the vault with.
Binding = The object in question's binding.

Return Values:
The Object's status.

User Responsibility: None

char*
GetImplementationCache(LegionIdType HIdType,
char *HostName
);

Ask the host for the LOID of its ImplementationCacheObject.

Parameters:
HIdType = A flag indicating whether HostName is a context path
name or a LOID.
HostName= The name of the host to check.

Return Values:
The LOID of the host object's implementation cache.

Error Return:
NULL

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

char*
ChangeObjectOwner(LegionIdType HIdType, char *HostName,
LegionIdType OOIdType, char *OrigOwnerNm,
LegionIdType NOIdType, char *NewOwnerNm
);

Change the owner of a certain object that the host is running.

Parameters:
HIdType = A flag indicating whether HostName is a context path
name or a LOID.
HostName = The name of the host to check the vault with.
OOIdType = A flag indicating whether OrigOwnerNm is a context
path name or a LOID.
OrigOwnerNm = The name of the original owner of the object.
NOIdType = A flag indicating whether NewOwnerNm is a context
path name or a LOID.
NewOwnerNm = The name of the new owner of the object.

Return Values:
The LOID of the object'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/