Skip to content

Commit

Permalink
Remove delete_image_using_name function
Browse files Browse the repository at this point in the history
This is not used anywhere

Signed-off-by: Pradipta Banerjee <pradipta.banerjee@gmail.com>
  • Loading branch information
bpradipt committed May 14, 2024
1 parent 40b5ed9 commit 11584a6
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions config/peerpods/podvm/azure-podvm-image-handler.sh
Original file line number Diff line number Diff line change
Expand Up @@ -638,22 +638,6 @@ function delete_image_gallery() {
echo "Azure image gallery deleted successfully"
}

# Function to delete the image from Azure given the image name
# Resource group is must
# Input is of the form /subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.Compute/images/<image-name>

function delete_image_using_name() {
echo "Deleting Azure image"
# If any error occurs, exit the script with an error message

# Delete the image
az image delete --resource-group "${AZURE_RESOURCE_GROUP}" \
--name "${IMAGE_NAME}" ||
error_exit "Failed to delete the image"

echo "Azure image deleted successfully"
}

# Function to delete the image from Azure given the image id
# Input is of the form
# /subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.Compute/galleries/<gallery-name>/images/<image-name>/versions/<image-version>
Expand Down

0 comments on commit 11584a6

Please sign in to comment.