On 04/28/2011 02:48 PM, Scott Seago wrote:
On 04/28/2011 02:18 PM, Mo Morsi wrote:
> ---
> recipes/aeolus_recipe/aeolus_recipe.pp | 2 ++
> recipes/aeolus_recipe/manifests/aeolus.pp | 4 ++--
> recipes/aeolus_recipe/manifests/deltacloud.pp | 2 +-
> recipes/aeolus_recipe/templates/deltacloud-core | 4 ++++
> 4 files changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/recipes/aeolus_recipe/aeolus_recipe.pp
b/recipes/aeolus_recipe/aeolus_recipe.pp
> index dd05dc3..6f7a2f1 100644
> --- a/recipes/aeolus_recipe/aeolus_recipe.pp
> +++ b/recipes/aeolus_recipe/aeolus_recipe.pp
> @@ -48,6 +48,7 @@ aeolus::provider{"mock":
>
> aeolus::provider{"ec2-us-east-1":
> type => 'ec2',
> + realm => 'us-east-1',
My only comment here is don't call this 'realm', since this is
identifying the provider itself (which will, ultimately, have multiple
realms). Perhaps api_provider_key or something like that -- since this
corresponds with what will ultimately get sent to the deltacloud API as
the "provider" parameter.
Scott
Yea, the env variable that we need to expose is api_provider, so maybe
just use that.
> port => 3003,
> login_user => 'admin',
> login_password => 'password',
> @@ -55,6 +56,7 @@ aeolus::provider{"ec2-us-east-1":
>
> aeolus::provider{"ec2-us-west-1":
> type => 'ec2',
> + realm => 'us-west-1',
> port => 3004,
> login_user => 'admin',
> login_password => 'password',
> diff --git a/recipes/aeolus_recipe/manifests/aeolus.pp
b/recipes/aeolus_recipe/manifests/aeolus.pp
> index de43f9c..85c4a7a 100644
> --- a/recipes/aeolus_recipe/manifests/aeolus.pp
> +++ b/recipes/aeolus_recipe/manifests/aeolus.pp
> @@ -54,8 +54,8 @@ class aeolus {
> }
>
> # Create a new provider in aeolus
> -define aeolus::provider($type, $port, $login_user="",
$login_password=""){
> - aeolus::deltacloud{$name: provider_type => $type, port => $port}
> +define aeolus::provider($type, $realm, $port, $login_user="",
$login_password=""){
> + aeolus::deltacloud{$name: provider_type => $type, realm => $realm, port
=> $port}
> aeolus::conductor::provider{$name:
> type => $type,
> url =>
"http://localhost:${port}/api",
> diff --git a/recipes/aeolus_recipe/manifests/deltacloud.pp
b/recipes/aeolus_recipe/manifests/deltacloud.pp
> index f8c460b..ae070c5 100644
> --- a/recipes/aeolus_recipe/manifests/deltacloud.pp
> +++ b/recipes/aeolus_recipe/manifests/deltacloud.pp
> @@ -17,7 +17,7 @@ class aeolus::deltacloud::ec2 {
>
>
> # install the deltacloud component w/ the specified driver
> -define aeolus::deltacloud($provider_type="", $port="3002") {
> +define aeolus::deltacloud($provider_type="", $realm='',
$port="3002") {
> include aeolus::deltacloud::core
>
> if $provider_type == "ec2" {
> diff --git a/recipes/aeolus_recipe/templates/deltacloud-core
b/recipes/aeolus_recipe/templates/deltacloud-core
> index 8cc998a..cd098df 100644
> --- a/recipes/aeolus_recipe/templates/deltacloud-core
> +++ b/recipes/aeolus_recipe/templates/deltacloud-core
> @@ -18,6 +18,10 @@ LOGFILE="${LOGFILE:-/var/log/deltacloud-<%= name
%>/$DRIVER.log}"
> PIDFILE="${THIN_PID:-/var/run/deltacloud-<%= name %>.pid}"
> export DELTACLOUD_MOCK_STORAGE=/usr/lib/ruby/gems/1.8/gems/deltacloud-<%= name
%>-0.2.0/lib/deltacloud/drivers/mock/data/
>
> +<% unless realm == "" %>
> +API_PROVIDER=<%= realm %>
+export API_PROVIDER=<%= realm %>
but probably
+export API_PROVIDER=<%= api_provider %>
and make the rename consistent across the rest of the manifests.
> +<% end %>
> +
> PROG=/usr/bin/deltacloudd
>
> STARTTIMEOUT=20
_______________________________________________
aeolus-devel mailing list
aeolus-devel(a)lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/aeolus-devel