0

I am using Open-Stack APIs to create a server/instance. I am using a rest client to do it. when I send a request to create a server the request executes successfully and returns me following response:

{
    "server": {
        "OS-DCF:diskConfig": "AUTO",
        "adminPass": "CQH9gWzgkVno",
        "id": "324dfb7d-f4a9-419a-9a19-237df04b443b",
        "links": [
            {
                "href": "http://openstack.example.com/v2/openstack/servers/324dfb7d-f4a9-419a-9a19-237df04b443b",
                "rel": "self"
            },
            {
                "href": "http://openstack.example.com/openstack/servers/324dfb7d-f4a9-419a-9a19-237df04b443b",
                "rel": "bookmark"
            }
        ]
    }
}

I don't know how to access the Server/Instance using the URL received in the JSON response. when the URL is clicked it says Unauthorised.

I don't have access to the OpenStack server or Horizon.

Please help!

Bhushan
  • 1
  • 1

1 Answers1

1

That URL does not provide a means for you to access your server. The URL is a REST API endpoint that can be used by your REST client to perform actions on the server. Take a look at the REST API documentation. For example, you can GET that URL (with appropriate credentials) to get details about that server, or you can use that URL and a suffix to do things like interact with the server metadata (<url>/metadata) or perform server actions (<url>/action) such as rebooting the server.

If you actually want to log in to the server or access services on the server, you would need to look up the ip addresses that have been assigned to the server by OpenStack. The easiest way to do this is to install the nova command line client, and then just run something like nova list, which will produce output like:

+--------------------------------------+----------+--------+------------+-------------+---------------------------------+
| ID                                   | Name     | Status | Task State | Power State | Networks                        |
+--------------------------------------+----------+--------+------------+-------------+---------------------------------+
| 2ed5f06c-66aa-4dc5-b24f-2aec1c4c7411 | myserver | ACTIVE | -          | Running     | net0=10.0.0.25, 192.168.200.190 |
+--------------------------------------+----------+--------+------------+-------------+---------------------------------+

If for some reason you can't install the nova client, you could replicate the functionality yourself using the REST APIs documented at the above link.

larsks
  • 277,717
  • 41
  • 399
  • 399