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

[feat]tools-v2:curve bs delete volume snapshot #2637

Closed

Conversation

lng2020
Copy link
Contributor

@lng2020 lng2020 commented Jul 20, 2023

What problem does this PR solve?

Issue Number: #2578

Problem Summary: add curve bs delete volume snapshot command

What is changed and how it works?

What's Changed: ./pkg/cli/command/curvebs/delete/snapshot, ./pkg/cli/command/curvebs/delete/delete.go and ./pkg/config/bs.go

How it Works: Use the filename (path flag) and sequence number to send a deleteSnapShotRequest RPC to remove a snapshot

Side effects(Breaking backward compatibility? Performance regression?):

Check List

  • Relevant documentation/comments is changed or added
  • I acknowledge that all my contributions will be made under the project's license

@Cyber-SiKu
Copy link
Contributor

cicheck

@Cyber-SiKu
Copy link
Contributor

fix dco error.

@lng2020 lng2020 force-pushed the feature/curve-bs-delete-snapshot branch from 2da7e17 to 30fa137 Compare July 21, 2023 08:06
Copy link
Contributor

@Cyber-SiKu Cyber-SiKu left a comment

Choose a reason for hiding this comment

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

The command is best as follows, otherwise it will be confused with copyset

curve bs delete volume snapshot

@Cyber-SiKu
Copy link
Contributor

@lng2020 continue?

@lng2020 lng2020 force-pushed the feature/curve-bs-delete-snapshot branch from 30fa137 to a7f9a88 Compare August 23, 2023 13:57
@lng2020 lng2020 changed the title [feat]tools-v2:curve bs delete snapshot [feat]tools-v2:curve bs delete volume snapshot Aug 23, 2023
Cyber-SiKu
Cyber-SiKu previously approved these changes Sep 5, 2023
Copy link
Contributor

@Cyber-SiKu Cyber-SiKu left a comment

Choose a reason for hiding this comment

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

def delete_or_cancel_snapshot(method, uuid, user, file):
params = None
if user and uuid:
params = {'Action':method, 'Version':'0.0.6', 'User':user, 'UUID':uuid, 'File':file}
if params is None:
return -1
jsonobj = query(params)
if jsonobj['Code'] != '0':
print('%s uuid=%s, user=%s failed, ecode=%s, etext=%s' % (method, uuid, user, jsonobj['Code'], errcodelist[jsonobj['Code']]))
return -1
print('%s uuid=%s, user=%s success' % (method, uuid, user))
return 0

What want to achieve is this

@@ -0,0 +1,166 @@
/*
Copy link
Contributor

Choose a reason for hiding this comment

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

add license

@Cyber-SiKu
Copy link
Contributor

You can refer to this pr

@caoxianfei1
Copy link
Contributor

@lng2020 rebase and fix the conflicts.

@lng2020 lng2020 force-pushed the feature/curve-bs-delete-snapshot branch from a7f9a88 to 9e3fefb Compare September 25, 2023 13:22
@Cyber-SiKu
Copy link
Contributor

What want to achieve is this

There seems to be no modification?

@caoxianfei1
Copy link
Contributor

some conflict to fix.

@caoxianfei1
Copy link
Contributor

another has complete it by taking part in activitiy.

@caoxianfei1
Copy link
Contributor

I will close it. If you have some suggession, can reopen it again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants