Skip to content

Commit 1d1aa94

Browse files
author
Shreyas-Microsoft
committed
add quota check
1 parent 85b7914 commit 1d1aa94

File tree

2 files changed

+10
-16
lines changed

2 files changed

+10
-16
lines changed

scripts/validate_model_deployment_quota.ps1

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,9 @@ $ResourceGroup = $env:AZURE_RESOURCE_GROUP
1111
# Validate required parameters
1212
$MissingParams = @()
1313

14-
if (-not $SubscriptionId) {
15-
$MissingParams += "subscription"
16-
}
17-
if (-not $Location) {
18-
$MissingParams += "location"
19-
}
20-
if (-not $ModelsParameter) {
21-
$MissingParams += "models-parameter"
22-
}
14+
if (-not $SubscriptionId) { $MissingParams += "SubscriptionId" }
15+
if (-not $Location) { $MissingParams += "Location" }
16+
if (-not $ModelsParameter) { $MissingParams += "ModelsParameter" }
2317

2418
if ($MissingParams.Count -gt 0) {
2519
Write-Error "❌ ERROR: Missing required parameters: $($MissingParams -join ', ')"

scripts/validate_model_deployment_quota.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ MODELS_PARAMETER=""
66

77
while [[ $# -gt 0 ]]; do
88
case "$1" in
9-
--subscription)
9+
--SubscriptionId)
1010
SUBSCRIPTION_ID="$2"
1111
shift 2
1212
;;
13-
--location)
13+
--Location)
1414
LOCATION="$2"
1515
shift 2
1616
;;
17-
--models-parameter)
17+
--ModelsParameter)
1818
MODELS_PARAMETER="$2"
1919
shift 2
2020
;;
@@ -27,13 +27,13 @@ done
2727

2828
# Validate required parameters
2929
MISSING_PARAMS=()
30-
[[ -z "$SUBSCRIPTION_ID" ]] && MISSING_PARAMS+=("subscription")
31-
[[ -z "$LOCATION" ]] && MISSING_PARAMS+=("location")
32-
[[ -z "$MODELS_PARAMETER" ]] && MISSING_PARAMS+=("models-parameter")
30+
[[ -z "$SUBSCRIPTION_ID" ]] && MISSING_PARAMS+=("SubscriptionId")
31+
[[ -z "$LOCATION" ]] && MISSING_PARAMS+=("Location")
32+
[[ -z "$MODELS_PARAMETER" ]] && MISSING_PARAMS+=("ModelsParameter")
3333

3434
if [[ ${#MISSING_PARAMS[@]} -ne 0 ]]; then
3535
echo "❌ ERROR: Missing required parameters: ${MISSING_PARAMS[*]}"
36-
echo "Usage: $0 --subscription <SUBSCRIPTION_ID> --location <LOCATION> --models-parameter <MODELS_PARAMETER>"
36+
echo "Usage: $0 --SubscriptionId <SUBSCRIPTION_ID> --Location <LOCATION> --ModelsParameter <MODELS_PARAMETER>"
3737
exit 1
3838
fi
3939

0 commit comments

Comments
 (0)