Created attachment 1161885 [details]
Description of problem:
When opening the "import Virtual Machine(s)" dialog, the following error message always appears on start: "Not available when no Export Domain is active", although an active export domain does exist and active.
Note that after selecting other source (like VMware) and then re-selecting "Export Domain" source again (without changing anything else), the error disappears.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1.make sure there is an active export domain
2.Browse webadmin and open "import" dialog.
an error appears: "Not available when no Export Domain is active"
the error is invalid and shouldn't appear
see attached screenshot.
After the bug fix, the dialog behavior is as follows:
1. While opening the dialog - error message and button disabling appears only if no export doamin really exists for that DC.
2. Changing the Source from other source back to be "Export Domain" - no actual verification is done for export domain existence. The previous status is kept and displayed.
3. Selecting other Data Center for the "export Domain" source - actual verification is done by querying the DB and in case no export Domain exists then an err msg is displayed and "load" button is disabled.
Furtheremore, this bug fix also cleans the VMs lists after selecting other Data Center.
*** Bug 1359667 has been marked as a duplicate of this bug. ***
let's backport it to 4.0.z