Commit Graph

2296 Commits

Author SHA1 Message Date
Konstantina Chremmou
0598e6342d Merge remote-tracking branch 'upstream/master' into feature/REQ-797 2021-01-19 11:01:02 +00:00
Konstantina Chremmou
75f9127e27 Move files to a better location.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2021-01-19 10:37:35 +00:00
Konstantina Chremmou
be010e1c39 CA-350406: Exclude the Tools SR when plugging PBDs after a host reboot during an update process.
Also, try plugging PBDs only for the host in question (other hosts are not necessary,
as the PBDs are re-checked for any previously evacuated VMs before repatriation).

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2021-01-12 12:15:12 +00:00
Konstantina Chremmou
9a5c664eb0 CA-350574: Corrections to signing an appliance.
Also, removed listing of CryptoServiceProviders from the settings.

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2021-01-12 12:14:31 +00:00
Konstantina Chremmou
501cca2ffb CA-350410: Ensure we set the certificate before checking it's null.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2021-01-04 16:23:11 +00:00
Konstantina Chremmou
542a329a27 Fixed failure to start a VM after it was imported as an XVA package.
Regression introduced by the changes for CA-64500. Since we initiate a VMStartAction
we need to ensure that the VM object passed to the action has a non-null Connection.

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2020-12-18 01:34:25 +00:00
Konstantina Chremmou
1c4178c7fe CA-347480: Improved ability to cancel an import/export while compressing/uncompressing the files, or packaging into/extracting from an OVA file.
Also, remove another couple of unused methods from the OVF class.

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2020-12-18 01:34:25 +00:00
Konstantina Chremmou
e325548a75 CA-349836: Reworked handling of manifest and signature for appliance import/export.
- Moved the code to the ExportApplianceAction so it's easier to modify the
  action's description.
- Fixed issue where the user's option for adding signature/manifest to a plain
  OVF package was ignored.

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2020-12-18 01:34:25 +00:00
Konstantina Chremmou
8d004401fb CA-343280: Removed metadata entry.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2020-12-07 15:57:26 +00:00
Konstantina Chremmou
6286f96cb1 CA-343280: Extended proxy authentication.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2020-12-07 15:57:26 +00:00
Konstantina Chremmou
3e0d982631 CA-347849: No need to keep track of the VIF.device numbers across all VMs of the imported appliance.
Reset to 0 for each VM.

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2020-12-07 15:57:00 +00:00
Konstantina Chremmou
84d0a2b8ae Bad application of the code reusability principle in VMDestroyAction.
Destroying a VM does not disrupt the connection, hence the use of the BestEffort
method is not warranted. After this correction, BestEffort is only used in the
DestroyedBondAction, hence I removed it completely and replaced it with simpler
exception handling in the latter class's Run method.

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2020-12-03 14:56:11 +00:00
Konstantina Chremmou
94024f99a9 CA-347481: Clean up the disks of the destroyed VM if import is interrupted due to cancellation or failure.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2020-12-03 14:55:38 +00:00
Konstantina Chremmou
2469c947c9 Increased precision in displaying progress of transferred disk data.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2020-12-01 12:07:13 +00:00
Konstantina Chremmou
719d6b5e45 CA-347487: Fixed error formatting.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2020-12-01 12:07:13 +00:00
Konstantina Chremmou
07ae413e15 CA-349194: Prevent crash when initialising a disk image import.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2020-12-01 11:03:49 +00:00
Konstantina Chremmou
d7512d14c7 CA-347479: Added more cancellation points.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2020-12-01 11:03:49 +00:00
Konstantina Chremmou
60fb141e57 CA-339384: Take account of thin provisioning when placing a disk on a target SR.
Also, set the required disk size to zero when the disk spinner value is invalid.

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2020-11-18 09:24:45 +00:00
Konstantina Chremmou
80119e9411 CP-15790: Implementation improvement aimed to make manual testing easier.
- Ensure we read the updates.xml location anew from the registry, otherwise the
application has to be relaunched to pick a registry change. Look in both hives
HKCU and HKLM. To avoid performance impact on the UI, move the operation into
the action's Run() body.
- Some refactoring to improve OOP design and fix XmlReader leak.

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2020-11-12 11:04:33 +00:00
Konstantina Chremmou
0b0819b0aa Moved files to a better location.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2020-11-12 11:04:33 +00:00
Konstantina Chremmou
c1375c51ed CA-347407: Handle exceptions when failing to unprotect saved proxy credentials.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2020-11-03 11:34:06 +00:00
Konstantina Chremmou
fbb25c7970 Minor modifications to task polling:
- Consolidated Action.PollToCompletion overloads, among others, to reduce precision loss.
- Logging the environment's stack trace is not very useful in the case of an API failure.
- Log the task's opaque_ref so it's easier to trace errors in the server side logs.

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2020-10-13 15:02:31 +01:00
Konstantina Chremmou
e895bc4168 CA-339353: SrProbeAction should run its RBAC checks explicitly instead of inheriting from PureAsyncAction.
The fix for CA-337280 moved the parsing of the probe result in the Run body of
the action, causing it to fail when the dry-run for the RBAC checks is performed.

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2020-10-13 15:02:31 +01:00
Konstantina Chremmou
4f564979e1 CA-345349: Verify the exported disk using DiscUtils and fail the whole export if one disk export failure occurs.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2020-10-13 14:34:15 +01:00
Konstantina Chremmou
d23c40c543 CA-324350: When the OVF files are compressed, create manifest and signature on the final package after the compression.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2020-10-13 14:34:15 +01:00
Konstantina Chremmou
f24a81bd28 CA-89896: Enabled cancellation during OVA packaging/extraction and file compression/decompression.
Also removed some more unused methods.

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2020-10-13 14:34:15 +01:00
Konstantina Chremmou
38c88b5692 CA-64500: Offer the option to start the vApp or VM automatically after an OVF/OVA import.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2020-10-13 14:34:15 +01:00
Konstantina Chremmou
54e8347a5c CP-34826: Upgraded DiscUtils to version 0.11.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2020-10-13 14:34:15 +01:00
Darren Matthews
a9016bc14e L10N : Translation Update and RESX resync
Signed-off-by: Darren Matthews <darren.matthews@citrix.com>
2020-10-13 13:56:55 +01:00
Konstantina Chremmou
1e6197022e
CA-339233: Do not allow selection of networks while they're locked. (#2733)
* Hid properties from the designer and renamed them because they give the wrong impression.
* Fixed some inefficiencies around the NetworkComboboxItem.
- Move NetworkComboBoxItem into the NetworkComboBox class.
- Moved XenAdmin.Dialogs.NetworkComboBoxItem into the VIFDialog class and made it
  private to avoid ambiguousness with the public XenAdmin.Controls.NetworkComboBox.NetworkComboboxItem.
- Create a NetworkComboBoxItem only if needed and assign its name at construction time.
- Add method to select a NetworkComboBoxItem and property to return the SelectedNetwork.
* CA-339233: Do not allow selection of networks while they're locked.

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2020-10-07 13:34:03 +01:00
Konstantina Chremmou
6f44821e40 Import refactoring 4: Simplifications and corrections, including:
- Improvements to progress reporting (CA-65894).
- Added some logging.
- Use the connection cache instead of making server calls.
- Moved some methods to the string utilities and added unit tests.

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2020-10-07 13:22:33 +01:00
Konstantina Chremmou
42b06251bc Export refactoring 4: Some improvements to progress reporting (CA-65894). Added some logging.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2020-10-07 13:22:33 +01:00
Konstantina Chremmou
23892df15d Moved the OVF actions to XenModel and removed what was left from XenOvfTransport.
Previously this was not possible due to XenModel-XenOvfTransport cyclical references.

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2020-10-07 13:22:33 +01:00
Konstantina Chremmou
317f66758d Removed Settings file. It is not meant for storing constants and most entries were obsolete anyway.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2020-10-07 13:22:33 +01:00
Konstantina Chremmou
18c407d992 Removed controls for Transfer VM configuration.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2020-10-07 13:22:33 +01:00
Konstantina Chremmou
6e2c45bcd5 CP-34221: Basic implementation of export/import using the API's http actions.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2020-10-07 13:22:33 +01:00
Konstantina Chremmou
bf9f5b1308 Ensure all the CommandLib classes are defined in this namespace so as to avoid conflicts with homonymous classes from other namespaces.
- Automatic indentation fix as a consequence.
- Use proper xml doc for the various methods and classes.

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2020-10-07 13:22:33 +01:00
Konstantina Chremmou
e3d6db3a80 Removed support for long retired XVA v1 packages.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2020-10-07 13:22:33 +01:00
Konstantina Chremmou
25b61ea129
CA-343763: Corrected the handling of VMSS alert priority/severity according to CA-342874. (#2730)
* CA-343763: Corrected the handling of VMSS alert priority/severity according to CA-342874.

- Distinguish between warnings and errors.
- Made PolicyAlert derive from MessageAlert to conform with other alert types.
- Replaced EventType column by a simple image column because it adds to clatter
  without really offering useful information.

* Correction as per code review.

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2020-10-06 14:51:14 +01:00
Konstantina Chremmou
d93e40065a Various fixes on the EvacuateHostDialog (includes CA-292642, CA-284126, CP-34862).
- CP-34862: Do not allow nomination of new master if a pool secret rotation or
  other pool operations are in progress.
- CA-292642: Fixed button enablement after resolving VM problem.
- CA-284126: Added button to rescan running VMs on the server.
- Removed annoying, focus stealing, modal action progress dialog. When scanning
  for VMs show a spinner on the control instead.
- Fixed crash when the host combobox was updated due to cache changes.
- Logging in an elevated session was happening on the UI thread.
- Show the role elevation dialog before launching the host evacuation dialog or
  we end up with showing the user an unpopulated control.
- Stop deriving from animated progress dialog because it makes it difficult to
  get the resizing right when adding more controls.
- Stop using the progress bar for the VM solution actions; rely simply on the
  action's description and the VM's icon in the gridView.

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2020-10-06 11:27:32 +01:00
Konstantina Chremmou
b34a5d54cf CP-34862: Do not allow enabling HA when a pool secret rotation is pending.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2020-10-06 11:27:32 +01:00
Konstantina Chremmou
f3da384a6a Configuring HA on the TabPage should offer the same UX as when using the Menu Items.
- Use CommandButtons on the HA TabPage for configuring/disabling HA.
- Added menu item to disable HA.
- There is no point in hiding the buttons on the HA TabPage when the corresponding
  menu items are available. They should rather offer the same user experience.
- Added RBAC page to the HaWizard to avoid unnecessary SR scanning only to be told
  that one cannot proceed.
- Show RBAC error dialog if the user does not have permission to launch the
  EditVmPriorities dialog.

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2020-10-06 11:27:32 +01:00
Konstantina Chremmou
db7582a397 CP-34862: Do not allow enabling clustering when a pool secret rotation is pending.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2020-10-06 11:27:32 +01:00
Konstantina Chremmou
cef3acaa6e CP-34862: Updated SDK to include the latest additions for REQ-819.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2020-10-06 11:27:32 +01:00
Konstantina Chremmou
aec6b395ff CA-343956: Fixed issues on the VM storage TabPage:
- Disabled button tooltips did not disappear when the DataGridView selection was cleared.
- The disabled Activate/Deactivate button had no tooltip for template disks.
- Minor improvement to the tooltip of the Delete button.
- The Add button was using the enablement logic of the AttachVirtualDiskCommand.
- Use CommandButtons to avoid logic duplication.
- Hide the CommandButton.Command from the designer as it's mostly assigned programmatically.
- Increased the minimum width of the non-autosizable columns so they remain visible.

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2020-10-02 11:59:55 +01:00
Konstantina Chremmou
c4754c0251 Removed exception that was never thrown (referring to obsolete licensing restriction).
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2020-09-08 10:34:08 +01:00
Konstantina Chremmou
cdd650d40e Fixed 3rd party library references in the solution project files.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2020-09-08 10:34:08 +01:00
Darren Matthews
c75ab40ef8 L10N : Translation Updates and Resx Resync
Signed-off-by: Darren Matthews <darren.matthews@citrix.com>
2020-09-01 14:26:40 +01:00
Konstantina Chremmou
822394597f Corrected button text. Fixed duplicate hotkey in the host right click menu.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2020-08-24 16:49:23 +01:00
Konstantina Chremmou
e3896239df CA-339305: XenCenter was hanging when update alerts were removed very fast, and other issues:
- Use a plain list to store update alerts and, where possible, fire a collection
  change event only after a bulk change and not every time a single object is added
  or removed.
- Fixed issue where dismissed updates were stored in the config of all connected
  pools, even of those where the update did not apply.
- Corrected RBAC checks for update dismissal.
- Fixed enabled state of dismiss buttons.

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2020-08-21 16:08:20 +01:00