1010import pytest
1111
1212from ads .jobs .ads_job import Job
13- from ads .jobs .builders .infrastructure import DSCFileStorage , DataScienceJob
13+ from ads .jobs .builders .infrastructure import OCIFileStorage , DataScienceJob
1414from ads .jobs .builders .runtimes .python_runtime import PythonRuntime
1515
1616try :
7171 .with_shape_config_details (memory_in_gbs = 16 , ocpus = 1 )
7272 .with_block_storage_size (50 )
7373 .with_storage_mount (
74- DSCFileStorage (
74+ OCIFileStorage (
7575 destination_directory_name = "test_mount_one" ,
7676 mount_target = "test_mount_target_one" ,
7777 export_path = "test_export_path_one" ,
@@ -134,14 +134,14 @@ class TestDataScienceJobMountFileSystem(unittest.TestCase):
134134 def test_data_science_job_initialize (self ):
135135 assert isinstance (job .infrastructure .storage_mount , list )
136136 dsc_file_storage_one = job .infrastructure .storage_mount [0 ]
137- assert isinstance (dsc_file_storage_one , DSCFileStorage )
137+ assert isinstance (dsc_file_storage_one , OCIFileStorage )
138138 assert dsc_file_storage_one .storage_type == "FILE_STORAGE"
139139 assert dsc_file_storage_one .destination_directory_name == "test_mount_one"
140140 assert dsc_file_storage_one .mount_target == "test_mount_target_one"
141141 assert dsc_file_storage_one .export_path == "test_export_path_one"
142142
143143 dsc_file_storage_two = job .infrastructure .storage_mount [1 ]
144- assert isinstance (dsc_file_storage_two , DSCFileStorage )
144+ assert isinstance (dsc_file_storage_two , OCIFileStorage )
145145 assert dsc_file_storage_two .storage_type == "FILE_STORAGE"
146146 assert dsc_file_storage_two .destination_directory_name == "test_mount_two"
147147 assert dsc_file_storage_two .mount_target == "test_mount_target_two"
@@ -152,14 +152,14 @@ def test_data_science_job_from_yaml(self):
152152
153153 assert isinstance (job_from_yaml .infrastructure .storage_mount , list )
154154 dsc_file_storage_one = job_from_yaml .infrastructure .storage_mount [0 ]
155- assert isinstance (dsc_file_storage_one , DSCFileStorage )
155+ assert isinstance (dsc_file_storage_one , OCIFileStorage )
156156 assert dsc_file_storage_one .storage_type == "FILE_STORAGE"
157157 assert dsc_file_storage_one .destination_directory_name == "test_mount_one"
158158 assert dsc_file_storage_one .mount_target == "test_mount_target_one"
159159 assert dsc_file_storage_one .export_path == "test_export_path_one"
160160
161161 dsc_file_storage_two = job .infrastructure .storage_mount [1 ]
162- assert isinstance (dsc_file_storage_two , DSCFileStorage )
162+ assert isinstance (dsc_file_storage_two , OCIFileStorage )
163163 assert dsc_file_storage_two .storage_type == "FILE_STORAGE"
164164 assert dsc_file_storage_two .destination_directory_name == "test_mount_two"
165165 assert dsc_file_storage_two .mount_target == "test_mount_target_two"
@@ -214,7 +214,7 @@ def test_mount_file_system_failed(self):
214214 ValueError ,
215215 match = "Either parameter `export_path` or `export_id` must be provided to mount file system." ,
216216 ):
217- DSCFileStorage (
217+ OCIFileStorage (
218218 destination_directory_name = "test_mount" ,
219219 mount_target_id = "ocid1.mounttarget.oc1.iad.xxxx" ,
220220 )
@@ -223,7 +223,7 @@ def test_mount_file_system_failed(self):
223223 ValueError ,
224224 match = "Either parameter `mount_target` or `mount_target_id` must be provided to mount file system." ,
225225 ):
226- DSCFileStorage (
226+ OCIFileStorage (
227227 destination_directory_name = "test_mount" ,
228228 export_id = "ocid1.export.oc1.iad.xxxx" ,
229229 )
@@ -232,13 +232,13 @@ def test_mount_file_system_failed(self):
232232 ValueError ,
233233 match = "Parameter `destination_directory_name` must be provided to mount file system." ,
234234 ):
235- DSCFileStorage (
235+ OCIFileStorage (
236236 mount_target_id = "ocid1.mounttarget.oc1.iad.xxxx" ,
237237 export_id = "ocid1.export.oc1.iad.xxxx" ,
238238 )
239239
240240 job_copy = copy .deepcopy (job )
241- dsc_file_storage = DSCFileStorage (
241+ dsc_file_storage = OCIFileStorage (
242242 destination_directory_name = "test_mount" ,
243243 mount_target = "test_mount_target" ,
244244 export_id = "ocid1.export.oc1.iad.xxxx" ,
@@ -305,8 +305,8 @@ def test_update_storage_mount_from_dsc_model(
305305 infrastructure ._update_from_dsc_model (dsc_job_payload )
306306
307307 assert len (infrastructure .storage_mount ) == 2
308- assert isinstance (infrastructure .storage_mount [0 ], DSCFileStorage )
309- assert isinstance (infrastructure .storage_mount [1 ], DSCFileStorage )
308+ assert isinstance (infrastructure .storage_mount [0 ], OCIFileStorage )
309+ assert isinstance (infrastructure .storage_mount [1 ], OCIFileStorage )
310310 assert infrastructure .storage_mount [0 ].to_dict () == {
311311 "destinationDirectoryName" : "test_destination_directory_name_from_dsc" ,
312312 "exportId" : "export_id_from_dsc" ,
0 commit comments