Skip to content

feat(azure): implement Azure Functions operations#60

Open
hariram4862 wants to merge 5 commits intoc2siorg:mainfrom
hariram4862:feature/azure-function-app
Open

feat(azure): implement Azure Functions operations#60
hariram4862 wants to merge 5 commits intoc2siorg:mainfrom
hariram4862:feature/azure-function-app

Conversation

@hariram4862
Copy link
Contributor

Note: This PR builds on top of the Azure networking and VM implementation (#48), the VM Scale Set implementation (#50), the Azure Container Instances implementation (#52), and the Azure Kubernetes Service implementation (#57).
Once those PRs are merged, this PR will only contain the Azure Functions changes.

Closes #59

Summary

This PR adds support for Azure Functions in RustCloud.

Azure Functions allows users to run event-driven serverless code without managing infrastructure. This feature extends RustCloud's Azure compute capabilities by enabling serverless function management alongside existing Azure Virtual Machine, VM Scale Set, Container Instance, and Kubernetes support.

Implemented Services

  • Azure Functions

Implemented Operations

Function App Operations

  • Create Function App
  • List Function Apps (Resource Group)
  • Get Function App
  • Restart Function App
  • Delete Function App

Function Operations

  • List Functions in Function App

Methodology

Azure Function Apps are managed using the Azure REST API.

Authentication is handled using Azure CLI, where access tokens are retrieved from the Azure CLI session and used to authorize requests to Azure resource management APIs.

Before running tests, login using Azure CLI:

az login

Set the subscription ID as an environment variable.

Linux/macOS:

export AZURE_SUBSCRIPTION_ID=<subscription-id>

Windows PowerShell:

$env:AZURE_SUBSCRIPTION_ID="<subscription-id>"

Running Tests

Function App Operations

cargo test test_create_function_app -- --nocapture
cargo test test_list_function_apps -- --nocapture
cargo test test_get_function_app -- --nocapture
cargo test test_restart_function_app -- --nocapture
cargo test test_delete_function_app -- --nocapture

Function Operations

cargo test test_list_functions_in_app -- --nocapture

Notes

Tests assume the Azure account has sufficient permissions to create resources.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Azure Functions operations

1 participant