Clean up dependency chain

This includes a resync of charms_ceph to raise the directory one level
The charms_ceph change that we're syncing in changes the
name of the ceph.py file into the __init__.py file to remove the
second level of namespacing

Change-Id: I4eabbd313de2e9420667dc4acca177b2dbbf9581
This commit is contained in:
Chris MacNaughton 2016-08-11 08:21:32 -04:00
parent f9993191ab
commit 69b821d344
12 changed files with 1213 additions and 1213 deletions

1
.gitignore vendored
View File

@ -7,3 +7,4 @@ bin
*.pyc
.unit-state.db
.idea
func-results.json

View File

@ -26,7 +26,7 @@ ch-sync: bin/charm_helpers_sync.py
$(PYTHON) bin/charm_helpers_sync.py -c charm-helpers-tests.yaml
git-sync: bin/git_sync.py
$(PYTHON) bin/git_sync.py -d lib/ceph -s https://github.com/CanonicalLtd/charms_ceph.git
$(PYTHON) bin/git_sync.py -d lib -s https://github.com/CanonicalLtd/charms_ceph.git
sync: git-sync ch-sync

View File

@ -27,7 +27,7 @@ from charmhelpers.core.hookenv import (
action_fail,
)
from ceph.ceph.ceph import get_local_osd_ids
from ceph import get_local_osd_ids
from ceph_hooks import assess_status
from utils import (

View File

@ -23,7 +23,7 @@ import time
import netifaces
sys.path.append('lib')
from ceph.ceph import ceph
import ceph
from charmhelpers.core import hookenv
from charmhelpers.core.hookenv import (
log,

0
lib/__init__.py Normal file
View File

File diff suppressed because it is too large Load Diff

View File

@ -1 +0,0 @@
__author__ = 'chris'

File diff suppressed because it is too large Load Diff

View File

@ -22,7 +22,7 @@ from charmhelpers.core.hookenv import (
INFO,
ERROR,
)
from charmhelpers.contrib.storage.linux.ceph import (
from charmhelpers.contrib.storage.linux.ceph import (
create_erasure_profile,
delete_pool,
erasure_profile_exists,
@ -191,7 +191,7 @@ def handle_replicated_pool(request, service):
replicas = request.get('replicas')
quota = request.get('max-bytes')
weight = request.get('weight')
# Optional params
pg_num = request.get('pg_num')
if pg_num:

View File

@ -18,7 +18,7 @@ import posix
from mock import call, Mock, patch
import test_utils
from ceph.ceph import ceph
import ceph
import replace_osd
TO_PATCH = [
@ -73,13 +73,13 @@ class ReplaceOsdTestCase(test_utils.CharmTestCase):
])
assert ret == 0
@patch('ceph.ceph.ceph.mounts')
@patch('ceph.ceph.ceph.subprocess')
@patch('ceph.ceph.ceph.umount')
@patch('ceph.ceph.ceph.osdize')
@patch('ceph.ceph.ceph.shutil')
@patch('ceph.ceph.ceph.systemd')
@patch('ceph.ceph.ceph.ceph_user')
@patch('ceph.mounts')
@patch('ceph.subprocess')
@patch('ceph.umount')
@patch('ceph.osdize')
@patch('ceph.shutil')
@patch('ceph.systemd')
@patch('ceph.ceph_user')
def test_replace_osd(self,
ceph_user,
systemd,

View File

@ -1,7 +1,7 @@
__author__ = 'Chris Holcombe <chris.holcombe@canonical.com>'
from mock import patch, call
import test_utils
from ceph.ceph import ceph
import ceph
TO_PATCH = [
'hookenv',
@ -16,8 +16,8 @@ class PerformanceTestCase(test_utils.CharmTestCase):
super(PerformanceTestCase, self).setUp(ceph, TO_PATCH)
def test_tune_nic(self):
with patch('ceph.ceph.ceph.get_link_speed', return_value=10000):
with patch('ceph.ceph.ceph.save_sysctls') as save_sysctls:
with patch('ceph.get_link_speed', return_value=10000):
with patch('ceph.save_sysctls') as save_sysctls:
ceph.tune_nic('eth0')
save_sysctls.assert_has_calls(
[
@ -49,12 +49,12 @@ class PerformanceTestCase(test_utils.CharmTestCase):
uuid = ceph.get_block_uuid('/dev/sda1')
self.assertEqual(uuid, '378f3c86-b21a-4172-832d-e2b3d4bc7511')
@patch('ceph.ceph.ceph.persist_settings')
@patch('ceph.ceph.ceph.set_hdd_read_ahead')
@patch('ceph.ceph.ceph.get_max_sectors_kb')
@patch('ceph.ceph.ceph.get_max_hw_sectors_kb')
@patch('ceph.ceph.ceph.set_max_sectors_kb')
@patch('ceph.ceph.ceph.get_block_uuid')
@patch('ceph.persist_settings')
@patch('ceph.set_hdd_read_ahead')
@patch('ceph.get_max_sectors_kb')
@patch('ceph.get_max_hw_sectors_kb')
@patch('ceph.set_max_sectors_kb')
@patch('ceph.get_block_uuid')
def test_tune_dev(self,
block_uuid,
set_max_sectors_kb,
@ -84,12 +84,12 @@ class PerformanceTestCase(test_utils.CharmTestCase):
call('maintenance', 'Finished tuning device /dev/sda')
])
@patch('ceph.ceph.ceph.persist_settings')
@patch('ceph.ceph.ceph.set_hdd_read_ahead')
@patch('ceph.ceph.ceph.get_max_sectors_kb')
@patch('ceph.ceph.ceph.get_max_hw_sectors_kb')
@patch('ceph.ceph.ceph.set_max_sectors_kb')
@patch('ceph.ceph.ceph.get_block_uuid')
@patch('ceph.persist_settings')
@patch('ceph.set_hdd_read_ahead')
@patch('ceph.get_max_sectors_kb')
@patch('ceph.get_max_hw_sectors_kb')
@patch('ceph.set_max_sectors_kb')
@patch('ceph.get_block_uuid')
def test_tune_dev_2(self,
block_uuid,
set_max_sectors_kb,

View File

@ -16,7 +16,7 @@ import time
from mock import patch, call, MagicMock
from ceph.ceph.ceph import CrushLocation
from ceph import CrushLocation
import test_utils
import ceph_hooks