File tree 1 file changed +10
-0
lines changed
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -303,6 +303,11 @@ func (a *App) EnableAll() {
303
303
GroupName := a .getGroupName (g .ID )
304
304
groupCopiesSettings := a .getGroupCopiesSettings (g .ID )
305
305
copySettings := a .getRequestedCopy (groupCopiesSettings )
306
+ // skip if copy is already 'enabled'
307
+ if copySettings .RoleInfo .Role == "ACTIVE" {
308
+ fmt .Printf ("Image Access already enabled for %s -> %s\n " , a .Group , copySettings .Name )
309
+ return
310
+ }
306
311
t .GroupName = GroupName
307
312
t .GroupUID = copySettings .CopyUID .GroupUID .ID
308
313
t .ClusterUID = copySettings .CopyUID .GlobalCopyUID .ClusterUID .ID
@@ -329,6 +334,11 @@ func (a *App) EnableOne() {
329
334
var t Task
330
335
groupCopiesSettings := a .getGroupCopiesSettings (groupID )
331
336
copySettings := a .getRequestedCopy (groupCopiesSettings )
337
+ // skip if copy is already 'enabled'
338
+ if copySettings .RoleInfo .Role == "ACTIVE" {
339
+ fmt .Printf ("Image Access already enabled for %s -> %s\n " , a .Group , copySettings .Name )
340
+ return
341
+ }
332
342
t .GroupName = a .Group
333
343
t .GroupUID = copySettings .CopyUID .GroupUID .ID
334
344
t .ClusterUID = copySettings .CopyUID .GlobalCopyUID .ClusterUID .ID
You can’t perform that action at this time.
0 commit comments