Skip to content
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

[ ENH ] Update all performXYZAction operations to allow for specifying the action parameter payload by name (as a keyword). #647

Closed
jshcodes opened this issue May 7, 2022 · 0 comments · Fixed by #648
Assignees
Labels
device control Device Control Policies issues and questions enhancement 🌟 New feature or request firewall Firewall Policies and Management issues and questions hosts Hosts or Host Groups issues and questions incidents Incidents issues and questions prevention policies Prevention Policies issues and questions RTR Real Time Response issues and questions SDK usage General SDK usage issues and questions sensor update Sensor Update Policy issues and questions

Comments

@jshcodes
Copy link
Member

jshcodes commented May 7, 2022

Describe the bug
For all operations where the action_parameter branch of the body payload only allows for one value (example: group_id in performSensorUpdatePoliciesAction) so that developers do not have to specify a list of dictionaries for the action_parameters keyword.

UPDATE
This change will speak to all Service Classes handling payloads with action_parameters, including ones that have multiple action_parameters available. (Example: Incidents Service Class)

To Reproduce
The current pattern is:

action_parameters = {
    "name": "group_id",
    "value": "string"
}
result = sensor_update_policies.perform_policies_action(ids=id_list,
                                                        action_parameters=[action_parameters],
                                                        action_name="add-host-group"
                                                        )

Expected behavior
Move the pattern to:

result = sensor_update_policies.perform_policies_action(ids=id_list,
                                                        group_id=group_id,
                                                        action_name="add-host-group"
                                                        )

Environment (please complete the following information):

  • OS: All supported
  • Python: All supported
  • FalconPy: <=1.0.10
@jshcodes jshcodes added enhancement 🌟 New feature or request SDK usage General SDK usage issues and questions labels May 7, 2022
@jshcodes jshcodes self-assigned this May 7, 2022
jshcodes added a commit that referenced this issue May 9, 2022
jshcodes added a commit that referenced this issue May 9, 2022
jshcodes added a commit that referenced this issue May 9, 2022
jshcodes added a commit that referenced this issue May 9, 2022
@jshcodes jshcodes added sensor update Sensor Update Policy issues and questions RTR Real Time Response issues and questions hosts Hosts or Host Groups issues and questions firewall Firewall Policies and Management issues and questions device control Device Control Policies issues and questions incidents Incidents issues and questions prevention policies Prevention Policies issues and questions labels May 9, 2022
@jshcodes jshcodes changed the title [ ENH ] Update all performXYZAction operations to allow for specifying the action parameter payload by name. [ ENH ] Update all performXYZAction operations to allow for specifying the action parameter payload by name (as a keyword). May 9, 2022
jshcodes added a commit that referenced this issue May 9, 2022
jshcodes added a commit that referenced this issue May 9, 2022
jlangdev pushed a commit that referenced this issue May 9, 2022
jlangdev pushed a commit that referenced this issue May 9, 2022
jlangdev pushed a commit that referenced this issue May 9, 2022
jlangdev pushed a commit that referenced this issue May 9, 2022
jlangdev pushed a commit that referenced this issue May 9, 2022
jlangdev pushed a commit that referenced this issue May 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
device control Device Control Policies issues and questions enhancement 🌟 New feature or request firewall Firewall Policies and Management issues and questions hosts Hosts or Host Groups issues and questions incidents Incidents issues and questions prevention policies Prevention Policies issues and questions RTR Real Time Response issues and questions SDK usage General SDK usage issues and questions sensor update Sensor Update Policy issues and questions
Projects
None yet
1 participant