PageRenderTime 37ms CodeModel.GetById 12ms 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
  1. from boto.manage.server import Server
  2. from boto.manage.volume import Volume
  3. import time
  4. print '--> Creating New Volume'
  5. volume = Volume.create()
  6. print volume
  7. print '--> Creating New Server'
  8. server_list = Server.create()
  9. server = server_list[0]
  10. print server
  11. print '----> Waiting for Server to start up'
  12. while server.status != 'running':
  13. print '*'
  14. time.sleep(10)
  15. print '----> Server is running'
  16. print '--> Run "df -k" on Server'
  17. status = server.run('df -k')
  18. print status[1]
  19. print '--> Now run volume.make_ready to make the volume ready to use on server'
  20. volume.make_ready(server)
  21. print '--> Run "df -k" on Server'
  22. status = server.run('df -k')
  23. print status[1]
  24. print '--> Do an "ls -al" on the new filesystem'
  25. status = server.run('ls -al %s' % volume.mount_point)
  26. print status[1]