Skip to content

Commit 0d9dc4b

Browse files
authored
Add enableCapabilities to extraAttrs for stop (goharbor#20299)
Signed-off-by: stonezdj <stone.zhang@broadcom.com>
1 parent b3dc183 commit 0d9dc4b

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/controller/scan/base_controller.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,11 @@ const (
7070
artfiactKey = "artifact"
7171
registrationKey = "registration"
7272

73-
artifactIDKey = "artifact_id"
74-
artifactTagKey = "artifact_tag"
75-
reportUUIDsKey = "report_uuids"
76-
robotIDKey = "robot_id"
73+
artifactIDKey = "artifact_id"
74+
artifactTagKey = "artifact_tag"
75+
reportUUIDsKey = "report_uuids"
76+
robotIDKey = "robot_id"
77+
enabledCapabilities = "enabled_capabilities"
7778
)
7879

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

0 commit comments

Comments
 (0)