bareon-ironic/patches/newton/ironic/0003-Allow-access-to-bareon-ironic-vendor-passthru-API-en.patch
Dmitry Bogun 7468264200 New communication interface with bareon instance
Set of tools that represent some sort of API to communicate with bareon
instance. This API use vendor_passthru ironic API to "catch" request
from bareon instance to ironic API. So bareon-ironic driver can receive
bareon insnstance requests. This is existing communication channel.

Before it was used to receive notification from bareon instance about
successfull node load.

Now this channel is extended to send "generic" tasks(step) from
bareon-ironic driver to bareon instance. Right now only one task(step)
is used - step to inject SSH key into bareon instance.

This new "steps" interface allow to refuse from preinstalled SSH key
in bareon instance, right now. And in future it allow to refuse from SSH
communication between bareon-ironic and bareon instance...

Change-Id: I0791807c7cb3dba70c71c4f46e5eddf01da76cdd
2017-02-28 16:06:57 +02:00

45 lines
1.8 KiB
Diff

From 9787aa4765db729d05d8c9acff19adb4f9181189 Mon Sep 17 00:00:00 2001
From: Dmitry Bogun <dbogun@mirantis.com>
Date: Mon, 20 Feb 2017 16:31:34 +0200
Subject: [PATCH 3/3] Allow access to bareon-ironic vendor passthru API
endpoints
Bareon-ironic driver have implemented extended vendor passthru
"protocol" used in communication between bareon-ironic driver and bareon
instance. This "protoco" use one more http endpoint. This endpoint must
be treated in same was as already existed enpoint
vendor_passthru/pass_deploy_info
---
ironic/api/config.py | 1 +
ironic/api/controllers/v1/node.py | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/ironic/api/config.py b/ironic/api/config.py
index 49231d5..8627dc2 100644
--- a/ironic/api/config.py
+++ b/ironic/api/config.py
@@ -36,6 +36,7 @@ app = {
'/v1/drivers/[a-z0-9_]*/vendor_passthru/lookup',
'/v1/nodes/[a-z0-9\-]+/vendor_passthru/heartbeat',
'/v1/nodes/[a-z0-9\-]+/vendor_passthru/pass_deploy_info',
+ '/v1/nodes/[a-z0-9\-]+/vendor_passthru/deploy_steps',
],
}
diff --git a/ironic/api/controllers/v1/node.py b/ironic/api/controllers/v1/node.py
index d93c2c4..9422772 100644
--- a/ironic/api/controllers/v1/node.py
+++ b/ironic/api/controllers/v1/node.py
@@ -980,7 +980,7 @@ class NodeVendorPassthruController(rest.RestController):
:param data: body of data to supply to the specified method.
"""
cdict = pecan.request.context.to_dict()
- if method in ('heartbeat', 'pass_deploy_info'):
+ if method in ('heartbeat', 'pass_deploy_info', 'deploy_steps'):
policy.authorize('baremetal:node:ipa_heartbeat', cdict, cdict)
else:
policy.authorize('baremetal:node:vendor_passthru', cdict, cdict)
--
2.10.2