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

@ -190,15 +190,26 @@ 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
case "${pkg_vers:0:6}" in if echo "$1" | grep -q swift ; then
"2011.2") echo "diablo" ;; case "${pkg_vers:0:5}" in
"2012.1") echo "essex" ;; "1.4.3") echo "diablo" ;;
"2012.2") echo "folsom" ;; "1.4.8") echo "essex" ;;
"2013.1") echo "grizzly" ;; "1.7.4") echo "folsom" ;;
"2013.2") echo "havana" ;; "1.7.6") echo "grizzly" ;;
esac "1.7.7") echo "grizzly" ;;
"1.8.0") echo "grizzly" ;;
esac
else
case "${pkg_vers:0:6}" in
"2011.2") echo "diablo" ;;
"2012.1") echo "essex" ;;
"2012.2") echo "folsom" ;;
"2013.1") echo "grizzly" ;;
"2013.2") echo "havana" ;;
esac
fi
} }
get_os_version_codename() { get_os_version_codename() {