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