建议零售价 "get_version_v3() got an unexpected keyword argument 'auth'"

OVH "get_version_v3() got an unexpected keyword argument 'auth'"

我正在尝试从 openStack v2 切换到 v3,但我在请求令牌时遇到问题。

这里是 POST 请求

         {
            "auth": {
            "identity": {
              "methods": [
                  "password"
              ],
              "password": {
                  "user": {
                      "id": my_id,
                      "domain": {
                          "id": "default"
                      },
                      "password": my_password
                  }
              }
          },
          "scope": {
            "project": {
              "name": my_tenant_name,
              "domain": { "id": "default" }
            }
          }
        }
        }

终点曾经是https://auth.cloud.ovh.net/v2/tokens 我现在正在尝试 https://auth.cloud.ovh.net/v3 as https://auth.cloud.ovh.net/v3/tokens 发回 404。

这是回复

{
    "error": {
        "message": "get_version_v3() got an unexpected keyword argument 'auth'",
        "code": 400,
        "title": "Bad Request"
    }
}

确保端点 https://auth.cloud.ovh.net/v3 as https://auth.cloud.ovh.net/v3/auth/tokens 也请尝试不使用范围参数。

 {
     "auth": {
         "identity": {
             "methods": [
                 "password"
             ],
             "password": {
                 "user": {
                     "name": "my_id",
                     "domain": {
                         "name": "Default"
                     },
                     "password": "my_password"
                 }
             }
         }
     }
 }

如果有人遇到同样的问题。我的最终通过按照 Tony 的建议更改端点来工作。

我还把正文改成了

{
   "auth":{
      "identity":{
         "methods":[
            "password"
         ],
         "password":{
            "user":{
               "name":"",
               "password":"",
               "domain":{
                  "id":"default"
               }
            }
         }
      }
   }
}

我不知道这对

是否有影响
"password":{
   "user":{
      "name":"my_id",
      "domain":{
         "name":"Default"
      },
      "password":"my_password"
   }
}