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

Refactored restore resource #63

Merged
merged 4 commits into from
Jun 23, 2020
Merged

Refactored restore resource #63

merged 4 commits into from
Jun 23, 2020

Conversation

VenkateshRavula
Copy link
Contributor

@VenkateshRavula VenkateshRavula commented Jun 15, 2020

Description

Refactored restore resource

Issues Resolved

Fixes #23

Check List

  • New functionality includes testing.
    • All tests pass for Python 2.7+ & 3.4+($ tox).
  • New functionality has been documented in the README if applicable.
    • New functionality has been thoroughly documented in the examples (please include helpful comments).
    • New endpoints supported are updated in the endpoints-support.md file.
  • Changes are documented in the CHANGELOG.

def test_restore_should_be_called_once(self, mock_create):
restore = {
"uriOfBackupToRestore": "/rest/backups/example_backup_2014-03-06_023131"
}
self.resource.restore(restore)

mock_create.assert_called_once_with(restore, timeout=-1, default_values=self.resource.DEFAULT_VALUES)
mock_create.assert_called_once_with(restore, timeout=-1)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why arent we using default values here, any reason to it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this refactored code is using the new base class (Resource) and in that class we are handling those default_values. So need to pass them in resource library.

Copy link
Contributor

@AsisBagga AsisBagga left a comment

Choose a reason for hiding this comment

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

👍 LGTM

@VenkateshRavula VenkateshRavula merged commit bbf3616 into master Jun 23, 2020
@VenkateshRavula VenkateshRavula deleted the Restore branch June 23, 2020 05:46
spapinwar12 pushed a commit that referenced this pull request May 16, 2022
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.

MISSING_JSON_TYPE error code is thrown when attempting to restore the appliance
3 participants