The nova.cmd.manage Module¶
CLI interface for nova management.
-
AccountCommands¶ alias of
ProjectCommands
-
class
AgentBuildCommands¶ Bases:
objectClass 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.
-
list(hypervisor=None)¶ Lists all agent builds.
arguments: <none>
-
modify(os, architecture, version, url, md5hash, hypervisor='xen')¶ Update an existing agent build.
-
-
class
ApiDbCommands¶ Bases:
objectClass for managing the api database.
-
sync(version=None)¶ Sync the database up to the most recent version.
-
version()¶ Print the current database version.
-
-
class
CellCommands¶ Bases:
objectCommands 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)¶
-
delete(cell_name)¶
-
list()¶
-
-
class
CellV2Commands¶ Bases:
objectCommands 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:
objectClass 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.
-
null_instance_uuid_scan(delete=False)¶ Lists and optionally deletes database records where instance_uuid is NULL.
-
online_data_migrations(max_count=None)¶
-
online_migrations= (<function pcidevice_online_data_migration at 0x7f4288be8230>, <function computenode_uuids_online_data_migration at 0x7f4288be8320>, <function aggregate_uuids_online_data_migration at 0x7f4288be82a8>)¶
-
sync(version=None)¶ Sync the database up to the most recent version.
-
version()¶ Print the current database version.
-
-
class
FixedIpCommands¶ Bases:
objectClass for managing fixed IP.
-
list(host=None)¶ Lists all fixed IPs (optionally by host).
-
reserve(address)¶ Mark fixed IP as reserved
arguments: address
-
unreserve(address)¶ Mark fixed IP as free to use
arguments: address
-
-
class
FloatingIpCommands¶ Bases:
objectClass 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.
-
delete(ip_range)¶ Deletes floating IPs by range.
-
list(host=None)¶ Lists all floating IPs (optionally by host).
Note: if host is given, only active floating IPs are returned
-
static
-
class
GetLogCommands¶ Bases:
objectGet logging information.
-
errors()¶ Get all of the errors from the log files.
-
syslog(num_entries=10)¶ Get <num_entries> of the nova syslog events.
-
-
class
HostCommands¶ Bases:
objectList hosts.
-
list(zone=None)¶ Show a list of all physical hosts. Filter by zone. args: [zone]
-
-
class
NetworkCommands¶ Bases:
objectClass 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()¶ 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:
objectClass 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.
-
scrub(project_id)¶ Deletes data associated with project.
-
-
class
ServiceCommands¶ Bases:
objectEnable and disable running services.
-
describe_resource(host)¶ 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-
bpython()¶ Runs a bpython shell.
Falls back to Ipython/python shell if unavailable
-
ipython()¶ Runs an Ipython shell.
Falls back to Python shell if unavailable
-
python()¶ Runs a python shell.
Falls back to Python shell if unavailable
-
run(shell=None)¶ Runs a Python interactive interpreter.
-
script(path)¶ Runs the script from the specified path with flags set properly.
arguments: path
-
-
class
VmCommands¶ Bases:
objectClass for managing VM instances.
-
list(host=None)¶ Show a list of all instances.
-
-
class
VpnCommands¶ Bases:
objectClass 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.
-
-
add_command_parsers(subparsers)¶
-
args(*args, **kwargs)¶
-
deprecate(msg)¶ Decorator which print the deprecation message before the decorated function is called
-
main()¶ Parse options and call the appropriate class/method.
-
methods_of(obj)¶ Get all callable methods of an object that don’t start with underscore
returns a list of tuples of the form (method_name, method)
-
param2id(object_id)¶ Helper function to convert various volume id types to internal id. args: [object_id], e.g. ‘vol-0000000a’ or ‘volume-0000000a’ or ‘10’
-
validate_network_plugin(f)¶ Decorator to validate the network plugin.