mirror of
https://github.com/retspen/webvirtcloud
synced 2025-07-31 12:41:08 +00:00
convert strings to python3 f-Strings
This commit is contained in:
parent
7864ca6e01
commit
3e5769fe2d
5 changed files with 121 additions and 124 deletions
|
|
@ -4,14 +4,14 @@ from vrtManager.connection import wvmConnect
|
|||
|
||||
class wvmSecrets(wvmConnect):
|
||||
def create_secret(self, ephemeral, private, secret_type, data):
|
||||
xml = """<secret ephemeral='%s' private='%s'>
|
||||
<usage type='%s'>""" % (ephemeral, private, secret_type)
|
||||
xml = f"""<secret ephemeral='{ephemeral}' private='{private}'>
|
||||
<usage type='{secret_type}'>"""
|
||||
if secret_type == 'ceph':
|
||||
xml += """<name>%s</name>""" % data
|
||||
xml += f"""<name>{data}</name>"""
|
||||
if secret_type == 'volume':
|
||||
xml += """<volume>%s</volume>""" % data
|
||||
xml += f"""<volume>{data}</volume>"""
|
||||
if secret_type == 'iscsi':
|
||||
xml += """<target>%s</target>""" % data
|
||||
xml += f"""<target>{data}</target>"""
|
||||
xml += """</usage>
|
||||
</secret>"""
|
||||
self.wvm.secretDefineXML(xml)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue