The nova.cmd.manage Module

CLI interface for nova management.


alias of ProjectCommands

class AgentBuildCommands

Bases: object

Class for managing agent builds.

create(os, architecture, version, url, md5hash, hypervisor='xen')

Creates a new agent build.

delete(os, architecture, hypervisor='xen')

Deletes an existing agent build.


Lists all agent builds.

arguments: <none>

modify(os, architecture, version, url, md5hash, hypervisor='xen')

Update an existing agent build.

class ApiDbCommands

Bases: object

Class for managing the api database.


Sync the database up to the most recent version.


Print the current database version.

class CellCommands

Bases: object

Commands for managing cells.

create(name, cell_type='child', username=None, broker_hosts=None, password=None, hostname=None, port=None, virtual_host=None, woffset=None, wscale=None)
class CellV2Commands

Bases: object

Commands for managing cells v2.

map_cell_and_hosts(transport_url, name=None, verbose=False)

EXPERIMENTAL. Create a cell mapping and host mappings for a cell.

Users not dividing their cloud into multiple cells will be a single cell v2 deployment and should specify:

nova-manage cell_v2 map_cell_and_hosts –config-file <nova.conf>

Users running multiple cells can add a cell v2 by specifying:

nova-manage cell_v2 map_cell_and_hosts –config-file <cell nova.conf>
map_instances(cell_uuid=None, limit=None, marker=None, verbose=0)
class DbCommands

Bases: object

Class for managing the main database.

archive_deleted_rows(max_rows, verbose=False)

Move up to max_rows deleted rows from production tables to shadow tables.


Lists and optionally deletes database records where instance_uuid is NULL.

online_migrations = (<function pcidevice_online_data_migration at 0x7f32eefd3578>, <function computenode_uuids_online_data_migration at 0x7f32eefd3668>, <function aggregate_uuids_online_data_migration at 0x7f32eefd35f0>)

Sync the database up to the most recent version.


Print the current database version.

class FixedIpCommands

Bases: object

Class for managing fixed IP.


Lists all fixed IPs (optionally by host).


Mark fixed IP as reserved

arguments: address


Mark fixed IP as free to use

arguments: address

class FloatingIpCommands

Bases: object

Class for managing floating IP.

static address_to_hosts(addresses)

Iterate over hosts within an address range.

If an explicit range specifier is missing, the parameter is interpreted as a specific individual address.

create(ip_range, pool=None, interface=None)

Creates floating IPs for zone by range.


Deletes floating IPs by range.


Lists all floating IPs (optionally by host).

Note: if host is given, only active floating IPs are returned

class GetLogCommands

Bases: object

Get logging information.


Get all of the errors from the log files.


Get <num_entries> of the nova syslog events.

class HostCommands

Bases: object

List hosts.


Show a list of all physical hosts. Filter by zone. args: [zone]

class NetworkCommands

Bases: object

Class for managing networks.

create(label=None, cidr=None, num_networks=None, network_size=None, multi_host=None, vlan=None, vlan_start=None, vpn_start=None, cidr_v6=None, gateway=None, gateway_v6=None, bridge=None, bridge_interface=None, dns1=None, dns2=None, project_id=None, priority=None, uuid=None, fixed_cidr=None)

Creates fixed IPs for host by range.

delete(fixed_range=None, uuid=None)

Deletes a network.


List all created networks.

modify(fixed_range, project=None, host=None, dis_project=None, dis_host=None)

Associate/Disassociate Network with Project and/or Host arguments: network project host leave any field blank to ignore it

class ProjectCommands

Bases: object

Class for managing projects.

quota(project_id, user_id=None, key=None, value=None)

Create, update or display quotas for project/user

If no quota key is provided, the quota will be displayed. If a valid quota key is provided and it does not exist, it will be created. Otherwise, it will be updated.


Deletes data associated with project.

class ServiceCommands

Bases: object

Enable and disable running services.


Describes cpu/memory/hdd info for host.

Parameters:host – hostname.
description = 'DEPRECATED: Use the nova service-* commands from python-novaclient instead or the os-services REST resource. The service subcommand will be removed in the 14.0 release.'
disable(host, service)

Disable scheduling for a service.

enable(host, service)

Enable scheduling for a service.

list(host=None, service=None)

Show a list of all running services. Filter by host & service name

class ShellCommands

Bases: object


Runs a bpython shell.

Falls back to Ipython/python shell if unavailable


Runs an Ipython shell.

Falls back to Python shell if unavailable


Runs a python shell.

Falls back to Python shell if unavailable


Runs a Python interactive interpreter.


Runs the script from the specified path with flags set properly.

arguments: path

class VmCommands

Bases: object

Class for managing VM instances.


Show a list of all instances.

class VpnCommands

Bases: object

Class for managing VPNs.

change(project_id, ip, port)

Change the IP and port for a VPN.

This will update all networks associated with a project not sure if that’s the desired behavior or not, patches accepted.

args(*args, **kwargs)

Decorator which print the deprecation message before the decorated function is called


Parse options and call the appropriate class/method.


Get all callable methods of an object that don’t start with underscore

returns a list of tuples of the form (method_name, method)


Helper function to convert various volume id types to internal id. args: [object_id], e.g. ‘vol-0000000a’ or ‘volume-0000000a’ or ‘10’


Decorator to validate the network plugin.

Previous topic

The nova.cmd.idmapshift Module

Next topic

The Module

Project Source

This Page