Scaling Group Functions

class ai.backend.client.func.scaling_group.ScalingGroup(name)

Provides getting scaling-group information required for the current user.

The scaling-group is an opaque server-side configuration which splits the whole cluster into several partitions, so that server administrators can apply different auto-scaling policies and operation standards to each partition of agent sets.

classmethod await list_available(group)

List available scaling groups for the current user, considering the user, the user’s domain, and the designated user group.

classmethod await list(fields=(FieldSpec(field_ref='name', humanized_name='Name', field_name='name', alt_name='name', formatter=<ai.backend.client.output.formatters.OutputFormatter object>, subfields={}), FieldSpec(field_ref='description', humanized_name='Description', field_name='description', alt_name='description', formatter=<ai.backend.client.output.formatters.OutputFormatter object>, subfields={}), FieldSpec(field_ref='is_active', humanized_name='Active?', field_name='is_active', alt_name='is_active', formatter=<ai.backend.client.output.formatters.OutputFormatter object>, subfields={}), FieldSpec(field_ref='created_at', humanized_name='Created At', field_name='created_at', alt_name='created_at', formatter=<ai.backend.client.output.formatters.OutputFormatter object>, subfields={}), FieldSpec(field_ref='driver', humanized_name='Driver', field_name='driver', alt_name='driver', formatter=<ai.backend.client.output.formatters.OutputFormatter object>, subfields={}), FieldSpec(field_ref='scheduler', humanized_name='Scheduler', field_name='scheduler', alt_name='scheduler', formatter=<ai.backend.client.output.formatters.OutputFormatter object>, subfields={})))

List available scaling groups for the current user, considering the user, the user’s domain, and the designated user group.

Return type

Sequence[dict]

classmethod await detail(name, fields=(FieldSpec(field_ref='name', humanized_name='Name', field_name='name', alt_name='name', formatter=<ai.backend.client.output.formatters.OutputFormatter object>, subfields={}), FieldSpec(field_ref='description', humanized_name='Description', field_name='description', alt_name='description', formatter=<ai.backend.client.output.formatters.OutputFormatter object>, subfields={}), FieldSpec(field_ref='is_active', humanized_name='Active?', field_name='is_active', alt_name='is_active', formatter=<ai.backend.client.output.formatters.OutputFormatter object>, subfields={}), FieldSpec(field_ref='created_at', humanized_name='Created At', field_name='created_at', alt_name='created_at', formatter=<ai.backend.client.output.formatters.OutputFormatter object>, subfields={}), FieldSpec(field_ref='driver', humanized_name='Driver', field_name='driver', alt_name='driver', formatter=<ai.backend.client.output.formatters.OutputFormatter object>, subfields={}), FieldSpec(field_ref='driver_opts', humanized_name='Driver Opts', field_name='driver_opts', alt_name='driver_opts', formatter=<ai.backend.client.output.formatters.NestedDictOutputFormatter object>, subfields={}), FieldSpec(field_ref='scheduler', humanized_name='Scheduler', field_name='scheduler', alt_name='scheduler', formatter=<ai.backend.client.output.formatters.OutputFormatter object>, subfields={}), FieldSpec(field_ref='scheduler_opts', humanized_name='Scheduler Opts', field_name='scheduler_opts', alt_name='scheduler_opts', formatter=<ai.backend.client.output.formatters.NestedDictOutputFormatter object>, subfields={})))

Fetch information of a scaling group by name.

Parameters
  • name (str) – Name of the scaling group.

  • fields (Sequence[FieldSpec]) – Additional per-scaling-group query fields.

Return type

dict

classmethod await create(name, description='', is_active=True, driver=None, driver_opts=None, scheduler=None, scheduler_opts=None, fields=None)

Creates a new scaling group with the given options.

Return type

dict

classmethod await update(name, description='', is_active=True, driver=None, driver_opts=None, scheduler=None, scheduler_opts=None, fields=None)

Update existing scaling group.

Return type

dict

classmethod await delete(name)

Deletes an existing scaling group.

classmethod await associate_domain(scaling_group, domain)

Associate scaling_group with domain.

Parameters
  • scaling_group (str) – The name of a scaling group.

  • domain (str) – The name of a domain.

classmethod await dissociate_domain(scaling_group, domain)

Dissociate scaling_group from domain.

Parameters
  • scaling_group (str) – The name of a scaling group.

  • domain (str) – The name of a domain.

classmethod await dissociate_all_domain(domain)

Dissociate all scaling_groups from domain.

Parameters

domain (str) – The name of a domain.

classmethod await associate_group(scaling_group, group_id)

Associate scaling_group with group.

Parameters
  • scaling_group (str) – The name of a scaling group.

  • group_id (str) – The ID of a group.

classmethod await dissociate_group(scaling_group, group_id)

Dissociate scaling_group from group.

Parameters
  • scaling_group (str) – The name of a scaling group.

  • group_id (str) – The ID of a group.

classmethod await dissociate_all_group(group_id)

Dissociate all scaling_groups from group.

Parameters

group_id (str) – The ID of a group.