-
Notifications
You must be signed in to change notification settings - Fork 919
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add task manager and collector #2535
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @embano1 , +1 for adding this. We can probably find a way around the import issue, I'll try to take a look at that soon. I can also help with the vcsim support
That'd be great Doug. No rush, I'm on PTO and will get back to this in a couple of weeks. Pretty sure you have found a workaround by then :) |
TODOs:
|
@dougm ready for review. Updated PR notes incl. breaking changes related to the events package. Something odd I found is that while the EventHistoryCollector returns items sorted in ascending order (by eventID), TaskHistoryCollector returns tasks sorted in descending order (by taskID). I don't see any code differences between the events and task implementation or how to influence this. So pretty sure this is server behavior then? |
This change introduces a task manager (https://vdc-download.vmware.com/vmwb-repository/dcr-public/8946c1b6-2861-4c12-a45f-f14ae0d3b1b9/a5b8094c-c222-4307-9399-3b606a04af55/vim.TaskManager.html) with support for creating a task history collector. History collector is moved from object into its own package and changes were made to the event package accordingly (collector logic is shared between task and event manager). BREAKING: `event.Manager` does not embed `object.Common` anymore. Only the methods `Client()` and `Reference()` are implemented. `event.NewHistoryCollector()` is now unexported (to `newHistoryCollector()`) as it was merely a helper and to comply with the task manager implementation. Closes: vmware#2497 Signed-off-by: Michael Gasch <[email protected]>
Not sure, I've yet to try TaskHistoryCollector, but yes sounds like it's server behavior. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, thanks @embano1 !
Prior to vmware#2535 both managers implemented mo.Reference via the embedded 'object.Common' field, but that field was removed.
Prior to vmware#2535 both managers implemented mo.Reference via the embedded 'object.Common' field, but that field was removed.
Prior to vmware#2535 both managers implemented mo.Reference via the embedded 'object.Common' field, but that field was removed.
Description
This change introduces a task manager (https://vdc-download.vmware.com/vmwb-repository/dcr-public/8946c1b6-2861-4c12-a45f-f14ae0d3b1b9/a5b8094c-c222-4307-9399-3b606a04af55/vim.TaskManager.html) with support for creating a task history collector.
History collector is moved from
object
into its own package and changes were made to the event package accordingly (collector logic is shared between task and event manager).Notes:
vcsim
#2567)HistoryCollector
fromobject
to its own package to avoid cyclic importsCreateTask
method not implemented (not sure if this is useful), can be added later if need tonewHistoryCollector
not exported since it's merely a helper and does not add value to external API IMHOevent.Manager
does not embedobject.Common
anymore. Only the methodsClient()
andReference()
were implemented.event.NewHistoryCollector()
is now unexported (newHistoryCollector()
) as it was merely a helper and to comply with the task manager implementation.Closes: #2497
Signed-off-by: Michael Gasch [email protected]
Type of change
Please mark options that are relevant:
not work as expected)
How Has This Been Tested?
Tested example against vCenter 6.7.
Test Configuration:
Checklist:
this project