Skip to content

Commit a8af988

Browse files
Refactor ceph_metrics as a library
1 parent a2507ee commit a8af988

File tree

14 files changed

+108
-338
lines changed

14 files changed

+108
-338
lines changed

.github/workflows/build-and-test.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@ jobs:
8383
run: tox -c ${{ matrix.part }} -e pep8
8484

8585
- name: Run unit tests
86-
run: tox -c ${{ matrix.part }} -e py3
86+
run: |
87+
./charm_utils.sh copy_libs ${{ matrix.part }}
88+
tox -c ${{ matrix.part }} -e py3
8789
8890
- name: Setup LXD
8991
uses: canonical/setup-lxd@v0.1.1

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ bin
1010
func-results.json
1111
.stestr
1212
__pycache__
13+
*/build/*

ceph-mon/lib/charms/observability_libs/v0/juju_topology.py

-306
This file was deleted.

ceph-mon/requirements.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ dnspython
66
netaddr
77
netifaces
88
pyyaml
9-
git+https://github.com/openstack/charms.ceph#egg=charms_ceph
9+
# the build process expects charms.ceph and charms.ceph_metrics be at lib/ inside the charm directory.
10+
./lib/charms.ceph_metrics
11+
./lib/charms.ceph
1012
git+https://opendev.org/openstack/charm-ops-openstack#egg=ops_openstack
1113
git+https://opendev.org/openstack/charm-ops-interface-tls-certificates#egg=interface_tls_certificates
1214
git+https://github.com/openstack-charmers/ops-interface-ceph-iscsi-admin-access#egg=interface_ceph_iscsi_admin_access

ceph-mon/src/charm.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
)
2222
import ceph_hooks as hooks
2323
import ceph_client
24-
import ceph_metrics
24+
from ceph_metrics import ceph_metrics
2525

2626
import ops_actions
2727

0 commit comments

Comments
 (0)