The openstack_dashboard.api.rest.nova ModuleΒΆ

API over the nova service.

class openstack_dashboard.api.rest.nova.AggregateExtraSpecs(**kwargs)[source]

Bases: django.views.generic.base.View

API for managing aggregate extra specs

get(request, *args, **kw)[source]

Get a specific aggregate’s extra specs

Example GET: http://localhost/api/nova/flavors/1/extra-specs

patch(request, *args, **kw)[source]

Update a specific aggregate’s extra specs.

This method returns HTTP 204 (no content) on success.

url_regex = 'nova/aggregates/(?P<aggregate_id>[^/]+)/extra-specs/$'
class openstack_dashboard.api.rest.nova.AvailabilityZones(**kwargs)[source]

Bases: django.views.generic.base.View

API for nova availability zones.

get(request, *args, **kw)[source]

Get a list of availability zones.

The following get parameters may be passed in the GET request:

Parameters:detailed – If this equals “true” then the result will include more detail.

The listing result is an object with property “items”.

url_regex = 'nova/availzones/$'
class openstack_dashboard.api.rest.nova.ConsoleOutput(**kwargs)[source]

Bases: django.views.generic.base.View

API for console output.

post(request, *args, **kw)[source]

Get a list of lines of console output.

The listing result is an object with property “items”. Each item is a line of output from the server.

Example GET: http://localhost/api/nova/servers/abcd/console-output/

url_regex = 'nova/servers/(?P<server_id>[^/]+)/console-output/$'
class openstack_dashboard.api.rest.nova.DefaultQuotaSets(**kwargs)[source]

Bases: django.views.generic.base.View

API for getting default quotas for nova

get(request, *args, **kw)[source]

Get the values for Nova specific quotas

Example GET: http://localhost/api/nova/quota-sets/defaults/

patch(request, *args, **kw)[source]

Update the values for Nova specific quotas

This method returns HTTP 204 (no content) on success.

url_regex = 'nova/quota-sets/defaults/$'
class openstack_dashboard.api.rest.nova.EditableQuotaSets(**kwargs)[source]

Bases: django.views.generic.base.View

API for editable quotas.

get(request, *args, **kw)[source]

Get a list of editable quota fields.

The listing result is an object with property “items”. Each item is an editable quota. Returns an empty list in case no editable quota is found.

url_regex = 'nova/quota-sets/editable/$'
class openstack_dashboard.api.rest.nova.Extensions(**kwargs)[source]

Bases: django.views.generic.base.View

API for nova extensions.

get(request, *args, **kw)[source]

Get a list of extensions.

The listing result is an object with property “items”. Each item is an image.

Example GET: http://localhost/api/nova/extensions

url_regex = 'nova/extensions/$'
class openstack_dashboard.api.rest.nova.Flavor(**kwargs)[source]

Bases: django.views.generic.base.View

API for retrieving a single flavor

delete(request, *args, **kw)[source]
extract_boolean(request, name)[source]
get(request, *args, **kw)[source]

Get a specific flavor

Parameters:get_extras – Also retrieve the extra specs.

Example GET: http://localhost/api/nova/flavors/1

patch(request, *args, **kw)[source]
url_regex = 'nova/flavors/(?P<flavor_id>[^/]+)/$'
class openstack_dashboard.api.rest.nova.FlavorExtraSpecs(**kwargs)[source]

Bases: django.views.generic.base.View

API for managing flavor extra specs

get(request, *args, **kw)[source]

Get a specific flavor’s extra specs

Example GET: http://localhost/api/nova/flavors/1/extra-specs

patch(request, *args, **kw)[source]

Update a specific flavor’s extra specs.

This method returns HTTP 204 (no content) on success.

url_regex = 'nova/flavors/(?P<flavor_id>[^/]+)/extra-specs/$'
class openstack_dashboard.api.rest.nova.Flavors(**kwargs)[source]

Bases: django.views.generic.base.View

API for nova flavors.

get(request, *args, **kw)[source]

Get a list of flavors.

The listing result is an object with property “items”. Each item is a flavor. By default this will return the flavors for the user’s current project. If the user is admin, public flavors will also be returned.

Parameters:
  • is_public – For a regular user, set to True to see all public flavors. For an admin user, set to False to not see public flavors.
  • get_extras – Also retrieve the extra specs.

Example GET: http://localhost/api/nova/flavors?is_public=true

post(request, *args, **kw)[source]
url_regex = 'nova/flavors/$'
class openstack_dashboard.api.rest.nova.Keypair(**kwargs)[source]

Bases: django.views.generic.base.View

get(request, keypair_name)[source]

Creates a new keypair and associates it to the current project.

  • Since the response for this endpoint creates a new keypair and is not idempotent, it normally would be represented by a POST HTTP request. However, this solution was adopted as it would support automatic file download across browsers.
Parameters:
  • keypair_name – the name to associate the keypair to
  • regenerate – (optional) if set to the string ‘true’, replaces the existing keypair with a new keypair

This returns the new keypair object on success.

url_regex = 'nova/keypairs/(?P<keypair_name>.+)/$'
class openstack_dashboard.api.rest.nova.Keypairs(**kwargs)[source]

Bases: django.views.generic.base.View

API for nova keypairs.

get(request, *args, **kw)[source]

Get a list of keypairs associated with the current logged-in account.

The listing result is an object with property “items”.

post(request, *args, **kw)[source]

Create a keypair.

Create a keypair using the parameters supplied in the POST application/json object. The parameters are:

Parameters:
  • name – the name to give the keypair
  • public_key – (optional) a key to import

This returns the new keypair object on success.

url_regex = 'nova/keypairs/$'
class openstack_dashboard.api.rest.nova.Limits(**kwargs)[source]

Bases: django.views.generic.base.View

API for nova limits.

get(request, *args, **kw)[source]

Get an object describing the current project limits.

Note: the Horizon API doesn’t support any other project (tenant) but the underlying client does...

The following get parameters may be passed in the GET request:

Parameters:reserved – Take into account the reserved limits. Reserved limits

may be instances in the rebuild process for example.

The result is an object with limits as properties.

url_regex = 'nova/limits/$'
class openstack_dashboard.api.rest.nova.QuotaSets(**kwargs)[source]

Bases: django.views.generic.base.View

API for setting quotas for a given project.

patch(request, *args, **kw)[source]

Update a single project quota data.

The PATCH data should be an application/json object with the attributes to set to new quota values.

This method returns HTTP 204 (no content) on success.

url_regex = 'nova/quota-sets/(?P<project_id>[0-9a-f]+)$'
class openstack_dashboard.api.rest.nova.RemoteConsoleInfo(**kwargs)[source]

Bases: django.views.generic.base.View

API for remote console information.

post(request, *args, **kw)[source]

Gets information about an available remote console for the given server.

Example POST: http://localhost/api/nova/servers/abcd/console-info/

url_regex = 'nova/servers/(?P<server_id>[^/]+)/console-info/$'
class openstack_dashboard.api.rest.nova.SecurityGroups(**kwargs)[source]

Bases: django.views.generic.base.View

API over all server security groups.

get(request, *args, **kw)[source]

Get a list of server security groups.

The listing result is an object with property “items”. Each item is security group associated with this server.

Example GET: http://localhost/api/nova/servers/abcd/security-groups/

url_regex = 'nova/servers/(?P<server_id>[^/]+)/security-groups/$'
class openstack_dashboard.api.rest.nova.Server(**kwargs)[source]

Bases: django.views.generic.base.View

API for retrieving a single server

delete(request, *args, **kw)[source]
get(request, *args, **kw)[source]

Get a specific server

http://localhost/api/nova/servers/1

post(request, *args, **kw)[source]

Perform a change to a server

url_regex = 'nova/servers/(?P<server_id>[^/]+|default)$'
class openstack_dashboard.api.rest.nova.ServerActions(**kwargs)[source]

Bases: django.views.generic.base.View

API over all server actions.

get(request, *args, **kw)[source]

Get a list of server actions.

The listing result is an object with property “items”. Each item is an action taken against the given server.

Example GET: http://localhost/api/nova/servers/abcd/actions/

url_regex = 'nova/servers/(?P<server_id>[^/]+)/actions/$'
class openstack_dashboard.api.rest.nova.ServerGroups(**kwargs)[source]

Bases: django.views.generic.base.View

API for nova server groups.

get(request, *args, **kw)[source]

Get a list of server groups.

The listing result is an object with property “items”.

url_regex = 'nova/servergroups/$'
class openstack_dashboard.api.rest.nova.ServerMetadata(**kwargs)[source]

Bases: django.views.generic.base.View

API for server metadata.

get(request, *args, **kw)[source]

Get a specific server’s metadata

http://localhost/api/nova/servers/1/metadata

patch(request, *args, **kw)[source]

Update metadata items for a server

http://localhost/api/nova/servers/1/metadata

url_regex = 'nova/servers/(?P<server_id>[^/]+|default)/metadata$'
class openstack_dashboard.api.rest.nova.Servers(**kwargs)[source]

Bases: django.views.generic.base.View

API over all servers.

get(request, *args, **kw)[source]

Get a list of servers.

The listing result is an object with property “items”. Each item is a server.

Example GET: http://localhost/api/nova/servers

post(request, *args, **kw)[source]

Create a server.

Create a server using the parameters supplied in the POST application/json object. The required parameters as specified by the underlying novaclient are:

Parameters:
  • name – The new server name.
  • source_id – The ID of the image to use.
  • flavor_id – The ID of the flavor to use.
  • key_name – (optional extension) name of previously created keypair to inject into the instance.
  • user_data – user data to pass to be exposed by the metadata server this can be a file type object as well or a string.
  • security_groups – An array of one or more objects with a “name” attribute.

Other parameters are accepted as per the underlying novaclient: “block_device_mapping”, “block_device_mapping_v2”, “nics”, “meta”, “availability_zone”, “instance_count”, “admin_pass”, “disk_config”, “config_drive”, “scheduler_hints”

This returns the new server object on success.

url_regex = 'nova/servers/$'
class openstack_dashboard.api.rest.nova.Services(**kwargs)[source]

Bases: django.views.generic.base.View

API for nova services.

get(request, *args, **kw)[source]

Get a list of nova services. Will return HTTP 501 status code if the service_list extension is not supported.

url_regex = 'nova/services/$'
class openstack_dashboard.api.rest.nova.Snapshots(**kwargs)[source]

Bases: django.views.generic.base.View

API for nova snapshots.

post(request, *args, **kw)[source]
url_regex = 'nova/snapshots/$'
class openstack_dashboard.api.rest.nova.Volumes(**kwargs)[source]

Bases: django.views.generic.base.View

API over all server volumes.

get(request, *args, **kw)[source]

Get a list of server volumes.

The listing result is an object with property “items”. Each item is a volume.

Example GET: http://localhost/api/nova/servers/abcd/volumes/

url_regex = 'nova/servers/(?P<server_id>[^/]+)/volumes/$'

Previous topic

The openstack_dashboard.api.rest.neutron Module

Next topic

The openstack_dashboard.api.rest Module

Project Source

This Page