Renamed barbican-hsm-plugin to barbican-hsm
The interface name has been changed, so this ripples it through the charm. Also fixed the README, and ensured that tox.it has a pep8 target.
This commit is contained in:
parent
8fe19c4a3d
commit
281e0a6896
2
Makefile
2
Makefile
@ -8,7 +8,7 @@ build: clean
|
||||
LAYER_PATH=$(LAYER_PATH) tox -e build
|
||||
|
||||
lint:
|
||||
@tox -e lint
|
||||
@tox -e pep8
|
||||
|
||||
test:
|
||||
@echo Starting unit tests...
|
||||
|
@ -1,5 +1,7 @@
|
||||
# Barbican Source Charm
|
||||
|
||||
THIS CHARM IS FOR EXPERIMENTAL USE AT PRESENT.
|
||||
|
||||
This repository is for the reactive, layered,
|
||||
[Barbican](https://wiki.openstack.org/wiki/Barbican) _source_ charm. From the
|
||||
[wiki](https://wiki.openstack.org/wiki/Barbican) 'Barbican is a REST API
|
||||
@ -11,7 +13,7 @@ for all environments, including large ephemeral Clouds.'
|
||||
|
||||
The Barbican charm currently supports the following plugins:
|
||||
|
||||
- [charm-barbican-softhsm-plugin](https://github.com/openstack/charm-barbican-softhsm-plugin)
|
||||
- charm-barbican-softhsm
|
||||
|
||||
# Creating the primary MKEK and primary HMAC
|
||||
|
||||
@ -55,10 +57,10 @@ HSM may reject setting up the keys more than once.
|
||||
# Developer Notes
|
||||
|
||||
The Barbican charm has to be able to set `[crypto]` and `[xxx_plugin]` sections
|
||||
in the `barbican-api.conf` file. This data comes via the `barbican-hsm-plugin`
|
||||
in the `barbican-api.conf` file. This data comes via the `barbican-hsm`
|
||||
interface from a charm (probably a subordinate) that provides the interface.
|
||||
|
||||
On the `barbican-hsm-interface` the data is provided in the `plugin_data()`
|
||||
On the `barbican-hsm` interface the data is provided in the `plugin_data()`
|
||||
method of the interface (or if it is adapted) in the `plugin_data` property.
|
||||
|
||||
The theory of operation for the crypto plugin is that a local library that
|
||||
|
@ -3,7 +3,7 @@ includes:
|
||||
- interface:mysql-shared
|
||||
- interface:rabbitmq
|
||||
- interface:keystone
|
||||
- interface:barbican-hsm-plugin
|
||||
- interface:barbican-hsm
|
||||
options:
|
||||
basic:
|
||||
use_venv: True
|
||||
|
@ -19,5 +19,5 @@ requires:
|
||||
identity-service:
|
||||
interface: keystone
|
||||
hsm:
|
||||
interface: barbican-hsm-plugin
|
||||
interface: barbican-hsm
|
||||
optional: true
|
||||
|
2
tox.ini
2
tox.ini
@ -32,7 +32,7 @@ basepython = python3.5
|
||||
deps = -r{toxinidir}/test-requirements.txt
|
||||
commands = ostestr {posargs}
|
||||
|
||||
[testenv:lint]
|
||||
[testenv:pep8]
|
||||
basepython = python2.7
|
||||
deps = -r{toxinidir}/test-requirements.txt
|
||||
commands = flake8 {posargs} src unit_tests
|
||||
|
@ -129,6 +129,7 @@ class TestBarbicanAdapters(Helper):
|
||||
'os-internal-hostname': 'internal',
|
||||
'os-admin-hostname': 'admin',
|
||||
}
|
||||
|
||||
def cf(key=None):
|
||||
if key is not None:
|
||||
return reply[key]
|
||||
@ -169,6 +170,7 @@ class TestBarbicanCharm(Helper):
|
||||
'mkek-key-length': 5,
|
||||
'label-mkek': 'the-label'
|
||||
}
|
||||
|
||||
def cf(key=None):
|
||||
if key is not None:
|
||||
return config[key]
|
||||
@ -192,6 +194,7 @@ class TestBarbicanCharm(Helper):
|
||||
self.log.assert_called_once_with(
|
||||
"barbican-mangage hsm gen_mkek succeeded")
|
||||
# and check that a problem is logged if it goes wrong
|
||||
|
||||
def side_effect():
|
||||
raise barbican.subprocess.CalledProcessError
|
||||
|
||||
@ -214,6 +217,7 @@ class TestBarbicanCharm(Helper):
|
||||
'hmac-key-length': 5,
|
||||
'label-hmac': 'the-label'
|
||||
}
|
||||
|
||||
def cf(key=None):
|
||||
if key is not None:
|
||||
return config[key]
|
||||
@ -237,6 +241,7 @@ class TestBarbicanCharm(Helper):
|
||||
self.log.assert_called_once_with(
|
||||
"barbican-mangage hsm gen_hmac succeeded")
|
||||
# and check that a problem is logged if it goes wrong
|
||||
|
||||
def side_effect():
|
||||
raise barbican.subprocess.CalledProcessError
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user