tim 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (198) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README.rdoc +392 -0
  3. data/Rakefile +33 -0
  4. data/app/assets/javascripts/tim/application.js +15 -0
  5. data/app/assets/stylesheets/tim/application.css +13 -0
  6. data/app/controllers/tim/application_controller.rb +19 -0
  7. data/app/controllers/tim/base_images_controller.rb +59 -0
  8. data/app/controllers/tim/entrypoint_controller.rb +8 -0
  9. data/app/controllers/tim/image_versions_controller.rb +48 -0
  10. data/app/controllers/tim/provider_images_controller.rb +59 -0
  11. data/app/controllers/tim/target_images_controller.rb +61 -0
  12. data/app/controllers/tim/templates_controller.rb +47 -0
  13. data/app/filters/tim/user_keys_filter.rb +59 -0
  14. data/app/helpers/tim/application_helper.rb +4 -0
  15. data/app/models/tim/base.rb +6 -0
  16. data/app/models/tim/base_image.rb +15 -0
  17. data/app/models/tim/image_version.rb +13 -0
  18. data/app/models/tim/provider_image.rb +51 -0
  19. data/app/models/tim/target_image.rb +50 -0
  20. data/app/models/tim/template.rb +19 -0
  21. data/app/responders/tim/custom_responder.rb +24 -0
  22. data/app/validators/template_validator.rb +15 -0
  23. data/app/views/layouts/tim/application.html.erb +14 -0
  24. data/app/views/tim/base_images/_base_image.xml.haml +11 -0
  25. data/app/views/tim/base_images/_base_image_minimal.xml.haml +2 -0
  26. data/app/views/tim/base_images/_form.html.erb +17 -0
  27. data/app/views/tim/base_images/edit.html.erb +6 -0
  28. data/app/views/tim/base_images/index.html.erb +17 -0
  29. data/app/views/tim/base_images/index.xml.haml +4 -0
  30. data/app/views/tim/base_images/new.html.erb +5 -0
  31. data/app/views/tim/base_images/show.html.erb +5 -0
  32. data/app/views/tim/base_images/show.xml.haml +2 -0
  33. data/app/views/tim/entrypoint/index.xml.haml +7 -0
  34. data/app/views/tim/image_versions/_form.html.erb +17 -0
  35. data/app/views/tim/image_versions/_image_version.xml.haml +9 -0
  36. data/app/views/tim/image_versions/_image_version_minimal.xml.haml +2 -0
  37. data/app/views/tim/image_versions/edit.html.erb +6 -0
  38. data/app/views/tim/image_versions/index.html.erb +17 -0
  39. data/app/views/tim/image_versions/index.xml.haml +4 -0
  40. data/app/views/tim/image_versions/new.html.erb +5 -0
  41. data/app/views/tim/image_versions/show.html.erb +5 -0
  42. data/app/views/tim/image_versions/show.xml.haml +2 -0
  43. data/app/views/tim/images/_form.html.erb +17 -0
  44. data/app/views/tim/images/edit.html.erb +6 -0
  45. data/app/views/tim/images/index.html.erb +21 -0
  46. data/app/views/tim/images/new.html.erb +5 -0
  47. data/app/views/tim/images/show.html.erb +5 -0
  48. data/app/views/tim/layouts/application.html.erb +14 -0
  49. data/app/views/tim/provider_images/_form.html.erb +17 -0
  50. data/app/views/tim/provider_images/_provider_image.xml.haml +12 -0
  51. data/app/views/tim/provider_images/_provider_image_minimal.xml.haml +2 -0
  52. data/app/views/tim/provider_images/edit.html.erb +6 -0
  53. data/app/views/tim/provider_images/index.html.erb +17 -0
  54. data/app/views/tim/provider_images/index.xml.haml +4 -0
  55. data/app/views/tim/provider_images/new.html.erb +5 -0
  56. data/app/views/tim/provider_images/show.html.erb +5 -0
  57. data/app/views/tim/provider_images/show.xml.haml +2 -0
  58. data/app/views/tim/target_images/_form.html.erb +17 -0
  59. data/app/views/tim/target_images/_target_image.xml.haml +13 -0
  60. data/app/views/tim/target_images/_target_image_minimal.xml.haml +2 -0
  61. data/app/views/tim/target_images/edit.html.erb +6 -0
  62. data/app/views/tim/target_images/index.html.erb +21 -0
  63. data/app/views/tim/target_images/index.xml.haml +4 -0
  64. data/app/views/tim/target_images/new.html.erb +5 -0
  65. data/app/views/tim/target_images/show.html.erb +5 -0
  66. data/app/views/tim/target_images/show.xml.haml +2 -0
  67. data/app/views/tim/templates/_form.html.erb +17 -0
  68. data/app/views/tim/templates/_template.xml.haml +8 -0
  69. data/app/views/tim/templates/_template_minimal.xml.haml +2 -0
  70. data/app/views/tim/templates/edit.html.erb +6 -0
  71. data/app/views/tim/templates/index.html.erb +17 -0
  72. data/app/views/tim/templates/index.xml.haml +4 -0
  73. data/app/views/tim/templates/new.html.erb +5 -0
  74. data/app/views/tim/templates/show.html.erb +5 -0
  75. data/app/views/tim/templates/show.xml.haml +2 -0
  76. data/config/cucumber.yml +8 -0
  77. data/config/initializers/haml.rb +1 -0
  78. data/config/routes.rb +9 -0
  79. data/config/schemas/tdl.rng +282 -0
  80. data/config/user_keys.yml +26 -0
  81. data/db/migrate/20120906180351_create_tim_base_images.rb +12 -0
  82. data/db/migrate/20120906210106_create_tim_image_versions.rb +10 -0
  83. data/db/migrate/20120910175233_create_tim_templates.rb +9 -0
  84. data/db/migrate/20120911202321_create_tim_target_images.rb +14 -0
  85. data/db/migrate/20120911204329_create_tim_provider_images.rb +19 -0
  86. data/lib/generators/tim/install_generator.rb +15 -0
  87. data/lib/generators/tim/templates/README +6 -0
  88. data/lib/generators/tim/templates/tim.rb +8 -0
  89. data/lib/image_factory/image_factory.rb +4 -0
  90. data/lib/image_factory/model/base.rb +88 -0
  91. data/lib/image_factory/model/provider_image.rb +6 -0
  92. data/lib/image_factory/model/target_image.rb +6 -0
  93. data/lib/tasks/cucumber.rake +59 -0
  94. data/lib/tasks/tim_tasks.rake +4 -0
  95. data/lib/tim.rb +8 -0
  96. data/lib/tim/engine.rb +9 -0
  97. data/lib/tim/version.rb +3 -0
  98. data/spec/controllers/base_images_controller_spec.rb +131 -0
  99. data/spec/controllers/entrypoint_controller_spec.rb +32 -0
  100. data/spec/controllers/image_versions_controller_spec.rb +146 -0
  101. data/spec/controllers/provider_images_controller_spec.rb +156 -0
  102. data/spec/controllers/target_images_controller_spec.rb +153 -0
  103. data/spec/controllers/templates_controller_spec.rb +41 -0
  104. data/spec/decorators/controllers/templates_controller_decorator_spec.rb +13 -0
  105. data/spec/factories/tim/base_image.rb +10 -0
  106. data/spec/factories/tim/image_factory/provider_image.rb +10 -0
  107. data/spec/factories/tim/image_factory/status_detail.rb +0 -0
  108. data/spec/factories/tim/image_factory/target_image.rb +7 -0
  109. data/spec/factories/tim/image_version.rb +20 -0
  110. data/spec/factories/tim/provider_image.rb +9 -0
  111. data/spec/factories/tim/target_image.rb +10 -0
  112. data/spec/factories/tim/template.rb +23 -0
  113. data/spec/filters/user_keys_filter_spec.rb +41 -0
  114. data/spec/fixtures/template.xml +13 -0
  115. data/spec/models/base_image_spec.rb +39 -0
  116. data/spec/models/dummy/pool_family_spec.rb +14 -0
  117. data/spec/models/dummy/provider_account_spec.rb +18 -0
  118. data/spec/models/dummy/provider_type_spec.rb +18 -0
  119. data/spec/models/dummy/user_spec.rb +14 -0
  120. data/spec/models/image_version_spec.rb +27 -0
  121. data/spec/models/provider_image_spec.rb +69 -0
  122. data/spec/models/target_image_spec.rb +75 -0
  123. data/spec/models/template_spec.rb +16 -0
  124. data/spec/spec_helper.rb +56 -0
  125. data/spec/support/routes.rb +41 -0
  126. data/spec/validators/template_validator_spec.rb +19 -0
  127. data/spec/views/base_images_spec.rb +23 -0
  128. data/spec/views/image_versions_spec.rb +25 -0
  129. data/spec/views/provider_images_spec.rb +30 -0
  130. data/spec/views/target_images_spec.rb +25 -0
  131. data/spec/views/templates_spec.rb +24 -0
  132. data/test/dummy/Rakefile +7 -0
  133. data/test/dummy/app/assets/javascripts/application.js +15 -0
  134. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  135. data/test/dummy/app/controllers/application_controller.rb +3 -0
  136. data/test/dummy/app/decorators/tim/controllers/templates_controller_decorator.rb +8 -0
  137. data/test/dummy/app/helpers/application_helper.rb +2 -0
  138. data/test/dummy/app/models/pool_family.rb +3 -0
  139. data/test/dummy/app/models/provider_account.rb +3 -0
  140. data/test/dummy/app/models/provider_type.rb +3 -0
  141. data/test/dummy/app/models/tim/base_image.rb +6 -0
  142. data/test/dummy/app/models/user.rb +3 -0
  143. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  144. data/test/dummy/app/views/tim/base_images/_custom.xml.haml +1 -0
  145. data/test/dummy/app/views/tim/image_versions/_custom.xml.haml +1 -0
  146. data/test/dummy/app/views/tim/layouts/application.html.erb +14 -0
  147. data/test/dummy/app/views/tim/provider_images/_custom.xml.haml +1 -0
  148. data/test/dummy/app/views/tim/target_images/_custom.xml.haml +1 -0
  149. data/test/dummy/app/views/tim/templates/_custom.xml.haml +1 -0
  150. data/test/dummy/config.ru +4 -0
  151. data/test/dummy/config/application.rb +58 -0
  152. data/test/dummy/config/boot.rb +10 -0
  153. data/test/dummy/config/database.yml +28 -0
  154. data/test/dummy/config/environment.rb +5 -0
  155. data/test/dummy/config/environments/development.rb +37 -0
  156. data/test/dummy/config/environments/production.rb +67 -0
  157. data/test/dummy/config/environments/test.rb +37 -0
  158. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  159. data/test/dummy/config/initializers/inflections.rb +15 -0
  160. data/test/dummy/config/initializers/mime_types.rb +5 -0
  161. data/test/dummy/config/initializers/secret_token.rb +7 -0
  162. data/test/dummy/config/initializers/session_store.rb +8 -0
  163. data/test/dummy/config/initializers/tim.rb +8 -0
  164. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  165. data/test/dummy/config/locales/en.yml +5 -0
  166. data/test/dummy/config/routes.rb +4 -0
  167. data/test/dummy/db/development.sqlite3 +0 -0
  168. data/test/dummy/db/migrate/20120326103723532622_create_users.rb +9 -0
  169. data/test/dummy/db/migrate/20120423123114264114_create_pool_families.rb +7 -0
  170. data/test/dummy/db/migrate/20120911182850_add_pool_family_id_to_tim_base_image.rb +5 -0
  171. data/test/dummy/db/migrate/20120911202845_add_provider_type_id_to_tim_target_image.rb +5 -0
  172. data/test/dummy/db/migrate/20120911203222_create_provider_types.rb +7 -0
  173. data/test/dummy/db/migrate/20120911205431_create_provider_accounts.rb +7 -0
  174. data/test/dummy/db/schema.rb +86 -0
  175. data/test/dummy/db/test.sqlite3 +0 -0
  176. data/test/dummy/log/development.log +982 -0
  177. data/test/dummy/log/test.log +8629 -0
  178. data/test/dummy/public/404.html +26 -0
  179. data/test/dummy/public/422.html +26 -0
  180. data/test/dummy/public/500.html +26 -0
  181. data/test/dummy/public/favicon.ico +0 -0
  182. data/test/dummy/script/rails +6 -0
  183. data/test/dummy/test.rb +0 -0
  184. data/test/dummy/tmp/cache/assets/C7A/BB0/sprockets%2F13445f7a19078dd2df39517062aa6711 +0 -0
  185. data/test/dummy/tmp/cache/assets/C8C/CC0/sprockets%2F95d79f3b3096348427f3e4e38b5202e3 +0 -0
  186. data/test/dummy/tmp/cache/assets/CB0/2B0/sprockets%2F79106b90879c02a115d7f6f1c8390ac4 +0 -0
  187. data/test/dummy/tmp/cache/assets/CE0/690/sprockets%2F04c628c2a636286bfa92a4966b82b92a +0 -0
  188. data/test/dummy/tmp/cache/assets/D03/040/sprockets%2Fd9e94204d4b307145f12efc109b16c1f +0 -0
  189. data/test/dummy/tmp/cache/assets/D06/DC0/sprockets%2Fcd282851b6e4c463409ba3ece67e0510 +0 -0
  190. data/test/dummy/tmp/cache/assets/D23/5F0/sprockets%2F2a521f3183c6bbcd71bd26a5490b201e +0 -0
  191. data/test/dummy/tmp/cache/assets/D64/3A0/sprockets%2F56ac1aed10c39b12a88cb1b30f668f58 +0 -0
  192. data/test/dummy/tmp/cache/assets/D69/BD0/sprockets%2F0aaf75cf34556b33a9fec534fe4d0415 +0 -0
  193. data/test/dummy/tmp/cache/assets/D87/D80/sprockets%2Fefa3c8b210e87358c7add88cd6f49597 +0 -0
  194. data/test/dummy/tmp/cache/assets/D89/200/sprockets%2Ff9b4e953c874ed6a87de6490d055d9db +0 -0
  195. data/test/dummy/tmp/cache/assets/DF4/430/sprockets%2F403bb1de60cae4325cebd7e6c389b8ad +0 -0
  196. data/test/dummy/tmp/cache/assets/E00/500/sprockets%2Faaddc5b6f2cb6b98930cc54cf4c64a95 +0 -0
  197. data/test/dummy/tmp/cache/assets/EB3/CE0/sprockets%2Fd75a89c9fffacd99bce7eed96844eafc +0 -0
  198. metadata +432 -0
@@ -0,0 +1,4 @@
1
+ !!! XML
2
+ %provider_images
3
+ - @provider_images.each do |provider_image|
4
+ = render :partial => 'provider_image_minimal', :locals => {:provider_image => provider_image}
@@ -0,0 +1,5 @@
1
+ <h1>New provider_image</h1>
2
+
3
+ <%= render 'form' %>
4
+
5
+ <%= link_to 'Back', provider_images_path %>
@@ -0,0 +1,5 @@
1
+ <p id="notice"><%= notice %></p>
2
+
3
+
4
+ <%= link_to 'Edit', edit_provider_image_path(@provider_image) %> |
5
+ <%= link_to 'Back', provider_images_path %>
@@ -0,0 +1,2 @@
1
+ !!! XML
2
+ = render :partial => 'provider_image', :locals => { :provider_image => @provider_image }
@@ -0,0 +1,17 @@
1
+ <%= form_for(@target_image) do |f| %>
2
+ <% if @target_image.errors.any? %>
3
+ <div id="error_explanation">
4
+ <h2><%= pluralize(@target_image.errors.count, "error") %> prohibited this target_image from being saved:</h2>
5
+
6
+ <ul>
7
+ <% @target_image.errors.full_messages.each do |msg| %>
8
+ <li><%= msg %></li>
9
+ <% end %>
10
+ </ul>
11
+ </div>
12
+ <% end %>
13
+
14
+ <div class="actions">
15
+ <%= f.submit %>
16
+ </div>
17
+ <% end %>
@@ -0,0 +1,13 @@
1
+ !!! XML
2
+ %target_image{:id => target_image.id, :href => target_image_url(target_image.id) }
3
+ %target= target_image.target
4
+ %status= target_image.status
5
+ %status_detail= target_image.status_detail
6
+ %progress= target_image.progress
7
+ - if target_image.image_version
8
+ = render :partial => 'tim/image_versions/image_version_minimal', :locals => {:image_version => target_image.image_version}
9
+ %provider_images
10
+ - target_image.provider_images.each do |provider_image|
11
+ = render :partial => 'tim/provider_images/provider_image_minimal', :locals => {:provider_image => provider_image}
12
+ - if controller.template_exists?("custom", "tim/target_images", true)
13
+ = render :partial => 'tim/target_images/custom', :locals => {:target_image => target_image}
@@ -0,0 +1,2 @@
1
+ !!! XML
2
+ %target_image{:id => target_image.id, :href => target_image_url(target_image.id) }
@@ -0,0 +1,6 @@
1
+ <h1>Editing target_image</h1>
2
+
3
+ <%= render 'form' %>
4
+
5
+ <%= link_to 'Show', @target_image %> |
6
+ <%= link_to 'Back', target_images_path %>
@@ -0,0 +1,21 @@
1
+ <h1>Listing target_images</h1>
2
+
3
+ <table>
4
+ <tr>
5
+ <th></th>
6
+ <th></th>
7
+ <th></th>
8
+ </tr>
9
+
10
+ <% @target_images.each do |target_image| %>
11
+ <tr>
12
+ <td><%= link_to 'Show', target_image %></td>
13
+ <td><%= link_to 'Edit', edit_target_image_path(target_image) %></td>
14
+ <td><%= button_to 'Delete', target_image_path(target_image), :method => :delete %></td>
15
+ </tr>
16
+ <% end %>
17
+ </table>
18
+
19
+ <br />
20
+
21
+ <%= link_to 'New Target image', new_target_image_path %>
@@ -0,0 +1,4 @@
1
+ !!! XML
2
+ %target_images
3
+ - @target_images.each do |target_image|
4
+ = render :partial => 'target_image_minimal', :locals => {:target_image => target_image}
@@ -0,0 +1,5 @@
1
+ <h1>New target_image</h1>
2
+
3
+ <%= render 'form' %>
4
+
5
+ <%= link_to 'Back', target_images_path %>
@@ -0,0 +1,5 @@
1
+ <p id="notice"><%= notice %></p>
2
+
3
+
4
+ <%= link_to 'Edit', edit_target_image_path(@target_image) %> |
5
+ <%= link_to 'Back', target_images_path %>
@@ -0,0 +1,2 @@
1
+ !!! XML
2
+ = render :partial => 'target_image', :locals => { :target_image => @target_image }
@@ -0,0 +1,17 @@
1
+ <%= form_for(@template) do |f| %>
2
+ <% if @template.errors.any? %>
3
+ <div id="error_explanation">
4
+ <h2><%= pluralize(@template.errors.count, "error") %> prohibited this template from being saved:</h2>
5
+
6
+ <ul>
7
+ <% @template.errors.full_messages.each do |msg| %>
8
+ <li><%= msg %></li>
9
+ <% end %>
10
+ </ul>
11
+ </div>
12
+ <% end %>
13
+
14
+ <div class="actions">
15
+ <%= f.submit %>
16
+ </div>
17
+ <% end %>
@@ -0,0 +1,8 @@
1
+ !!! XML
2
+ %template{:id => template.id, :href => template_url(template.id) }
3
+ != template.xml_elements
4
+ %base_images
5
+ - template.base_images.each do |base_image|
6
+ = render :partial => 'tim/base_images/base_image_minimal', :locals => {:base_image => base_image}
7
+ - if controller.template_exists?("custom", "tim/templates", true)
8
+ = render :partial => 'tim/templates/custom', :locals => {:template => template}
@@ -0,0 +1,2 @@
1
+ !!! XML
2
+ %template{:id => template.id, :href => template_url(template.id) }
@@ -0,0 +1,6 @@
1
+ <h1>Editing template</h1>
2
+
3
+ <%= render 'form' %>
4
+
5
+ <%= link_to 'Show', @template %> |
6
+ <%= link_to 'Back', templates_path %>
@@ -0,0 +1,17 @@
1
+ <h1>Listing templates</h1>
2
+ <table>
3
+ <tr>
4
+ <th></th>
5
+ <th></th>
6
+ <th></th>
7
+ </tr>
8
+ <% @templates.each do |template| %>
9
+ <tr>
10
+ <td><%= link_to 'Show', template %></td>
11
+ <td><%= link_to 'Edit', edit_template_path(template) %></td>
12
+ <td><%= button_to 'Delete', template_path(template), :method => :delete %></td>
13
+ </tr>
14
+ <% end %>
15
+ </table>
16
+ <br />
17
+ <%= link_to 'New Template', new_template_path %>
@@ -0,0 +1,4 @@
1
+ !!! XML
2
+ %templates
3
+ - @templates.each do |template|
4
+ = render :partial => 'template_minimal', :locals => {:template => template}
@@ -0,0 +1,5 @@
1
+ <h1>New template</h1>
2
+
3
+ <%= render 'form' %>
4
+
5
+ <%= link_to 'Back', templates_path %>
@@ -0,0 +1,5 @@
1
+ <p id="notice"><%= notice %></p>
2
+
3
+
4
+ <%= link_to 'Edit', edit_template_path(@template) %> |
5
+ <%= link_to 'Back', templates_path %>
@@ -0,0 +1,2 @@
1
+ !!! XML
2
+ = render :partial => 'template', :locals => { :template => @template }
@@ -0,0 +1,8 @@
1
+ <%
2
+ rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : ""
3
+ rerun_opts = rerun.to_s.strip.empty? ? "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} features" : "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}"
4
+ std_opts = "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} --strict --tags ~@wip"
5
+ %>
6
+ default: <%= std_opts %> features
7
+ wip: --tags @wip:3 --wip features
8
+ rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags ~@wip
@@ -0,0 +1 @@
1
+ require 'haml'
@@ -0,0 +1,9 @@
1
+ Tim::Engine.routes.draw do
2
+ resources :base_images
3
+ resources :image_versions
4
+ resources :target_images
5
+ resources :provider_images
6
+ resources :templates
7
+
8
+ root :to => "entrypoint#index"
9
+ end
@@ -0,0 +1,282 @@
1
+ <?xml version="1.0"?>
2
+ <!-- A Relax NG schema for the TDL (template description language) format
3
+
4
+ #### Important Note
5
+ ##
6
+ ## This Schema is cloned from the upstream project Oz, it is modified to handle extra content validation. Please
7
+ ## do not use this schema for generating TDL templates, it is likely to change to coincide project specific requirements.
8
+ ## Always use the tdl.rng proper defined in the Oz project.
9
+ ##
10
+ ## The Oz project can be found here: https://github.com/clalancette/oz
11
+ ####
12
+
13
+ -->
14
+ <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
15
+ <start>
16
+ <ref name='template'/>
17
+ </start>
18
+
19
+ <define name='template'>
20
+ <element name='template'>
21
+ <optional>
22
+ <attribute name='version'>
23
+ <text/>
24
+ </attribute>
25
+ </optional>
26
+ <interleave>
27
+ <element name='name'>
28
+ <text/>
29
+ </element>
30
+ <element name='os'>
31
+ <interleave>
32
+ <element name='name'>
33
+ <choice>
34
+ <value>Fedora</value>
35
+ <value>FedoraCore</value>
36
+ <value>FC</value>
37
+ <value>RedHatEnterpriseLinux-2.1</value>
38
+ <value>RHEL-2.1</value>
39
+ <value>RedHatEnterpriseLinux-3</value>
40
+ <value>RHEL-3</value>
41
+ <value>CentOS-3</value>
42
+ <value>RedHatEnterpriseLinux-4</value>
43
+ <value>RHEL-4</value>
44
+ <value>CentOS-4</value>
45
+ <value>ScientificLinux-4</value>
46
+ <value>SL-4</value>
47
+ <value>RedHatEnterpriseLinux-5</value>
48
+ <value>RHEL-5</value>
49
+ <value>CentOS-5</value>
50
+ <value>ScientificLinux-5</value>
51
+ <value>SL-5</value>
52
+ <value>RedHatEnterpriseLinux-6</value>
53
+ <value>RHEL-6</value>
54
+ <value>CentOS-6</value>
55
+ <value>ScientificLinux-6</value>
56
+ <value>SL-6</value>
57
+ <value>OracleEnterpriseLinux-6</value>
58
+ <value>OEL-6</value>
59
+ <value>Ubuntu</value>
60
+ <value>Windows</value>
61
+ <value>RedHatLinux</value>
62
+ <value>RHL</value>
63
+ <value>OpenSUSE</value>
64
+ <value>Debian</value>
65
+ <value>RHELMock</value>
66
+ <value>FedoraMock</value>
67
+ </choice>
68
+ </element>
69
+ <element name='version'>
70
+ <text/>
71
+ </element>
72
+ <element name='arch'>
73
+ <choice>
74
+ <value>i386</value>
75
+ <value>x86_64</value>
76
+ </choice>
77
+ </element>
78
+ <element name='install'>
79
+ <choice>
80
+ <ref name='url'/>
81
+ <ref name='iso'/>
82
+ </choice>
83
+ </element>
84
+ <element name='rootpw'>
85
+ <text/>
86
+ </element>
87
+ <optional>
88
+ <element name='key'>
89
+ <text/>
90
+ </element>
91
+ </optional>
92
+ </interleave>
93
+ </element>
94
+ <optional>
95
+ <element name='description'>
96
+ <text/>
97
+ </element>
98
+ </optional>
99
+ <optional>
100
+ <element name='packages'>
101
+ <zeroOrMore>
102
+ <element name='package'>
103
+ <attribute name='name'>
104
+ <text/>
105
+ </attribute>
106
+ <interleave>
107
+ <optional>
108
+ <element name='repository'>
109
+ <text/>
110
+ </element>
111
+ </optional>
112
+ <optional>
113
+ <element name='file'>
114
+ <text/>
115
+ </element>
116
+ </optional>
117
+ <optional>
118
+ <element name='arguments'>
119
+ <text/>
120
+ </element>
121
+ </optional>
122
+ </interleave>
123
+ </element>
124
+ </zeroOrMore>
125
+ </element>
126
+ </optional>
127
+ <optional>
128
+ <element name='files'>
129
+ <zeroOrMore>
130
+ <element name='file'>
131
+ <attribute name='name'>
132
+ <text/>
133
+ </attribute>
134
+ <choice>
135
+ <ref name='rawtype'/>
136
+ <ref name='base64type'/>
137
+ </choice>
138
+ </element>
139
+ </zeroOrMore>
140
+ </element>
141
+ </optional>
142
+ <optional>
143
+ <element name='commands'>
144
+ <zeroOrMore>
145
+ <element name='command'>
146
+ <attribute name='name'>
147
+ <text/>
148
+ </attribute>
149
+ <choice>
150
+ <ref name='rawtype'/>
151
+ <ref name='base64type'/>
152
+ </choice>
153
+ </element>
154
+ </zeroOrMore>
155
+ </element>
156
+ </optional>
157
+ <optional>
158
+ <element name='repositories'>
159
+ <zeroOrMore>
160
+ <element name='repository'>
161
+ <attribute name='name'>
162
+ <text/>
163
+ </attribute>
164
+ <interleave>
165
+ <element name='url'>
166
+ <text/>
167
+ </element>
168
+ <optional>
169
+ <element name='signed'>
170
+ <ref name='bool'/>
171
+ </element>
172
+ </optional>
173
+ <optional>
174
+ <element name='persisted'>
175
+ <ref name='bool'/>
176
+ </element>
177
+ </optional>
178
+ <optional>
179
+ <interleave>
180
+ <element name='clientcert'>
181
+ <text/>
182
+ </element>
183
+ <optional>
184
+ <element name='clientkey'>
185
+ <text/>
186
+ </element>
187
+ </optional>
188
+ </interleave>
189
+ </optional>
190
+ <optional>
191
+ <interleave>
192
+ <element name='sslverify'>
193
+ <ref name='bool'/>
194
+ </element>
195
+ <element name='cacert'>
196
+ <text/>
197
+ </element>
198
+ </interleave>
199
+ </optional>
200
+ </interleave>
201
+ </element>
202
+ </zeroOrMore>
203
+ </element>
204
+ </optional>
205
+ </interleave>
206
+ </element>
207
+ </define>
208
+
209
+ <define name='url'>
210
+ <attribute name='type'>
211
+ <value>url</value>
212
+ </attribute>
213
+ <element name='url'>
214
+ <text/>
215
+ </element>
216
+ </define>
217
+
218
+ <define name='iso'>
219
+ <attribute name='type'>
220
+ <value>iso</value>
221
+ </attribute>
222
+ <interleave>
223
+ <element name='iso'>
224
+ <text/>
225
+ </element>
226
+ <optional>
227
+ <choice>
228
+ <element name='md5sum'>
229
+ <text/>
230
+ </element>
231
+ <element name='sha1sum'>
232
+ <text/>
233
+ </element>
234
+ <element name='sha256sum'>
235
+ <text/>
236
+ </element>
237
+ </choice>
238
+ </optional>
239
+ </interleave>
240
+ </define>
241
+
242
+ <define name='bool'>
243
+ <choice>
244
+ <data type="string">
245
+ <param name="pattern">[Tt][Rr][Uu][Ee]</param>
246
+ </data>
247
+ <data type="string">
248
+ <param name="pattern">[Ff][Aa][Ll][Ss][Ee]</param>
249
+ </data>
250
+ <data type="string">
251
+ <param name="pattern">[Yy][Ee][Ss]</param>
252
+ </data>
253
+ <data type="string">
254
+ <param name="pattern">[Nn][Oo]</param>
255
+ </data>
256
+ </choice>
257
+ </define>
258
+
259
+ <define name='rawtype'>
260
+ <optional>
261
+ <attribute name='type'>
262
+ <value>raw</value>
263
+ </attribute>
264
+ </optional>
265
+ <text/>
266
+ </define>
267
+
268
+ <define name='base64'>
269
+ <data type="string">
270
+ <param name="pattern">[a-zA-Z0-9+/]+={0,2}</param>
271
+ </data>
272
+ </define>
273
+
274
+ <define name='base64type'>
275
+ <attribute name='type'>
276
+ <value>base64</value>
277
+ </attribute>
278
+ <ref name='base64'/>
279
+ </define>
280
+
281
+ </grammar>
282
+