Gate sending ceph pool creation request.

Add new state ceph.create_pool.req.sent to gate sending the ceph
pool creation request. This fixes a problem where the changed
method in requires of ceph-client interface raises the
'{relation_name}.pools.available' state but the create_pool
method then removes it again.

Also remove snap functional tests as they are no longer
needed since that install method via charms is not
actively supported.

Change-Id: Iaf986d24f005bcc7c8f485cfc2eb1775e6dbbbdd
Closes-Bug: #1846480
This commit is contained in:
Liam Young 2019-10-04 12:20:34 +00:00
parent e569e699a2
commit d0d2ac8864
5 changed files with 6 additions and 51 deletions

View File

@ -75,9 +75,11 @@ def cluster_connected(hacluster):
charm_class.assess_status()
@reactive.when_not('ceph.create_pool.req.sent')
@reactive.when('storage-ceph.connected')
def storage_ceph_connected(ceph):
ceph.create_pool(hookenv.service_name())
reactive.set_state('ceph.create_pool.req.sent')
@reactive.when('storage-ceph.available')

View File

@ -15,7 +15,7 @@ aodhclient>=0.1.0
gnocchiclient>=3.1.0,<3.2.0
python-barbicanclient>=4.0.1
python-ceilometerclient>=1.5.0
python-cinderclient>=1.4.0
python-cinderclient>=1.4.0,<5.0.0
python-designateclient>=1.5
python-glanceclient>=1.1.0
python-heatclient>=0.8.0

View File

@ -1,25 +0,0 @@
#!/usr/bin/env python
#
# Copyright 2016 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.
"""Amulet tests on a basic Gnocchi Charm deployment on xenial-ocata."""
from basic_deployment import GnocchiCharmSnapDeployment
if __name__ == '__main__':
deployment = GnocchiCharmSnapDeployment(series='xenial',
openstack='cloud:xenial-ocata',
snap_source='snap:ocata/edge')
deployment.run_tests()

View File

@ -1,25 +0,0 @@
#!/usr/bin/env python
#
# Copyright 2016 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.
"""Amulet tests on a basic Gnocchi Charm deployment on xenial-pike."""
from basic_deployment import GnocchiCharmSnapDeployment
if __name__ == '__main__':
deployment = GnocchiCharmSnapDeployment(series='xenial',
openstack='cloud:xenial-pike',
snap_source='snap:pike/edge')
deployment.run_tests()

View File

@ -73,6 +73,9 @@ class TestRegisteredHooks(test_utils.TestRegisteredHooks):
'init_db': (
'db.synced',
),
'storage_ceph_connected': (
'ceph.create_pool.req.sent',
),
},
}
# test that the hooks were registered via the