diff --git a/osci.yaml b/osci.yaml new file mode 100644 index 0000000..09d05e3 --- /dev/null +++ b/osci.yaml @@ -0,0 +1,12 @@ +- project: + templates: + - charm-unit-jobs-py38 + - charm-unit-jobs-py310 + - charm-publish-jobs + vars: + needs_charm_build: true + charm_build_name: ovn-central-k8s + build_type: charmcraft + publish_charm: true + charmcraft_channel: 2.0/stable + publish_channel: latest/edge diff --git a/rename.sh b/rename.sh new file mode 100755 index 0000000..d0c35c9 --- /dev/null +++ b/rename.sh @@ -0,0 +1,13 @@ +#!/bin/bash +charm=$(grep "charm_build_name" osci.yaml | awk '{print $2}') +echo "renaming ${charm}_*.charm to ${charm}.charm" +echo -n "pwd: " +pwd +ls -al +echo "Removing bad downloaded charm maybe?" +if [[ -e "${charm}.charm" ]]; +then + rm "${charm}.charm" +fi +echo "Renaming charm here." +mv ${charm}_*.charm ${charm}.charm diff --git a/src/charm.py b/src/charm.py index 026e30f..1bc4e73 100755 --- a/src/charm.py +++ b/src/charm.py @@ -7,7 +7,7 @@ This charm provide Glance services as part of an OpenStack deployment import ovn import ovsdb as ch_ovsdb import logging -from typing import List +from typing import List, Mapping import ops.charm from ops.framework import StoredState @@ -164,6 +164,15 @@ class OVNCentralOperatorCharm(sunbeam_charm.OSBaseOperatorCharm): ovn_ctxts.OVNDBConfigContext(self, "ovs_db")) return contexts + @property + def databases(self) -> Mapping[str, str]: + """Databases needed to support this charm. + + Return empty dict as no mysql databases are + required. + """ + return {} + def ovn_rundir(self): return '/var/run/ovn' diff --git a/tox.ini b/tox.ini index de6c5d5..ca8b745 100644 --- a/tox.ini +++ b/tox.ini @@ -29,6 +29,7 @@ allowlist_externals = git charmcraft fetch-libs.sh + rename.sh deps = -r{toxinidir}/test-requirements.txt @@ -37,6 +38,7 @@ basepython = python3 deps = commands = charmcraft -v pack + {toxinidir}/rename.sh [testenv:fetch] basepython = python3