Hostnet OpenStack Cloud Compute API

No ''Hostnet Wiki''
Versija 2017. gada 5. jūnijs, plkst. 10.25, kādu to atstāja Martins (Diskusija | devums)

Pārlēkt uz: navigācija, meklēt

Once you have these pieces of information, you can pass them into the SDK by replacing {username}, {password}, {domain} and {projectID} with your info:

  1. {username}, {apiKey} below are placeholders, do not enclose '{}' when you replace them with actual credentials.
~ curl -i \
  -H "Content-Type: application/json" \
  -d '
{ "auth": {
    "identity": {
      "methods": [
        "password"
      ],
      "password": {
        "user": {
          "name": "{username}",
          "domain": {
            "id": "{domain}"
          },
          "password": "{password}"
        }
      }
    },
    "scope": {
      "project": {
        "id": "{projectID}"
      }
    }
  }
}' \
  https://identity.api.cloud.hostnet.lv/v3/auth/tokens
  1. From the resulting, set environment variable as X-Subject-Token value:
 export OS_TOKEN="{X-Subject-Token}"
  1. Get service endpoints:
curl -s -X GET https://identity.api.cloud.hostnet.lv/v3/endpoints \                        
-H "X-Auth-Token: $OS_TOKEN" | python -m json.tool
  1. Set env variable for public compute URL:
 export ENDPOINT="{computeURL}"
  1. List available flavors:
curl -s -X GET $ENDPOINT/flavors \
-H "X-Auth-Token: $OS_TOKEN" | python -m json.tool

!!!Full list of flavors!!!