Skip to content

Commit 547c2ba

Browse files
authored
Adding Powermax replication group action (#318)
1 parent cb994ce commit 547c2ba

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

repctl/pkg/cmd/action.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright © 2021-2023 Dell Inc. or its subsidiaries. All Rights Reserved.
2+
Copyright © 2021-2025 Dell Inc. or its subsidiaries. All Rights Reserved.
33

44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
@@ -38,7 +38,8 @@ For single or multi-cluster config:
3838
./repctl --rg <rg-id> exec -a <ACTION>
3939
repctl --rg <rg-id> exec -a suspend
4040
repctl --rg <rg-id> exec -a resume
41-
repctl --rg <rg-id> exec -a sync`,
41+
repctl --rg <rg-id> exec -a sync
42+
repctl --rg <rg-id> exec -a establish`,
4243
Long: `
4344
This command will perform a maintenance on current source site. repctl will patch the CR with specified <ACTION>`,
4445
Run: func(cmd *cobra.Command, args []string) {
@@ -106,6 +107,8 @@ func getSupportedMaintenanceAction(action string) (string, error) {
106107
return config.ActionSuspend, nil
107108
case "sync":
108109
return config.ActionSync, nil
110+
case "establish":
111+
return config.ActionEstablish, nil
109112
}
110113
return "", fmt.Errorf("not a supported action")
111114
}

repctl/pkg/cmd/action_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ func TestGetSupportedMaintenanceAction(t *testing.T) {
226226
{"resume", config.ActionResume, nil},
227227
{"suspend", config.ActionSuspend, nil},
228228
{"sync", config.ActionSync, nil},
229+
{"establish", config.ActionEstablish, nil},
229230
{"invalid", "", fmt.Errorf("not a supported action")},
230231
}
231232

repctl/pkg/config/constants.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright © 2021-2023 Dell Inc. or its subsidiaries. All Rights Reserved.
2+
Copyright © 2021-2025 Dell Inc. or its subsidiaries. All Rights Reserved.
33

44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
@@ -30,6 +30,7 @@ const (
3030
ActionSuspend = "SUSPEND"
3131
ActionResume = "RESUME"
3232
ActionSync = "SYNC"
33+
ActionEstablish = "ESTABLISH"
3334
ActionCreateSnapshot = "CREATE_SNAPSHOT"
3435
Verbose = "verbose"
3536
)

0 commit comments

Comments
 (0)