Add osci yaml
Add project templates and variables to osci.yaml Add rename script to change built charm name to charm_build_name defined in osci.yaml Change-Id: I746b8a5964bd5f8ab43616b1820981567729278c
This commit is contained in:
parent
55906e5906
commit
e6237cab71
12
charms/ovn-central-k8s/osci.yaml
Normal file
12
charms/ovn-central-k8s/osci.yaml
Normal file
@ -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
|
13
charms/ovn-central-k8s/rename.sh
Executable file
13
charms/ovn-central-k8s/rename.sh
Executable file
@ -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
|
@ -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'
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user