Skip to content

Commit d1e446a

Browse files
reverse unnecessary changes
1 parent afa7e08 commit d1e446a

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/azure-cli/azure/cli/command_modules/acs/addonconfiguration.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -435,21 +435,21 @@ def ensure_container_insights_for_monitoring(
435435
ingestionDataCollectionEndpointName = f"MSCI-ingest-{location}-{cluster_name}"
436436
# Max length of the DCE name is 44 chars
437437
ingestionDataCollectionEndpointName = _trim_suffix_if_needed(ingestionDataCollectionEndpointName[0:43])
438-
ingestion_scoped_resource_id = None
438+
ingestion_dce_resource_id = None
439439

440440
# config DCE MUST be in cluster region
441441
configDataCollectionEndpointName = f"MSCI-config-{cluster_region}-{cluster_name}"
442442
# Max length of the DCE name is 44 chars
443443
configDataCollectionEndpointName = _trim_suffix_if_needed(configDataCollectionEndpointName[0:43])
444-
config_scoped_resource_id = None
444+
config_dce_resource_id = None
445445

446446
# create ingestion DCE if high log scale mode enabled
447447
if enable_high_log_scale_mode:
448-
ingestion_scoped_resource_id = create_data_collection_endpoint(cmd, cluster_subscription, cluster_resource_group_name, location, ingestionDataCollectionEndpointName, is_use_ampls)
448+
ingestion_dce_resource_id = create_data_collection_endpoint(cmd, cluster_subscription, cluster_resource_group_name, location, ingestionDataCollectionEndpointName, is_use_ampls)
449449

450450
# create config DCE if AMPLS resource specified
451451
if is_use_ampls:
452-
config_scoped_resource_id = create_data_collection_endpoint(cmd, cluster_subscription, cluster_resource_group_name, cluster_region, configDataCollectionEndpointName, is_use_ampls)
452+
config_dce_resource_id = create_data_collection_endpoint(cmd, cluster_subscription, cluster_resource_group_name, cluster_region, configDataCollectionEndpointName, is_use_ampls)
453453

454454
if create_dcr:
455455
# first get the association between region display names and region IDs (because for some reason
@@ -534,7 +534,7 @@ def ensure_container_insights_for_monitoring(
534534
}
535535
]
536536
},
537-
"dataCollectionEndpointId": ingestion_scoped_resource_id
537+
"dataCollectionEndpointId": ingestion_dce_resource_id
538538
},
539539
}
540540
)
@@ -615,7 +615,7 @@ def ensure_container_insights_for_monitoring(
615615
}
616616
]
617617
},
618-
"dataCollectionEndpointId": ingestion_scoped_resource_id
618+
"dataCollectionEndpointId": ingestion_dce_resource_id
619619
},
620620
}
621621
)
@@ -647,22 +647,22 @@ def ensure_container_insights_for_monitoring(
647647
create_or_delete_dcr_association(cmd, cluster_region, remove_monitoring, cluster_resource_id, dcr_resource_id)
648648
if is_use_ampls:
649649
# associate config DCE to the cluster
650-
create_dce_association(cmd, cluster_region, cluster_resource_id, config_scoped_resource_id)
650+
create_dce_association(cmd, cluster_region, cluster_resource_id, config_dce_resource_id)
651651
# link config DCE to AMPLS
652-
create_ampls_scope(cmd, ampls_resource_id, configDataCollectionEndpointName, config_scoped_resource_id)
652+
create_ampls_scope(cmd, ampls_resource_id, configDataCollectionEndpointName, config_dce_resource_id)
653653
# link workspace to AMPLS
654654
create_ampls_scope(cmd, ampls_resource_id, workspace_name, workspace_resource_id)
655655
# link ingest DCE to AMPLS
656656
if enable_high_log_scale_mode:
657-
create_ampls_scope(cmd, ampls_resource_id, ingestionDataCollectionEndpointName, ingestion_scoped_resource_id)
657+
create_ampls_scope(cmd, ampls_resource_id, ingestionDataCollectionEndpointName, ingestion_dce_resource_id)
658658

659659

660-
def create_dce_association(cmd, cluster_region, cluster_resource_id, config_scoped_resource_id):
660+
def create_dce_association(cmd, cluster_region, cluster_resource_id, config_dce_resource_id):
661661
association_body = json.dumps(
662662
{
663663
"location": cluster_region,
664664
"properties": {
665-
"dataCollectionEndpointId": config_scoped_resource_id,
665+
"dataCollectionEndpointId": config_dce_resource_id,
666666
"description": "associates config dataCollectionEndpoint to AKS cluster resource",
667667
},
668668
}

0 commit comments

Comments
 (0)