1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-03-22 10:34:49 +00:00

lint with black python. convert f style strings to old one. some small fixes

This commit is contained in:
catborise 2020-11-05 12:34:31 +03:00
parent c20c353a40
commit 508e3609be
54 changed files with 2123 additions and 1824 deletions

View file

@ -1,4 +1,5 @@
import base64
from vrtManager.connection import wvmConnect
@ -6,12 +7,12 @@ class wvmSecrets(wvmConnect):
def create_secret(self, ephemeral, private, secret_type, data):
xml = f"""<secret ephemeral='{ephemeral}' private='{private}'>
<usage type='{secret_type}'>"""
if secret_type == 'ceph':
if secret_type == "ceph":
xml += f"""<name>{data}</name>"""
if secret_type == 'volume':
if secret_type == "volume":
xml += f"""<volume>{data}</volume>"""
if secret_type == 'iscsi':
xml += f"""<target>{data}</target>"""
if secret_type == "iscsi":
xml += f"""<target>{data}</target>"""
xml += """</usage>
</secret>"""
self.wvm.secretDefineXML(xml)