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.
2 parents 7b91303 + c1d2feb commit b22542eCopy full SHA for b22542e
kvmagent/kvmagent/plugins/vm_plugin.py
@@ -3331,7 +3331,9 @@ def _create_ceph_secret_key(userKey, uuid):
3331
try:
3332
o = shell.call("virsh secret-define %s" % spath)
3333
o = o.strip(' \n\t\r')
3334
- _, 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}"
3335
+ pattern = re.compile(uuidReg)
3336
+ generateuuid = pattern.findall(o)[0]
3337
shell.call('virsh secret-set-value %s %s' % (generateuuid, userKey))
3338
finally:
3339
os.remove(spath)
0 commit comments