Actions: Move concrete charm module to works with layer-openstack
This patchset fixes the reference bug by moving the concrete charm class module to lib/charm/openstack/ from lib/charms. This is so that the bus.discover() function in layer-openstack [1] can find the concrete class and instantiate it. The patchset is dependent on the layer-ovn (linked below). [1]: https://review.opendev.org/p/openstack/charm-layer-openstack Depends On: https://github.com/openstack-charmers/charm-layer-ovn/pull/4 Change-Id: Icf5492e733c5068622bd84243c88ddb7942bf0d7 Closes-Bug: #1861069
This commit is contained in:
parent
9dcd53bb75
commit
efdffd1ca3
13
src/lib/charm/openstack/__init__.py
Normal file
13
src/lib/charm/openstack/__init__.py
Normal file
@ -0,0 +1,13 @@
|
||||
# Copyright 2019 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.
|
@ -12,8 +12,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import os
|
||||
|
||||
import charms.reactive as reactive
|
||||
import charms.leadership as leadership
|
||||
|
||||
@ -21,7 +19,7 @@ import charms_openstack.bus
|
||||
import charms_openstack.charm as charm
|
||||
|
||||
|
||||
charms_openstack.bus.discover(os.path.join('lib', 'charms'))
|
||||
charms_openstack.bus.discover()
|
||||
|
||||
# Use the charms.openstack defaults for common states and hooks
|
||||
charm.use_defaults(
|
||||
|
@ -18,7 +18,7 @@ import os
|
||||
|
||||
import charms_openstack.test_utils as test_utils
|
||||
|
||||
import charms.ovn_central as ovn_central
|
||||
import charm.openstack.ovn_central as ovn_central
|
||||
|
||||
|
||||
class Helper(test_utils.PatchHelper):
|
||||
|
Loading…
Reference in New Issue
Block a user