Resync with charmhelper for new swift version
This commit is contained in:
@@ -370,7 +370,7 @@ class NeutronContext(object):
|
||||
return None
|
||||
|
||||
def _ensure_packages(self):
|
||||
ensure_packages(self.packages)
|
||||
[ensure_packages(pkgs) for pkgs in self.packages]
|
||||
|
||||
def _save_flag_file(self):
|
||||
if self.network_manager == 'quantum':
|
||||
|
||||
@@ -23,15 +23,15 @@ def quantum_plugins():
|
||||
database=config('neutron-database'),
|
||||
relation_prefix='neutron')],
|
||||
'services': ['quantum-plugin-openvswitch-agent'],
|
||||
'packages': ['quantum-plugin-openvswitch-agent',
|
||||
'openvswitch-datapath-dkms'],
|
||||
'packages': [['openvswitch-datapath-dkms'],
|
||||
['quantum-plugin-openvswitch-agent']],
|
||||
},
|
||||
'nvp': {
|
||||
'config': '/etc/quantum/plugins/nicira/nvp.ini',
|
||||
'driver': 'quantum.plugins.nicira.nicira_nvp_plugin.'
|
||||
'QuantumPlugin.NvpPluginV2',
|
||||
'services': [],
|
||||
'packages': ['quantum-plugin-nicira'],
|
||||
'packages': [],
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,15 +49,15 @@ def neutron_plugins():
|
||||
database=config('neutron-database'),
|
||||
relation_prefix='neutron')],
|
||||
'services': ['neutron-plugin-openvswitch-agent'],
|
||||
'packages': ['neutron-plugin-openvswitch-agent',
|
||||
'openvswitch-datapath-dkms'],
|
||||
'packages': [['openvswitch-datapath-dkms'],
|
||||
['quantum-plugin-openvswitch-agent']],
|
||||
},
|
||||
'nvp': {
|
||||
'config': '/etc/neutron/plugins/nicira/nvp.ini',
|
||||
'driver': 'neutron.plugins.nicira.nicira_nvp_plugin.'
|
||||
'NeutronPlugin.NvpPluginV2',
|
||||
'services': [],
|
||||
'packages': ['neutron-plugin-nicira'],
|
||||
'packages': [],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -45,16 +45,17 @@ OPENSTACK_CODENAMES = OrderedDict([
|
||||
])
|
||||
|
||||
# The ugly duckling
|
||||
SWIFT_CODENAMES = {
|
||||
'1.4.3': 'diablo',
|
||||
'1.4.8': 'essex',
|
||||
'1.7.4': 'folsom',
|
||||
'1.7.6': 'grizzly',
|
||||
'1.7.7': 'grizzly',
|
||||
'1.8.0': 'grizzly',
|
||||
'1.9.0': 'havana',
|
||||
'1.9.1': 'havana',
|
||||
}
|
||||
SWIFT_CODENAMES = OrderedDict([
|
||||
('1.4.3', 'diablo'),
|
||||
('1.4.8', 'essex'),
|
||||
('1.7.4', 'folsom'),
|
||||
('1.8.0', 'grizzly'),
|
||||
('1.7.7', 'grizzly'),
|
||||
('1.7.6', 'grizzly'),
|
||||
('1.10.0', 'havana'),
|
||||
('1.9.1', 'havana'),
|
||||
('1.9.0', 'havana'),
|
||||
])
|
||||
|
||||
|
||||
def error_out(msg):
|
||||
@@ -137,8 +138,11 @@ def get_os_codename_package(package, fatal=True):
|
||||
|
||||
try:
|
||||
if 'swift' in pkg.name:
|
||||
vers = vers[:5]
|
||||
return SWIFT_CODENAMES[vers]
|
||||
swift_vers = vers[:5]
|
||||
if swift_vers not in SWIFT_CODENAMES:
|
||||
# Deal with 1.10.0 upward
|
||||
swift_vers = vers[:6]
|
||||
return SWIFT_CODENAMES[swift_vers]
|
||||
else:
|
||||
vers = vers[:6]
|
||||
return OPENSTACK_CODENAMES[vers]
|
||||
|
||||
Reference in New Issue
Block a user