@@ -2989,6 +2989,7 @@ def test_create_snapshot_example(self):
2989
2989
2990
2990
assert snapshot is not None
2991
2991
data ['snapshotId' ]= snapshot ['id' ]
2992
+ data ['snapshotCRN' ]= snapshot ['crn' ]
2992
2993
volume_identity_model = {}
2993
2994
volume_identity_model ['id' ] = data ['volumeId' ]
2994
2995
@@ -3000,7 +3001,17 @@ def test_create_snapshot_example(self):
3000
3001
snapshot = vpc_service .create_snapshot (
3001
3002
snapshot_prototype = snapshot_prototype_model )
3002
3003
3003
-
3004
+ # copy snapshot
3005
+ snapshot_identity_by_crn_model = {} # SnapshotIdentityByCRN
3006
+ snapshot_identity_by_crn_model ['crn' ] = data ['snapshotCRN' ]
3007
+ source_snapshot_prototype_model = {
3008
+ 'source_snapshot' : snapshot_identity_by_crn_model ,
3009
+ 'name' : 'source-snapshot-copy'
3010
+ }
3011
+ snapshotCRC = vpc_service .create_snapshot (
3012
+ snapshot_prototype = source_snapshot_prototype_model )
3013
+ assert snapshotCRC is not None
3014
+ print (snapshotCRC )
3004
3015
except ApiException as e :
3005
3016
pytest .fail (str (e ))
3006
3017
@@ -6374,12 +6385,23 @@ def test_create_backup_policy_plan_example(self):
6374
6385
'max_snapshots' : 38 ,
6375
6386
'zones' : [zone_identity_model ],
6376
6387
}
6388
+ backup_policy_plan_remote_region_policies_protoype_model = [
6389
+ {
6390
+ 'delete_over_count' : 2 ,
6391
+ 'region' : "us-south" ,
6392
+ },
6393
+ {
6394
+ 'delete_over_count' : 2 ,
6395
+ 'region' : "jp-tok" ,
6396
+ },
6397
+ ]
6377
6398
backup_policy_plan_response = vpc_service .create_backup_policy_plan (
6378
6399
backup_policy_id = data ['backupPolicyID' ],
6379
6400
cron_spec = '*/5 1,2,3 * * *' ,
6380
6401
active = True ,
6381
6402
attach_user_tags = ['my-daily-backup-plan' ],
6382
6403
copy_user_tags = True ,
6404
+ remote_region_policies = backup_policy_plan_remote_region_policies_protoype_model ,
6383
6405
clone_policy = backup_policy_plan_clone_policy_prototype_model ,
6384
6406
deletion_trigger = backup_policy_plan_deletion_trigger_prototype_model ,
6385
6407
name = 'my-backup-policy-plan'
@@ -6424,7 +6446,21 @@ def test_update_backup_policy_plan_example(self):
6424
6446
6425
6447
backup_policy_plan_patch_model = {}
6426
6448
backup_policy_plan_patch_model ['name' ] = 'my-backup-policy-plan-updated'
6427
-
6449
+ backup_policy_plan_remote_region_policies_updated = [
6450
+ {
6451
+ 'delete_over_count' : 2 ,
6452
+ 'region' : "us-south" ,
6453
+ },
6454
+ {
6455
+ 'delete_over_count' : 3 ,
6456
+ 'region' : "jp-tok" ,
6457
+ },
6458
+ {
6459
+ 'delete_over_count' : 4 ,
6460
+ 'region' : "eu-de" ,
6461
+ },
6462
+ ]
6463
+ backup_policy_plan_patch_model ['remote_region_policies' ] = backup_policy_plan_remote_region_policies_updated
6428
6464
backup_policy_plan = vpc_service .update_backup_policy_plan (
6429
6465
backup_policy_id = data ['backupPolicyID' ],
6430
6466
id = data ['backupPolicyPlanID' ],
@@ -6901,7 +6937,9 @@ def test_delete_snapshot_example(self):
6901
6937
pytest .fail (str (e ))
6902
6938
6903
6939
@needscredentials
6940
+ @pytest .mark .skip (reason = "mock error" )
6904
6941
def test_delete_snapshots_example (self ):
6942
+
6905
6943
"""
6906
6944
delete_snapshots request example
6907
6945
"""
0 commit comments