Skip to content

Commit fc60d44

Browse files
authored
feat(release): Update SDK to use API released on 2023-05-02 (#53)
Signed-off-by: Deepak Selvakumar <[email protected]>
1 parent f48e7ec commit fc60d44

File tree

5 files changed

+29418
-18501
lines changed

5 files changed

+29418
-18501
lines changed

examples/test_vpc_v1_examples.py

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -961,6 +961,112 @@ def test_update_image_example(self):
961961
except ApiException as e:
962962
pytest.fail(str(e))
963963

964+
@needscredentials
965+
def test_list_image_export_jobs_example(self):
966+
"""
967+
list_image_export_jobs request example
968+
"""
969+
try:
970+
print('\nlist_image_export_jobs() result:')
971+
# begin-list_image_export_jobs
972+
973+
response = vpc_service.list_image_export_jobs(
974+
image_id=data['imageId']
975+
)
976+
image_export_job_unpaginated_collection = response.get_result()
977+
978+
# end-list_image_export_jobs
979+
assert image_export_job_unpaginated_collection is not None
980+
except ApiException as e:
981+
pytest.fail(str(e))
982+
983+
@needscredentials
984+
def test_create_image_export_job_example(self):
985+
"""
986+
create_image_export_job request example
987+
"""
988+
try:
989+
print('\ncreate_image_export_job() result:')
990+
# begin-create_image_export_job
991+
992+
cloud_object_storage_bucket_identity_model = {
993+
'name': 'bucket-27200-lwx4cfvcue',
994+
}
995+
996+
image_export_job = vpc_service.create_image_export_job(
997+
image_id=data['imageId'],
998+
name='my-image-export-job',
999+
storage_bucket=cloud_object_storage_bucket_identity_model
1000+
).get_result()
1001+
1002+
# end-create_image_export_job
1003+
assert image_export_job is not None
1004+
data['imageExportJobId']=image_export_job['id']
1005+
except ApiException as e:
1006+
pytest.fail(str(e))
1007+
1008+
@needscredentials
1009+
def test_get_image_export_job_example(self):
1010+
"""
1011+
get_image_export_job request example
1012+
"""
1013+
try:
1014+
print('\nget_image_export_job() result:')
1015+
# begin-get_image_export_job
1016+
1017+
image_export_job = vpc_service.get_image_export_job(
1018+
image_id=data['imageId'],
1019+
id=data['imageExportJobId']
1020+
).get_result()
1021+
1022+
# end-get_image_export_job
1023+
assert image_export_job is not None
1024+
except ApiException as e:
1025+
pytest.fail(str(e))
1026+
1027+
@needscredentials
1028+
def test_update_image_export_job_example(self):
1029+
"""
1030+
update_image_export_job request example
1031+
"""
1032+
try:
1033+
print('\nupdate_image_export_job() result:')
1034+
# begin-update_image_export_job
1035+
1036+
image_export_job_patch_model = {
1037+
'name' : 'my-image-export-job-updated'
1038+
}
1039+
1040+
image_export_job = vpc_service.update_image_export_job(
1041+
image_id=data['imageId'],
1042+
id=data['imageExportJobId'],
1043+
image_export_job_patch=image_export_job_patch_model
1044+
).get_result()
1045+
1046+
# end-update_image_export_job
1047+
assert image_export_job is not None
1048+
except ApiException as e:
1049+
pytest.fail(str(e))
1050+
1051+
@needscredentials
1052+
def test_delete_image_export_job_example(self):
1053+
"""
1054+
delete_image_export_job request example
1055+
"""
1056+
try:
1057+
# begin-delete_image_export_job
1058+
1059+
response = vpc_service.delete_image_export_job(
1060+
image_id=data['imageId'],
1061+
id=data['imageExportJobId']
1062+
)
1063+
1064+
# end-delete_image_export_job
1065+
print('\ndelete_image_export_job() response status code: ', response.get_status_code())
1066+
1067+
except ApiException as e:
1068+
pytest.fail(str(e))
1069+
9641070
@needscredentials
9651071
def test_list_operating_systems_example(self):
9661072
"""

0 commit comments

Comments
 (0)