-
Notifications
You must be signed in to change notification settings - Fork 0
Cmd results #13
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
Cmd results #13
Conversation
can you an alias an output? i this breaking is going to cause us problems, I'd rather just point the old to the new. |
@alanag13 You were right, this is what they want. |
file_results = CommandResults( | ||
outputs_prefix="File", outputs_key_field=None, outputs=file_context | ||
) | ||
return code42_results, file_results |
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.
@kiran-chaudhary The way it is set up, these commands are allowed to return 1 or more CommandResults objects. This command is the only one that returns more than one. The reason for this is because they have different outputs_prefix
properties, which is important when digging through Incident Context looking at the Outputs - and mapping outputs to different things, etc. Our integration modifies the system "File" outputs (line 744) as well as our own custom-defined Code42 outputs.
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.
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
This is the new way we are supposed to return stuff from Commands. The old way is deprecated and I was asked to change it. There are no changes in usage.
Also squeezes in some missing changelog entries (the only breaking changes). Which by the way could cause problems for us.