We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dac6024 commit c1d2febCopy full SHA for c1d2feb
kvmagent/kvmagent/plugins/vm_plugin.py
@@ -3308,7 +3308,9 @@ def _create_ceph_secret_key(userKey, uuid):
3308
try:
3309
o = shell.call("virsh secret-define %s" % spath)
3310
o = o.strip(' \n\t\r')
3311
- _, generateuuid, _ = o.split()
+ uuidReg = "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}"
3312
+ pattern = re.compile(uuidReg)
3313
+ generateuuid = pattern.findall(o)[0]
3314
shell.call('virsh secret-set-value %s %s' % (generateuuid, userKey))
3315
finally:
3316
os.remove(spath)
0 commit comments