Before you can modify anything, you should have a good look at it.
When you want to check how many servers you have active, you need to use the GET method when you call the /server URL. When you are testing things, use the curl command to get the raw JSON reply:
$ curl -v -H "X-Auth-Token:999888777666" http://localhost:8774/v1.1/openstack/servers
When you have no active servers, the result will be a dictionary with one key—servers—whose value is an empty list:
{
"servers": []
}
When there are more servers active, you will see a longer list of all servers that you can manage:
{
"servers": [
{
"id": 2,
"uuid": "fcdeba5b-40f7-4f51-9404-8a41951739b2",
"links": [
{
"href": "http://localhost:8774/v1.1/openstack/servers/2",
"rel": "self"
},
{
"href": "http://localhost:8774/openstack/servers/2",
"rel": "bookmark"
}
],
"name": "tornado002"
},
{
"id": 1,
"uuid": "8fec45a8-92fb-4840-8f2a-c64e1be49dee",
"links": [
{
"href": "http://localhost:8774/v1.1/openstack/servers/1",
"rel": "self"
},
{
"href": "http://localhost:8774/openstack/servers/1",
"rel": "bookmark"
}
],
"name": "tornado001"
}
]
}
For a better view, here is a single server entry in the servers list:
{
"id": 1,
"uuid": "8fec45a8-92fb-4840-8f2a-c64e1be49dee",
"links": [
{
"href": "http://localhost:8774/v1.1/openstack/servers/1",
"rel": "self"
},
{
"href": "http://localhost:8774/openstack/servers/1",
"rel": "bookmark"
}
],
"name": "tornado001"
}
The keys in a dictionary that describes each server have the following meaning:
id — the numeric ID of the server.
uuid — the universally unique identifier of the server.
links — the list of URLs that point to the server.
name — a descriptive name of the server.
It is worth pointing out a few things: the server id is unique within your account with the OpenStack cloud provider. Other users with the same provider may (and will) have the same server id numbers. They are assigned in the order of server creation. Similarly, the the value of the name key does not have to be unique, even within your own account.
The only unique identifier of your server will be its uuid. It is assigned automatically by you OpenStack cloud provider's system using an algorithm that is supposed to guarantee that the IDs it creates do not clash. You can read more about UUIDs on Wikipedia:
