Commit Graph

34 Commits

Author SHA1 Message Date
Konstantina Chremmou
5828c03e8d CA-375173: Create the VDI and VBD records before closing the new disk dialog. Also:
Fixed issue where the SR was not preselected when editing an existing disk and no scans were taking place.

Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
2023-02-28 15:36:13 +00:00
Konstantina Chremmou
d7b519a53c Updated copyright notice on files.
Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
2023-01-30 16:24:16 +00:00
Konstantina Chremmou
421831f312 CP-41048: Do not scan SRs automatically when adding to the SrPicker. Added button to scan on demand.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2022-12-02 00:55:27 +00:00
Konstantina Chremmou
e1c808eb8f Corrections as per code review.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2022-11-22 16:44:32 +00:00
Konstantina Chremmou
a3569aa875 CP-41048: Add each SR to the SrPicker as soon as its scan finishes, without waiting for the other scans to finish.
The scans run in parallel in batches of three to avoid flooding the session.
Also, prevent firing the SelectedIndexChanged event multiple times when populating the NewDisk dialog.
Renamed the SrPicker control on the latter (because SrListBox is a different type of control).

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2022-11-15 16:48:53 +00:00
Danilo Del Busso
77bd034e8d
CA-359965: Consider physical_utilisation value when checking for free space in thinly provisioned SRs (#3028)
* CA-359965: Consider `physical_utilisation` value when checking for free space in thinly provisioned SRs

* CA-359965: Fix miscellaneous formatting issues

* Made SrPickerItem show the SR by default. Removed virtual method that was never overriden.

* Use slightly more intuitive name for property; also inverted its logic.

* Renamed VdiCreationCanProceed to the more specific CanFitDisks since it only deals with sizes.

* Re-arranged classes in file.

* Refactored SrPickerItem:

- Merged CanBeEnabled and DisabledReason properties to method CanBeEnabled(out disabledREason)
  to avoid running the same checks twice.
- Pass the disk instead of the size into extension method SR.CanFitDisks
  so that the correct size can be used for each storage (thin vs. non-thin provision).

* Correction as per code review and some tweaks to make the checks clearer and more efficient.

Signed-off-by: Danilo Del Busso <Danilo.Del.Busso@citrix.com>
Co-authored-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2022-10-11 09:26:54 +01:00
Konstantina Chremmou
688fe99e3e CA-359969: Do not rebuild the list if the scanning of the SRs has not finished yet. Removed unused code.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2021-11-02 16:53:48 +00:00
Konstantina Chremmou
b116c4713d CA-353524: Full copy of VM on the same SR is allowed.
Moving and copying a VM should be treated differently, hence we need a different
SrPickerItem subclass for each operation. Minor logic simplifications.

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2021-05-04 13:05:27 +01:00
Konstantina Chremmou
abf4ae3f35 CP-36392 pt.1: Removed unused using directives.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2021-04-07 10:04:47 +01: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
a84053cf8d CA-337323 : SR.scan on the SrPicker was happening silently without any indication on the UI (enhanced fix for CA-280299).
The result was that numbers were changing suddenly; in cases of slow connections,
a user could make a selection before the scan was over.

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2020-05-04 14:30:24 +01:00
Konstantina Chremmou
7cc42fe2ee CA-329317: When migrating a VDI do not enable target SRs that do not allow mirroring.
- Compacted code deciding whether to show an SR on the picker.
- Removed code sorting the disabled SRs because it repeats partially the
SR checks without reflecting exactly the disabled reason and probably
causes confusion when compared with the main treeview.
- Renamed property.

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2019-10-25 10:07:06 +01:00
Konstantina Chremmou
73eaed6af8 Fixed some issues around the validation of SrPicker selections.
- Fixed button enablement on the IntraPoolCopy page.
- Regression on the NewDiskDialog were selection was considered valid
even if the SR was disabled.The SrSelectionChanged and SelectedIndexChanged
were fired in the wrong order. To fix this the event SrSelectionChanged
is removed (in reality after the refactoring in 5b79b1dc94
it became obsolete).

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2019-10-14 09:24:36 +01:00
Konstantina Chremmou
0e57e871b9 Removed unnecessary instance class SrPickerItemFactory.
Removed comments that did not provide further info than the class name
they were documenting. Removed unused code. Launch progress dialog within
a using block.

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2019-07-22 16:19:25 +01:00
Konstantina Chremmou
5b79b1dc94 Removed the label from the SrPicker because in half of the occasions it was
hidden and in all other cases it was set by the implementing control, i.e.
the label was not reusable, hence no reason to have it in the control and risk
layout issues. This means that the SrPicker does not need to be a control
encapsulating a CustomTreeVIew, but simply derive from the latter.

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2018-10-24 12:49:31 +01:00
Konstantina Chremmou
f1d5abb7a5 Replaced duplicate events ItemSelectionNull and ItemSelectionNotNull with SrSelectionChanged.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2018-10-24 12:49:31 +01:00
Konstantina Chremmou
0fe584cdba Removed unnecessary method and replaced it with the field it returns.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2018-10-24 12:49:31 +01:00
Konstantina Chremmou
0eef02fc3b Removed redundant code.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2018-10-24 12:49:31 +01:00
serenc
c99c4a0f2e CA-280299: Rescan SRs when choosing SR for copying VM 2018-02-05 10:53:46 +00:00
Stephen Turner
89f51e90a1 CA-258782 Remove thin provisioning code (#1728)
* CA-258782 Remove thin provisioning code

* Revert file that shouldn't have been touched

* Remove line that was only present for debugging
2017-08-22 16:40:08 +01:00
Mihaela Stoica
80e60abf7c CP-19607: Make sure that event handlers are unregistered when the SrPicker control is disposed
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
2017-01-25 12:15:59 +00:00
Gabor Apati-Nagy
7c0bc50b4a CA-176169: Changed copyright statements to include the comma in Citrix Systems,
Inc.

Signed-off-by: Gabor Apati-Nagy<gabor.apati-nagy@citrix.com>
2017-01-16 19:59:50 +00:00
Konstantina Chremmou
eb3fbe2ac8 Corrections and refactoring on VDI move/migrate:
- Allow move of multiple VDIs
- CA-187659: show better messages when batching move/migration of multiple VDIs.
- Show different tooltips for single vs. multiple VDI move/migration/deletion.
- Refactored the MoveDiskDdialog. Removed the inherited class VDIMigrateDialog and
the batching manager as it was not very different from its parent, it was registering
the events twice, and was batching migration of even single VDIs.
- Tidied up the Move- and MigrateVirtualDisk commands so they're easier to compare.

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2016-09-28 09:50:43 +01:00
Konstantina Chremmou
fd3393049c Code simplification: use Action delegate instead of EventHandler since the event is not sending any objects when triggered. 2016-06-27 10:20:23 +01:00
Stephen Turner
30dfce6a7b CA-137301: Add null checks, following code review 2016-04-20 17:18:46 +01:00
Stephen Turner
953ea412df CA-137301: Double-click should choose item in Move VM/VDI dialogs 2016-04-18 16:17:01 +01:00
Mihaela Stoica
7df999c532 Improved behavior of the SR picker in the New Disk dialog
- when the user changes the disk size (or initial allocation), the selection in the SR list should not change and the list should not be automatically resorted
- users should not be allowed to create disks larger than the SR size (the SR is disabled and an explicit reason is displayed)

Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
2015-09-18 16:45:05 +01:00
Carmen Agimof
06b7b66357 CP-13174: Change units used for initial_allocation and allocation_quantum to MB or GB instead of percentages.
Changes allocation type from "dynamic" to "xlvhd".
2015-08-26 17:14:01 +01:00
Gabor Apati-Nagy
847eebd32c CP-12475: XenCenter work for thin provisioning: Add Virtual Disk dialog: new fields
Add New Virtual Page (VDI):
By default, the SR's default initial size allocation percentage (that may be different for different SRs) is used.
Once the user has changed the initial allocation rate, the page would only use the custom value from that point.

New SR Wizard:
Minimal change in if statement and added comment in RunNextPagePrecheck
method for LvmoHba.
2015-06-26 15:36:04 +01:00
Gabor Apati-Nagy
37330629b8 CP-12475: XenCenter work for thin provisioning: Add Virtual Disk dialog: new fields
Created SR.IsThinProvisioned property
2015-06-25 13:42:08 +01:00
Gabor Apati-Nagy
31af0f0004 CP-12475: XenCenter work for thin provisioning: Add Virtual Disk dialog: new fields
Fixed dynamic allocation based calculation on the new SR page and in the SrPicker (issue found in code review)
2015-06-25 11:46:31 +01:00
Gabor Apati-Nagy
aefed11165 Revert "CA-149867: Invoke on MainWindow instead of various controls"
This reverts commit 92f0499911.
2015-04-16 14:17:02 +01:00
Gabor Apati-Nagy
92f0499911 CA-149867: Invoke on MainWindow instead of various controls
We observed that some threads can reach deadlock-ish state after they have Invoked into a control's UI thread. When it happens they are all in a waiting for join or in sleep state for very long time, although there should not be any deadlock situations.
It seems this has something to do with multiple parent controls and with which control we invoked on. This should not make a difference, because we have got one UI thread (for MainWindow) they should wait for, but we have seen it does.

The solution that fixed this issue was to invoke on the MainWindow instead of various controls (see a4fe507adf ).

This changeset is changing all our Invokes to invoke into MainWindow
instead of a control itself. (MainWindow's UI thread is the only UI thread
all Control is using in XenCenter)
This changeset should be in place until we have found the root cause or the exact reason for the above.
2015-04-08 15:16:10 +01:00
Mihaela Stoica
bd36a85bff CP-4816: Initial commit to git repo
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
2013-06-24 12:41:48 +01:00