@@ -639,70 +639,70 @@ def test_apim_policy_operations(self, resource_group, resource_group_location):
639639 self .kwargs ['operation_name' ] = operation_name
640640
641641 # Verify initial policy lists (global, API, and operation levels)
642- initial_policy_global = self .cmd ('apim api policy list -g {rg} -n {service_name}' ).get_output_in_json ()
643- initial_policy_api = self .cmd ('apim api policy list -g {rg} -n {service_name} --api-id {api_id}' ).get_output_in_json ()
644- initial_policy_operation = self .cmd ('apim api policy list -g {rg} -n {service_name} --api-id {api_id} --operation-id {operation_name}' ).get_output_in_json ()
642+ initial_policy_global = self .cmd ('apim policy list -g {rg} -n {service_name}' ).get_output_in_json ()
643+ initial_policy_api = self .cmd ('apim policy list -g {rg} -n {service_name} --api-id {api_id}' ).get_output_in_json ()
644+ initial_policy_operation = self .cmd ('apim policy list -g {rg} -n {service_name} --api-id {api_id} --operation-id {operation_name}' ).get_output_in_json ()
645645
646646 # Set policies at different scopes
647- self .cmd ('apim api policy set -g {rg} -n {service_name} '
647+ self .cmd ('apim policy set -g {rg} -n {service_name} '
648648 '--specification-path {policy_specification_path} '
649649 '--policy-format {policy_specification_format}' )
650650
651- self .cmd ('apim api policy set -g {rg} -n {service_name} '
651+ self .cmd ('apim policy set -g {rg} -n {service_name} '
652652 '--api-id {api_id} '
653653 '--specification-path {policy_specification_path} '
654654 '--policy-format {policy_specification_format}' )
655655
656- self .cmd ('apim api policy set -g {rg} -n {service_name} '
656+ self .cmd ('apim policy set -g {rg} -n {service_name} '
657657 '--api-id {api_id} '
658658 '--operation-id {operation_name} '
659659 '--specification-path {policy_specification_path} '
660660 '--policy-format {policy_specification_format}' )
661661
662- self .cmd ('apim api policy wait -g "{rg}" -n "{service_name}" --api-id "{api_id}" --policy-id policy --exists' , checks = [self .is_empty ()])
662+ self .cmd ('apim policy wait -g "{rg}" -n "{service_name}" --api-id "{api_id}" --policy-id policy --exists' , checks = [self .is_empty ()])
663663
664664 # Verify policies were updated
665- current_policy_global = self .cmd ('apim api policy list -g {rg} -n {service_name}' ).get_output_in_json ()
666- current_policy_api = self .cmd ('apim api policy list -g {rg} -n {service_name} --api-id {api_id}' ).get_output_in_json ()
667- current_policy_operation = self .cmd ('apim api policy list -g {rg} -n {service_name} --api-id {api_id} --operation-id {operation_name}' ).get_output_in_json ()
665+ current_policy_global = self .cmd ('apim policy list -g {rg} -n {service_name}' ).get_output_in_json ()
666+ current_policy_api = self .cmd ('apim policy list -g {rg} -n {service_name} --api-id {api_id}' ).get_output_in_json ()
667+ current_policy_operation = self .cmd ('apim policy list -g {rg} -n {service_name} --api-id {api_id} --operation-id {operation_name}' ).get_output_in_json ()
668668
669669 # Ensure policies are different after update
670670 self .assertNotEqual (initial_policy_global ['value' ], current_policy_global ['value' ],
671671 "Global policy should have changed" )
672672 self .assertNotEqual (initial_policy_api ['value' ], current_policy_api ['value' ],
673- "API policy should have changed" )
673+ "policy should have changed" )
674674 self .assertNotEqual (initial_policy_operation ['value' ], current_policy_operation ['value' ],
675675 "Operation policy should have changed" )
676676
677677 # Verify policy show commands
678- self .cmd ('apim api policy show -g {rg} -n {service_name}' ,
678+ self .cmd ('apim policy show -g {rg} -n {service_name}' ,
679679 checks = [self .check ('format' , '{policy_specification_format}' )])
680- self .cmd ('apim api policy show -g {rg} -n {service_name} --api-id {api_id}' ,
680+ self .cmd ('apim policy show -g {rg} -n {service_name} --api-id {api_id}' ,
681681 checks = [self .check ('format' , '{policy_specification_format}' )])
682- self .cmd ('apim api policy show -g {rg} -n {service_name} --api-id {api_id} --operation-id {operation_name}' ,
682+ self .cmd ('apim policy show -g {rg} -n {service_name} --api-id {api_id} --operation-id {operation_name}' ,
683683 checks = [self .check ('format' , '{policy_specification_format}' )])
684684
685685 # Get etag
686- etag_global = self .cmd ('apim api policy get-etag -g {rg} -n {service_name}' ).get_output_in_json ()
687- etag_api = self .cmd ('apim api policy get-etag -g {rg} -n {service_name} --api-id {api_id}' ).get_output_in_json ()
688- etag_operation = self .cmd ('apim api policy get-etag -g {rg} -n {service_name} --api-id {api_id} --operation-id {operation_name}' ).get_output_in_json ()
686+ etag_global = self .cmd ('apim policy get-etag -g {rg} -n {service_name}' ).get_output_in_json ()
687+ etag_api = self .cmd ('apim policy get-etag -g {rg} -n {service_name} --api-id {api_id}' ).get_output_in_json ()
688+ etag_operation = self .cmd ('apim policy get-etag -g {rg} -n {service_name} --api-id {api_id} --operation-id {operation_name}' ).get_output_in_json ()
689689
690690 self .assertTrue (etag_global , "Global policy etag should not be empty" )
691- self .assertTrue (etag_api , "API policy etag should not be empty" )
691+ self .assertTrue (etag_api , "policy etag should not be empty" )
692692 self .assertTrue (etag_operation , "Operation policy etag should not be empty" )
693693
694694 # Delete policies
695- self .cmd ('apim api policy delete -g {rg} -n {service_name} --yes' )
696- self .cmd ('apim api policy delete -g {rg} -n {service_name} --api-id {api_id} --yes' )
697- self .cmd ('apim api policy delete -g {rg} -n {service_name} --api-id {api_id} --operation-id {operation_name} --yes' )
695+ self .cmd ('apim policy delete -g {rg} -n {service_name} --yes' )
696+ self .cmd ('apim policy delete -g {rg} -n {service_name} --api-id {api_id} --yes' )
697+ self .cmd ('apim policy delete -g {rg} -n {service_name} --api-id {api_id} --operation-id {operation_name} --yes' )
698698
699699 #wait
700- self .cmd ('apim api policy wait -g "{rg}" -n "{service_name}" --api-id "{api_id}" --policy-id policy --deleted' , checks = [self .is_empty ()])
700+ self .cmd ('apim policy wait -g "{rg}" -n "{service_name}" --api-id "{api_id}" --policy-id policy --deleted' , checks = [self .is_empty ()])
701701
702702 # Verify policies are deleted
703- final_policy_global = self .cmd ('apim api policy list -g {rg} -n {service_name}' ).get_output_in_json ()
704- final_policy_api = self .cmd ('apim api policy list -g {rg} -n {service_name} --api-id {api_id}' ).get_output_in_json ()
705- final_policy_operation = self .cmd ('apim api policy list -g {rg} -n {service_name} --api-id {api_id} --operation-id {operation_name}' ).get_output_in_json ()
703+ final_policy_global = self .cmd ('apim policy list -g {rg} -n {service_name}' ).get_output_in_json ()
704+ final_policy_api = self .cmd ('apim policy list -g {rg} -n {service_name} --api-id {api_id}' ).get_output_in_json ()
705+ final_policy_operation = self .cmd ('apim policy list -g {rg} -n {service_name} --api-id {api_id} --operation-id {operation_name}' ).get_output_in_json ()
706706
707707 self .assertEqual (final_policy_global .get ('count' , 0 ), 0 , "Global policy should be deleted" )
708708 self .assertEqual (final_policy_api .get ('count' , 0 ), 0 , "API policy should be deleted" )
0 commit comments