Computing Quotas

class qarnot.computing_quotas.UserSchedulingQuota(max_cores: int, running_cores_count: int, max_instances: int, running_instances_count: int)[source]

Bases: object

Describes a scheduling quota for the user.

__init__(max_cores: int, running_cores_count: int, max_instances: int, running_instances_count: int)[source]

Create a new UserSchedulingQuota object describing a scheduling quota for the user.

Parameters:
  • max_cores (int) – Maximum number of cores that can be simultaneously used with this scheduling plan.

  • running_cores_count (int) – Number of cores that are currently running with this scheduling plan.

  • max_instances (int) – Maximum number of instances that can be simultaneously used with this scheduling plan.

  • running_instances_count (int) – Number of instances that are currently running with this scheduling plan.

Returns:

The created UserSchedulingQuota.

max_cores
Type:

int

Maximum number of cores that can be simultaneously used with this scheduling plan.

running_cores_count
Type:

int

Number of cores that are currently running with this scheduling plan.

max_instances
Type:

int

Maximum number of instances that can be simultaneously used with this scheduling plan.

running_instances_count
Type:

int

Number of instances that are currently running with this scheduling plan.

classmethod from_json(json: Dict[str, Any])[source]

Create a new UserSchedulingQuota object from json describing a scheduling quota for a user.

Parameters:

json (dict) – Dictionary representing the user scheduling plan

Returns:

The created UserSchedulingQuota.

class qarnot.computing_quotas.UserReservedSchedulingQuota(reservation_name: str, machine_key: str, max_cores: int, running_cores_count: int, max_instances: int, running_instances_count: int)[source]

Bases: UserSchedulingQuota

Describes a reserved scheduling quota for the user.

__init__(reservation_name: str, machine_key: str, max_cores: int, running_cores_count: int, max_instances: int, running_instances_count: int)[source]

Create a new UserReservedSchedulingQuota object describing a reserved scheduling quota for the user.

Parameters:
  • machine_key (str) – Machine key of the reservation.

  • max_cores (int) – Maximum number of cores that can be simultaneously used with this reserved machine specification.

  • running_cores_count (int) – Number of cores that are currently running with this reserved machine specification.

  • max_instances (int) – Maximum number of instances that can be simultaneously used with this reserved machine specification.

  • running_instances_count (int) – Number of instances that are currently running with this reserved machine specification.

Returns:

The created UserReservedSchedulingQuota.

machine_key
Type:

str

Machine key of the reservation.

reservation_name
Type:

str

Name of the reservation.

classmethod from_json(json: Dict[str, Any])[source]

Create a new UserReservedSchedulingQuota object from json describing a reserved scheduling quota for a user.

Parameters:

json (dict) – Dictionary representing the user reserved scheduling quota

Returns:

The created UserReservedSchedulingQuota.

class qarnot.computing_quotas.UserComputingQuotas(flex: UserSchedulingQuota, on_demand: UserSchedulingQuota, reserved: List[UserReservedSchedulingQuota])[source]

Bases: object

Describes the user’s computing quotas.

__init__(flex: UserSchedulingQuota, on_demand: UserSchedulingQuota, reserved: List[UserReservedSchedulingQuota])[source]

Create a new UserComputingQuotas object describing the user’s computing quotas.

Parameters:
Returns:

The created UserComputingQuotas.

flex
Type:

UserSchedulingQuota

Quotas for Flex scheduling plan.

on_demand
Type:

UserSchedulingQuota

Quotas for OnDemand scheduling plan.

reserved
Type:

list(UserReservedSchedulingQuota)

Quotas for Reserved scheduling plan.

classmethod from_json(json: Dict[str, Any])[source]

Create a new UserComputingQuotas object from json describing the user’s computing quotas.

Parameters:

json (dict) – Dictionary representing the user computing quota

Returns:

The created UserComputingQuotas.

class qarnot.computing_quotas.OrganizationSchedulingQuota(max_cores: int, running_cores_count: int, max_instances: int, running_instances_count: int)[source]

Bases: object

Describes a scheduling quota for the organization.

__init__(max_cores: int, running_cores_count: int, max_instances: int, running_instances_count: int)[source]

Create a new OrganizationSchedulingQuota object describing a scheduling quota for the organization.

Parameters:
  • max_cores (int) – Maximum number of cores that can be simultaneously used with this scheduling plan.

  • running_cores_count (int) – Number of cores that are currently running with this scheduling plan.

  • max_instances (int) – Maximum number of instances that can be simultaneously used with this scheduling plan.

  • running_instances_count (int) – Number of instances that are currently running with this scheduling plan.

Returns:

The created OrganizationSchedulingQuota.

max_cores
Type:

int

Maximum number of cores that can be simultaneously used with this scheduling plan.

running_cores_count
Type:

int

Number of cores that are currently running with this scheduling plan.

max_instances
Type:

int

Maximum number of instances that can be simultaneously used with this scheduling plan.

running_instances_count
Type:

int

Number of instances that are currently running with this scheduling plan.

classmethod from_json(json: Dict[str, Any])[source]

Create a new OrganizationSchedulingQuota object from json describing a scheduling quota for the organization.

Parameters:

json (dict) – Dictionary representing the organization scheduling plan

Returns:

The created OrganizationSchedulingQuota.

class qarnot.computing_quotas.OrganizationReservedSchedulingQuota(reservation_name: str, machine_key: str, max_cores: int, running_cores_count: int, max_instances: int, running_instances_count: int)[source]

Bases: OrganizationSchedulingQuota

Describes a reserved scheduling quota for the organization.

__init__(reservation_name: str, machine_key: str, max_cores: int, running_cores_count: int, max_instances: int, running_instances_count: int)[source]

Create a new OrganizationReservedSchedulingQuota object describing a reserved scheduling quota for the organization.

Parameters:
  • machine_key (str) – Machine key of the reservation.

  • max_cores (int) – Maximum number of cores that can be simultaneously used with this reserved machine specification.

  • running_cores_count (int) – Number of cores that are currently running with this reserved machine specification.

  • max_instances (int) – Maximum number of instances that can be simultaneously used with this reserved machine specification.

  • running_instances_count (int) – Number of instances that are currently running with this reserved machine specification.

Returns:

The created OrganizationReservedSchedulingQuota.

machine_key
Type:

str

Machine key of the reservation.

reservation_name
Type:

str

Name of the reservation.

classmethod from_json(json: Dict[str, Any])[source]

Create a new OrganizationReservedSchedulingQuota object from json describing a reserved scheduling quota for a organization.

Parameters:

json (dict) – Dictionary representing the organization reserved scheduling quota

Returns:

The created OrganizationReservedSchedulingQuota.

class qarnot.computing_quotas.OrganizationComputingQuotas(name: str, flex: OrganizationSchedulingQuota, on_demand: OrganizationSchedulingQuota, reserved: List[OrganizationReservedSchedulingQuota])[source]

Bases: object

Describes the organization’s computing quotas.

__init__(name: str, flex: OrganizationSchedulingQuota, on_demand: OrganizationSchedulingQuota, reserved: List[OrganizationReservedSchedulingQuota])[source]

Create a new OrganizationComputingQuotas object describing the organization’s computing quotas.

Parameters:
Returns:

The created OrganizationComputingQuotas.

name
Type:

str

Name of the organization.

flex
Type:

OrganizationSchedulingQuota

Quotas for Flex scheduling plan.

on_demand
Type:

OrganizationSchedulingQuota

Quotas for OnDemand scheduling plan.

reserved
Type:

list(OrganizationReservedSchedulingQuota)

Quotas for Reserved scheduling plan.

classmethod from_json(json: Dict[str, Any])[source]

Create a new OrganizationComputingQuotas object from json describing the organization’s computing quotas.

Parameters:

json (dict) – Dictionary representing the organization computing quota

Returns:

The created OrganizationComputingQuotas.

class qarnot.computing_quotas.ComputingQuotas(user_computing_quotas: UserComputingQuotas | None, organization_computing_quotas: OrganizationComputingQuotas | None = None)[source]

Bases: object

Describes user and organization computing quotas.

__init__(user_computing_quotas: UserComputingQuotas | None, organization_computing_quotas: OrganizationComputingQuotas | None = None)[source]

Create a new ComputingQuotas object describing user and organization computing quotas.

Parameters:
  • user_computing_quotas (~qarnot.computing_quotas.UserComputingQuotas, optional) – the user related computing quotas

  • organization_computing_quotas (~qarnot.computing_quotas.OrganizationComputingQuotas, optional) – the organization related computing quotas

Returns:

The created ComputingQuotas.

user
Type:

UserComputingQuotas

The user related computing quotas.

organization
Type:

OrganizationComputingQuotas

The organization related computing quotas.

classmethod from_json(json: Dict[str, Any])[source]

Create a new ComputingQuotas object from json describing user and organization computing quotas.

Parameters:

json (dict) – Dictionary representing the computing quotas

Returns:

The created ComputingQuotas