@@ -137,6 +137,22 @@ def to_xml(self):
137
137
return xml_part_list
138
138
139
139
140
+ class IdsList(object):
141
+ def __init__(self, id_list):
142
+ for cur_id in id_list:
143
+ if not isinstance(cur_id, str):
144
+ raise TypeError("Ids should only contain strings")
145
+ self.id_list = id_list
146
+
147
+ def to_xml(self):
148
+ xml_id_list = xmldom.Element('Ids')
149
+ for cur_id in self.id_list:
150
+ xml_cur_id = xmldom.Element('Id')
151
+ xml_cur_id.text = cur_id
152
+ xml_id_list.append(xml_cur_id)
153
+ return xml_id_list
154
+
155
+
140
156
# Type Descriptors
141
157
142
158
@@ -3461,8 +3477,15 @@ def __init__(self, s3_data_replication_rule, initial_data_placement=None, max_bl
3461
3477
3462
3478
class ClearSuspectBlobAzureTargetsSpectraS3Request(AbstractRequest):
3463
3479
3464
- def __init__(self, force=None):
3480
+ def __init__(self, id_list, force=None):
3465
3481
super(ClearSuspectBlobAzureTargetsSpectraS3Request, self).__init__()
3482
+ if id_list is not None:
3483
+ if not (isinstance(cur_id, str) for cur_id in id_list):
3484
+ raise TypeError(
3485
+ 'ClearSuspectBlobAzureTargetsSpectraS3Request should have request payload of type: list of strings')
3486
+ xml_id_list = IdsList(id_list)
3487
+ self.body = xmldom.tostring(xml_id_list.to_xml())
3488
+
3466
3489
if force is not None:
3467
3490
self.query_params['force'] = force
3468
3491
self.path = '/_rest_/suspect_blob_azure_target'
@@ -3471,8 +3494,15 @@ def __init__(self, force=None):
3471
3494
3472
3495
class ClearSuspectBlobDs3TargetsSpectraS3Request(AbstractRequest):
3473
3496
3474
- def __init__(self, force=None):
3497
+ def __init__(self, id_list, force=None):
3475
3498
super(ClearSuspectBlobDs3TargetsSpectraS3Request, self).__init__()
3499
+ if id_list is not None:
3500
+ if not (isinstance(cur_id, str) for cur_id in id_list):
3501
+ raise TypeError(
3502
+ 'ClearSuspectBlobDs3TargetsSpectraS3Request should have request payload of type: list of strings')
3503
+ xml_id_list = IdsList(id_list)
3504
+ self.body = xmldom.tostring(xml_id_list.to_xml())
3505
+
3476
3506
if force is not None:
3477
3507
self.query_params['force'] = force
3478
3508
self.path = '/_rest_/suspect_blob_ds3_target'
@@ -3481,8 +3511,15 @@ def __init__(self, force=None):
3481
3511
3482
3512
class ClearSuspectBlobPoolsSpectraS3Request(AbstractRequest):
3483
3513
3484
- def __init__(self, force=None):
3514
+ def __init__(self, id_list, force=None):
3485
3515
super(ClearSuspectBlobPoolsSpectraS3Request, self).__init__()
3516
+ if id_list is not None:
3517
+ if not (isinstance(cur_id, str) for cur_id in id_list):
3518
+ raise TypeError(
3519
+ 'ClearSuspectBlobPoolsSpectraS3Request should have request payload of type: list of strings')
3520
+ xml_id_list = IdsList(id_list)
3521
+ self.body = xmldom.tostring(xml_id_list.to_xml())
3522
+
3486
3523
if force is not None:
3487
3524
self.query_params['force'] = force
3488
3525
self.path = '/_rest_/suspect_blob_pool'
@@ -3491,8 +3528,15 @@ def __init__(self, force=None):
3491
3528
3492
3529
class ClearSuspectBlobS3TargetsSpectraS3Request(AbstractRequest):
3493
3530
3494
- def __init__(self, force=None):
3531
+ def __init__(self, id_list, force=None):
3495
3532
super(ClearSuspectBlobS3TargetsSpectraS3Request, self).__init__()
3533
+ if id_list is not None:
3534
+ if not (isinstance(cur_id, str) for cur_id in id_list):
3535
+ raise TypeError(
3536
+ 'ClearSuspectBlobS3TargetsSpectraS3Request should have request payload of type: list of strings')
3537
+ xml_id_list = IdsList(id_list)
3538
+ self.body = xmldom.tostring(xml_id_list.to_xml())
3539
+
3496
3540
if force is not None:
3497
3541
self.query_params['force'] = force
3498
3542
self.path = '/_rest_/suspect_blob_s3_target'
@@ -3501,8 +3545,15 @@ def __init__(self, force=None):
3501
3545
3502
3546
class ClearSuspectBlobTapesSpectraS3Request(AbstractRequest):
3503
3547
3504
- def __init__(self, force=None):
3548
+ def __init__(self, id_list, force=None):
3505
3549
super(ClearSuspectBlobTapesSpectraS3Request, self).__init__()
3550
+ if id_list is not None:
3551
+ if not (isinstance(cur_id, str) for cur_id in id_list):
3552
+ raise TypeError(
3553
+ 'ClearSuspectBlobTapesSpectraS3Request should have request payload of type: list of strings')
3554
+ xml_id_list = IdsList(id_list)
3555
+ self.body = xmldom.tostring(xml_id_list.to_xml())
3556
+
3506
3557
if force is not None:
3507
3558
self.query_params['force'] = force
3508
3559
self.path = '/_rest_/suspect_blob_tape'
@@ -3808,8 +3859,15 @@ def __init__(self, bucket_id=None, storage_domain_id=None):
3808
3859
3809
3860
class MarkSuspectBlobAzureTargetsAsDegradedSpectraS3Request(AbstractRequest):
3810
3861
3811
- def __init__(self, force=None):
3862
+ def __init__(self, id_list, force=None):
3812
3863
super(MarkSuspectBlobAzureTargetsAsDegradedSpectraS3Request, self).__init__()
3864
+ if id_list is not None:
3865
+ if not (isinstance(cur_id, str) for cur_id in id_list):
3866
+ raise TypeError(
3867
+ 'MarkSuspectBlobAzureTargetsAsDegradedSpectraS3Request should have request payload of type: list of strings')
3868
+ xml_id_list = IdsList(id_list)
3869
+ self.body = xmldom.tostring(xml_id_list.to_xml())
3870
+
3813
3871
if force is not None:
3814
3872
self.query_params['force'] = force
3815
3873
self.path = '/_rest_/suspect_blob_azure_target'
@@ -3818,8 +3876,15 @@ def __init__(self, force=None):
3818
3876
3819
3877
class MarkSuspectBlobDs3TargetsAsDegradedSpectraS3Request(AbstractRequest):
3820
3878
3821
- def __init__(self, force=None):
3879
+ def __init__(self, id_list, force=None):
3822
3880
super(MarkSuspectBlobDs3TargetsAsDegradedSpectraS3Request, self).__init__()
3881
+ if id_list is not None:
3882
+ if not (isinstance(cur_id, str) for cur_id in id_list):
3883
+ raise TypeError(
3884
+ 'MarkSuspectBlobDs3TargetsAsDegradedSpectraS3Request should have request payload of type: list of strings')
3885
+ xml_id_list = IdsList(id_list)
3886
+ self.body = xmldom.tostring(xml_id_list.to_xml())
3887
+
3823
3888
if force is not None:
3824
3889
self.query_params['force'] = force
3825
3890
self.path = '/_rest_/suspect_blob_ds3_target'
@@ -3828,8 +3893,15 @@ def __init__(self, force=None):
3828
3893
3829
3894
class MarkSuspectBlobPoolsAsDegradedSpectraS3Request(AbstractRequest):
3830
3895
3831
- def __init__(self, force=None):
3896
+ def __init__(self, id_list, force=None):
3832
3897
super(MarkSuspectBlobPoolsAsDegradedSpectraS3Request, self).__init__()
3898
+ if id_list is not None:
3899
+ if not (isinstance(cur_id, str) for cur_id in id_list):
3900
+ raise TypeError(
3901
+ 'MarkSuspectBlobPoolsAsDegradedSpectraS3Request should have request payload of type: list of strings')
3902
+ xml_id_list = IdsList(id_list)
3903
+ self.body = xmldom.tostring(xml_id_list.to_xml())
3904
+
3833
3905
if force is not None:
3834
3906
self.query_params['force'] = force
3835
3907
self.path = '/_rest_/suspect_blob_pool'
@@ -3838,8 +3910,15 @@ def __init__(self, force=None):
3838
3910
3839
3911
class MarkSuspectBlobS3TargetsAsDegradedSpectraS3Request(AbstractRequest):
3840
3912
3841
- def __init__(self, force=None):
3913
+ def __init__(self, id_list, force=None):
3842
3914
super(MarkSuspectBlobS3TargetsAsDegradedSpectraS3Request, self).__init__()
3915
+ if id_list is not None:
3916
+ if not (isinstance(cur_id, str) for cur_id in id_list):
3917
+ raise TypeError(
3918
+ 'MarkSuspectBlobS3TargetsAsDegradedSpectraS3Request should have request payload of type: list of strings')
3919
+ xml_id_list = IdsList(id_list)
3920
+ self.body = xmldom.tostring(xml_id_list.to_xml())
3921
+
3843
3922
if force is not None:
3844
3923
self.query_params['force'] = force
3845
3924
self.path = '/_rest_/suspect_blob_s3_target'
@@ -3848,8 +3927,15 @@ def __init__(self, force=None):
3848
3927
3849
3928
class MarkSuspectBlobTapesAsDegradedSpectraS3Request(AbstractRequest):
3850
3929
3851
- def __init__(self, force=None):
3930
+ def __init__(self, id_list, force=None):
3852
3931
super(MarkSuspectBlobTapesAsDegradedSpectraS3Request, self).__init__()
3932
+ if id_list is not None:
3933
+ if not (isinstance(cur_id, str) for cur_id in id_list):
3934
+ raise TypeError(
3935
+ 'MarkSuspectBlobTapesAsDegradedSpectraS3Request should have request payload of type: list of strings')
3936
+ xml_id_list = IdsList(id_list)
3937
+ self.body = xmldom.tostring(xml_id_list.to_xml())
3938
+
3853
3939
if force is not None:
3854
3940
self.query_params['force'] = force
3855
3941
self.path = '/_rest_/suspect_blob_tape'
0 commit comments