Guest User

Untitled

a guest
May 3rd, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. import shade
  2. import json
  3.  
  4. cloud_name = 'phx-private'
  5. project_name = 'QSC-DEV'
  6. filters = {'name': 'p3dlqscats'}
  7. servers = []
  8.  
  9. # Initialize and turn on debug logging
  10. shade.simple_logging(debug=True)
  11.  
  12. # Initialize cloud
  13. # Cloud configs are read with os-client-config
  14. # clouds:
  15. # phx-private:
  16. # auth:
  17. # auth_url: <auth_url>
  18. # username: username
  19. # password: <password>
  20. # project_name: user-project
  21. default_cloud = shade.openstack_cloud(cloud=cloud_name)
  22. servers = default_cloud.list_servers()
  23. print servers
  24.  
  25. project_cloud = default_cloud.connect_as_project(project=project_name)
Add Comment
Please, Sign In to add comment