Remove remaining vendor passthru lookup/heartbeat
Vendor-passthru lookup and heartbeat was mostly removed (in
5eb4ba26dd
). This removes the
remaining code and references to them.
Change-Id: I6b214503999ce1892f10f4507a6063b6e8d604bc
Related-Bug: #1640533
This commit is contained in:
parent
4c24d2e09c
commit
24006badee
@ -97,9 +97,6 @@ GET v1/drivers/ipmi > driver-get-response.json
|
|||||||
GET v1/drivers/agent_ipmitool/properties > driver-property-response.json
|
GET v1/drivers/agent_ipmitool/properties > driver-property-response.json
|
||||||
GET v1/drivers/agent_ipmitool/raid/logical_disk_properties > driver-logical-disk-properties-response.json
|
GET v1/drivers/agent_ipmitool/raid/logical_disk_properties > driver-logical-disk-properties-response.json
|
||||||
|
|
||||||
GET v1/drivers/agent_ipmitool/vendor_passthru/methods > driver-passthru-methods-response.json
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#########
|
#########
|
||||||
# CHASSIS
|
# CHASSIS
|
||||||
|
@ -8,9 +8,10 @@ Each driver MAY support vendor-specific extensions, called "passthru" methods.
|
|||||||
|
|
||||||
Internally, Ironic's driver API supports flexibly exposing functions via the
|
Internally, Ironic's driver API supports flexibly exposing functions via the
|
||||||
common HTTP methods GET, PUT, POST, and DELETE. To call a passthru method,
|
common HTTP methods GET, PUT, POST, and DELETE. To call a passthru method,
|
||||||
the query string must contain the name of the method, eg.
|
the query string must contain the name of the method. For example, if the
|
||||||
``/vendor_passthru?method=lookup``. The contents of the HTTP request are
|
method name was ``my_passthru_method``, the request would look like
|
||||||
forwarded to the driver and validated there.
|
``/vendor_passthru?method=my_passthru_method``. The contents of the HTTP
|
||||||
|
request are forwarded to the driver and validated there.
|
||||||
|
|
||||||
Ironic's REST API provides a means to discover these methods, but does not
|
Ironic's REST API provides a means to discover these methods, but does not
|
||||||
provide support, testing, or documentation for these endpoints. The Ironic
|
provide support, testing, or documentation for these endpoints. The Ironic
|
||||||
@ -42,8 +43,12 @@ Request
|
|||||||
|
|
||||||
- driver_name: driver_ident
|
- driver_name: driver_ident
|
||||||
|
|
||||||
Response Parameters
|
Response
|
||||||
-------------------
|
--------
|
||||||
|
|
||||||
|
The response BODY is a dictionary whose keys are the method names. The value
|
||||||
|
of each item is itself a dictionary describing how to interact with that
|
||||||
|
method.
|
||||||
|
|
||||||
.. rest_parameters:: parameters.yaml
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
@ -52,16 +57,6 @@ Response Parameters
|
|||||||
- description: passthru_description
|
- description: passthru_description
|
||||||
- http_methods: passthru_http_methods
|
- http_methods: passthru_http_methods
|
||||||
|
|
||||||
Response Example
|
|
||||||
----------------
|
|
||||||
|
|
||||||
The response BODY is a dictionary whose keys are a ``method_name``. The value
|
|
||||||
of each item is itself a dictionary describing how to interact with that
|
|
||||||
method.
|
|
||||||
|
|
||||||
.. literalinclude:: samples/driver-passthru-methods-response.json
|
|
||||||
:language: javascript
|
|
||||||
|
|
||||||
|
|
||||||
Call a Method
|
Call a Method
|
||||||
=============
|
=============
|
||||||
@ -71,7 +66,7 @@ Call a Method
|
|||||||
The HTTP METHOD may be one of GET, POST, PUT, DELETE, depending on the driver
|
The HTTP METHOD may be one of GET, POST, PUT, DELETE, depending on the driver
|
||||||
and method.
|
and method.
|
||||||
|
|
||||||
This endpoint passes the request directly to the Node's hardware driver. The
|
This endpoint passes the request directly to the hardware driver. The
|
||||||
HTTP BODY must be parseable JSON, which will be converted to parameters passed
|
HTTP BODY must be parseable JSON, which will be converted to parameters passed
|
||||||
to that function. Unparseable JSON, missing parameters, or excess parameters
|
to that function. Unparseable JSON, missing parameters, or excess parameters
|
||||||
will cause the request to be rejected with an HTTP 400 error.
|
will cause the request to be rejected with an HTTP 400 error.
|
||||||
@ -94,4 +89,4 @@ method_name.
|
|||||||
Response
|
Response
|
||||||
--------
|
--------
|
||||||
|
|
||||||
Varies.
|
Varies.
|
||||||
|
@ -1,10 +0,0 @@
|
|||||||
{
|
|
||||||
"lookup": {
|
|
||||||
"async": false,
|
|
||||||
"attach": false,
|
|
||||||
"description": "",
|
|
||||||
"http_methods": [
|
|
||||||
"POST"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
@ -8,15 +8,6 @@
|
|||||||
],
|
],
|
||||||
"require_exclusive_lock": true
|
"require_exclusive_lock": true
|
||||||
},
|
},
|
||||||
"heartbeat": {
|
|
||||||
"async": true,
|
|
||||||
"attach": false,
|
|
||||||
"description": "",
|
|
||||||
"http_methods": [
|
|
||||||
"POST"
|
|
||||||
],
|
|
||||||
"require_exclusive_lock": true
|
|
||||||
},
|
|
||||||
"send_raw": {
|
"send_raw": {
|
||||||
"async": true,
|
"async": true,
|
||||||
"attach": false,
|
"attach": false,
|
||||||
|
@ -285,10 +285,7 @@ class DriverPassthruController(rest.RestController):
|
|||||||
:param data: body of data to supply to the specified method.
|
:param data: body of data to supply to the specified method.
|
||||||
"""
|
"""
|
||||||
cdict = pecan.request.context.to_policy_values()
|
cdict = pecan.request.context.to_policy_values()
|
||||||
if method == "lookup":
|
policy.authorize('baremetal:driver:vendor_passthru', cdict, cdict)
|
||||||
policy.authorize('baremetal:driver:ipa_lookup', cdict, cdict)
|
|
||||||
else:
|
|
||||||
policy.authorize('baremetal:driver:vendor_passthru', cdict, cdict)
|
|
||||||
|
|
||||||
topic = pecan.request.rpcapi.get_topic_for_driver(driver_name)
|
topic = pecan.request.rpcapi.get_topic_for_driver(driver_name)
|
||||||
return api_utils.vendor_passthru(driver_name, method, topic, data=data,
|
return api_utils.vendor_passthru(driver_name, method, topic, data=data,
|
||||||
|
Loading…
Reference in New Issue
Block a user