POST请求到OpenStack Swift中的/ v1 / <account-name>是否创建该帐户?</account-name>

时间:2014-07-21 23:28:53

标签: openstack openstack-swift

我在解释此页面时遇到问题: http://docs.openstack.org/api/openstack-object-storage/1.0/content/POST_updateAccountMeta__v1__account__storage_account_services.html

它表示对帐户/的POST请求应该更新该帐户的元数据。看起来这意味着如果对不存在的帐户/有POST请求,则不会创建帐户。正确?

但是,观察SAIO中的网络流量(swift all in one),我发现SAIO功能测试的第一件事就是发出此请求:

POST /v1/6fa5758df0d5463283c1fae5d1b32b27

我很确定此帐户不存在。 Swift是否希望使用该POST请求创建该帐户?

2 个答案:

答案 0 :(得分:1)

swift@swift-1:/etc/swift$ swift stat -v
                  StorageURL: http://XXXX:8080/v1/AUTH_db8e1e2e00874ca88c9118a28bba0602
                  Auth Token: f7d527d0551c4f02a050ea7e4073ac64
                     Account: AUTH_db8e1e2e00874ca88c9118a28bba0602
                  Containers: 2
                     Objects: 17
                       Bytes: 17179869441
Objects in policy "policy-0": 17
  Bytes in policy "policy-0": 17179869441
                 X-Timestamp: 1417682993.39561
                  X-Trans-Id: txf84a1c09c7c7459a909b2-00551672fa
                Content-Type: text/plain; charset=utf-8
               Accept-Ranges: bytes



swift@swift-1:/etc/swift$ keystone tenant-list
+----------------------------------+---------+---------+
|                id                |   name  | enabled |
+----------------------------------+---------+---------+
| b1003d1e8e514e07be811316eb6f34bd |  admin  |   True  |
| db8e1e2e00874ca88c9118a28bba0602 |   demo  |   True  |
| 75497dda7a4743c3a464e3e12acc4951 |  XXX|   True  |
| 3008e419d6c147618a10d5e55eb03298 | service |   True  |
+----------------------------------+---------+---------+




As you see,the account is the tenant id of demo.

答案 1 :(得分:0)

OpenStack Object Storage API v1的文档未描述通过该服务创建帐户的方法。帐户是通过以下API方法之一创建的,具体取决于所使用的身份验证服务: