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

creating proper velo client for agent deletion now #214

Merged
merged 1 commit into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ wheels/
*.sqbpro
site/
backend/file-store/api.config.yaml
backend/data/api.config.yaml
unplugin.components.d.ts
package-lock.json
*.checkpoint
Expand Down
4 changes: 2 additions & 2 deletions backend/app/agents/velociraptor/services/agents.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ async def delete_client(client_id: str) -> dict:
Returns:
dict: A dictionary containing the result of the deletion operation.
"""
universal_service = UniversalService()
universal_service = await UniversalService.create("Velociraptor")
try:
query = create_query(
f"SELECT collect_client(client_id='server', artifacts=['Server.Utils.DeleteClient'], env=dict(ClientIdList='{client_id}',ReallyDoIt='Y')) FROM scope()",
Expand All @@ -219,7 +219,7 @@ async def ensure_client_deleted(client_id: str) -> dict:
Returns:
dict: The result of the deletion operation.
"""
universal_service = UniversalService()
universal_service = await UniversalService.create("Velociraptor")
try:
query = create_query(
"SELECT collect_client(client_id='server', artifacts=['Server.Information.Clients'], env=dict()) FROM scope()",
Expand Down
Loading