PageRenderTime 14ms CodeModel.GetById 11ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/boto-2.5.2/boto/manage/test_manage.py

#
Python | 34 lines | 26 code | 8 blank | 0 comment | 1 complexity | ed038cd787ac5f376e1ee478cff677ff MD5 | raw file
 1from boto.manage.server import Server
 2from boto.manage.volume import Volume
 3import time
 4
 5print '--> Creating New Volume'
 6volume = Volume.create()
 7print volume
 8
 9print '--> Creating New Server'
10server_list = Server.create()
11server = server_list[0]
12print server
13
14print '----> Waiting for Server to start up'
15while server.status != 'running':
16    print '*'
17    time.sleep(10)
18print '----> Server is running'
19
20print '--> Run "df -k" on Server'
21status = server.run('df -k')
22print status[1]
23
24print '--> Now run volume.make_ready to make the volume ready to use on server'
25volume.make_ready(server)
26
27print '--> Run "df -k" on Server'
28status = server.run('df -k')
29print status[1]
30
31print '--> Do an "ls -al" on the new filesystem'
32status = server.run('ls -al %s' % volume.mount_point)
33print status[1]
34