encode proxy name as base58 to allow full deletion of resources (#907)

This commit is contained in:
bmc-msft
2021-05-21 20:54:17 -04:00
committed by GitHub
parent e7197f1407
commit 6e5f7e4d4c
3 changed files with 13 additions and 2 deletions

View File

@ -9,6 +9,7 @@ import os
from typing import List, Optional, Tuple
from uuid import UUID, uuid4
import base58
from azure.mgmt.compute.models import VirtualMachine
from onefuzztypes.enums import ErrorCode, VmState
from onefuzztypes.events import (
@ -69,7 +70,7 @@ class Proxy(ORMMixin):
def get_vm(self) -> VM:
vm = VM(
name="proxy-%s-%s" % (self.region, self.proxy_id),
name="proxy-%s" % base58.b58encode(self.proxy_id.bytes).decode(),
region=self.region,
sku=PROXY_SKU,
image=PROXY_IMAGE,