Pre-release charm-helpers sync 16.10

Get each charm up to date with lp:charm-helpers for release testing.

Change-Id: I93569f02dad733e75869df21dc125429b17ec2e5
This commit is contained in:
David Ames
2016-09-30 08:49:39 -07:00
parent b311aedeb8
commit 6ba551b13e
5 changed files with 111 additions and 13 deletions

View File

@@ -1421,9 +1421,9 @@ class InternalEndpointContext(OSContextGenerator):
class AppArmorContext(OSContextGenerator):
"""Base class for apparmor contexts."""
def __init__(self):
def __init__(self, profile_name=None):
self._ctxt = None
self.aa_profile = None
self.aa_profile = profile_name
self.aa_utils_packages = ['apparmor-utils']
@property
@@ -1442,6 +1442,8 @@ class AppArmorContext(OSContextGenerator):
if config('aa-profile-mode') in ['disable', 'enforce', 'complain']:
ctxt = {'aa_profile_mode': config('aa-profile-mode'),
'ubuntu_release': lsb_release()['DISTRIB_RELEASE']}
if self.aa_profile:
ctxt['aa_profile'] = self.aa_profile
else:
ctxt = None
return ctxt

View File

@@ -151,7 +151,7 @@ SWIFT_CODENAMES = OrderedDict([
('mitaka',
['2.5.0', '2.6.0', '2.7.0']),
('newton',
['2.8.0', '2.9.0']),
['2.8.0', '2.9.0', '2.10.0']),
])
# >= Liberty version->codename mapping