-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #154 from dell/repl-get-capabilities
Add GetReplicationCapabilities
- Loading branch information
Showing
8 changed files
with
243 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[ | ||
{ | ||
"endpoint": "http://127.0.0.1", | ||
"username": "admin", | ||
"password": "Password123", | ||
"insecure": true, | ||
"isDefault": true, | ||
"systemID": "14dbbf5617523654" | ||
}, | ||
{ | ||
"endpoint": "http://127.0.0.1", | ||
"username": "admin", | ||
"password": "Password123", | ||
"skipCertificateValidation": true, | ||
"isDefault": false, | ||
"systemID": "15dbbf5617523655-system-name" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Feature: PowerFlex replication | ||
As a powerflex user, I want to test powerflex replication | ||
So that replication is known to work | ||
|
||
@replication | ||
Scenario Outline: Test GetReplicationCapabilities | ||
Given a VxFlexOS service | ||
And I use config "replication-config" | ||
And I induce error <error> | ||
When I call GetReplicationCapabilities | ||
Then the error contains <errormsg> | ||
And a <valid> replication capabilities structure is returned | ||
Examples: | ||
| error | errormsg | valid | | ||
| "none" | "none" | "true" | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
package service | ||
|
||
import ( | ||
"github.com/dell/dell-csi-extensions/replication" | ||
"golang.org/x/net/context" | ||
) | ||
|
||
func (s *service) GetReplicationCapabilities(ctx context.Context, req *replication.GetReplicationCapabilityRequest) (*replication.GetReplicationCapabilityResponse, error) { | ||
var rep = new(replication.GetReplicationCapabilityResponse) | ||
rep.Capabilities = []*replication.ReplicationCapability{ | ||
{ | ||
Type: &replication.ReplicationCapability_Rpc{ | ||
Rpc: &replication.ReplicationCapability_RPC{ | ||
Type: replication.ReplicationCapability_RPC_CREATE_REMOTE_VOLUME, | ||
}, | ||
}, | ||
}, | ||
{ | ||
Type: &replication.ReplicationCapability_Rpc{ | ||
Rpc: &replication.ReplicationCapability_RPC{ | ||
Type: replication.ReplicationCapability_RPC_CREATE_PROTECTION_GROUP, | ||
}, | ||
}, | ||
}, | ||
{ | ||
Type: &replication.ReplicationCapability_Rpc{ | ||
Rpc: &replication.ReplicationCapability_RPC{ | ||
Type: replication.ReplicationCapability_RPC_DELETE_PROTECTION_GROUP, | ||
}, | ||
}, | ||
}, | ||
{ | ||
Type: &replication.ReplicationCapability_Rpc{ | ||
Rpc: &replication.ReplicationCapability_RPC{ | ||
Type: replication.ReplicationCapability_RPC_REPLICATION_ACTION_EXECUTION, | ||
}, | ||
}, | ||
}, | ||
{ | ||
Type: &replication.ReplicationCapability_Rpc{ | ||
Rpc: &replication.ReplicationCapability_RPC{ | ||
Type: replication.ReplicationCapability_RPC_MONITOR_PROTECTION_GROUP, | ||
}, | ||
}, | ||
}, | ||
} | ||
rep.Actions = []*replication.SupportedActions{ | ||
{ | ||
Actions: &replication.SupportedActions_Type{ | ||
Type: replication.ActionTypes_FAILOVER_REMOTE, | ||
}, | ||
}, | ||
{ | ||
Actions: &replication.SupportedActions_Type{ | ||
Type: replication.ActionTypes_UNPLANNED_FAILOVER_LOCAL, | ||
}, | ||
}, | ||
{ | ||
Actions: &replication.SupportedActions_Type{ | ||
Type: replication.ActionTypes_REPROTECT_LOCAL, | ||
}, | ||
}, | ||
{ | ||
Actions: &replication.SupportedActions_Type{ | ||
Type: replication.ActionTypes_SUSPEND, | ||
}, | ||
}, | ||
{ | ||
Actions: &replication.SupportedActions_Type{ | ||
Type: replication.ActionTypes_RESUME, | ||
}, | ||
}, | ||
{ | ||
Actions: &replication.SupportedActions_Type{ | ||
Type: replication.ActionTypes_SYNC, | ||
}, | ||
}, | ||
{ | ||
Actions: &replication.SupportedActions_Type{ | ||
Type: replication.ActionTypes_CREATE_SNAPSHOT, | ||
}, | ||
}, | ||
{ | ||
Actions: &replication.SupportedActions_Type{ | ||
Type: replication.ActionTypes_ABORT_SNAPSHOT, | ||
}, | ||
}, | ||
} | ||
return rep, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters