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.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 – This may be set to “true” but it’s not clear what the result of that is.

The result is an object with limits as properties.

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

Bases: django.views.generic.base.View

API for retrieving a single server

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

Get a specific server

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

url_regex = 'nova/servers/(?P<server_id>[^/]+|default)$'
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”

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/$'

Previous topic

The openstack_dashboard.api.rest.policy Module

Next topic

The openstack_dashboard.api.rest.cinder Module

Project Source

This Page