- removed unused methods and properties from the NewPolicyWizard class
- made the wizard pages private in the NewPolicyWizard class
- removed unused constructor from the NewPolicySnapshotTypePage class
- removed unused property from the PolicyHistory class
- removed the public properties TreeView and DataGridView from the SnapshotsPage
- removed the PolicyType from the PolicyAlert class and the constructor that is no longer used
- removed unused property from the VMSS class
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
- 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>
* CA-205187 - L10n: JA/SC: The websites are not shown as hyperlink on the “Health Check Privacy Statement” window
Signed-off-by: Letsibogo Ramadi <letsibogo.ramadi@citrix.com>
* CA-205187 - L10n: JA/SC: The websites are not shown as hyperlink
Fixed tab order
Signed-off-by: Letsibogo Ramadi <letsibogo.ramadi@citrix.com>
* CA-205187 - L10n: JA/SC: The websites are not shown as hyperlink
Added Japanese privacy policy
* CA-205187 - L10n: JA/SC: The websites are not shown as hyperlink
Fixed regression in tab order
XenCenter specific and it is not retrieved from the SDK any more. Renamed
EventNextBlockedException to EventFromBlockedException since event.next() is now removed.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
Detect both VM_LACKS_FEATURE and VM_LACKS_FEATURE_SUSPEND, show proper error message on the pre-check page in the Install Updates Wizard
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
Moved "Legacy Windows" template to the bottom of the Windows templates
to discourage users from selecting it and avoid it being selected by default
at the top of the list as was the case.
Signed-off-by: Letsibogo Ramadi <letsibogo.ramadi@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>
* CA-249845: Compiling the server status reports sometime fails with System.IO.IOException: The process cannot access the file because it is being used by another process
Add a retry mechanism around the File.Move, because the operation sometimes fails when there is an anti-virus running on the XenCenter machine (we are doing the move immediately after we finished writing the file and the anti-virus software might be checking the file at that point)
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
* CA-249845: Compiling the server status reports sometime fails with System.IO.IOException: The process cannot access the file because it is being used by another process
Extract the move with retry into a separate function
Signed-off-by: Mihaela Stoica <mihaela.stoica@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>
- On the Updates tab: for new versions, check that the version of XenCenter is at least the latest. If not, give an additional option to download a newer XenCenter (for both updates and upgrades), and not offer "Download and Install" (for updates).
- In the Patching wizard: if the update is a new version, we force the user to first update their XenCenter to the new version
- In the RPU wizard: if the server version is not the latest and their XenCenter version is not the latest from updates.xml, we assume that they want to upgrade to the latest XenServer version and we force the user to first update their XenCenter to the latest version.
Signed-off-by: Mihaela Stoica <mihaela.stoica@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>
This way XC will display the name attribute of the XC-version which is expected to contain the LTSR string for LTSR version.
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
- Add "latestcr" field to the XenCenterVersion class
- Change the Updates class to cope with multiple latest XenCenter versions
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
Improved the ReadHttpHeaders function, by making sure that a chunk is read fully from the stream (the number of bytes read by the Stream.Read function can be less than the number of bytes requested, so we need to continue reading until the required number of bytes is read)
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
* CP-19605: Improve the performance of the CreateNewRootNode function
Make GroupKey a class and override GetHashCode and Equals
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
* CP-19605: Remove debugging lines
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>
raises XenCenter error on XS 6.1
When Text is null error is raised by split() function, we
need to handle that case.
Signed-Off-By: Sharath Babu <sharath.babu@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>
Added "VM.pool_migrate" to the list of tasks suitable for meddling actions.
Removed the usage of MeddlingActionTitle other_config key, because it wasn't working as intended for two reasons:
- If XenCenter starts an action that does multiple async api calls, so multiple tasks, the action's title is assigned to all tasks as MeddlingActionTitles, so the second XenCenter instance would create multiple meddling actions with the same title.
- When a second XenCenter instance tries to see if a task is suitable for a meddling action, the MeddlingActionTitle is not yet present in the task's other_config, so the task is ignored in most of the cases.
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
When getting the control domain VM, we should use the control_domain only if it is not null. there is no need to check the version (which was, however, looking at the API version of the master)
Remove the VDI only on a best effort basis if the upload failed in the UploadSupplementalPackAction. This will make XenCenter to display the message from the original exception and not from the removal action if the latter had also failed.
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
Fixed a typo that caused XenCenter to show a Trace error dialog (and to fail to do the clean-up) after applying an update in manual mode. (when RBAC is involved)
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
- Replaced the information tooltip with a warning icon and label at the bottom of the page.
- Added some null checks
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
have the wizard do it before we get there. Also, replaced the labels in such way
that, if there should be lag, the user will not see the draft message used only
on the designer.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
- On the PVS Cache Configuration dialog, disable the cache storage fields with an information tooltip stating that this PVS cache storage cannot be changed because it is in use.
- Also set the minimum width for the splitter panels, to avoid display issues when the splitter is moved and either of the panels becomes unusable.
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
This change implements a lightweight retry logic for downloading updates to protect against temporary network issues.
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
Added an extra parameter to the CreateVmFastAction constructor, which is used to specify whether to set the VM's property IsBeingCreated. In order to set this property, we need to wait for the newly created VM to appear in the cache. But we cannot do this in the action test, because the cache is not being updated. Therefore the action needs skip this step when running from the tests. The IsBeingCreated property is only used in the UI, to refresh the PVS tab after the VM is created, so the accuracy of the action test (CreateVMFastActionTest) is not affected by this change.
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
* [CA-233454] PVS tab doesn't show a new VM when it's created
Refined the rules for not adding a VM to the table, if it is a template (thus not_a_real_vm), and it has the __gui__ prefix (thus hidden), we still add it, but hide it.
When its name is changed (to remove the __gui__ prefix), we update its name and re-calculate whether it should be visible (in the case of a new VM this will be true once the __gui__ prefix is gone). Also resort the table if a node changes from hidden to visible, because it appears as an addition to the table.
Signed-off-by: Callum McIntyre <callumiandavid.mcintyre@citrix.com>
* [CA-233454] Update criteria for VM visibility to include is_a_real_vm
is_a_template is changed before the name_label removes the __gui__ prefix, so this works with no other changes to the vm property changed event.
Signed-off-by: Callum McIntyre <callumiandavid.mcintyre@citrix.com>
* [CA-233454] Update when the VMs are shown in the PVS list
New observable property IsBeingCreated for VMs, set to true when they're made a hidden object, and false when they're removed from hidden objects (both in CreateVMAction). In the PVS Page when this is set to false, we re-evaluate whether a VM can be shown. This means that new VMs show here at the same time they're added to the tree (only different is tree refresh time), instead of far earlier (and before their networks were added).
Signed-off-by: Callum McIntyre <callumiandavid.mcintyre@citrix.com>
* [CA-233454] Set IsbeingCreated in the CreateVMFastAction
* [CA-233454] Properly support the VM Fast Create action
Further changes to CreateVMFastAction, to ensure it works with PVS tab - use the __gui__ prefix when the VM is created and then change it back just before showing.
* [CA-233454] Small logic adjustments/tidying up
If batch updating fails in a pool, this code will do the clean up by
running the appropriate (next in the queue) RemoveUpdateFilesFromMaster action. In addition to Pool_update.clean(), Pool_update.destroy() will be called when needed.
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
confirmations are displayed. Added checkboxes to the dialogs requesting confirmation
of dismissal of notifications so the user can opt to skip this step.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
Changes as discussed on the ticket: No longer disable the rows when they have a warning in the dialog, support warning about storage configuration as well as PVS configuration, and also include these warnings in the PVS page table.