[PATCH] BZ#773768 validating the X-Deltacloud-Provider value

Martyn Taylor mtaylor at redhat.com
Thu Mar 1 17:01:41 UTC 2012


On 02/28/2012 05:26 PM, tsedovic at redhat.com wrote:
> https://bugzilla.redhat.com/show_bug.cgi?id=773768
>
> Unfortunately, we cannot validate the X-Deltacloud-Provider value when we're
> adding a new provider. This is because the actual validation requires a working
> provider account -- which we don't have at the time.
>
> Fixing this the correct way would require a significant changes around the
> Provider and Provider Account creation UI workflow. I.e. ain't gonna happen
> now.
>
> So what the fix actually does:
>
> 1) Checks that the X-Deltacloud-Provider value is correct on Provider Account
> creation.
> 2) Displays a (hopefully) helpful error message when the user tries to push an
> image or launch a deployment whilst having X-Deltacloud-Provider set incorrectly.
>
>
> Notes to the reviewers
> ----------------------
>
> This code depends on a Deltacloud Core patch that's been ACKed but not pushed
> at the time of writing:
>
> http://mail-archives.apache.org/mod_mbox/deltacloud-dev/201202.mbox/%3C1330096415-8982-1-git-send-email-tsedovic%40redhat.com%3E
>
>
> Note that 2 cucumber tests are failing:
>
> cucumber features/provider.feature:61 # Scenario: Create a new Provider failure when using wrong url
> cucumber features/provider_account.feature:17 # Scenario: List providers in XML format
>
> I didn't have the time to fix them. If the patch is otherwise correct and
> there's a pressure for getting this in, would you be so kind and fix them?
> Hopefully, it's not that difficult.
>
> Otherwise, I'll fix it on 12th March when I'm back.
>
> Thanks,
> Thomas
>
I don't see the the error message:

Invalid datacenter specified for provider: %{provider}.

When I update a provider account.  Also, Isn't checking this in the provider account / provider page enough.  Rather than having to do this check on each instance start/image creation?  Instead of checking on instance start etc... have a check on provider create/update page something like.

if provider.accounts.empty?
   // allow invalid URL (since we cant check for it - we'll check this once an account is added - on create account/update account)
else
   // Check the URL using an account
end

also we have a check on provider account page

This would prevent saving an invalid (provider + account)

Since you need both provider and account to start an instance we can be sure that the data centre is correct, so we don't need this extra stuff when starting instances etc...




More information about the aeolus-devel mailing list