- Stop rethrowing exceptions.
- Added some checks.
- Renamed method XenCenterUUID to GetXenCenterUUID to match the methods
SetXenCenterUUID and RemoveXenCenterUUID.
- Replaced check via static string list with a string switch block.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
- 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>
Removed unnecessary ITaskSpecification interface and its inefficient
implementations; compacted methods to make following the logic easier
and avoid duplicate dictionary lookups.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
- Refactored MeddlingAction and Task classes: moved the logic for building a MeddlingAction outside the Task class and switched to using the vm_operations enum to identify which tasks are suitable for MeddlingAction
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
* CP-14807: Delete OEM in ServerVersion
* CP-14807: Removing unused IgnorePatchAction and IgnoreServerAction classes (moving their constants to the Updates class).
Signed-off-by: Aaron Robson <aaron.robson@citrix.com>
it's obvious what it is. The Session's uuid will be deprecated from the API bindings.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
prevent them from being serialised alongside the API properties. This will also
be useful for moving the API bindings out of XenModel.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@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>
Expose both the HIMN network and any VIFs associated with the HIMN
network using XenCenter when the "View->Show Hidden Objects" option
is displayed. However the shown HIMN should not be able to autoplug,
edit or delete.
- removed unnecessary casts
- no need to catch exception only to rethrow it; do not interrupt the call stack by using "throw ex"
- redundant check and value setting
- The StartDiagnosisForm dialog shows the reasons why a VM cannot be started or resumed. XenCenter tries to get these reasons from a call to VM.assert_can_boot_here, but his function does not perform a CPU feature compatibility check.
- This commit adds the CPU feature compatibility check for resume operations.
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
Fixed code to treat uuids of patches case-insensitive when consuming, but not changing them (eg. to lowercase) to keep compatibility with older XAPIs.
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
Changes to the DeleteAllAlertsAction:
- when the dismiss operation fails with INVALID_HANDLE we need to remove the alert from our alert list (XenCenterAlerts) and trigger the CollectionChanged event so that the alert count gets updated.
- the action title now says "Removing <n> alerts" when dismissing all/selected alerts and "Removing alert" when dismissing single alert (instead of "Removing all alerts" in all cases)
- move the initialization of Dismissing flag outside the action (see below)
This fix also includes changes so that the Dismissing flag works as intended: to be able to hide the dismissing alerts in the Alerts view immediately, rather than one by one when they were actually deleted, causing a large number of refreshes.
On dismissing alerts we do:
1. set dismissing to true for all alerts
2. rebuild alert list (this will filter out the dismissing alerts)
3. dismiss alerts - run the DismissAllAlerts action
Also, the action buttons on each row should only apply to the clicked row (not multiselect).
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
- Suppress reporting of success and failure for sub-actions:
The suppress history flag is set when the action is created and if is false (by default) the action is added to the history (the Events list).
In order to suppress history for the subactions, we need change all actions used in Edit pages so their constructor can set the SuppressHistory flag and then use these constructors with suppressHistory = true on all the implementations of IEditPage.SaveSettings() where an action is created
(then we need to remember to do the same everytime we introduce a new page and / or "save" action).
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
was available for non-dismissible alerts. Fixed wrong enabled state of the top
ToolStripSplitbutton Dismiss on the alerts and the events page. Refactored code
calculating dismissability of alerts and dismissing them. Events list should be
multi-selectable.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
succeeded, failed; cancelled at the moment counts as failed, we may need to distinguish
in future). As a consequence the filter checkboxes from the top of the Log tab
were removed and some temporary changes were made to the drawing of action rows
(the controls will change completely in a subsequent commit).
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
NewAction to use the Action<ActionBase> delegate instead of EventHandler. Thus
there is no need to fire them with Empty or null EventArgs and on several occasions
we avoid casting objects in the event handlers.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>