~alexlist/charms/trusty/swift-storage/nrpe-rebased

« back to all changes in this revision

Viewing changes to hooks/charmhelpers/contrib/openstack/utils.py

  • Committer: james.page at ubuntu
  • Date: 2014-06-19 10:11:47 UTC
  • Revision ID: james.page@ubuntu.com-20140619101147-8aqnz9d14gkc4ct5
[trivial] Resync helpers to pickup fstab fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
# Common python helper functions used for OpenStack charms.
4
4
from collections import OrderedDict
5
5
 
6
 
import apt_pkg as apt
7
6
import subprocess
8
7
import os
9
8
import socket
132
131
 
133
132
def get_os_codename_package(package, fatal=True):
134
133
    '''Derive OpenStack release codename from an installed package.'''
 
134
    import apt_pkg as apt
135
135
    apt.init()
136
136
 
137
137
    # Tell apt to build an in-memory cache to prevent race conditions (if
325
325
 
326
326
    """
327
327
 
 
328
    import apt_pkg as apt
328
329
    src = config('openstack-origin')
329
330
    cur_vers = get_os_version_package(package)
330
331
    available_vers = get_os_version_install_source(src)