-
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
vcsim: add TaskHistoryCollector support #3389
Conversation
0b50b63
to
3eb9981
Compare
e63976a
to
cfe7f17
Compare
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 @dougm !
simulator/task_manager.go
Outdated
@@ -43,29 +46,96 @@ func (m *TaskManager) init(r *Registry) { | |||
m.Description = esx.Description | |||
} | |||
} | |||
|
|||
if m.MaxCollector == 0 { | |||
m.MaxCollector = 1000 |
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.
We should probably make this a well-documented constant.
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.
Added a var maxCollectors
. Looks like VC's default is 32 and can be changed w/ OptionManager, but don't have a use-case to support that yet.
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.
Should it be a constant that we can adjust as needed? Is there any reason it should be a variable?
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.
If we end up with a use-case to support changing the max via OptionManager, then we'd need a variable. But I just clumped it into the existing set of non-exported var (...)
, do we gain anything by making it a constant?
TaskHistoryCollector provides a way to collect Task history beyond the 10 minute max of the 'RecentTask' property. And unlike 'RecentTask', can filter based on Task state and collect tasks of child entities. refactor portions of 'EventHistoryCollector' to 'HistoryCollector' for use with 'TaskHistoryCollector' govc: add history flags to 'tasks' command Closes vmware#2567
cfe7f17
to
4cec059
Compare
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! I left one more comment about var versus constant, but I do not feel strongly about it. Thanks again @dougm !
Thanks @akutz ! |
refactor portions of 'EventHistoryCollector' to 'HistoryCollector' for use with 'TaskHistoryCollector'
TaskHistoryCollector provides a way to collect Task history beyond the 10 minute max of the 'RecentTask' property.
And unlike 'RecentTask', can filter based on Task state and collect tasks of child entities.
govc: add history flags to 'tasks' command
Closes #2567