Skip to content

Commit

Permalink
Merge pull request #90 from yunify/qingstor_snapshot
Browse files Browse the repository at this point in the history
support to specify backstore_type for snapshot
  • Loading branch information
huyujie authored Feb 22, 2021
2 parents 52df3de + 9f230d9 commit 54a2363
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions qingcloud/iaas/actions/snapshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,18 +66,20 @@ def describe_snapshots(self, snapshots=None,
def create_snapshots(self, resources,
snapshot_name=None,
is_full=0,
backstore_type=None,
**ignore):
""" Create snapshots.
@param resources: the IDs of resources you want to create snapshot for, the supported resource types are instance/volume.
@param snapshot_name: the name of the snapshot.
@param is_full: whether to create a full snapshot. 0: determined by the system. 1: should create full snapshot.
@param backstore_type: the backstore type used to store the snapshot.
"""
action = const.ACTION_CREATE_SNAPSHOTS
valid_keys = ['resources', 'snapshot_name', 'is_full']
valid_keys = ['resources', 'snapshot_name', 'is_full', 'backstore_type']
body = filter_out_none(locals(), valid_keys)
if not self.conn.req_checker.check_params(body,
required_params=["resources"],
integer_params=["is_full"],
integer_params=["is_full", 'backstore_type'],
list_params=["resources"]
):
return None
Expand Down

0 comments on commit 54a2363

Please sign in to comment.