Comment 2 for bug 1620680

Revision history for this message
Alexey Stepanov (astepanov-m) wrote :

>>> ssh.execute('id', verbose=True)
uid=1000(ubuntu) gid=1000(ubuntu) groups=1000(ubuntu),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),111(lxd),115(lpadmin),116(sambashare),117(libvirtd)
2016-09-12 10:15:20 - INFO - ssh_client.py:853 -- 'id' execution results:
Exit code: EX_OK<0(0x00)>
STDOUT:
uid=1000(ubuntu) gid=1000(ubuntu) groups=1000(ubuntu),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),111(lxd),115(lpadmin),116(sambashare),117(libvirtd)
STDERR:

ExecResult(cmd='id', stdout=['uid=1000(ubuntu) gid=1000(ubuntu) groups=1000(ubuntu),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),111(lxd),115(lpadmin),116(sambashare),117(libvirtd)\n'], stderr=[], exit_code=EX_OK<0(0x00)>)
>>> with ssh.sudo(True):ssh.execute('id', verbose=True)
uid=0(root) gid=0(root) groups=0(root)
[sudo] password for ubuntu: 2016-09-12 10:15:43 - INFO - ssh_client.py:853 -- 'id' execution results:
Exit code: EX_OK<0(0x00)>
STDOUT:
uid=0(root) gid=0(root) groups=0(root)
STDERR:
[sudo] password for ubuntu:
ExecResult(cmd='id', stdout=['uid=0(root) gid=0(root) groups=0(root)\n'], stderr=['[sudo] password for ubuntu: '], exit_code=EX_OK<0(0x00)>)

Need to check detaily on CI with dedicated test