Using proper options for blkid.
We can use blikd options to get the device path. Example: test:~$ sudo /sbin/blkid -c /dev/null -o device -t LABEL=cloudimg-rootfs /dev/vda1 Change-Id: Idde0be920bb6a9be534d4c17e0ca98da2beff342
This commit is contained in:
parent
8cfd0e16f4
commit
2ebfc15bf4
|
@ -101,7 +101,7 @@ class BaremetalBasicOps(baremetal_manager.BaremetalScenarioTest):
|
|||
LOG.info("Looking for partition %s mounted on %s", label, mount)
|
||||
|
||||
# Validate we have a device with the given partition label
|
||||
cmd = "/sbin/blkid | grep '%s' | cut -d':' -f1" % label
|
||||
cmd = "/sbin/blkid -c /dev/null -l -o device -t LABEL=%s" % label
|
||||
device = client.exec_command(cmd).rstrip('\n')
|
||||
LOG.debug("Partition device is %s", device)
|
||||
self.assertNotEqual('', device)
|
||||
|
|
Loading…
Reference in New Issue