Advertisement
genius1611

sampledate.py

Oct 22nd, 2011
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.11 KB | None | 0 0
  1. import keystone.manage
  2.  
  3. DEFAULT_FIXTURE = [
  4. # Tenants
  5. ('tenant', 'add', '1234'),
  6. ('tenant', 'add', 'ANOTHER:TENANT'),
  7. ('tenant', 'add', '0000'),
  8. ('tenant', 'disable', '0000'),
  9. # Users
  10. ('user', 'add', 'joeuser', 'secrete', '1234'),
  11. ('user', 'add', 'joeadmin', 'secrete', '1234'),
  12. ('user', 'add', 'admin', 'secrete', '1234'),
  13. ('user', 'add', 'serviceadmin', 'secrete', '1234'),
  14. ('user', 'add', 'disabled', 'secrete', '1234'),
  15. ('user', 'disable', 'disabled'),
  16. # Roles
  17. ('role', 'add', 'Admin'),
  18. ('role', 'add', 'KeystoneServiceAdmin'),
  19. ('role', 'grant', 'Admin', 'admin'),
  20. ('role', 'grant', 'KeystoneServiceAdmin', 'serviceadmin'),
  21. ('role', 'grant', 'Admin', 'joeadmin', '1234'),
  22. ('role', 'grant', 'Admin', 'joeadmin', 'ANOTHER:TENANT'),
  23. ('role', 'add', 'Member'),
  24. ('role', 'grant', 'Member', 'joeuser', '1234'),
  25. # Keeping for compatibility for a while till dashboard catches up
  26. ('endpointTemplates', 'add', 'RegionOne', 'swift',
  27. 'http://127.0.0.1:8080/v1/AUTH_%tenant_id%',
  28. 'http://127.0.0.1:8080/',
  29. 'http://127.0.0.1:8080/v1/AUTH_%tenant_id%', '1', '0'),
  30. ('endpointTemplates', 'add', 'RegionOne', 'nova_compat',
  31. 'http://nova.publicinternets.com/v1.0/',
  32. 'http://127.0.0.1:8774/v1.0', 'http://localhost:8774/v1.0', '1', '0'),
  33. ('endpointTemplates', 'add', 'RegionOne', 'nova',
  34. 'http://nova.publicinternets.com/v1.1/', 'http://127.0.0.1:8774/v1.1',
  35. 'http://localhost:8774/v1.1', '1', '0'),
  36. ('endpointTemplates', 'add', 'RegionOne', 'glance',
  37.  
  38. 'http://glance.publicinternets.com/v1.1/%tenant_id%',
  39. 'http://nova.admin-nets.local/v1.1/%tenant_id%',
  40. 'http://127.0.0.1:9292/v1.1/%tenant_id%', '1', '0'),
  41. ('endpointTemplates', 'add', 'RegionOne', 'cdn',
  42. 'http://cdn.publicinternets.com/v1.1/%tenant_id%',
  43. 'http://cdn.admin-nets.local/v1.1/%tenant_id%',
  44. 'http://127.0.0.1:7777/v1.1/%tenant_id%', '1', '0'),
  45. # endpointTemplates
  46. ('endpointTemplates', 'add', 'RegionOne', 'swift',
  47. 'http://127.0.0.1:8080/v1/AUTH_%tenant_id%',
  48. 'http://127.0.0.1:8080/',
  49. 'http://127.0.0.1:8080/v1/AUTH_%tenant_id%', '1', '0'),
  50. ('endpointTemplates', 'add', 'RegionOne', 'compute',
  51. 'http://nova.publicinternets.com/v1.0/', 'http://127.0.0.1:8774/v1.0',
  52. 'http://localhost:8774/v1.0', '1', '0'),
  53. ('endpointTemplates', 'add', 'RegionOne', 'compute_v1',
  54. 'http://nova.publicinternets.com/v1.1/', 'http://127.0.0.1:8774/v1.1',
  55. 'http://localhost:8774/v1.1', '1', '0'),
  56. ('endpointTemplates', 'add', 'RegionOne', 'image',
  57. 'http://glance.publicinternets.com/v1.1/%tenant_id%',
  58. 'http://nova.admin-nets.local/v1.1/%tenant_id%',
  59. 'http://127.0.0.1:9292/v1.1/%tenant_id%', '1', '0'),
  60. ('endpointTemplates', 'add', 'RegionOne', 'cdn',
  61. 'http://cdn.publicinternets.com/v1.1/%tenant_id%',
  62. 'http://cdn.admin-nets.local/v1.1/%tenant_id%',
  63. 'http://127.0.0.1:7777/v1.1/%tenant_id%', '1', '0'),
  64. # Global endpointTemplate
  65. ('endpointTemplates', 'add', 'RegionOne', 'identity',
  66. 'http://keystone.publicinternets.com/v2.0',
  67. 'http://127.0.0.1:5001/v2.0', 'http://127.0.0.1:5000/v2.0', '1', '1'),
  68.  
  69. # Tokens
  70. ('token', 'add', '887665443383838', 'joeuser', '1234', '2012-02-05T00:00'),
  71. ('token', 'add', '999888777666', 'admin', '1234', '2015-02-05T00:00'),
  72. ('token', 'add', '111222333444', 'serviceadmin', '1234',
  73. '2015-02-05T00:00'),
  74. ('token', 'add', '000999', 'admin', '1234', '2010-02-05T00:00'),
  75. ('token', 'add', '999888777', 'disabled', '1234', '2015-02-05T00:00'),
  76. # Tenant endpointsGlobal endpoint not added
  77. ('endpoint', 'add', '1234', '1'),
  78. ('endpoint', 'add', '1234', '2'),
  79. ('endpoint', 'add', '1234', '3'),
  80. ('endpoint', 'add', '1234', '4'),
  81. ('endpoint', 'add', '1234', '5'),
  82. # Add Services
  83. ('service', 'add', 'exampleservice'),
  84. # Add Credentials
  85. ('credentials', 'add', 'admin', 'EC2', 'admin:admin', 'admin', 'admin'),
  86. ]
  87.  
  88.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement