Revision 9f1d1fcf

b/kamaki/cli/config.py
44 44

  
45 45
# Path to the file that stores the configuration
46 46
CONFIG_PATH = os.path.expanduser('~/.kamakirc')
47
HISTORY_PATH = os.path.expanduser('~/.kamaki.history')
47 48

  
48 49
# Name of a shell variable to bypass the CONFIG_PATH value
49 50
CONFIG_ENV = 'KAMAKI_CONFIG'
......
63 64
    },
64 65
    'history':{
65 66
        'cli': 'history_cli',
66
        'file':'.kamaki.history'
67
        'file':HISTORY_PATH
67 68
    },
68 69
    'store': {
69 70
        'cli': 'pithos_cli',
b/kamaki/clients/tests.py
197 197
		while True:
198 198
			try:
199 199
				self.client.delete_network(netid)
200
				print('\n\tSUCCESFULL COMMIT delete network %s'%netid)
200 201
				break
201 202
			except ClientError as err:
202 203
				self.assertEqual(err.status, 421)
......
204 205
				time.sleep(wait)
205 206
				wait += 3
206 207
				sys.stdout.write('.')
207
		print(' OK')
208

  
209 208

  
210 209
	def if_not_all(foo):
211 210
		global TEST_ALL
......
318 317
		print('...ok')
319 318

  
320 319
		sys.stdout.write(' test set_firewall_profile')
321
		#self._test_set_firewall_profile()	
320
		self._test_set_firewall_profile()	
322 321
		print('...ok')
323 322

  
324 323
		sys.stdout.write(' test get_server_stats')
......
331 330
		self._test_create_network()	
332 331
		print('...ok')
333 332

  
334
		print('- wait for netowrk to be activated')
333
		print('- wait for netowork to be activated')
335 334
		self._wait_for_network(self.network1['id'], 'ACTIVE')
336 335
		print('- ok')
337 336

  
......
344 343
		print('...ok')
345 344

  
346 345
		self.network2 = self._create_network(self.netname2)
347
		print('- wait for netowrk to be activated')
346
		print('- wait for netowork to be activated')
348 347
		self._wait_for_network(self.network2['id'], 'ACTIVE')
349 348
		print('- ok')
350 349

  
......
383 382
		wait = 3
384 383
		limit = 50
385 384
		c=['|','/','-','\\']
386
		sys.stdout.write(' Wait for net %s to be %s  '%(netid, status))
385
		sys.stdout.write('\tWait for net %s to be %s  '%(netid, status))
387 386
		while wait < limit:
388 387
			r = self.client.get_network_details(netid)
389 388
			if r['status'] == status:
......
697 696
		self._test_set_firewall_profile()
698 697

  
699 698
	def _test_set_firewall_profile(self):
700
		def next_profile(cur_profile):
701
			index = self.PROFILES.index(cur_profile)
702
			new_index = 0 if index >= len(self.PROFILES)-1 else (index+1)
703
			return self.PROFILES[new_index]
699
		#def next_profile(cur_profile):
700
		#	index = self.PROFILES.index(cur_profile)
701
		#	new_index = 0 if index >= len(self.PROFILES)-1 else (index+1)
702
		#	return self.PROFILES[new_index]
704 703

  
705 704
		self._wait_for_status(self.server1['id'], 'BUILD')
706 705
		fprofile = self.client.get_firewall_profile(self.server1['id'])
707
		for counter in range(1,1+len(self.PROFILES)):
708
			nprofile = next_profile(fprofile)
706
		#for counter in range(1,1+len(self.PROFILES)):
707
		#	nprofile = next_profile(fprofile)
708
		for counter, fprofile in enumerate(self.PROFILES):
709 709
			start=fprofile
710
			print('\tProfile swap %s: %s -> %s'%(counter, fprofile, nprofile))
710
			print('\tProfile swap %s: %s -> %s'%((counter+1), fprofile, nprofile))
711 711
			self.client.set_firewall_profile(self.server1['id'], nprofile)
712 712
			wait = 3
713 713
			c=['|','/','-','\\']

Also available in: Unified diff