Negotiator Class

class htcondor2.Negotiator(location=None)

The negotiator client. Query and manage resource usage.

Consult User Priorities and Negotiation before using these functions.

Parameters

location (Optional[ClassAd]) – A ClassAd with a MyAddress attribute, such as might be returned by htcondor2.Collector.locate(). None means the default pool negotiator.

deleteUser(user) None

Delete all records of an accounting principal from the negotiator’s accounting.

Parameters

user (str) – A fully-qualifed (user@domain) accounting principal.

getPriorities(rollup=False) List[ClassAd]

Retrieve the pool accounting information as a list of accounting ClassAds.

Parameters

rollup (bool) – It True, the accounting information that applies to heirarchical group quotas will be summed for groups and subgroups.

getResourceUsage(user) List[ClassAd]

Retrieve the resources (slots) assigned to the specificied accounting principal as a list of ClassAds. The names of the attributes and their types are currently undocumented.

Parameters

user (str) – A fully-qualifed (user@domain) accounting principal.

resetAllUsage()

Set the accumulated usage of all accounting principals to zero.

resetUsage(user) None

Set the accumulated usage of the specified accounting principal to zero.

Parameters

user (str) – A fully-qualifed (user@domain) accounting principal.

setBeginUsage(user, when) None

Set the beginning of the specified accounting principal’s usage.

Parameters
  • user (str) – A fully-qualifed (user@domain) accounting principal.

  • when (int) – A Unix timestamp.

setCeiling(user, ceiling) None

Set the submitter ceiling for the specific accounting principal.

Parameters
  • user (str) – A fully-qualifed (user@domain) accounting principal.

  • ceiling (int) – A value greater than or equal to -1.

setFactor(user, factor) None

Set the priority factor of the specified accounting principal.

Parameters
  • user (str) – A fully-qualifed (user@domain) accounting principal.

  • factor (float) – A value greater than or equal to 1.0.

setLastUsage(user, when) None

Set the end of the specified accounting principal’s usage.

Parameters
  • user (str) – A fully-qualifed (user@domain) accounting principal.

  • when (int) – A Unix timestamp.

setPriority(user, priority) None

Set the priority of the specified accounting principal.

Parameters
  • user (str) – A fully-qualifed (user@domain) accounting principal.

  • priority (float) – A value greater than or equal to 0.0.

setUsage(user, usage) None

Set the usage of the specified accounting principal.

Parameters
  • user (str) – A fully-qualifed (user@domain) accounting principal.

  • usage (float) – The usage in hours.