Skip to content

Commit f71aed3

Browse files
committed
support to specify backstore_type for snapshot
1 parent 949c5e7 commit f71aed3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

qingcloud/iaas/actions/snapshot.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,18 +66,20 @@ def describe_snapshots(self, snapshots=None,
6666
def create_snapshots(self, resources,
6767
snapshot_name=None,
6868
is_full=0,
69+
backstore_type=None,
6970
**ignore):
7071
""" Create snapshots.
7172
@param resources: the IDs of resources you want to create snapshot for, the supported resource types are instance/volume.
7273
@param snapshot_name: the name of the snapshot.
7374
@param is_full: whether to create a full snapshot. 0: determined by the system. 1: should create full snapshot.
75+
@param backstore_type: the backstore type used to store the snapshot.
7476
"""
7577
action = const.ACTION_CREATE_SNAPSHOTS
76-
valid_keys = ['resources', 'snapshot_name', 'is_full']
78+
valid_keys = ['resources', 'snapshot_name', 'is_full', 'backstore_type']
7779
body = filter_out_none(locals(), valid_keys)
7880
if not self.conn.req_checker.check_params(body,
7981
required_params=["resources"],
80-
integer_params=["is_full"],
82+
integer_params=["is_full", 'backstore_type'],
8183
list_params=["resources"]
8284
):
8385
return None

0 commit comments

Comments
 (0)