Skip to content

Commit

Permalink
Add enableCapabilities to extraAttrs for stop (#20299)
Browse files Browse the repository at this point in the history
Signed-off-by: stonezdj <stone.zhang@broadcom.com>
  • Loading branch information
stonezdj authored Apr 19, 2024
1 parent b3dc183 commit 0d9dc4b
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/controller/scan/base_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,11 @@ const (
artfiactKey = "artifact"
registrationKey = "registration"

artifactIDKey = "artifact_id"
artifactTagKey = "artifact_tag"
reportUUIDsKey = "report_uuids"
robotIDKey = "robot_id"
artifactIDKey = "artifact_id"
artifactTagKey = "artifact_tag"
reportUUIDsKey = "report_uuids"
robotIDKey = "robot_id"
enabledCapabilities = "enabled_capabilities"
)

// uuidGenerator is a func template which is for generating UUID.
Expand Down Expand Up @@ -317,6 +318,9 @@ func (bc *basicController) Scan(ctx context.Context, artifact *ar.Artifact, opti
"id": r.ID,
"name": r.Name,
},
enabledCapabilities: map[string]interface{}{
"type": opts.GetScanType(),
},
}
if op := operator.FromContext(ctx); op != "" {
extraAttrs["operator"] = op
Expand Down

0 comments on commit 0d9dc4b

Please sign in to comment.