Advertisement
hellboy2k8

Untitled

May 4th, 2013
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from boto.ec2.connection import EC2Connection
  2.  
  3. import urllib2
  4. proxy_support = urllib2.ProxyHandler({"http":""})
  5. opener = urllib2.build_opener(proxy_support)
  6. urllib2.install_opener(opener)
  7.  
  8.  
  9.  
  10. ip = 'http://10.2.4.129:8773/services/cloud'
  11. apikey = 'demo123'
  12. passx = 'demo123'
  13. pathx='services/cloud'
  14. conn=EC2Connection(
  15. aws_access_key_id=apikey,
  16. aws_secret_access_key=passx,
  17. host = 'http://10.2.4.129',
  18. is_secure=False,
  19. port=8773,
  20. path=pathx)
  21. print "got here"
  22. #conn.get_status()
  23. conn.get_all_instances()
  24. print "got here too"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement