Revision c59aef27

b/kamaki/cli/commands/quotaholder_cli.py
47 47
            or self.config.get('global', 'url')
48 48
        self.client = QuotaHolderClient(self.base_url, self.token)
49 49

  
50
@command()
51
class quotaholder_test_specific(_quotaholder_init):
52
    """Test quota holder commands - devel/testing only"""
53

  
54
    def main(self):
55
        super(self.__class__, self).main()
56
        print('We will test quota holder stuff')
57
        r = self.client.test_quota()
58
        print('That is what we got {%s}' % r)
59

  
60
@command()
61
class quotaholder_test_all(_quotaholder_init):
62
    """Test quota holder commands - devel/testing only"""
63

  
64
    def main(self):
65
        super(self.__class__, self).main()
66
        print('We will test quota holder stuff')
67
        r = self.client.test_quota()
68
        print('That is what we got {%s}' % r)
50 69

  
51 70
@command()
52 71
class quotaholder_test(_quotaholder_init):
b/kamaki/clients/cyclades.py
229 229
        r = self.get_server_details(server_id)
230 230
        if r['status'] != current_status:
231 231
            return r['status']
232
        total_wait = 1
233
        old_wait = total_wait
232
        old_wait = total_wait = 0
234 233

  
235 234
        if current_status == 'BUILD':
236
            max_wait = delay * 100
235
            max_wait = 100 * delay
237 236

  
238 237
        if wait_cb:
239 238
            wait_gen = wait_cb(1 + max_wait // delay)
239
            wait_gen.next()
240 240

  
241 241
        while r['status'] == current_status and total_wait <= max_wait:
242 242
            if current_status == 'BUILD':
243
                total_wait = r['progress']
243
                total_wait = int(r['progress']) * delay
244 244
                if wait_cb:
245
                    for i in range(old_wait, total_wait):
245
                    for i in range(int(old_wait), int(total_wait)):
246 246
                        wait_gen.next()
247 247
                    old_wait = total_wait
248 248
            else:
......
252 252
            sleep(delay)
253 253
            r = self.get_server_details(server_id)
254 254

  
255
        if wait_cb and r['status'] != current_status:
256
            try:
257
                while True:
258
                    wait_gen.next()
259
            except:
260
                pass
255
        if r['status'] != current_status:
256
            if wait_cb:
257
                try:
258
                    while True:
259
                        wait_gen.next()
260
                except:
261
                    pass
261 262
            return r['status']
262 263
        return False

Also available in: Unified diff