
Add suppot for Trilio encryption options TRILIO_ENCRYPTION_SUPPORT and OPENSTACK_ENCRYPTION_SUPPORT. TRILIO_ENCRYPTION_SUPPORT should set to True for trilio > 4.2. OPENSTACK_ENCRYPTION_SUPPORT should be set to True if Barbican is present in the deployment. It would be nice if Barbicans presence was detected via a relation but since this option is going in Trilio 5.X exposing this as a charm option is a tactical fix. As part of the work the charm classes were restructured a little as this charm does not support 4.0. func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/856 Change-Id: I29e83cab68ba670204f27f15010459836d8f8160
44 lines
1.5 KiB
Python
44 lines
1.5 KiB
Python
# Copyright 2020 Canonical Ltd
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
|
|
import charm.openstack.trilio_horizon_plugin as trilio_horizon
|
|
import charms_openstack.test_utils as test_utils
|
|
|
|
|
|
class Helper(test_utils.PatchHelper):
|
|
def setUp(self):
|
|
super().setUp()
|
|
self.patch_release(
|
|
trilio_horizon.TrilioHorizonPluginCharmQueens42.release)
|
|
self.patch_release(
|
|
trilio_horizon.TrilioHorizonPluginCharmRocky42.release)
|
|
|
|
|
|
class TestTrilioHorizonCharm(Helper):
|
|
|
|
def test_packages_queens(self):
|
|
dm_charm = trilio_horizon.TrilioHorizonPluginCharmQueens42()
|
|
self.assertEqual(
|
|
dm_charm.packages,
|
|
["python-workloadmgrclient", "tvault-horizon-plugin"],
|
|
)
|
|
|
|
def test_packages_rocky(self):
|
|
dm_charm = trilio_horizon.TrilioHorizonPluginCharmRocky42()
|
|
self.assertEqual(
|
|
dm_charm.packages,
|
|
["python3-workloadmgrclient", "python3-tvault-horizon-plugin"],
|
|
)
|