Commit Graph

23 Commits

Author SHA1 Message Date
Danilo Del Busso
afb419af04
CP-44767, CP-44766 & CP-44765: Refactor usage of VM restrictions and add reference_label to OVFs (#3211)
* Tidy up `VM` extension: use `var`
* Tidy up `VM` extension: remove redundant initialisers
* Tidy up `VM` extension: use type keywords when possible
* Tidy up `VM` extension: merge conditional expressions
* Tidy up `VM` extension: remove redundant qualifiers
* Tidy up `VM` extension: remove redundant type arguments
* Tidy up `VM` extension: remove redundant `else`s and parentheses
* Tidy up `VM` extension: fix naming
* Tidy up `VM` extension: misc changes
* Tidy up `VM` extension: use `null` propagation
* Tidy up `VM` extension: fix whitespace
* Tidy up `VM` extension: apply ReSharper Code Cleanup utility
* Tidy up `VM` extension: Fix naming of private string array
* CP-44767: Ignore VM restriction when fetching `MaxVCPUsAllowed`
Instead, fetch the highest available value in all templates for the host.
This means that VMs imported from vhd won't automatically default to `DEFAULT_NUM_VCPUS_ALLOWED`, and that VMs that have been kept across XenServer upgrades won't be limited to the number of vCPUs in their own (possibly outdated) restrictions
* CP-44766: Use value in template with a matching `reference_label` when checking VM restrictions
* Move restriction getters to own region
* CP-44766: Use matching templates to fetch VM restrictions
- Rewrite `GetRestrictions...` methods to perform simpler operations
- Add `GetIntRestrictionValue` and `GetBoolRestrictionValue` wrappers to `GetRestrictionValueFromMatchingTemplate`
- Now all calls to a restrictions first check the template value, with a fall-back to defaults
* CP-44765: Export `reference-label` when generating OVFs
---------

Signed-off-by: Danilo Del Busso <danilo.delbusso@cloud.com>
2023-09-29 03:45:17 +01: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
b3bc93f1f6 CP-36392: Refactored so that GetHashCode() does not reference mutable fields.
Also, removed some unused GridRow class members.

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2022-04-06 13:11:33 +01:00
Danilo Del Busso
396bcb0e35
CP-36392: Make type field readonly in QueryElement.cs
field is used in `GetHashCode`

Signed-off-by: Danilo Del Busso <Danilo.Del.Busso@citrix.com>
2021-11-15 09:46:12 +00:00
Danilo Del Busso
db2c00d54d
CP-36392: Cast operands of divisions to not lose precision
Cast to `decimal` or `float` to keep floating-point precision

Signed-off-by: Danilo Del Busso <Danilo.Del.Busso@citrix.com>
2021-10-04 16:22:29 +01:00
Danilo Del Busso
2d1e6dcb92 CP-36392: Remove base calls directly based on the object reference.
Two objects will never have the same hash since base methods are based on direct object reference

Signed-off-by: Danilo Del Busso <Danilo.Del.Busso@citrix.com>
2021-10-01 11:56:36 +01:00
Konstantina Chremmou
e30ea433c7 Refactoring to simplify the code and make calculations more efficient:
Removed unnecessary abstractions. Replaced named delegates with anonymous ones.
Use pattern matching and avoid multiple casts. Be consistent in the properties
we check.

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2020-07-30 10:42:20 +01:00
Konstantina Chremmou
fad80c778b Avoid duplicate logging; compact multiple logging calls.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2019-11-13 12:31:44 +00:00
Konstantina Chremmou
30226c590d CA-116060: Stop saving the expanded state of the New Search panel with the other Search metadata.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2019-07-23 14:00:38 +01:00
Konstantina Chremmou
fb8434819d Namespace tidy 3/several: replaced XenAdmin.Core (instances in XenCenterLib) with XenCenterLib.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2017-11-30 13:56:32 +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
bf08f9d875 Refactored old events which did not need to pass parameters when fired, but were
defined a long time ago, before C# obtained the Action delegates.

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2016-10-13 22:59:06 +01:00
Callum McIntyre
c36f160327 CA-140338: Truncation on New Search Page with long Custom Field Filters name
Accidentally left an extra piece of ellpising in the wrong place, now removed.

Signed-off-by: Callum McIntyre <callumiandavid.mcintyre@citrix.com>
2016-09-01 15:03:43 +01:00
Callum McIntyre
3295dc845d CA-140338: Truncation on New Search Page with long Custom Field Filters name.
The truncating of the custom field name by space (instead of ellipsising) seems to be a Windows default, but it's not ideal. This change edits the text displayed in the dropdown when an item is selected so that if a custom field is selected it is ellipsised to an appropriate length. It doesn't affect the dropdown itself, which continues to display the full custom field name.
2016-09-01 15:00:06 +01:00
Gabor Apati-Nagy
570e98406e CP-15034: UI: Search: show new search & filter (Windows Update capability)
Added Windows Update capability related search functionality
2015-12-17 11:05:22 +00:00
Stephen Turner
cb9a66a64d CA-185020: Search by UUID 2015-10-07 17:19:44 +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
Stephen Turner
dc3db509f1 CA-163334: Add read caching status to the Search 2015-03-09 15:23:42 +00:00
Konstantina Chremmou
152b320e36 CP-4960: Notify the users they have a half-upgraded pool.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2013-12-13 17:55:39 +00:00
Konstantina Chremmou
2a21608e13 CP-6094: Moved the New Search button outside the Search panel and the Default search
under the saved Searches drop down. Also minor layout tweaks and test update.

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2013-09-24 15:58:53 +01:00
Konstantina Chremmou
8f51089efe CP-5752: Use Action delegate instead of EventHandler when there is no need to
pass in parameters when the event is fired. Moved QueryElement.Dispose method
from the Designer.cs to the main file (it needs visibility since it contains more
code than the autogenerated method).

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2013-08-03 01:04:40 +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