From a830264910bca41e0a27bb3160b73011ccabc8ef Mon Sep 17 00:00:00 2001 From: Ian Gulliver Date: Tue, 10 May 2016 00:31:13 +0000 Subject: [PATCH] Fetch manifest at startup --- client/client.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/client.py b/client/client.py index 2a4cd72..0a0d075 100755 --- a/client/client.py +++ b/client/client.py @@ -64,6 +64,7 @@ class Client(threadedclient.WebSocketClient): def Loop(self): self.daemon = True self.connect() + self._OnNewManifest2() while True: report = { 'hostname': socket.gethostname(), @@ -91,6 +92,9 @@ class Client(threadedclient.WebSocketClient): def _OnNewManifest(self, data): if data['image_type'] != self._config['image_type']: return + self._OnNewManifest2() + + def _OnNewManifest2(self): fetch = fetcher.Fetcher( 'https://%s/image/%s' % (FLAGS.server, self._config['image_type']), FLAGS.ca_cert,