summaryrefslogtreecommitdiff
path: root/api-ref/source/os-fping.inc
blob: 73e82ac462440ad0ca1c0a93550daa838d3cc27c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
.. -*- rst -*-

==========================
 Ping instances (os-fping)
==========================

.. warning::

   This API only works with ``nova-network`` which is
   deprecated. It should be avoided in any new applications.
   These will fail with a 404 starting from microversion 2.36.
   It was removed in the 18.0.0 Rocky release.

Pings instances and reports which instances are alive.

Ping Instances
==============

.. rest_method:: GET /os-fping

Runs the fping utility to ping instances and reports which instances are alive.

Specify the ``all_tenants=1`` query parameter to ping instances for all tenants. For example:

::

  GET /os-fping?all_tenants=1

Specify the ``include`` and ``exclude`` query parameters to filter the results. For example:

::

  GET /os-fping?all_tenants=1&include=uuid1,uuid2&exclude=uuid3,uuid4

Policy defaults enable only users with the administrative role or the
owner of the server to perform this operation. Cloud providers can
change these permissions through the ``policy.json`` file.

Normal response codes: 200

Error response codes: serviceUnavailable(503), unauthorized(401), forbidden(403),
itemNotFound(404), gone(410)

Request
-------

.. rest_parameters:: parameters.yaml


  - all_tenants: all_tenants
  - include: include
  - exclude: exclude

Response
--------

.. rest_parameters:: parameters.yaml

  - servers: servers
  - alive: alive
  - id: server_id
  - project_id: project_id

|

**Example Ping Instances**

.. literalinclude:: ../../doc/api_samples/os-fping/fping-get-resp.json
   :language: javascript

Ping An Instance
================

.. rest_method:: GET /os-fping/{instance_id}

Runs the fping utility to ping an instance and reports whether the instance is alive.

Policy defaults enable only users with the administrative role or the
owner of the server to perform this operation. Cloud providers can
change these permissions through the ``policy.json`` file.

Normal response codes: 200

Error response codes: serviceUnavailable(503), unauthorized(401), forbidden(403),
itemNotFound(404), gone(410)

Request
-------

.. rest_parameters:: parameters.yaml


  - instance_id: instance_id

Response
--------

.. rest_parameters:: parameters.yaml

  - server: server
  - alive: alive
  - id: server_id
  - project_id: project_id

|

**Example Ping An Instance**

.. literalinclude:: ../../doc/api_samples/os-fping/fping-get-details-resp.json
   :language: javascript