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: I737badefa19fd8d65def0ab79cadaa63d7d93b5a
This commit is contained in:
parent
b29ccf9d0a
commit
c0edd1efae
12
osci.yaml
Normal file
12
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-relay-k8s
|
||||
build_type: charmcraft
|
||||
publish_charm: true
|
||||
charmcraft_channel: 2.0/stable
|
||||
publish_channel: latest/edge
|
13
rename.sh
Executable file
13
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
|
11
src/charm.py
11
src/charm.py
@ -25,7 +25,7 @@ develop a new k8s charm using the Operator Framework:
|
||||
"""
|
||||
|
||||
import logging
|
||||
from typing import List
|
||||
from typing import List, Mapping
|
||||
|
||||
from ops.framework import StoredState
|
||||
from ops.main import main
|
||||
@ -76,6 +76,15 @@ class OVNRelayOperatorCharm(ovn_charm.OSBaseOVNOperatorCharm):
|
||||
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 {}
|
||||
|
||||
|
||||
class OVNRelayXenaOperatorCharm(OVNRelayOperatorCharm):
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user