- restore the "empty credential" test and update HealthCheck to ignore null or empty username and password
- also update XenCenter so it doesn't send null or empty username and password
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
The error was happening because of the Pool.sync_database call (when HA is enabled and the VM has a saved restart priority other than DoNotRestart) which requires pool admin or pool operator roles.
This call is not needed, so removing it.
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
Use the NewSession function which returns a session using the elevated credentials if they exist, otherwise using the connection's credentials
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
* CA-249056: Add a unique ID to XenCenter Check For Update
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
* CA-249056: Add a unique ID to XenCenter Check For Update
Fixed the format of the User-Agent to comply with [1].
[1] https://tools.ietf.org/html/rfc7231#section-5.5.3
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
* CA-249056: Add a unique ID to XenCenter Check For Update
Changes following the code review
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
* CA-249056: Add a unique ID to XenCenter Check For Update
Changes following the code review
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
* CA-249056: Add a unique ID to XenCenter Check For Update
Changes following the code review
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
- set managed=true, otherwise the network creation fails with the error "The network is not managed by xapi"
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
- Reset the action's Session after the PureAsyncAction is run to collect the RBAC method list.
Also fixes the bug where AD users cannot do multiple operations on the VMs [SCTX-2517]
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
1. Added pool.management_reconfigure to RBAC check
2. Time out is enhanced to check host.IsLive metric()
3. Assert for down management and null check for new management is added
4. Updated comments in the code as suggested by Mihaela Stoica
Signed-Off-By: Sharath Babu <sharath.babu@citrix.com>
Suppress updates to the status when the PureAsyncAction runs the action to populate the ApiMethodsToRoleCheck
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
When a TargetInvocationException is raised, its InnerException property holds the underlying exception, which is what we should display.
Also ellipsise the action description (which could be an error thrown by the upload action) that is displayed on the Upload page.
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
Try to match the alerts by message type, not by title, because for pooled hosts the title contains the host name followed by the friendly name, while for standalone hosts the host name is not included
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
Also changed ApplyPatchAction and ApplyUpdateAction to install a single update to a single host, so that the appropriate action title can be displayed if an action fails. And replaced 2 hardcoded strings with resource strings.
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
When working on this ticket (see previous commit), I noticed that the WebClient object used in DownloadAndUnzipXenServerPatchAction did not use XenCenter's proxy settings. This commit fixes this issue. By default (with no proxy being set) the proxy variable will be null as expected.
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
Using standard .NET Framework functionality instead of the custom implementation of the HTTP stack. (To download a single file.)
Note that this .net class WebClient is already being used to download hotfixes. However, in that code the proxy is not set, I am fixing that in a new commit on the same ticket.
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
A wrong api was being tested against the RBAC roles. Removed
vmss.protect_now and added vmss.snapshot_now.
Signed-Of-By: Sharath Babu <sharath.babu@citrix.com>
Disabled the ability to select unreachable hosts and in addition
added a try/catch block to hide error message resulting from trying
to clean up an unreachable host.
Signed-off-by: Letsibogo Ramadi <letsibogo.ramadi@citrix.com>
For ElyOrGreater hosts, we try move the existing VIFs to the desired networks. We will only destroy and create new ones for older hosts or when a corresponding VIF cannot be found in the network mapping.
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>