This commit is contained in:
Paul Edwards 2020-03-10 02:00:32 +00:00
Родитель da7c7b4874
Коммит a168429793
1 изменённых файлов: 13 добавлений и 5 удалений

Просмотреть файл

@ -115,8 +115,16 @@ class ConfigFile:
elif prefix == "secret":
res = azutil.get_keyvault_secret(parts[1], parts[2])
elif prefix == "sasurl":
log.debug(parts)
url = azutil.get_storage_url(parts[1])
saskey = azutil.get_storage_saskey(parts[1], parts[2])
x = parts[-1].split(",")
if len(x) == 1:
perm = "r"
else:
perm = x[1]
parts[-1] = x[0]
saskey = azutil.get_storage_saskey(parts[1], parts[2], perm)
log.debug(parts)
path = ".".join(parts[3:])
res = f"{url}{path}?{saskey}"
elif prefix == "fqdn":
@ -125,10 +133,10 @@ class ConfigFile:
elif prefix == "sakey":
res = azutil.get_storage_key(parts[1])
elif prefix == "saskey":
v = parts[2].split(",")
if len(v) == 1:
v.append("r")
res = azutil.get_storage_saskey(parts[1], v[0], v[1])
x = parts[2].split(",")
if len(x) == 1:
x.append("r")
res = azutil.get_storage_saskey(parts[1], x[0], x[1])
elif prefix == "laworkspace":
res = azutil.get_log_analytics_workspace(parts[1], parts[2])
elif prefix == "lakey":