Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metro volume configure/end #131

Merged
merged 27 commits into from
Sep 5, 2024
Merged

Conversation

lukeatdell
Copy link
Contributor

@lukeatdell lukeatdell commented Sep 4, 2024

Description

Adding support for volume endpoint actions, configure_metro and end_metro to configure and end metro replication at a volume level.

  • Update go modules.
  • Added unit and integration tests for both configure_metro and end_metro.
  • Refactored some int and unit tests whose outcome was effected by re-usage of the API client.
  • Randomized int test execution order to expose issues related to API client re-usage.
  • Updated ReplicationSession struct to support the session type.
  • Updated RemoteSystem struct to support data_connection_state and capabilities.

GitHub Issues

List the GitHub issues impacted by this PR:

GitHub Issue #
dell/csm#1443

Common PR Checklist:

  • Have you made sure that the code compiles?
  • Have you commented your code, particularly in hard-to-understand areas
  • Have you maintained backward compatibility

Testing

Integration Tests

Main

compute_differences test was failing due to reuse of API client between tests.

image

This PR

image


Unit Tests

Main

Tests were failing due to a missed update to json field that was changed from volume_group to volume_groups.

image
image

This PR

image
image

- refactoring MetroConfig and MetroSessionId type for compatibility with json decoder.
- refactoring tests to match types.
- fixing asser.Equal implementations to put correct variables in "expected" and "actual" arguments.
- updating configure-metro tests to end metro before deleting test vols.
- modifying tests to get new clients before testing in order to create a clean testing environments
- Suite setup will get all remote systems and iterate over them, trying to find one with Metro capabilities and in good connected state
- Removed previous need for env GOPOWERSTORE_REMOTE_NAME
santhoshatdell
santhoshatdell previously approved these changes Sep 5, 2024
client.go Outdated Show resolved Hide resolved
volume_types.go Outdated Show resolved Hide resolved
api/api.go Show resolved Hide resolved
inttests/common.go Show resolved Hide resolved
if err != nil {
log.Printf("%s file not found.", envVarsFile)
}
client, err = gopowerstore.NewClient()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does NewClient use the session tokens if already logged into the array?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe, based on a quick review, the client will get a new token for each new client.

@santhoshatdell santhoshatdell changed the title Usr/luke lau/metro volume create Metro volume configure/end Sep 5, 2024
@lukeatdell lukeatdell merged commit 7ed2ae2 into main Sep 5, 2024
4 checks passed
@lukeatdell lukeatdell deleted the usr/luke-lau/metro-volume-create branch September 5, 2024 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants