Sync charm-helpers
This commit is contained in:
parent
ec8a3d9578
commit
d4a3116380
|
@ -142,6 +142,9 @@ PACKAGE_CODENAMES = {
|
|||
'glance-common': OrderedDict([
|
||||
('11.0.0', 'liberty'),
|
||||
]),
|
||||
'openstack-dashboard': OrderedDict([
|
||||
('8.0.0', 'liberty'),
|
||||
]),
|
||||
}
|
||||
|
||||
DEFAULT_LOOPBACK_SIZE = '5G'
|
||||
|
|
|
@ -56,6 +56,8 @@ from charmhelpers.fetch import (
|
|||
apt_install,
|
||||
)
|
||||
|
||||
from charmhelpers.core.kernel import modprobe
|
||||
|
||||
KEYRING = '/etc/ceph/ceph.client.{}.keyring'
|
||||
KEYFILE = '/etc/ceph/ceph.client.{}.key'
|
||||
|
||||
|
@ -288,17 +290,6 @@ def place_data_on_block_device(blk_device, data_src_dst):
|
|||
os.chown(data_src_dst, uid, gid)
|
||||
|
||||
|
||||
# TODO: re-use
|
||||
def modprobe(module):
|
||||
"""Load a kernel module and configure for auto-load on reboot."""
|
||||
log('Loading kernel module', level=INFO)
|
||||
cmd = ['modprobe', module]
|
||||
check_call(cmd)
|
||||
with open('/etc/modules', 'r+') as modules:
|
||||
if module not in modules.read():
|
||||
modules.write(module)
|
||||
|
||||
|
||||
def copy_files(src, dst, symlinks=False, ignore=None):
|
||||
"""Copy files from src to dst."""
|
||||
for item in os.listdir(src):
|
||||
|
|
Loading…
Reference in New Issue