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 (ClassAd) – A ClassAd with a MyAddress attribute, such as might be returned by htcondor2.Collector.locate(). None means the default pool negotiator.

deleteUser(user)

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

Parameters

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

Return type

None

getPriorities(rollup=False)

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.

Return type

List[ClassAd]

getResourceUsage(user)

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.

Return type

List[ClassAd]

resetAllUsage()

Set the accumulated usage of all accounting principals to zero.

resetUsage(user)

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

Parameters

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

Return type

None

setBeginUsage(user, when)

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.

Return type

None

setCeiling(user, ceiling)

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.

Return type

None

setFactor(user, factor)

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.

Return type

None

setLastUsage(user, when)

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.

Return type

None

setPriority(user, priority)

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.

Return type

None

setUsage(user, usage)

Set the usage of the specified accounting principal.

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

  • usage (float) – The usage in hours.

Return type

None