~ivoks/charms/precise/nova-cloud-controller/fix-neutron-url

« back to all changes in this revision

Viewing changes to hooks/lib/openstack-common

  • Committer: Juan L. Negron
  • Date: 2012-11-29 19:16:02 UTC
  • mfrom: (46.2.2 nova-cloud-controller)
  • Revision ID: juan.negron@canonical.com-20121129191602-if6gx66co55a4ot5
* Some fixes for handling of repo URLs via 'openstack-origin' config. Courtesy of James Page.

* Allows the nova-cloud-controller service to inform nova-compute, via the cloud-compute relation, of the configured volume service so nova-compute can configure itself accordingly. The volume service changes depending on what has been deployed and related (nova-volume or cinder).  Fixed (negronjl) the ensemble left-overs from metadata.yaml. MP:136821

Show diffs side-by-side

added added

removed removed

Lines of Context:
78
78
        juju-log "$CHARM No repository key specified"
79
79
        url="$src"
80
80
      fi
81
 
      add-apt-repository -y "$url"
 
81
      echo $url > /etc/apt/sources.list.d/juju_deb.list
82
82
    fi
83
83
    return 0
84
84
  fi
129
129
      "oneiric") codename="diablo" ;;
130
130
      "precise") codename="essex" ;;
131
131
      "quantal") codename="folsom" ;;
 
132
      "raring")  codename="grizzly" ;;
132
133
    esac
133
134
  fi
134
135
 
141
142
      case "$ca_rel" in
142
143
        "folsom"|"folsom/updates"|"folsom/proposed"|"folsom/staging")
143
144
          codename="folsom" ;;
 
145
        "grizzly"|"grizzly/updates"|"grizzly/proposed"|"grizzy/staging")
 
146
          codename="grizly" ;;
144
147
      esac
145
148
    fi
146
149
  fi
 
150
 
 
151
  # have a guess based on the deb string provided
 
152
  if [[ "${rel:0:3}" == "deb" ]]; then
 
153
    CODENAMES="diablo essex folsom grizzly"
 
154
    for cname in $CODENAMES; do
 
155
      if echo $rel | grep -q $cname; then
 
156
        codename=$cname
 
157
      fi
 
158
    done
 
159
  fi
147
160
  echo $codename
148
161
}
149
162