From e7c89ce1d995768804ecc989b8178abffb220ace Mon Sep 17 00:00:00 2001 From: Ziming Zhang Date: Thu, 16 Jul 2020 19:19:18 +0800 Subject: [PATCH] fix SWR replication adapter pull-based Signed-off-by: Ziming Zhang --- .../adapter/huawei/huawei_adapter.go | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/src/replication/adapter/huawei/huawei_adapter.go b/src/replication/adapter/huawei/huawei_adapter.go index 4bd18c062..d1c2f9ce1 100644 --- a/src/replication/adapter/huawei/huawei_adapter.go +++ b/src/replication/adapter/huawei/huawei_adapter.go @@ -59,11 +59,23 @@ type adapter struct { // Info gets info about Huawei SWR func (a *adapter) Info() (*model.RegistryInfo, error) { registryInfo := model.RegistryInfo{ - Type: model.RegistryTypeHuawei, - Description: "Adapter for SWR -- The image registry of Huawei Cloud", - SupportedResourceTypes: []model.ResourceType{model.ResourceTypeImage}, - SupportedResourceFilters: []*model.FilterStyle{}, - SupportedTriggers: []model.TriggerType{}, + Type: model.RegistryTypeHuawei, + Description: "Adapter for SWR -- The image registry of Huawei Cloud", + SupportedResourceTypes: []model.ResourceType{model.ResourceTypeImage}, + SupportedResourceFilters: []*model.FilterStyle{ + { + Type: model.FilterTypeName, + Style: model.FilterStyleTypeText, + }, + { + Type: model.FilterTypeTag, + Style: model.FilterStyleTypeText, + }, + }, + SupportedTriggers: []model.TriggerType{ + model.TriggerTypeManual, + model.TriggerTypeScheduled, + }, } return ®istryInfo, nil }