mirror of
https://github.com/retspen/webvirtcloud.git
synced 2026-05-29 16:39:38 +00:00
lint with black python. convert f style strings to old one. some small fixes
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user