The openstack_dashboard.dashboards.project.instances.utils ModuleΒΆ

openstack_dashboard.dashboards.project.instances.utils.availability_zone_list(request)[source]

Utility method to retrieve a list of availability zones.

openstack_dashboard.dashboards.project.instances.utils.flavor_field_data(request, include_empty_option=False)[source]

Returns a list of tuples of all image flavors.

Generates a list of image flavors available. And returns a list of (id, name) tuples.

Parameters:
  • request – django http request object
  • include_empty_option – flag to include a empty tuple in the front of the list
Returns:

list of (id, name) tuples

openstack_dashboard.dashboards.project.instances.utils.flavor_list(request)[source]

Utility method to retrieve a list of flavors.

openstack_dashboard.dashboards.project.instances.utils.keypair_field_data(request, include_empty_option=False)[source]

Returns a list of tuples of all keypairs.

Generates a list of keypairs available to the user (request). And returns a list of (id, name) tuples.

Parameters:
  • request – django http request object
  • include_empty_option – flag to include a empty tuple in the front of the list
Returns:

list of (id, name) tuples

openstack_dashboard.dashboards.project.instances.utils.network_field_data(request, include_empty_option=False)[source]

Returns a list of tuples of all networks.

Generates a list of networks available to the user (request). And returns a list of (id, name) tuples.

Parameters:
  • request – django http request object
  • include_empty_option – flag to include a empty tuple in the front of the list
Returns:

list of (id, name) tuples

openstack_dashboard.dashboards.project.instances.utils.port_field_data(request)[source]

Returns a list of tuples of all ports available for the tenant.

Generates a list of ports that have no device_owner based on the networks available to the tenant doing the request.

Parameters:request – django http request object
Returns:list of (id, name) tuples
openstack_dashboard.dashboards.project.instances.utils.server_group_field_data(request)[source]

Returns a list of tuples of all server groups.

Generates a list of server groups available. And returns a list of (id, name) tuples.

Parameters:request – django http request object
Returns:list of (id, name) tuples
openstack_dashboard.dashboards.project.instances.utils.server_group_list(request)[source]

Utility method to retrieve a list of server groups.

openstack_dashboard.dashboards.project.instances.utils.sort_flavor_list(request, flavors)[source]

Utility method to sort a list of flavors. By default, returns the available flavors, sorted by RAM usage (ascending). Override these behaviours with a CREATE_INSTANCE_FLAVOR_SORT dict in local_settings.py.

Previous topic

The openstack_dashboard.dashboards.project.instances Module

Next topic

The openstack_dashboard.dashboards.project.instances.forms Module

Project Source

This Page