@@ -42,7 +42,7 @@ def test_registry_endpoint_lifecycle_anonymous(registry_endpoint_test_setup, tra
4242 try :
4343 # CREATE - SAMI authentication (default)
4444 registry_endpoint = run (
45- f"az iot ops registry add -n { registry_endpoint_name } "
45+ f"az iot ops registry create -n { registry_endpoint_name } "
4646 f"-g { resource_group } --instance { instance_name } "
4747 f"--host { host } "
4848 )
@@ -93,7 +93,7 @@ def test_registry_endpoint_lifecycle_anonymous(registry_endpoint_test_setup, tra
9393
9494 # REMOVE
9595 run (
96- f"az iot ops registry remove -n { registry_endpoint_name } "
96+ f"az iot ops registry delete -n { registry_endpoint_name } "
9797 f"-g { resource_group } --instance { instance_name } -y"
9898 )
9999 tracked_resources .remove (registry_endpoint ["id" ])
@@ -108,7 +108,7 @@ def test_registry_endpoint_lifecycle_anonymous(registry_endpoint_test_setup, tra
108108 if registry_endpoint .get ("id" ) in tracked_resources :
109109 try :
110110 run (
111- f"az iot ops registry remove -n { registry_endpoint_name } "
111+ f"az iot ops registry delete -n { registry_endpoint_name } "
112112 f"-g { resource_group } --instance { instance_name } -y"
113113 )
114114 tracked_resources .remove (registry_endpoint ["id" ])
@@ -128,7 +128,7 @@ def test_registry_endpoint_artifact_pull_secret(registry_endpoint_test_setup, tr
128128 try :
129129 # CREATE - ArtifactPullSecret authentication
130130 registry_endpoint = run (
131- f"az iot ops registry add -n { registry_endpoint_name } "
131+ f"az iot ops registry create -n { registry_endpoint_name } "
132132 f"-g { resource_group } --instance { instance_name } "
133133 f"--host { host } --secret-ref { secret_ref } "
134134 )
@@ -158,7 +158,7 @@ def test_registry_endpoint_artifact_pull_secret(registry_endpoint_test_setup, tr
158158
159159 # REMOVE
160160 run (
161- f"az iot ops registry remove -n { registry_endpoint_name } "
161+ f"az iot ops registry delete -n { registry_endpoint_name } "
162162 f"-g { resource_group } --instance { instance_name } -y"
163163 )
164164 tracked_resources .remove (registry_endpoint ["id" ])
@@ -168,7 +168,7 @@ def test_registry_endpoint_artifact_pull_secret(registry_endpoint_test_setup, tr
168168 if registry_endpoint .get ("id" ) in tracked_resources :
169169 try :
170170 run (
171- f"az iot ops registry remove -n { registry_endpoint_name } "
171+ f"az iot ops registry delete -n { registry_endpoint_name } "
172172 f"-g { resource_group } --instance { instance_name } -y"
173173 )
174174 tracked_resources .remove (registry_endpoint ["id" ])
@@ -188,7 +188,7 @@ def test_registry_endpoint_system_assigned_auth(registry_endpoint_test_setup, tr
188188 try :
189189 # CREATE - SystemAssigned authentication with audience
190190 registry_endpoint = run (
191- f"az iot ops registry add -n { registry_endpoint_name } "
191+ f"az iot ops registry create -n { registry_endpoint_name } "
192192 f"-g { resource_group } --instance { instance_name } "
193193 f"--host { host } --auth-type SystemAssignedManagedIdentity --audience { audience } "
194194 )
@@ -218,7 +218,7 @@ def test_registry_endpoint_system_assigned_auth(registry_endpoint_test_setup, tr
218218
219219 # REMOVE
220220 run (
221- f"az iot ops registry remove -n { registry_endpoint_name } "
221+ f"az iot ops registry delete -n { registry_endpoint_name } "
222222 f"-g { resource_group } --instance { instance_name } -y"
223223 )
224224 tracked_resources .remove (registry_endpoint ["id" ])
@@ -228,7 +228,7 @@ def test_registry_endpoint_system_assigned_auth(registry_endpoint_test_setup, tr
228228 if registry_endpoint .get ("id" ) in tracked_resources :
229229 try :
230230 run (
231- f"az iot ops registry remove -n { registry_endpoint_name } "
231+ f"az iot ops registry delete -n { registry_endpoint_name } "
232232 f"-g { resource_group } --instance { instance_name } -y"
233233 )
234234 tracked_resources .remove (registry_endpoint ["id" ])
@@ -250,7 +250,7 @@ def test_registry_endpoint_user_assigned_auth(registry_endpoint_test_setup, trac
250250 try :
251251 # CREATE - UserAssigned authentication with full parameters
252252 registry_endpoint = run (
253- f"az iot ops registry add -n { registry_endpoint_name } "
253+ f"az iot ops registry create -n { registry_endpoint_name } "
254254 f"-g { resource_group } --instance { instance_name } "
255255 f"--host { host } --auth-type UserAssignedManagedIdentity "
256256 f"--client-id { client_id } --tenant-id { tenant_id } --scope { scope } "
@@ -281,7 +281,7 @@ def test_registry_endpoint_user_assigned_auth(registry_endpoint_test_setup, trac
281281
282282 # REMOVE
283283 run (
284- f"az iot ops registry remove -n { registry_endpoint_name } "
284+ f"az iot ops registry delete -n { registry_endpoint_name } "
285285 f"-g { resource_group } --instance { instance_name } -y"
286286 )
287287 tracked_resources .remove (registry_endpoint ["id" ])
@@ -291,7 +291,7 @@ def test_registry_endpoint_user_assigned_auth(registry_endpoint_test_setup, trac
291291 if registry_endpoint .get ("id" ) in tracked_resources :
292292 try :
293293 run (
294- f"az iot ops registry remove -n { registry_endpoint_name } "
294+ f"az iot ops registry delete -n { registry_endpoint_name } "
295295 f"-g { resource_group } --instance { instance_name } -y"
296296 )
297297 tracked_resources .remove (registry_endpoint ["id" ])
@@ -335,7 +335,7 @@ def test_registry_endpoint_authentication_auto_detection(registry_endpoint_test_
335335 # Auto-detect ArtifactPullSecret (secret_ref provided)
336336 name1 = f"test-registry-{ generate_random_string (force_lower = True , size = 8 )} "
337337 endpoint1 = run (
338- f"az iot ops registry add -n { name1 } "
338+ f"az iot ops registry create -n { name1 } "
339339 f"-g { resource_group } --instance { instance_name } "
340340 f"--host registry1.azurecr.io --secret-ref my-secret"
341341 )
@@ -352,7 +352,7 @@ def test_registry_endpoint_authentication_auto_detection(registry_endpoint_test_
352352 # Auto-detect SystemAssigned (no auth parameters provided)
353353 name2 = f"test-registry-{ generate_random_string (force_lower = True , size = 8 )} "
354354 endpoint2 = run (
355- f"az iot ops registry add -n { name2 } "
355+ f"az iot ops registry create -n { name2 } "
356356 f"-g { resource_group } --instance { instance_name } "
357357 f"--host registry2.azurecr.io"
358358 )
@@ -369,7 +369,7 @@ def test_registry_endpoint_authentication_auto_detection(registry_endpoint_test_
369369 # Auto-detect UserAssigned (client-id and tenant-id provided)
370370 name3 = f"test-registry-{ generate_random_string (force_lower = True , size = 8 )} "
371371 endpoint3 = run (
372- f"az iot ops registry add -n { name3 } "
372+ f"az iot ops registry create -n { name3 } "
373373 f"-g { resource_group } --instance { instance_name } "
374374 f"--host registry3.azurecr.io --client-id my-client --tenant-id my-tenant"
375375 )
@@ -386,7 +386,7 @@ def test_registry_endpoint_authentication_auto_detection(registry_endpoint_test_
386386 # Auto-detect Anonymous --no-auth
387387 name4 = f"test-registry-{ generate_random_string (force_lower = True , size = 8 )} "
388388 endpoint4 = run (
389- f"az iot ops registry add -n { name4 } "
389+ f"az iot ops registry create -n { name4 } "
390390 f"-g { resource_group } --instance { instance_name } "
391391 f"--host registry4.azurecr.io --no-auth"
392392 )
@@ -402,15 +402,15 @@ def test_registry_endpoint_authentication_auto_detection(registry_endpoint_test_
402402
403403 # Cleanup all endpoints
404404 for ep_id , ep_name in endpoints_to_cleanup :
405- run (f"az iot ops registry remove -n { ep_name } " f"-g { resource_group } --instance { instance_name } -y" )
405+ run (f"az iot ops registry delete -n { ep_name } " f"-g { resource_group } --instance { instance_name } -y" )
406406 tracked_resources .append (ep_id ) # Add to tracked for safety
407407 tracked_resources .remove (ep_id ) # Remove after successful deletion
408408
409409 except Exception :
410410 # Cleanup in case of failure
411411 for ep_id , ep_name in endpoints_to_cleanup :
412412 try :
413- run (f"az iot ops registry remove -n { ep_name } " f"-g { resource_group } --instance { instance_name } -y" )
413+ run (f"az iot ops registry delete -n { ep_name } " f"-g { resource_group } --instance { instance_name } -y" )
414414 except Exception :
415415 pass # Best effort cleanup
416416 raise
@@ -432,7 +432,7 @@ def test_registry_endpoint_code_signing_cas(registry_endpoint_test_setup, tracke
432432 try :
433433 # CREATE - with one configmap
434434 registry_endpoint = run (
435- f"az iot ops registry add -n { registry_endpoint_name } "
435+ f"az iot ops registry create -n { registry_endpoint_name } "
436436 f"-g { resource_group } --instance { instance_name } "
437437 f"--host { host } --cs-config-map-refs { configmap1 } "
438438 )
@@ -514,7 +514,7 @@ def test_registry_endpoint_code_signing_cas(registry_endpoint_test_setup, tracke
514514
515515 # REMOVE
516516 run (
517- f"az iot ops registry remove -n { registry_endpoint_name } "
517+ f"az iot ops registry delete -n { registry_endpoint_name } "
518518 f"-g { resource_group } --instance { instance_name } -y"
519519 )
520520 tracked_resources .remove (registry_endpoint ["id" ])
@@ -524,7 +524,7 @@ def test_registry_endpoint_code_signing_cas(registry_endpoint_test_setup, tracke
524524 if registry_endpoint .get ("id" ) in tracked_resources :
525525 try :
526526 run (
527- f"az iot ops registry remove -n { registry_endpoint_name } "
527+ f"az iot ops registry delete -n { registry_endpoint_name } "
528528 f"-g { resource_group } --instance { instance_name } -y"
529529 )
530530 tracked_resources .remove (registry_endpoint ["id" ])
0 commit comments