首页 | 新闻 | 新品 | 文库 | 方案 | 视频 | 下载 | 商城 | 开发板 | 数据中心 | 座谈新版 | 培训 | 工具 | 博客 | 论坛 | 百科 | GEC | 活动 | 主题月 | 电子展
返回列表 回复 发帖

探索用于 PowerVC 的 OpenStack REST API(3)

探索用于 PowerVC 的 OpenStack REST API(3)

Nova 风格 (flavor) 可使用这些 API 管理虚拟服务器风格 (flavor)(定义 RAM 大小、磁盘、核心数量等的虚拟硬件模板):
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/flavors
    用途:创建一个新风格。
    操作:POST
    正常响应代码:OK                        (200)
    错误响应代码:Bad Request (400)、Server Error                    (500)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/flavors
    用途:获取风格列表。
    操作:GET
    正常响应代码:OK                        (200)
    错误响应代码:Not Found (404)、Server Error                    (500)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/flavors/detail
    用途:获取风格列表及详细信息。
    操作:GET
    正常响应代码:OK                        (200)
    错误响应代码:Not Found (404)、Server Error                    (500)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/flavors/detail/flavor_id
    用途:获取指定的风格的详细信息。
    操作:GET
    正常响应代码:OK                        (200)
    错误响应代码:Not Found (404)、Server Error                    (500)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/flavors/detail/flavor_id
    用途:Deletes                    the specified flavor                        ID.
    操作:DELETE
    正常响应代码:No                    Content (204)
    错误响应代码:Bad Request (400)、Not Found                    (404)、Server Error (500)
    没有请求或响应正文
额外的 Nova 风格规格 可用于管理现有虚拟服务器风格的额外规格(比如设置虚拟处理器或内存的最小和最大值,设置专用或共享的处理器)。
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/flavors/flavor_id/os-extra_specs
    用途:列出指定风格的额外规格或键。
    操作:GET
    正常响应代码:OK                        (200)
    错误响应代码:Not Found (404)、Server Error                    (500)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/flavors/flavor_id/os-extra_specs
    用途:创建指定风格的额外规格或键。
    操作:POST
    正常响应代码:OK                        (200)
    错误响应代码:Bad Request (400)、Server Error                    (500)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/flavors/flavor_id/os-extra_specs/key_id
    用途:获取指定的键的值。
    操作:GET
    正常响应代码:OK                        (200)
    错误响应代码:Not Found (404)、Server Error                    (500)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/flavors/flavor_id/os-extra_specs/key_id
    用途:按键删除一个指定的额外规格。
    操作:DELETE
    正常响应代码:No                    Content (204)
    错误响应代码:Bad Request (400)、Not Found                    (404)、Server Error (500)
    没有请求或响应正文
Nova 主机 向 PowerVC 中注册和取消注册 Power 主机。
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/os-hosts
    用途:列出所有主机。
    操作:GET
    正常响应代码:OK                        (200)
    错误响应代码:Not Found (404)、Server Error                    (500)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/os-hosts/host_name
    用途:描述一个指定的主机。
    操作:GET
    正常响应代码:OK                        (200)
    错误响应代码:Not Found (404)、Server Error                    (500)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/os-hosts
    用途:注册一个新的计算主机。
    操作:POST
    正常响应代码:OK                        (200)
    错误响应代码:Bad Request (400)、Server Error                    (500)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/os-hosts/host_name
    用途:取消注册一个计算主机。
    操作:DELETE
    正常响应代码:No                    Content (204)
    错误响应代码:Bad Request (400)、Not Found                    (404)、Server Error (500)
    没有请求或响应正文
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/os-hosts/host_name/update-registration
    用途:重新注册一个计算主机。
    操作:PUT
    正常响应代码:OK                        (200)
    错误响应代码:Bad Request (400)、Not Found                    (404)、Server Error (500)
Nova 虚拟机管理程序可使用这些 API 获取 PowerVC 所管理的服务器的虚拟机管理程序信息:
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/os-hypervisors
    用途:列出每个服务器的虚拟机管理程序信息。
    操作:GET
    正常响应代码:OK                        (200)
    错误响应代码:Not Found (404)、Server Error                    (500)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/os-hypervisors/detail
    用途:列出                    OpenStack                        安装所管理的虚拟机管理程序的详细信息。
    操作:GET
    正常响应代码:OK                        (200)
    错误响应代码:Not Found (404)、Server Error                    (500)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/os-hypervisors/hypervisor_id
    用途:提供特定的虚拟机管理程序的详细信息。
    操作:GET
    正常响应代码:OK                        (200)
    错误响应代码:Not Found (404)、Server Error                    (500)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/os-hypervisors/hypervisor_id/servers
    用途:列出虚拟机管理程序服务器或虚拟机。
    操作:GET
    正常响应代码:OK                        (200)
    错误响应代码:Not Found (404)、Server Error                    (500)
Nova 镜像 可以使用这些 API 来管理虚拟服务器镜像:
  • https://<powervc-ip>/powervc/openstack/image/v2/tenant_id/images
    用途:列出所有镜像。
    操作:GET
    正常响应代码:OK                        (200)
    错误响应代码:Not Found (404)、Server Error                    (500)
  • https://<powervc-ip>/powervc/openstack/image/v2/tenant_id/images/detail
    用途:列出所有镜像及其详细信息。
    操作:GET
    正常响应代码:OK                        (200)
    错误响应代码:Not Found (404)、Server Error                    (500)
  • https://<powervc-ip>/powervc/openstack/image/v2/tenant_id/images/image_id
    用途:列出指定的镜像的详细信息。
    操作:GET
    正常响应代码:OK                        (200)
    错误响应代码:Not Found (404)、Server Error                    (500)
  • https://<powervc-ip>/powervc/openstack/image/v2/tenant_id/images/image_id
    用途:删除指定的镜像。
    操作:DELETE
    正常响应代码:No                    Content (204)
    错误响应代码:Bad Request (400)、Not Found                    (404)、Server Error (500)
    没有请求或响应正文
  • Nova 限制 可以使用此 API 来获取为用户帐户配置的限制的详细信息:
  • https://<powervc-ip>/powervc/openstack/image/v2/tenant_id/limits
    用途:返回帐户的当前限制。
    操作:GET
    正常响应代码:OK                    (200), 203
    错误响应代码:Not Found (404)、Server Error                    (500)
Nova 放置策略 可以使用这些 API 来获取放置策略列表和修改它们的属性:
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/ego/policy/placement
    用途:列出所有策略。
    操作:GET
    正常响应代码:OK                        (200)
    错误响应代码:Not Found (404)、Server Error                    (500)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/ego/policy/placement/policy_id
    用途:列出一个特定的策略。
    操作:GET
    正常响应代码:OK                        (200)
    错误响应代码:Not Found (404)、Server Error                    (500)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/ego/policy/placement/policy_id
    用途:修改特定策略的可编辑属性。
    操作:PUT
    正常响应代码:No                    Content (204)
    错误响应代码:Bad Request (400)、Not Found                    (404)、Server Error (500)
Nova 键对 可以使用这些 API 来管理与虚拟服务器的用户帐户有关联的键对:
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/os-keypairs
    用途:列出与帐户有关联的键对。
    操作:GET
    正常响应代码:OK                        (200)
    错误响应代码:Not Found (404)、Server Error                    (500)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/os-keypairs
    用途:生成或导入一个键对。
    操作:POST
    正常响应代码:OK                        (200)
    错误响应代码:Bad Request (400)、Server Error                    (500)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/os-keypairs/keypair_name
    用途:删除某个指定的键对。
    操作:DELETE
    正常响应代码:No                    Content (204)
    错误响应代码:Bad Request (400)、Not Found                    (404)、Server Error (500)
    没有请求或响应正文
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/os-keypairs/keypair_name
    用途:显示与帐户有关联的键对。
    操作:GET
    正常响应代码:OK                        (200)
    错误响应代码:Not Found (404)、Server Error                    (500)
返回列表