Use the common configuration adapter from layer-ovn
Related-Bug: #1906280 Change-Id: Ia0fbb6c48f959a5d9da3f4aaf280184c43d2e3bb
This commit is contained in:
parent
801c8b5611
commit
56aa7d22ed
@ -12,9 +12,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import os
|
||||
|
||||
import charms_openstack.adapters
|
||||
import charms_openstack.charm as charm
|
||||
|
||||
import charms.ovn_charm
|
||||
@ -23,11 +20,8 @@ import charms.ovn_charm
|
||||
charm.use_defaults('charm.default-select-release')
|
||||
|
||||
|
||||
# NOTE(fnordahl): We should split the ``OVNConfigurationAdapter`` in
|
||||
# ``layer-ovn`` into common and chassis specific parts so we can re-use the
|
||||
# common parts here.
|
||||
class OVNDedicatedChassisConfigurationAdapter(
|
||||
charms_openstack.adapters.ConfigurationAdapter):
|
||||
charms.ovn_charm.OVNConfigurationAdapter):
|
||||
"""Provide a configuration adapter for OVN."""
|
||||
|
||||
# The charm class initializer will look for these but they are not and will
|
||||
@ -36,23 +30,6 @@ class OVNDedicatedChassisConfigurationAdapter(
|
||||
enable_sriov = False
|
||||
enable_hardware_offload = False
|
||||
|
||||
@property
|
||||
def ovn_key(self):
|
||||
return os.path.join(self.charm_instance.ovn_sysconfdir(), 'key_host')
|
||||
|
||||
@property
|
||||
def ovn_cert(self):
|
||||
return os.path.join(self.charm_instance.ovn_sysconfdir(), 'cert_host')
|
||||
|
||||
@property
|
||||
def ovn_ca_cert(self):
|
||||
return os.path.join(self.charm_instance.ovn_sysconfdir(),
|
||||
'{}.crt'.format(self.charm_instance.name))
|
||||
|
||||
@property
|
||||
def chassis_name(self):
|
||||
return self.charm_instance.get_ovs_hostname()
|
||||
|
||||
|
||||
class TrainOVNChassisCharm(charms.ovn_charm.BaseTrainOVNChassisCharm):
|
||||
# OpenvSwitch and OVN is distributed as part of the Ubuntu Cloud Archive
|
||||
|
Loading…
x
Reference in New Issue
Block a user