Bases: nova.objects.base.NovaObject
Returns a new RequestSpec object hydrated by various components.
This helper is useful in creating the RequestSpec from the various objects that are assembled early in the boot process. This method creates a complete RequestSpec object with all properties set or intentionally left blank.
Parameters: |
|
---|
Returns a new RequestSpec object by hydrating it from legacy dicts.
Deprecated. A RequestSpec object is created early in the boot process using the from_components method. That object will either be passed to places that require it, or it can be looked up with get_by_instance_uuid. This method can be removed when there are no longer any callers. Because the method is not remotable it is not tied to object versioning.
That helper is not intended to leave the legacy dicts kept in the nova codebase, but is rather just for giving a temporary solution for populating the Spec object until we get rid of scheduler_utils’ build_request_spec() and the filter_properties hydratation in the conductor.
Parameters: |
|
---|
Convenient helper for accessing a particular scheduler hint since it is hydrated by putting a single item into a list.
In order to reduce the complexity, that helper returns a string if the requested hint is a list of only one value, and if not, returns the value directly (ie. the list). If the hint is not existing (or scheduler_hints is None), then it returns the default value.
Parameters: |
|
---|
Clears the forced destination fields from the RequestSpec object.
This method is for making sure we don’t ask the scheduler to give us again the same destination(s) without persisting the modifications.
Returns a legacy filter_properties dict from the RequestSpec object.
Since we need to manage backwards compatibility and rolling upgrades within our RPC API, we need to accept to provide an helper for primitiving the right RequestSpec object into a legacy dict until we drop support for old Scheduler RPC API versions. If you don’t understand why this method is needed, please don’t use it.
Returns a legacy request_spec dict from the RequestSpec object.
Since we need to manage backwards compatibility and rolling upgrades within our RPC API, we need to accept to provide an helper for primitiving the right RequestSpec object into a legacy dict until we drop support for old Scheduler RPC API versions. If you don’t understand why this method is needed, please don’t use it.
Bases: nova.objects.base.NovaObject
Bases: nova.objects.base.NovaObject