update openstack-common to support swift version detection.

This commit is contained in:
Adam Gandelman 2013-05-22 14:12:58 -07:00
parent 3e3ca67cb9
commit 9c97acf1b0

View File

@ -192,6 +192,16 @@ get_os_codename_install_source() {
get_os_codename_package() { get_os_codename_package() {
local pkg_vers=$(dpkg -l | grep " $1 " | awk '{ print $3 }') || echo "none" local pkg_vers=$(dpkg -l | grep " $1 " | awk '{ print $3 }') || echo "none"
pkg_vers=$(echo $pkg_vers | cut -d: -f2) # epochs pkg_vers=$(echo $pkg_vers | cut -d: -f2) # epochs
if echo "$1" | grep -q swift ; then
case "${pkg_vers:0:5}" in
"1.4.3") echo "diablo" ;;
"1.4.8") echo "essex" ;;
"1.7.4") echo "folsom" ;;
"1.7.6") echo "grizzly" ;;
"1.7.7") echo "grizzly" ;;
"1.8.0") echo "grizzly" ;;
esac
else
case "${pkg_vers:0:6}" in case "${pkg_vers:0:6}" in
"2011.2") echo "diablo" ;; "2011.2") echo "diablo" ;;
"2012.1") echo "essex" ;; "2012.1") echo "essex" ;;
@ -199,6 +209,7 @@ get_os_codename_package() {
"2013.1") echo "grizzly" ;; "2013.1") echo "grizzly" ;;
"2013.2") echo "havana" ;; "2013.2") echo "havana" ;;
esac esac
fi
} }
get_os_version_codename() { get_os_version_codename() {