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

Implement commands' expansion logic #88

Open
Tracked by #349
AlexRuiz7 opened this issue Oct 2, 2024 · 0 comments
Open
Tracked by #349

Implement commands' expansion logic #88

AlexRuiz7 opened this issue Oct 2, 2024 · 0 comments
Labels
level/task Task issue type/enhancement Enhancement issue

Comments

@AlexRuiz7
Copy link
Member

AlexRuiz7 commented Oct 2, 2024

Description

The Command Manager plugin processes the commands received from its Rest API before persisting the information into the .commands index. The processing of these commands consists of:

  • Expanding the commands whose type is agent_groups.
    To expand this type of commands which are targeted to a group of agents, the Command Manager plugin needs to generate a processed command for each of the agents that belong to that group. For example, if the group has N agents, N commands need to be generated, inheriting the command details from the raw command.
  • Transform the received data into the commands data model.

Pre-requisites

  • That .agents index must exist, so the Command Manager can query their info (groups).
  • The commands index template exists.*

Functional requirements

  • All the commands are transformed from the API Model to the Index model.
  • The commands whose type is agent_groups are expanded to as many agents as there are in the target group (target field in the API model).
  • The processed commands are indexed into the .commands index.
---
title: Command Manager - Command expansion diagram
---
stateDiagram-v2

    [*] --> REST_API: command as JSON
    REST_API --> Command_Model: command JSON validation
    Command_Model --> Expansion: command expansion
    Expansion --> Order_Model: command → order
    Order_Model --> Index
    Index --> [*]
Loading
  • Suitable to change. The command's data model must fit the data after the expansion, not before, as it's made currently.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
level/task Task issue type/enhancement Enhancement issue
Projects
Status: Backlog
Development

No branches or pull requests

1 participant