The nova.scheduler.driver Module

Scheduler base class that all Schedulers should inherit from

class Scheduler

Bases: object

The base class that all Scheduler classes should inherit from.

create_instance_db_entry(context, request_spec, reservations)

Create instance DB entry based on request_spec

hosts_up(context, topic)

Return the list of hosts that have a running service for topic.

schedule(context, topic, method, *_args, **_kwargs)

Must override schedule method for scheduler to work.

schedule_live_migration(context, dest, block_migration=False, disk_over_commit=False, instance=None, instance_id=None)

Live migration scheduling method.

Parameters:
  • context
  • instance_id – (deprecated)
  • instance – instance dict
  • dest – destination host
  • block_migration – if true, block_migration.
  • disk_over_commit – if True, consider real(not virtual) disk size.
Returns:

The host where instance is running currently. Then scheduler send request that host.

schedule_prep_resize(context, image, request_spec, filter_properties, instance, instance_type, reservations=None)

Must override schedule_prep_resize method for scheduler to work.

schedule_run_instance(context, request_spec, admin_password, injected_files, requested_networks, is_first_time, filter_properties, reservations)

Must override schedule_run_instance method for scheduler to work.

update_service_capabilities(service_name, host, capabilities)

Process a capability update from a service node.

cast_to_compute_host(context, host, method, **kwargs)

Cast request to a compute host queue

cast_to_host(context, topic, host, method, **kwargs)

Generic cast to host

cast_to_network_host(context, host, method, **kwargs)

Cast request to a network host queue

cast_to_volume_host(context, host, method, **kwargs)

Cast request to a volume host queue

encode_instance(instance, local=True)

Encode locally created instance for return via RPC

instance_update_db(context, instance_uuid, host)

Set the host and scheduled_at fields of an Instance.

Returns:An Instance with the updated fields set properly.

Previous topic

The nova.scheduler.chance Module

Next topic

The nova.scheduler.filter_scheduler Module

This Page