3 from invirt.config import structs as config
4 from subprocess import Popen, call, PIPE
11 subprocess.call(['kinit', '-k', 'daemon/%s' % config.web.hostname])
13 temp_dir = tempfile.mkdtemp()
14 keystore = os.path.join(temp_dir, 'trust.store')
15 for host in config.hosts:
16 cert = subprocess.Popen(['remctl', config.remote.hostname, 'web',
17 'vnccert', host.hostname],
20 subprocess.call(['keytool', '-import', '-noprompt', '-alias',
21 host.hostname, '-keystore', keystore, '-storepass',
22 'foobar'], stdin=cert.stdout)
24 subprocess.call(['jar', 'uf', '/usr/share/invirt-vnc-client/VncViewer.jar',
25 '-C', temp_dir, 'trust.store'])
27 shutil.rmtree(temp_dir)
29 if __name__ == '__main__':