~james-page/charms/precise/nova-cloud-controller/quantum-security-support

« back to all changes in this revision

Viewing changes to hooks/lib/nova/nova-common

  • Committer: James Page
  • Date: 2013-06-13 11:04:41 UTC
  • Revision ID: james.page@canonical.com-20130613110441-uj0699nvjkdgax21
Tweak version checking to use dpkg --compare-versions

Show diffs side-by-side

added added

removed removed

Lines of Context:
88
88
      set_or_update "quantum_auth_strategy" "keystone"
89
89
      set_or_update "core_plugin" "$QUANTUM_CORE_PLUGIN" "$QUANTUM_CONF"
90
90
      set_or_update "bind_host" "0.0.0.0" "$QUANTUM_CONF"
91
 
      local cur_vers="$(get_os_codename_package "nova-common")"
92
 
      if [ "$cur_vers" > "folsom" ]; then
 
91
      local cur="$(get_os_codename_package "nova-common")"
 
92
      local vers=$(get_os_version_codename $cur)
 
93
      if dpkg --compare-versions $vers ge '2013.1'; then
93
94
        # Configure per-tenant managed quotas - >= grizzly only
94
95
        set_or_update "quota_driver" "quantum.db.quota_db.DbQuotaDriver" \
95
96
                      "$QUANTUM_CONF" "QUOTAS"
101
102
          set_or_update "local_ip" "$local_ip" $QUANTUM_PLUGIN_CONF "OVS"
102
103
      fi
103
104
      if [ "$(config-get quantum-security-groups)" == "yes" ] && \
104
 
         [ "$cur_vers" > "folsom" ]; then
 
105
         dpkg --compare-versions $vers ge '2013.1'; then
105
106
          set_or_update "security_group_api" "quantum"
106
107
          set_or_update "firewall_driver" "nova.virt.firewall.NoopFirewallDriver"
107
108
          set_or_update "allow_overlapping_ips" "True" $QUANTUM_CONF