• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
LeisureZhao
博客园    首页    新随笔    联系   管理    订阅  订阅

08.存储Cinder→4.Cinder组件详解→1.cinder-api

返回总目录

  1. cinder-api 向外界暴露若干 HTTP REST API 接口,在 keystone 中我们可以查询 cinder-api 的 endponits。
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    root@controller:~# openstack endpoint list
    +----------------------------------+-----------+--------------+----------------+---------+-----------+------------------------------------------------+
    | ID                               | Region    | Service Name | Service Type   | Enabled | Interface | URL                                            |
    +----------------------------------+-----------+--------------+----------------+---------+-----------+------------------------------------------------+
    | 06b3d542f3ee43cd96e02bc607b2eb4e | RegionOne | cinderv3     | volumev3       | True    | public    | http://192.168.32.73/volume/v3/$(project_id)s  |
    | 15bad1304d7b46e989329c3fb4ba76d4 | RegionOne | keystone     | identity       | True    | admin     | http://192.168.32.73/identity                  |
    | 1a339b1a524341218d3e43254f93fd48 | RegionOne | cinderv2     | volumev2       | True    | public    | http://192.168.32.73/volume/v2/$(project_id)s  |
    | 2d3e96fbe41c4b7a842d8f3138edba07 | RegionOne | cinder       | block-storage  | True    | public    | http://192.168.32.73/volume/v3/$(project_id)s  |
    | 4ddb72eb412948d09100b9db2d007e21 | RegionOne | glance       | image          | True    | public    | http://192.168.32.73/image                     |
    | 75a7442ebbdb47239d5ae577b99abfe6 | RegionOne | cinder       | volume         | True    | public    | http://192.168.32.73/volume/v1/$(project_id)s  |
    | 78c763847bed477da135f0a2fcd6aa51 | RegionOne | nova_legacy  | compute_legacy | True    | public    | http://192.168.32.73/compute/v2/$(project_id)s |
    | ce509688367d4a309ed9869823cfdfb7 | RegionOne | neutron      | network        | True    | public    | http://192.168.32.73:9696/                     |
    | d78c9ca6605c48eea7921e1dcf58412b | RegionOne | nova         | compute        | True    | public    | http://192.168.32.73/compute/v2.1              |
    | f4583d37662640ad8a39a1107439b268 | RegionOne | keystone     | identity       | True    | public    | http://192.168.32.73/identity                  |
    | f51f3152ef434d72bfefc1fd3309ba54 | RegionOne | placement    | placement      | True    | public    | http://192.168.32.73/placement                 |
    +----------------------------------+-----------+--------------+----------------+---------+-----------+------------------------------------------------+
    root@controller:~# openstack endpoint show 75a7442ebbdb47239d5ae577b99abfe6
    +--------------+-----------------------------------------------+
    | Field        | Value                                         |
    +--------------+-----------------------------------------------+
    | enabled      | True                                          |
    | id           | 75a7442ebbdb47239d5ae577b99abfe6              |
    | interface    | public                                        |
    | region       | RegionOne                                     |
    | region_id    | RegionOne                                     |
    | service_id   | ef61d58a3d6b424fb96c031e4a3d2410              |
    | service_name | cinder                                        |
    | service_type | volume                                        |
    | url          | http://192.168.32.73/volume/v1/$(project_id)s |
    +--------------+-----------------------------------------------+
  2. 当然,作为最终用户的我们不会直接发送 Rest API 请求。OpenStack CLI,Dashboard 和其他需要跟 Cinder 交换的组件会使用这些 API。
  3. cinder-api 对接收到的 HTTP API 请求会做如下处理:
    1. 检查客户端传入的参数是否合法有效
    2. 调用 cinder 其他子服务的处理客户端请求
    3. 将 cinder 其他子服务返回的结果格式化并返回给客户端
  4. cinder-api 接受哪些请求呢?简单的说,只要是 Volume 生命周期相关的操作,cinder-api 都可以响应。大部分操作都可以在 Dashboard 上看到。
posted @ 2019-07-13 17:22  LeisureZhao  阅读(201)  评论(0)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3