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