Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

1-

...

Create the

...

auth

...

.json file ( GUI_username, GUI_password and Tenant_name )

2-

...

 do a POST to get in the HTTP response with the auth_tokens ( HTTP response headers saved locally )


1-

...

Create the

...

auth.json file

https://www.juniper.net/documentation/en_US/nfv1.0/topics/task/configuration/ccpe-api-obtain-admin-token.html

Code Block
titleauth.json file
collapsetrue
{
  "auth": {
    "scope": {
      "project": {
        "domain": {
          "id": "default"
        },
        "name": "<tenant name: JEAN_LUC_KRIKER>"
      }
    },
    "identity": {
      "password": {
        "user": {
          "domain": {
            "id": "default"
          },
          "password": "<loging password>",
          "name": "<username:  jkriker@juniper.net>"
        }
      },
      "methods": [
        "password"
      ]
    }
  }
}



Go to Contrail Service Orchestratorhttps://contrail-juniper.net/
  • Select the tenant:  tenant_name
Image Added
  • Go to:     Administration >>> Users                   
  • GUI_ username / GUI_password
Image Added



2- do a POST to get in the response the auth_tokens

curl -X POST -D headers -H "content-type:application/json" httphttps://x48contrail-byod.mycsolab.com:5000juniper.net/v3/auth/tokens -d@auth.json

3- do some POST

Example to get "configure-sites"

curl -k -D headers -X POST -H "X-Auth-Token:$OS_TOKEN" -H "Content--D headers  ( the response header will be save localy)

-d@auth.json ( use the auth.json file for the password authentication )


#  OLD   CSO lab:   curl -X POST -D headers -H "content-type:application/json" httpshttp://192x48-byod.168.10.42/tssm/configure-sites -d'mycsolab.com:5000/v3/auth/tokens -d@auth.json



3- read the header file

# more headers 


Image Added