Mel
Mel

Reputation: 695

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

I'm trying to switch from openStack v2 to v3 but I'm having trouble requesting a token.

here is the POST request

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

the endpoint used to be https://auth.cloud.ovh.net/v2/tokens and I'm now trying with https://auth.cloud.ovh.net/v3 as https://auth.cloud.ovh.net/v3/tokens sends back a 404.

here is the response

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

Upvotes: 0

Views: 515

Answers (2)

Mel
Mel

Reputation: 695

If someone is having the same issue. Mine ended up working by changing the endpoint as Tony suggested.

Also I've changed the body to

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

I don't know if that makes a difference with

"password":{
   "user":{
      "name":"my_id",
      "domain":{
         "name":"Default"
      },
      "password":"my_password"
   }
}

Upvotes: 0

Tony
Tony

Reputation: 36

Make sure endpoint https://auth.cloud.ovh.net/v3 as https://auth.cloud.ovh.net/v3/auth/tokens please also try without scope parameter.

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

Upvotes: 1

Related Questions