novaclient.v2.shell 模块¶
- class novaclient.v2.shell.Console(console_dict)¶
基类:
object
- class novaclient.v2.shell.EvacuateHostResponse(manager, info, loaded=False, resp=None)¶
基类:
Resource填充并绑定到管理器。
- 参数:
manager – BaseManager 对象
info – 表示资源属性的字典
loaded – 如果设置为 True,则防止延迟加载
resp – 响应或响应对象列表
- class novaclient.v2.shell.HostServersMigrateResponse(manager, info, loaded=False, resp=None)¶
基类:
Resource填充并绑定到管理器。
- 参数:
manager – BaseManager 对象
info – 表示资源属性的字典
loaded – 如果设置为 True,则防止延迟加载
resp – 响应或响应对象列表
- novaclient.v2.shell.console_dict_accessor(cs, data)¶
- novaclient.v2.shell.do_add_secgroup(cs, args)¶
向服务器添加安全组。
- novaclient.v2.shell.do_agent_create(cs, args)¶
已弃用:创建新的 agent 构建。
- novaclient.v2.shell.do_agent_delete(cs, args)¶
已弃用:删除现有的 agent 构建。
- novaclient.v2.shell.do_agent_list(cs, args)¶
已弃用:列出所有构建。
- novaclient.v2.shell.do_agent_modify(cs, args)¶
已弃用:修改现有的 agent 构建。
- novaclient.v2.shell.do_aggregate_add_host(cs, args)¶
将主机添加到指定的聚合。
- novaclient.v2.shell.do_aggregate_cache_images(cs, args)¶
请求缓存镜像。
- novaclient.v2.shell.do_aggregate_create(cs, args)¶
使用指定的详细信息创建新的聚合。
- novaclient.v2.shell.do_aggregate_delete(cs, args)¶
删除聚合。
- novaclient.v2.shell.do_aggregate_list(cs, args)¶
打印所有聚合的列表。
- novaclient.v2.shell.do_aggregate_remove_host(cs, args)¶
从指定的聚合中删除指定的主机。
- novaclient.v2.shell.do_aggregate_set_metadata(cs, args)¶
更新与聚合关联的元数据。
- novaclient.v2.shell.do_aggregate_show(cs, args)¶
显示指定聚合的详细信息。
- novaclient.v2.shell.do_aggregate_update(cs, args)¶
更新聚合的名称和可选的可用区。
- novaclient.v2.shell.do_availability_zone_list(cs, _args)¶
列出所有可用区。
- novaclient.v2.shell.do_backup(cs, args)¶
通过创建“备份”类型的快照来备份服务器。
- novaclient.v2.shell.do_boot(cs, args)¶
启动新的服务器。
- novaclient.v2.shell.do_clear_password(cs, args)¶
从元数据服务器清除服务器的管理员密码。 此操作实际上不会更改实例服务器密码。
- novaclient.v2.shell.do_console_log(cs, args)¶
获取服务器的控制台日志输出。
- novaclient.v2.shell.do_delete(cs, args)¶
立即关闭并删除指定的服务器。
- novaclient.v2.shell.do_diagnostics(cs, args)¶
检索服务器诊断信息。
- novaclient.v2.shell.do_evacuate(cs, args)¶
从故障主机撤离服务器。
- novaclient.v2.shell.do_flavor_access_add(cs, args)¶
为给定的租户添加 flavor 访问权限。
- novaclient.v2.shell.do_flavor_access_list(cs, args)¶
打印有关给定 flavor 的访问信息。
- novaclient.v2.shell.do_flavor_access_remove(cs, args)¶
为给定的租户删除 flavor 访问权限。
- novaclient.v2.shell.do_flavor_create(cs, args)¶
创建一个新的 flavor。
- novaclient.v2.shell.do_flavor_delete(cs, args)¶
删除特定的 flavor
- novaclient.v2.shell.do_flavor_key(cs, args)¶
设置或取消 flavor 的 extra_spec。
- novaclient.v2.shell.do_flavor_list(cs, args)¶
打印可用的“flavor”(服务器大小)列表。
- novaclient.v2.shell.do_flavor_show(cs, args)¶
显示有关给定 flavor 的详细信息。
- novaclient.v2.shell.do_flavor_update(cs, args)¶
更新现有 flavor 的描述。
- novaclient.v2.shell.do_force_delete(cs, args)¶
强制删除服务器。
- novaclient.v2.shell.do_get_mks_console(cs, args)¶
获取服务器的 MKS 控制台。
- novaclient.v2.shell.do_get_password(cs, args)¶
获取服务器的管理员密码。 此操作调用元数据服务来查询元数据信息,并且不会从服务器本身读取密码信息。
- novaclient.v2.shell.do_get_rdp_console(cs, args)¶
获取服务器的 rdp 控制台。
- novaclient.v2.shell.do_get_serial_console(cs, args)¶
获取服务器的串口控制台。
- novaclient.v2.shell.do_get_spice_console(cs, args)¶
获取服务器的 spice 控制台。
- novaclient.v2.shell.do_get_vnc_console(cs, args)¶
获取服务器的 vnc 控制台。
- novaclient.v2.shell.do_host_evacuate(cs, args)¶
从故障主机上撤离所有实例。
- novaclient.v2.shell.do_host_evacuate_live(cs, args)¶
将指定主机上的所有实例实时迁移到其他可用主机。
- novaclient.v2.shell.do_host_meta(cs, args)¶
设置或删除主机上所有实例的元数据。
- novaclient.v2.shell.do_host_servers_migrate(cs, args)¶
将指定主机上的所有实例冷迁移到其他可用主机。
- novaclient.v2.shell.do_hypervisor_list(cs, args)¶
列出超visor。
- novaclient.v2.shell.do_hypervisor_servers(cs, args)¶
列出属于特定超visor的服务器。
- novaclient.v2.shell.do_hypervisor_show(cs, args)¶
显示指定超visor的详细信息。
- novaclient.v2.shell.do_hypervisor_stats(cs, args)¶
- novaclient.v2.shell.do_hypervisor_uptime(cs, args)¶
显示指定超visor的运行时间。
- novaclient.v2.shell.do_image_create(cs, args)¶
通过拍摄正在运行的服务器的快照来创建新镜像。
- novaclient.v2.shell.do_instance_action(cs, args)¶
显示一个操作。
- novaclient.v2.shell.do_instance_action_list(cs, args)¶
列出服务器上的操作。
- novaclient.v2.shell.do_instance_usage_audit_log(cs, args)¶
列出/获取服务器使用情况审计。
- novaclient.v2.shell.do_interface_attach(cs, args)¶
将网络接口附加到服务器。
- novaclient.v2.shell.do_interface_detach(cs, args)¶
将网络接口从服务器分离。
- novaclient.v2.shell.do_interface_list(cs, args)¶
列出附加到服务器的接口。
- novaclient.v2.shell.do_keypair_add(cs, args)¶
创建用于服务器的新密钥对。
- novaclient.v2.shell.do_keypair_delete(cs, args)¶
删除按名称给出的密钥对。
- novaclient.v2.shell.do_keypair_list(cs, args)¶
打印用户的密钥对列表
- novaclient.v2.shell.do_keypair_show(cs, args)¶
显示有关给定密钥对的详细信息。
- novaclient.v2.shell.do_limits(cs, args)¶
打印速率和绝对限制。
- novaclient.v2.shell.do_list(cs, args)¶
列出服务器。
- novaclient.v2.shell.do_list_secgroup(cs, args)¶
列出服务器的安全组。
- novaclient.v2.shell.do_live_migration(cs, args)¶
将正在运行的服务器迁移到新机器。
- novaclient.v2.shell.do_live_migration_abort(cs, args)¶
中止正在进行的实时迁移。
- novaclient.v2.shell.do_live_migration_force_complete(cs, args)¶
强制进行中的实时迁移完成。
- novaclient.v2.shell.do_lock(cs, args)¶
锁定服务器。普通(非管理员)用户将无法对锁定的服务器执行操作。
- novaclient.v2.shell.do_meta(cs, args)¶
设置或删除服务器上的元数据。
- novaclient.v2.shell.do_migrate(cs, args)¶
迁移服务器。
- novaclient.v2.shell.do_migration_list(cs, args)¶
打印迁移列表。
- novaclient.v2.shell.do_pause(cs, args)¶
暂停服务器。
- novaclient.v2.shell.do_quota_class_show(cs, args)¶
列出配额类别的配额。
- novaclient.v2.shell.do_quota_class_update(cs, args)¶
更新配额类的配额。
- novaclient.v2.shell.do_quota_defaults(cs, args)¶
列出租户的默认配额。
- novaclient.v2.shell.do_quota_delete(cs, args)¶
删除租户/用户的配额,使其配额将恢复到默认值。
- novaclient.v2.shell.do_quota_show(cs, args)¶
列出租户/用户的配额。
- novaclient.v2.shell.do_quota_update(cs, args)¶
更新租户/用户的配额。
- novaclient.v2.shell.do_reboot(cs, args)¶
重启服务器。
- novaclient.v2.shell.do_rebuild(cs, args)¶
关闭、重新镜像并重启服务器。
- novaclient.v2.shell.do_refresh_network(cs, args)¶
刷新服务器网络信息。
- novaclient.v2.shell.do_remove_secgroup(cs, args)¶
从服务器移除安全组。
- novaclient.v2.shell.do_rescue(cs, args)¶
将服务器重启到救援模式,从初始镜像或指定的镜像启动机器,并将当前启动磁盘作为辅助磁盘挂载。
- novaclient.v2.shell.do_reset_network(cs, args)¶
重置服务器的网络。
- novaclient.v2.shell.do_reset_state(cs, args)¶
重置服务器的状态。
- novaclient.v2.shell.do_resize(cs, args)¶
调整服务器的大小。
- novaclient.v2.shell.do_resize_confirm(cs, args)¶
确认之前的调整大小操作。
- novaclient.v2.shell.do_resize_revert(cs, args)¶
撤销之前的调整大小操作(并返回到之前的虚拟机)。
- novaclient.v2.shell.do_restore(cs, args)¶
恢复一个软删除的服务器。
- novaclient.v2.shell.do_resume(cs, args)¶
恢复服务器。
- novaclient.v2.shell.do_server_group_create(cs, args)¶
创建具有指定细节的新服务器组。
- novaclient.v2.shell.do_server_group_delete(cs, args)¶
删除特定的服务器组。
- novaclient.v2.shell.do_server_group_get(cs, args)¶
获取特定的服务器组。
- novaclient.v2.shell.do_server_group_list(cs, args)¶
打印所有服务器组的列表。
- novaclient.v2.shell.do_server_migration_list(cs, args)¶
获取指定服务器的迁移列表。
- novaclient.v2.shell.do_server_migration_show(cs, args)¶
获取指定服务器的迁移。
- novaclient.v2.shell.do_server_tag_add(cs, args)¶
向服务器添加一个或多个标签。
- novaclient.v2.shell.do_server_tag_delete(cs, args)¶
从服务器删除一个或多个标签。
- novaclient.v2.shell.do_server_tag_delete_all(cs, args)¶
删除服务器的所有标签。
- novaclient.v2.shell.do_server_tag_list(cs, args)¶
获取服务器的标签列表。
- novaclient.v2.shell.do_server_tag_set(cs, args)¶
为服务器设置标签列表。
- novaclient.v2.shell.do_server_topology(cs, args)¶
检索服务器拓扑。
- novaclient.v2.shell.do_service_delete(cs, args)¶
通过 UUID ID 删除服务。
如果删除的是 nova-compute 服务,请确保在通过此命令删除服务之前停止物理主机上的实际 nova-compute 进程。否则,运行的服务可能会在数据库中重新创建孤立的 compute_nodes 表记录。
- novaclient.v2.shell.do_service_disable(cs, args)¶
禁用服务。
- novaclient.v2.shell.do_service_enable(cs, args)¶
启用服务。
- novaclient.v2.shell.do_service_force_down(cs, args)¶
强制服务下线。
- novaclient.v2.shell.do_service_list(cs, args)¶
显示所有正在运行的服务的列表。按主机和二进制过滤。
- novaclient.v2.shell.do_set_password(cs, args)¶
更改服务器的管理员密码。
- novaclient.v2.shell.do_shelve(cs, args)¶
搁置服务器。
- novaclient.v2.shell.do_shelve_offload(cs, args)¶
从计算节点移除搁置的服务器。
- novaclient.v2.shell.do_show(cs, args)¶
显示给定服务器的详细信息。
- novaclient.v2.shell.do_ssh(cs, args)¶
通过 SSH 连接到服务器。
- novaclient.v2.shell.do_start(cs, args)¶
启动服务器。
- novaclient.v2.shell.do_stop(cs, args)¶
停止服务器。
- novaclient.v2.shell.do_suspend(cs, args)¶
暂停服务器。
- novaclient.v2.shell.do_trigger_crash_dump(cs, args)¶
在实例中触发崩溃转储。
- novaclient.v2.shell.do_unlock(cs, args)¶
解锁服务器。
- novaclient.v2.shell.do_unpause(cs, args)¶
取消暂停服务器。
- novaclient.v2.shell.do_unrescue(cs, args)¶
从正常启动磁盘再次启动服务器。
- novaclient.v2.shell.do_unshelve(cs, args)¶
取消挂起服务器。
- novaclient.v2.shell.do_update(cs, args)¶
更新服务器的名称或描述。
- novaclient.v2.shell.do_usage(cs, args)¶
显示单个租户的使用情况数据。
- novaclient.v2.shell.do_usage_list(cs, args)¶
列出所有租户的使用情况数据。
- novaclient.v2.shell.do_version_list(cs, args)¶
列出所有 API 版本。
- novaclient.v2.shell.do_volume_attach(cs, args)¶
将卷附加到服务器。
- novaclient.v2.shell.do_volume_attachments(cs, args)¶
列出附加到服务器的所有卷。
- novaclient.v2.shell.do_volume_detach(cs, args)¶
从服务器分离卷。
- novaclient.v2.shell.do_volume_update(cs, args)¶
更新服务器上的附件。
如果 dest_volume 与 src_volume 相同,则该命令会将数据从附加的卷迁移到指定的可用卷,并交换到新的卷的活动附件。否则,它仅更新现有附件的参数。
- novaclient.v2.shell.emit_duplicated_image_with_warning(img, image_with)¶
- novaclient.v2.shell.print_console(cs, data)¶