The nova.api.openstack.compute.views.servers Module

class ViewBuilder

Bases: nova.api.openstack.common.ViewBuilder

Model a server API response as a python dictionary.

basic(request, instance)

Generic, non-detailed view of an instance.

create(request, instance)

View that should be returned when an instance is created.

detail(request, instances)

Detailed view of a list of instance.

get_show_expected_attrs(expected_attrs=None)

Returns a list of lazy-loadable expected attributes used by show

This should be used when getting the instances from the database so that the necessary attributes are pre-loaded before needing to build the show response where lazy-loading can fail if an instance was deleted.

Parameters:expected_attrs (list) – The list of expected attributes that will be requested in addition to what this view builder requires. This method will merge the two lists and return what should be ultimately used when getting an instance from the database.
Returns:merged and sorted list of expected attributes
index(request, instances)

Show a list of servers without many details.

show(request, instance)

Detailed view of a single instance.

class ViewBuilderV21

Bases: nova.api.openstack.compute.views.servers.ViewBuilder

Model a server v2.1 API response as a python dictionary.

show(request, instance, extend_address=True)

Detailed view of a single instance.

Previous topic

The nova.api.openstack.compute.views.limits Module

Next topic

The nova.api.openstack.compute.views.versions Module

Project Source

This Page