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

New command for getting duplicate convert status #1655

Merged
merged 5 commits into from
Jun 7, 2022

Conversation

ko101
Copy link
Contributor

@ko101 ko101 commented May 27, 2022

New feature for getting duplicate split/move completion status .
Command name : duplicate-convert-status

Copy link
Member

@allmightyspiff allmightyspiff left a comment

Choose a reason for hiding this comment

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

Looks good to me, when the API for this is in production, I will merge this in.
Please comment on this pull request when that is officially available.

@@ -577,3 +577,12 @@ def convert_dep_dupe(self, volume_id):
return self.client.call('Network_Storage',
'convertCloneDependentToIndependent',
id=volume_id)

def split_percentage(self, volume_id):
"""Get the Clone split/move status completion of a duplicate volume
Copy link
Contributor

Choose a reason for hiding this comment

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

please put the link reference

Copy link
Contributor Author

@ko101 ko101 May 31, 2022

Choose a reason for hiding this comment

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

ahh.. which link reference you are asking here @caberos ...jira for API that's consuming this - https://jira.softlayer.local/browse/FBLOCK-4520

@environment.pass_env
def cli(env, volume_id):
"""Get status for split or move completed percentage of a given file duplicate volume."""
table = formatting.Table(['username', 'active_conversion_start_time', 'completed_percentage'])
Copy link
Contributor

Choose a reason for hiding this comment

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

uppercase

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@environment.pass_env
def cli(env, volume_id):
"""Get status for split or move completed percentage of a given file duplicate volume."""
table = formatting.Table(['username', 'active_conversion_start_time', 'completed_percentage'])
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
table = formatting.Table(['username', 'active_conversion_start_time', 'completed_percentage'])
table = formatting.Table(['Username', 'Active conversion start', 'Completed percentage'])

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done


file_manager = SoftLayer.FileStorageManager(env.client)

value = file_manager.split_percentage(
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
value = file_manager.split_percentage(
value = file_manager.split_percentage(volume_id)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done


block_manager = SoftLayer.BlockStorageManager(env.client)

value = block_manager.split_percentage(
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
value = block_manager.split_percentage(
value = block_manager.split_percentage(volume_id)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link
Contributor

@caberos caberos left a comment

Choose a reason for hiding this comment

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

LGTM

@ko101
Copy link
Contributor Author

ko101 commented May 31, 2022

Attached images for review
help working
incorrect id provided
ineligible state scenrio
Success SS for file
when conver process completed
When there are no active trxn or type != Clone:dulplicate
Success SS for block

@ko101
Copy link
Contributor Author

ko101 commented Jun 7, 2022

Hi @allmightyspiff , the api has released yesterday IST, Requesting you to please merge this PR.
Thankyou

@allmightyspiff allmightyspiff merged commit e8f1417 into softlayer:master Jun 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLI Storage Storage Systems
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Feature(cmd) needed for fetching volume clone split/move percentage
3 participants