Commit Graph

18 Commits

Author SHA1 Message Date
Konstantina Chremmou
bc92cf793d Removed class TaskPoller and moved its code to AsyncAction.
This simplifies the code since the TaskPoller cannot be perceived without an AsyncAction.

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2021-02-10 23:45:23 +00:00
Konstantina Chremmou
b0eafcf1d1 Code design issue: do not override DestroyTask. Minor refactoring in VMSnapshotCreateAction.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2021-02-10 23:45:23 +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
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
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
d1c9e7ddd1 CA-337323: Attempt finding the right owning form for the RoleElevation dialog. Also:
- Simplified SudoElevationResult.
- Renamed SudoDialogDelegate to ElevatedSessionDelegate so that it makes more sense
  for projects not referencing WinForms.
- Call directly the RoleElevationDialog within XenAdmin without using the ElevatedSessionDelegate.
- Minor modernisation in AsyncAction.
- Launch GraphDetailsDialog in a using block.

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2020-05-04 14:30:24 +01:00
Konstantina Chremmou
5614dafbe6 CA-329742, CA-330301: Logging simplification.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2019-11-13 12:31:44 +00: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
63c6b817d5 CA-40854: The Session's uuid is in reality its opaque_ref. Use the opaque_ref so
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>
2018-02-21 14:08:01 +00:00
Konstantina Chremmou
ae22560ce8 Converted all extension get properties of the API classes to methods in order to
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>
2017-09-03 03:35:30 +01:00
Stephen Turner
eda73f1dff Fix several usage errors identified by Lexica 2017-06-20 14:29:22 +01: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
Stephen Turner
b587ab832e CP-14647: Intermediate check-in #1 2015-11-08 11:27:56 +00:00
Mihaela Stoica
1405ec29f4 CA-180128: Make RelatedTask property setter aware of ExpectDisruption flag
When the pool's ssl_legacy settings are changed, we may temporarily lose connection. The action generally copes well, because PollToCompletion is aware of the ExpectDisruption flag.
But when the action's RelatedTask is assigned, we perform more api calls, which may fail with WebException. When disruption is expected, we need to ignore it and try again on a new session (CancellingAction.DoWithSessionRetry).
2015-10-06 16:25:32 +01:00
Mihaela Stoica
cb7dcc81f4 CA-136173: Getting several notifications for one user-level action (e.g. Updating network operation creates 4 entries in the Notifications/Events view)
- Set the pool details in the action to allow proper filtering by location on the Events page
- Also, when possible, set the Host property: when setting the SR in the action, we also set the Host to SR.Home

Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
2014-07-21 11:40:26 +01:00
Konstantina Chremmou
f0cf20ec43 CA-127510: Reworked the logic of differentiating between tasks started by this instance
of XenCenter and tasks started from outside and cancelling the former when exiting
or disconnecting from the pool.

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
2014-03-11 14:30:01 +00:00
Konstantina Chremmou
62586ef89c CP-5750: Removed ActionType; the actions should be categorised by status (in progress,
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>
2013-08-09 17:20:38 +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