cloud-toaster 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +15 -0
- data/LICENSE +202 -0
- data/README.md +54 -0
- data/Rakefile +51 -0
- data/VERSION +1 -0
- data/bin/strace-4.8_patched/strace-i686 +0 -0
- data/bin/strace-4.8_patched/strace-x86_64 +0 -0
- data/bin/toaster +74 -0
- data/chef/cookbooks/chef-solo-search/CHANGELOG +16 -0
- data/chef/cookbooks/chef-solo-search/Gemfile +8 -0
- data/chef/cookbooks/chef-solo-search/LICENSE +202 -0
- data/chef/cookbooks/chef-solo-search/NOTICE +18 -0
- data/chef/cookbooks/chef-solo-search/README.md +143 -0
- data/chef/cookbooks/chef-solo-search/Rakefile +10 -0
- data/chef/cookbooks/chef-solo-search/libraries/search/overrides.rb +100 -0
- data/chef/cookbooks/chef-solo-search/libraries/search/parser.rb +222 -0
- data/chef/cookbooks/chef-solo-search/libraries/search.rb +75 -0
- data/chef/cookbooks/chef-solo-search/libraries/vendor/chef/solr_query/lucene.treetop +150 -0
- data/chef/cookbooks/chef-solo-search/libraries/vendor/chef/solr_query/lucene_nodes.rb +285 -0
- data/chef/cookbooks/chef-solo-search/libraries/vendor/chef/solr_query/query_transform.rb +65 -0
- data/chef/cookbooks/chef-solo-search/metadata.rb +11 -0
- data/chef/cookbooks/chef-solo-search/recipes/default.rb +3 -0
- data/chef/cookbooks/chef-solo-search/tests/data/data_bags/node/alpha.json +10 -0
- data/chef/cookbooks/chef-solo-search/tests/data/data_bags/node/beta.json +10 -0
- data/chef/cookbooks/chef-solo-search/tests/data/data_bags/node/without_json_class.json +7 -0
- data/chef/cookbooks/chef-solo-search/tests/data/data_bags/users/jerry.json +8 -0
- data/chef/cookbooks/chef-solo-search/tests/data/data_bags/users/lea.json +10 -0
- data/chef/cookbooks/chef-solo-search/tests/data/data_bags/users/mike.json +13 -0
- data/chef/cookbooks/chef-solo-search/tests/data/data_bags/users/tom.json +10 -0
- data/chef/cookbooks/chef-solo-search/tests/gemfiles/Gemfile.10 +4 -0
- data/chef/cookbooks/chef-solo-search/tests/gemfiles/Gemfile.11 +5 -0
- data/chef/cookbooks/chef-solo-search/tests/test_data_bags.rb +45 -0
- data/chef/cookbooks/chef-solo-search/tests/test_search.rb +244 -0
- data/chef/cookbooks/lxc/attributes/create_lxc.rb +8 -0
- data/chef/cookbooks/lxc/attributes/general.rb +15 -0
- data/chef/cookbooks/lxc/attributes/init_bare_os.rb +15 -0
- data/chef/cookbooks/lxc/attributes/init_proto.rb +18 -0
- data/chef/cookbooks/lxc/attributes/install_ruby.rb +51 -0
- data/chef/cookbooks/lxc/attributes/mount_volume.rb +11 -0
- data/chef/cookbooks/lxc/attributes/setup_host.rb +9 -0
- data/chef/cookbooks/lxc/attributes/setup_proxy.rb +3 -0
- data/chef/cookbooks/lxc/attributes/start_lxc.rb +11 -0
- data/chef/cookbooks/lxc/attributes/stop_lxc.rb +3 -0
- data/chef/cookbooks/lxc/files/install.chef.sh +78 -0
- data/chef/cookbooks/lxc/metadata.json +6 -0
- data/chef/cookbooks/lxc/recipes/create_lxc.rb +106 -0
- data/chef/cookbooks/lxc/recipes/init_bare_os.rb +82 -0
- data/chef/cookbooks/lxc/recipes/init_proto.rb +417 -0
- data/chef/cookbooks/lxc/recipes/install_docker.rb +61 -0
- data/chef/cookbooks/lxc/recipes/install_ruby.rb +28 -0
- data/chef/cookbooks/lxc/recipes/mount_volume.rb +63 -0
- data/chef/cookbooks/lxc/recipes/setup_database.rb +22 -0
- data/chef/cookbooks/lxc/recipes/setup_host.rb +179 -0
- data/chef/cookbooks/lxc/recipes/setup_proxy.rb +157 -0
- data/chef/cookbooks/lxc/recipes/start_lxc.rb +180 -0
- data/chef/cookbooks/lxc/recipes/stop_lxc.rb +86 -0
- data/chef/cookbooks/mysql/CHANGELOG.md +391 -0
- data/chef/cookbooks/mysql/README.md +211 -0
- data/chef/cookbooks/mysql/attributes/default.rb +22 -0
- data/chef/cookbooks/mysql/libraries/helpers.rb +277 -0
- data/chef/cookbooks/mysql/libraries/matchers.rb +17 -0
- data/chef/cookbooks/mysql/libraries/provider_mysql_client.rb +10 -0
- data/chef/cookbooks/mysql/libraries/provider_mysql_client_debian.rb +37 -0
- data/chef/cookbooks/mysql/libraries/provider_mysql_client_fedora.rb +38 -0
- data/chef/cookbooks/mysql/libraries/provider_mysql_client_freebsd.rb +33 -0
- data/chef/cookbooks/mysql/libraries/provider_mysql_client_omnios.rb +41 -0
- data/chef/cookbooks/mysql/libraries/provider_mysql_client_rhel.rb +42 -0
- data/chef/cookbooks/mysql/libraries/provider_mysql_client_smartos.rb +33 -0
- data/chef/cookbooks/mysql/libraries/provider_mysql_client_suse.rb +37 -0
- data/chef/cookbooks/mysql/libraries/provider_mysql_client_ubuntu.rb +37 -0
- data/chef/cookbooks/mysql/libraries/provider_mysql_service.rb +10 -0
- data/chef/cookbooks/mysql/libraries/provider_mysql_service_debian.rb +193 -0
- data/chef/cookbooks/mysql/libraries/provider_mysql_service_fedora.rb +157 -0
- data/chef/cookbooks/mysql/libraries/provider_mysql_service_freebsd.rb +151 -0
- data/chef/cookbooks/mysql/libraries/provider_mysql_service_omnios.rb +232 -0
- data/chef/cookbooks/mysql/libraries/provider_mysql_service_rhel.rb +318 -0
- data/chef/cookbooks/mysql/libraries/provider_mysql_service_smartos.rb +216 -0
- data/chef/cookbooks/mysql/libraries/provider_mysql_service_suse.rb +170 -0
- data/chef/cookbooks/mysql/libraries/provider_mysql_service_ubuntu.rb +218 -0
- data/chef/cookbooks/mysql/libraries/resource_mysql_client.rb +11 -0
- data/chef/cookbooks/mysql/libraries/resource_mysql_service.rb +194 -0
- data/chef/cookbooks/mysql/metadata.json +40 -0
- data/chef/cookbooks/mysql/metadata.rb +20 -0
- data/chef/cookbooks/mysql/recipes/client.rb +22 -0
- data/chef/cookbooks/mysql/recipes/server.rb +33 -0
- data/chef/cookbooks/mysql/recipes/server_deprecated.rb +23 -0
- data/chef/cookbooks/mysql/templates/default/5.0/my.cnf.erb +38 -0
- data/chef/cookbooks/mysql/templates/default/5.1/my.cnf.erb +38 -0
- data/chef/cookbooks/mysql/templates/default/5.5/my.cnf.erb +38 -0
- data/chef/cookbooks/mysql/templates/default/5.6/my.cnf.erb +39 -0
- data/chef/cookbooks/mysql/templates/default/apparmor/usr.sbin.mysqld.erb +40 -0
- data/chef/cookbooks/mysql/templates/default/debian/debian.cnf.erb +12 -0
- data/chef/cookbooks/mysql/templates/default/debian/mysql-server.seed.erb +10 -0
- data/chef/cookbooks/mysql/templates/default/deprecated/my.cnf.erb +374 -0
- data/chef/cookbooks/mysql/templates/default/grants/grants.sql.erb +27 -0
- data/chef/cookbooks/mysql/templates/default/omnios/mysql.xml.erb +26 -0
- data/chef/cookbooks/mysql/templates/default/omnios/svc.method.mysqld.erb +29 -0
- data/chef/cookbooks/mysql/templates/default/smartos/mysql.xml.erb +32 -0
- data/chef/cookbooks/mysql/templates/default/smartos/svc.method.mysqld.erb +29 -0
- data/chef/cookbooks/openssl/README.md +37 -0
- data/chef/cookbooks/openssl/libraries/secure_password.rb +37 -0
- data/chef/cookbooks/openssl/metadata.json +30 -0
- data/chef/cookbooks/openssl/metadata.rb +8 -0
- data/chef/cookbooks/openssl/recipes/default.rb +19 -0
- data/chef/cookbooks/ssh/attributes/default.rb +8 -0
- data/chef/cookbooks/ssh/recipes/authorize_key.rb +20 -0
- data/chef/cookbooks/toaster/attributes/testing.rb +37 -0
- data/chef/cookbooks/toaster/libraries/default.rb +61 -0
- data/chef/cookbooks/toaster/recipes/post__cakephp__default.rb +27 -0
- data/chef/cookbooks/toaster/recipes/post__cube__default.rb +26 -0
- data/chef/cookbooks/toaster/recipes/post__drupal__default.rb +16 -0
- data/chef/cookbooks/toaster/recipes/post__icinga__default.rb +9 -0
- data/chef/cookbooks/toaster/recipes/post__node__default.rb +16 -0
- data/chef/cookbooks/toaster/recipes/post__virtualbox__default.rb +12 -0
- data/chef/cookbooks/toaster/recipes/post__wordpress__default.rb +12 -0
- data/chef/cookbooks/toaster/recipes/pre__aegir__default.rb +12 -0
- data/chef/cookbooks/toaster/recipes/pre__app__default.rb +3 -0
- data/chef/cookbooks/toaster/recipes/pre__cakephp__default.rb +24 -0
- data/chef/cookbooks/toaster/recipes/pre__cube__default.rb +9 -0
- data/chef/cookbooks/toaster/recipes/pre__disco__default.rb +21 -0
- data/chef/cookbooks/toaster/recipes/pre__drbd__default.rb +7 -0
- data/chef/cookbooks/toaster/recipes/pre__eaccelerator__default.rb +2 -0
- data/chef/cookbooks/toaster/recipes/pre__elasticsearch-head__default.rb +11 -0
- data/chef/cookbooks/toaster/recipes/pre__elasticsearch__default.rb +6 -0
- data/chef/cookbooks/toaster/recipes/pre__gitosis__default.rb +17 -0
- data/chef/cookbooks/toaster/recipes/pre__kafka__default.rb +3 -0
- data/chef/cookbooks/toaster/recipes/pre__munin__server.rb +6 -0
- data/chef/cookbooks/toaster/recipes/pre__mysql__server.rb +4 -0
- data/chef/cookbooks/toaster/recipes/pre__nagios__default.rb +3 -0
- data/chef/cookbooks/toaster/recipes/pre__netkernel__default.rb +24 -0
- data/chef/cookbooks/toaster/recipes/pre__php__default.rb +2 -0
- data/chef/cookbooks/toaster/recipes/pre__postgresql__server.rb +3 -0
- data/chef/cookbooks/toaster/recipes/pre__pxe_dust__default.rb +9 -0
- data/chef/cookbooks/toaster/recipes/pre__pxe_install_server__default.rb +6 -0
- data/chef/cookbooks/toaster/recipes/pre__riak__default.rb +40 -0
- data/chef/cookbooks/toaster/recipes/pre__sensu__default.rb +9 -0
- data/chef/cookbooks/toaster/recipes/pre__sol__default.rb +2 -0
- data/chef/cookbooks/toaster/recipes/pre__solr__default.rb +6 -0
- data/chef/cookbooks/toaster/recipes/pre__sonar__default.rb +2 -0
- data/chef/cookbooks/toaster/recipes/pre__storm__default.rb +3 -0
- data/chef/cookbooks/toaster/recipes/pre__vmware__tools.rb +4 -0
- data/chef/cookbooks/toaster/recipes/pre__wordpress__default.rb +17 -0
- data/chef/cookbooks/toaster/recipes/pre__xen__default.rb +7 -0
- data/chef/cookbooks/toaster/recipes/pre__znc__default.rb +7 -0
- data/chef/cookbooks/toaster/recipes/testing.rb +241 -0
- data/chef/cookbooks/toaster/recipes/testing_post.rb +36 -0
- data/chef/cookbooks/yum/CHANGELOG.md +212 -0
- data/chef/cookbooks/yum/README.md +268 -0
- data/chef/cookbooks/yum/attributes/main.rb +97 -0
- data/chef/cookbooks/yum/libraries/matchers.rb +27 -0
- data/chef/cookbooks/yum/metadata.json +34 -0
- data/chef/cookbooks/yum/metadata.rb +13 -0
- data/chef/cookbooks/yum/providers/globalconfig.rb +37 -0
- data/chef/cookbooks/yum/providers/repository.rb +85 -0
- data/chef/cookbooks/yum/recipes/default.rb +34 -0
- data/chef/cookbooks/yum/resources/globalconfig.rb +105 -0
- data/chef/cookbooks/yum/resources/repository.rb +63 -0
- data/chef/cookbooks/yum/templates/default/main.erb +251 -0
- data/chef/cookbooks/yum/templates/default/repo.erb +109 -0
- data/chef/cookbooks/yum-mysql-community/CHANGELOG.md +67 -0
- data/chef/cookbooks/yum-mysql-community/README.md +137 -0
- data/chef/cookbooks/yum-mysql-community/attributes/mysql-connectors-community.rb +31 -0
- data/chef/cookbooks/yum-mysql-community/attributes/mysql55-community.rb +29 -0
- data/chef/cookbooks/yum-mysql-community/attributes/mysql56-community.rb +31 -0
- data/chef/cookbooks/yum-mysql-community/files/default/mysql_pubkey.asc +33 -0
- data/chef/cookbooks/yum-mysql-community/metadata.json +30 -0
- data/chef/cookbooks/yum-mysql-community/metadata.rb +8 -0
- data/chef/cookbooks/yum-mysql-community/recipes/connectors.rb +48 -0
- data/chef/cookbooks/yum-mysql-community/recipes/mysql55.rb +48 -0
- data/chef/cookbooks/yum-mysql-community/recipes/mysql56.rb +48 -0
- data/config.json +34 -0
- data/lib/toaster/api.rb +447 -0
- data/lib/toaster/chef/chef_listener.rb +514 -0
- data/lib/toaster/chef/chef_node_inspector.rb +165 -0
- data/lib/toaster/chef/chef_util.rb +865 -0
- data/lib/toaster/chef/failsafe_resource_parser.rb +140 -0
- data/lib/toaster/chef/resource_inspector.rb +536 -0
- data/lib/toaster/db/cache.rb +98 -0
- data/lib/toaster/db/cached_db.rb +53 -0
- data/lib/toaster/db/cgi_session_cache.rb +209 -0
- data/lib/toaster/db/db.rb +98 -0
- data/lib/toaster/db/mysql.rb +18 -0
- data/lib/toaster/db/ram_cache.rb +203 -0
- data/lib/toaster/markup/jdom-1.1.jar +0 -0
- data/lib/toaster/markup/jdom-b7.jar +0 -0
- data/lib/toaster/markup/markup_util.rb +437 -0
- data/lib/toaster/markup/vmtools-utils-0.5.jar +0 -0
- data/lib/toaster/markup/xmldiff.sh +5 -0
- data/lib/toaster/model/additional_property.rb +11 -0
- data/lib/toaster/model/automation.rb +218 -0
- data/lib/toaster/model/automation_attribute.rb +13 -0
- data/lib/toaster/model/automation_run.rb +104 -0
- data/lib/toaster/model/ignore_property.rb +11 -0
- data/lib/toaster/model/key_value_pair.rb +59 -0
- data/lib/toaster/model/run_attribute.rb +17 -0
- data/lib/toaster/model/state.rb +17 -0
- data/lib/toaster/model/state_change.rb +79 -0
- data/lib/toaster/model/task.rb +292 -0
- data/lib/toaster/model/task_execution.rb +76 -0
- data/lib/toaster/model/task_parameter.rb +66 -0
- data/lib/toaster/model/user.rb +32 -0
- data/lib/toaster/ohai/_disabled_/network_ports.rb +81 -0
- data/lib/toaster/ohai/apache/apache.rb +48 -0
- data/lib/toaster/ohai/cron/cron.rb +32 -0
- data/lib/toaster/ohai/files/_meta.rb +30 -0
- data/lib/toaster/ohai/files/files.rb +20 -0
- data/lib/toaster/ohai/gems/gems.rb +19 -0
- data/lib/toaster/ohai/groups/groups.rb +20 -0
- data/lib/toaster/ohai/iptables/iptables.rb +48 -0
- data/lib/toaster/ohai/mounts/mounts.rb +26 -0
- data/lib/toaster/ohai/mysql/mysql.rb +31 -0
- data/lib/toaster/ohai/packages/_meta.rb +86 -0
- data/lib/toaster/ohai/packages/packages.rb +33 -0
- data/lib/toaster/ohai/ports/ports.rb +21 -0
- data/lib/toaster/ohai/routes/routes.rb +25 -0
- data/lib/toaster/ohai/services/services.rb +42 -0
- data/lib/toaster/ohai/users/users.rb +17 -0
- data/lib/toaster/state/convergence.rb +197 -0
- data/lib/toaster/state/idempotence.rb +192 -0
- data/lib/toaster/state/ptrace_util.rb +48 -0
- data/lib/toaster/state/state_node.rb +105 -0
- data/lib/toaster/state/state_transition.rb +38 -0
- data/lib/toaster/state/state_transition_graph.rb +701 -0
- data/lib/toaster/state/syscall_tracer.rb +317 -0
- data/lib/toaster/state/system_state.rb +349 -0
- data/lib/toaster/state/transition_edge.rb +65 -0
- data/lib/toaster/test/test_attribute.rb +19 -0
- data/lib/toaster/test/test_case.rb +175 -0
- data/lib/toaster/test/test_coverage.rb +147 -0
- data/lib/toaster/test/test_coverage_goal.rb +108 -0
- data/lib/toaster/test/test_generator.rb +246 -0
- data/lib/toaster/test/test_orchestrator.rb +165 -0
- data/lib/toaster/test/test_result.rb +73 -0
- data/lib/toaster/test/test_runner.rb +394 -0
- data/lib/toaster/test/test_suite.rb +151 -0
- data/lib/toaster/test_manager.rb +281 -0
- data/lib/toaster/toaster_app_service.rb +141 -0
- data/lib/toaster/util/blocking_map.rb +80 -0
- data/lib/toaster/util/combinatorial.rb +58 -0
- data/lib/toaster/util/config.rb +103 -0
- data/lib/toaster/util/docker.rb +71 -0
- data/lib/toaster/util/logging.rb +19 -0
- data/lib/toaster/util/lxc.rb +383 -0
- data/lib/toaster/util/mem_dump.rb +38 -0
- data/lib/toaster/util/proxy.rb +23 -0
- data/lib/toaster/util/timestamp.rb +131 -0
- data/lib/toaster/util/util.rb +437 -0
- data/lib/toaster/web_ui.rb +7 -0
- data/webapp/Gemfile +46 -0
- data/webapp/Gemfile.lock +237 -0
- data/webapp/Rakefile +6 -0
- data/webapp/app/assets/fonts/font.woff +0 -0
- data/webapp/app/assets/images/final_state.gif +0 -0
- data/webapp/app/assets/images/initial_state.gif +0 -0
- data/webapp/app/assets/images/loading.gif +0 -0
- data/webapp/app/assets/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/webapp/app/assets/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/webapp/app/assets/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/webapp/app/assets/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/webapp/app/assets/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/webapp/app/assets/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/webapp/app/assets/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/webapp/app/assets/images/ui-icons_222222_256x240.png +0 -0
- data/webapp/app/assets/javascripts/analysis.js.coffee +3 -0
- data/webapp/app/assets/javascripts/application.js +16 -0
- data/webapp/app/assets/javascripts/execs.js.coffee +3 -0
- data/webapp/app/assets/javascripts/graph.js +441 -0
- data/webapp/app/assets/javascripts/jquery-1.7.2.js +9404 -0
- data/webapp/app/assets/javascripts/jquery-ui-1.8.22.js +11529 -0
- data/webapp/app/assets/javascripts/jquery.cookie.js +96 -0
- data/webapp/app/assets/javascripts/jquery.hotkeys.js +99 -0
- data/webapp/app/assets/javascripts/jquery.jstree.js +4551 -0
- data/webapp/app/assets/javascripts/jsPlumb/jquery.jsPlumb-1.3.14-all-min.js +1 -0
- data/webapp/app/assets/javascripts/jstree.util.js +53 -0
- data/webapp/app/assets/javascripts/scripts.js.coffee +3 -0
- data/webapp/app/assets/javascripts/settings.js.coffee +3 -0
- data/webapp/app/assets/javascripts/test.js.coffee +3 -0
- data/webapp/app/assets/javascripts/util.js.coffee +3 -0
- data/webapp/app/assets/stylesheets/analysis.css.scss +3 -0
- data/webapp/app/assets/stylesheets/application.css +49 -0
- data/webapp/app/assets/stylesheets/execs.css.scss +3 -0
- data/webapp/app/assets/stylesheets/graph.css +159 -0
- data/webapp/app/assets/stylesheets/jquery-ui-1.8.6.custom.css +572 -0
- data/webapp/app/assets/stylesheets/layout.css +151 -0
- data/webapp/app/assets/stylesheets/menu.css +186 -0
- data/webapp/app/assets/stylesheets/reset.css +41 -0
- data/webapp/app/assets/stylesheets/scripts.css.scss +3 -0
- data/webapp/app/assets/stylesheets/settings.css.scss +3 -0
- data/webapp/app/assets/stylesheets/test.css.scss +3 -0
- data/webapp/app/assets/stylesheets/util.css.scss +3 -0
- data/webapp/app/assets/stylesheets/websymbols/websymbols-regular-webfont.eot +0 -0
- data/webapp/app/assets/stylesheets/websymbols/websymbols-regular-webfont.svg +1 -0
- data/webapp/app/assets/stylesheets/websymbols/websymbols-regular-webfont.ttf +0 -0
- data/webapp/app/assets/stylesheets/websymbols/websymbols-regular-webfont.woff +0 -0
- data/webapp/app/controllers/analysis_controller.rb +7 -0
- data/webapp/app/controllers/application_controller.rb +14 -0
- data/webapp/app/controllers/base_controller.rb +91 -0
- data/webapp/app/controllers/execs_controller.rb +59 -0
- data/webapp/app/controllers/graph_controller.rb +17 -0
- data/webapp/app/controllers/scripts_controller.rb +166 -0
- data/webapp/app/controllers/settings_controller.rb +10 -0
- data/webapp/app/controllers/test_controller.rb +127 -0
- data/webapp/app/controllers/util_controller.rb +6 -0
- data/webapp/app/helpers/analysis_helper.rb +2 -0
- data/webapp/app/helpers/application_helper.rb +2 -0
- data/webapp/app/helpers/automations_helper.rb +2 -0
- data/webapp/app/helpers/execs_helper.rb +2 -0
- data/webapp/app/helpers/scripts_helper.rb +2 -0
- data/webapp/app/helpers/settings_helper.rb +2 -0
- data/webapp/app/helpers/test_helper.rb +2 -0
- data/webapp/app/helpers/util_helper.rb +2 -0
- data/webapp/app/views/analysis/convergence.html.erb +156 -0
- data/webapp/app/views/analysis/idempotence.html.erb +2 -0
- data/webapp/app/views/execs/automation_runs.html.erb +98 -0
- data/webapp/app/views/execs/task_executions.html.erb +154 -0
- data/webapp/app/views/graph/graph_frame.html +101 -0
- data/webapp/app/views/layouts/application.html.erb +114 -0
- data/webapp/app/views/scripts/edit.html.erb +58 -0
- data/webapp/app/views/scripts/graph.html.erb +75 -0
- data/webapp/app/views/scripts/import_chef.html.erb +104 -0
- data/webapp/app/views/scripts/scripts.html.erb +116 -0
- data/webapp/app/views/scripts/tasks.html.erb +139 -0
- data/webapp/app/views/settings/containers.html.erb +161 -0
- data/webapp/app/views/settings/index.html.erb +51 -0
- data/webapp/app/views/test/cases.html.erb +2 -0
- data/webapp/app/views/test/gen.html.erb +229 -0
- data/webapp/app/views/test/suites.html.erb +205 -0
- data/webapp/app/views/util/chef.html.erb +53 -0
- data/webapp/bin/bundle +3 -0
- data/webapp/bin/rails +4 -0
- data/webapp/bin/rake +4 -0
- data/webapp/config/application.rb +28 -0
- data/webapp/config/boot.rb +18 -0
- data/webapp/config/database.yml +42 -0
- data/webapp/config/environment.rb +5 -0
- data/webapp/config/environments/development.rb +35 -0
- data/webapp/config/environments/production.rb +80 -0
- data/webapp/config/environments/test.rb +36 -0
- data/webapp/config/initializers/backtrace_silencers.rb +7 -0
- data/webapp/config/initializers/devise.rb +256 -0
- data/webapp/config/initializers/filter_parameter_logging.rb +4 -0
- data/webapp/config/initializers/inflections.rb +16 -0
- data/webapp/config/initializers/mime_types.rb +5 -0
- data/webapp/config/initializers/patches.rb +13 -0
- data/webapp/config/initializers/secret_token.rb +12 -0
- data/webapp/config/initializers/session_store.rb +6 -0
- data/webapp/config/initializers/wrap_parameters.rb +16 -0
- data/webapp/config/locales/devise.en.yml +59 -0
- data/webapp/config/locales/en.yml +23 -0
- data/webapp/config/routes.rb +113 -0
- data/webapp/config.ru +4 -0
- data/webapp/db/development.sqlite3 +0 -0
- data/webapp/db/migrate/20140624002037_devise_create_users.rb +42 -0
- data/webapp/db/migrate/20140628002058_create_all_tables.rb +159 -0
- data/webapp/db/schema.rb +162 -0
- data/webapp/db/seeds.rb +7 -0
- data/webapp/log/development.log +167823 -0
- data/webapp/public/404.html +58 -0
- data/webapp/public/422.html +58 -0
- data/webapp/public/500.html +57 -0
- data/webapp/public/favicon.ico +0 -0
- data/webapp/public/robots.txt +5 -0
- data/webapp/test/controllers/analysis_controller_test.rb +14 -0
- data/webapp/test/controllers/automations_controller_test.rb +49 -0
- data/webapp/test/controllers/execs_controller_test.rb +9 -0
- data/webapp/test/controllers/executions_controller_test.rb +9 -0
- data/webapp/test/controllers/runs_controller_test.rb +7 -0
- data/webapp/test/controllers/scripts_controller_test.rb +9 -0
- data/webapp/test/controllers/settings_controller_test.rb +9 -0
- data/webapp/test/controllers/test_controller_test.rb +14 -0
- data/webapp/test/controllers/util_controller_test.rb +9 -0
- data/webapp/test/fixtures/users.yml +11 -0
- data/webapp/test/helpers/analysis_helper_test.rb +4 -0
- data/webapp/test/helpers/automations_helper_test.rb +4 -0
- data/webapp/test/helpers/execs_helper_test.rb +4 -0
- data/webapp/test/helpers/executions_helper_test.rb +4 -0
- data/webapp/test/helpers/runs_helper_test.rb +4 -0
- data/webapp/test/helpers/scripts_helper_test.rb +4 -0
- data/webapp/test/helpers/settings_helper_test.rb +4 -0
- data/webapp/test/helpers/test_helper_test.rb +4 -0
- data/webapp/test/helpers/util_helper_test.rb +4 -0
- data/webapp/test/models/user_test.rb +7 -0
- data/webapp/test/test_helper.rb +15 -0
- data/webapp/tmp/cache/assets/development/sass/1330a34c6b24ed44c0f194c03246f627289a985a/analysis.css.scssc +0 -0
- data/webapp/tmp/cache/assets/development/sass/1330a34c6b24ed44c0f194c03246f627289a985a/automations.css.scssc +0 -0
- data/webapp/tmp/cache/assets/development/sass/1330a34c6b24ed44c0f194c03246f627289a985a/execs.css.scssc +0 -0
- data/webapp/tmp/cache/assets/development/sass/1330a34c6b24ed44c0f194c03246f627289a985a/executions.css.scssc +0 -0
- data/webapp/tmp/cache/assets/development/sass/1330a34c6b24ed44c0f194c03246f627289a985a/scripts.css.scssc +0 -0
- data/webapp/tmp/cache/assets/development/sass/1330a34c6b24ed44c0f194c03246f627289a985a/settings.css.scssc +0 -0
- data/webapp/tmp/cache/assets/development/sass/1330a34c6b24ed44c0f194c03246f627289a985a/test.css.scssc +0 -0
- data/webapp/tmp/cache/assets/development/sass/1330a34c6b24ed44c0f194c03246f627289a985a/util.css.scssc +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/06a1cdb3d5472dd126cffc18f548c342 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/0dc0562647e703ca0535da3b9fcad796 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/113f1c71cb0f2a786729477989122982 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/151a1c6b128721d8923ba0c380a2af17 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/1722fb8a6daad566c8a6d5ef31969459 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/1a05555c46560c6b246aa0a996679bc6 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/1cb7fb6aa8bd1c2b7df8f7c52442e345 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/1d76f803b0a83adc5ea7e7c848657967 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/200152f95fc464d69c425ed8fdc2fbcc +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/2049c8927ebd046c8a3291f81041d5f1 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/207907100aabd08a6767e39a95b364e3 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/249e2d4db815922fc72419c4a1407caf +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/3034e4c334b1ebed9433e33050555f18 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/316c88d859cc3666044e51b1dd89e872 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/347f43d816178c8ba11a28a771696924 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/36ab92a3b8d527ed1eff0944b5f1263d +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/3893b852ff196f05ff6ca8e38bb2237f +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/3c358bd5fa32d151c7aa44971dd9b96f +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/3ce88fad85146e0bed233f5419c24d29 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/3dabcb7c89677292e1e019a9bac446e5 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/4116fac01e6d379ede37af725a592477 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/42628e032b8f0b16a5ba01a1fcc7b6d7 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/437b258a98e8fe2c87fa8e24b7ce9abf +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/43e98ed206f05738ae305e7e1b09a840 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/468da8933ba442b88b2f4b0e40c2ac30 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/48ef3fa68e9084c7cfa84e525decc318 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/4b68dcc030691297629a7156361018dc +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/50368b1bd77c9130d821cbad89ab83ac +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/511a980807b8d16fc3fb839991041865 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/516a0973874a73d0d15feec9448f7466 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/569e21b0ca1a230c7880f8d7a8b1febf +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/5b5543d2ed5bed100f1739fc12ebf2c5 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/5c10dbffb918651dc0498579ba9a6853 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/5c366b5370316b3e9c03d1a58cb5eb44 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/5fcb9466e0d5cb0e31b35957fe2d3901 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/61da396fb86c5ecd844a2d83ac759b4b +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/624ba87170059068845a4651b3cd2c7c +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/6391f61b6121feda70da6d0a22520fdd +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/653a981829c12a52bd57b7918168a148 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/66479793d9e5683d9f7fa67522d1962d +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/69c589bd224ee0df5ab02e4568e0ab39 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/6dd7c564897b7e66eecbb180baeef2c6 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/6e2b92a4e6966cb78e63207bc7888391 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/70adb410f59a0edc5aea8c2b2ef8a441 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/72cbfd5bf33945bcce154f7a4feaf04d +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/740ee9d355ada8cf5e9beb620f2cd5cc +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/74770a22b5d1b0b3bc3527da83706f96 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/759bf97655af50852816720db7b59fcb +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/76e9c19246c684413a02af695fa2b0bc +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/7728beeace48ca12e336d2bce0158871 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/77f49730c7b689f75a2e174fbd3ace2a +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/78021a57030fd36cf82699aad9910b26 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/796b349b06da691fe5f069f9e3947fcb +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/79e7505c70697cc7d34d4a8351c3b840 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/7b2b7d9034fc7b77daf5da1436667e6f +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/7c2ea2ca2cdd89b062bf23f44e8f599c +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/7ea112af55e6df12cdff377052b71420 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/7f27632588dd316836b009a621c0176c +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/7fcef9f644290dea8d0e4bf13f6bb8e9 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/81c6bf67419a29257ed79f442c24907d +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/83656ce9260eb473c1654420e0180167 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/83e8bdddefc2dce069b56e6650135397 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/880c796f41e5d67ae68ed239acfc91e3 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/8c1c39dd537d2c9990fe9c70a5646b06 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/8d763042da5254015767385ce324b348 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/91e1ccbf65ff4d9b0f42b1159796bcf2 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/92cdfac7698b6bb68983cf317c1cedef +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/94cab8cbc120e152ce4c444492a3fc1d +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/96b918c3c041b6a089c8adc870fa3aaa +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/97cbe306627b432ab3bfb52416690d1d +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/98da83d396c0c00eb03937ecbc2e6bfa +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/9db04db20ec9c4a0f84ed01caa5e6e2b +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/9dc1c251f50c828fae95d6107619c53e +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/9e91711ab34bbf89ad1cfb4351027d36 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/9f587881f98b328b656e6456178418b5 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/9fc981560caba00621bb95d0974ad076 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/9fd4385f8fda99f3ddd3f133a89231d1 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/a32ab71649e3db15eca95bcc3a7588da +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/a497c976969bdbb1f69875358d39d3b5 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/b06058d455770c1d9db6b6670bc4bf4d +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/b3da405f1e68470ad6146a1322f2438c +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/b4ba5853663f6721d15942ce08dd76bf +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/b6f1534bcdbff92a16c85487f363235a +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/b9c57b9750f8af3551b1a5d9e27f0a92 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/bb5be6a0ee889a15214e2442aee8c6e1 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/bc80a81b2d67b5ad40f3c7a2bb6e6f22 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/bfaba27d5ce71d292f453659b0755511 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/bfac6cd2984fbd5e0d762389e3c37164 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/c17bec9e3b5db6d8385c3d6eb362e628 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/c1a9eceddc0a1e41eb2992e9204f71e6 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/c50cd87be040044504b5c3fde1047e24 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/c5907cfd07b24ad19b8c80e8af618a57 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/c8da5594caf845a183dd1c6cd45c5433 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/cbc6968ed49fa14db439a64dd0a46abc +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/cedf710ee090647b81c08675583eca62 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/cf1e3cebfad43293c3c470a5e437ebc9 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/d5a14f86bb4b422fdd8eb4722d966c9a +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/d66b9cdd3230f9e5354e495e17097c49 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/dfa0ed87d851222fe58ada385e3f037d +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/e1aa402390382db4d97b27cb094485fa +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/e4f1db35ef9d9fbbf53252a44e381eb8 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/e57eb6c1ad51fd8c13afc0e719a259b5 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/e7c37b542e914e392ec326190cea1aa2 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/e923d7e19c216d4a924831f3896e007a +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/e96a414a621483bbc89e73f11be5e7b4 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/eafcfc3d2561c18743c1b32f0f710c68 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/ecdd630f5466d45a2afa7515aaa5fc3b +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/ee60a0a35d60cff425373970547694bd +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/eee2c36b75709b0c3797c2a151fdd5d3 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/f104b66c0f89b453d0c8c73980fbab18 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/f26d1bc86590415685e9836ad75d1774 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/f4081e868eb565527099dba2c9d8c4de +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/f813030b97e30415ad276bbd1f7e1fb4 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/f8e3e28bc9640c25da58aea46c3ac4b3 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/f9169d0a8b70eaf95de52b3c6ad51105 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/f939450f7a481e3fbeb158b81b39c624 +0 -0
- data/webapp/tmp/cache/assets/development/sprockets/fce73296b8298ac4c74b3e95cde4dfdb +0 -0
- metadata +941 -0
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
class ScriptsController < ApplicationController
|
|
2
|
+
|
|
3
|
+
require "toaster/model/automation"
|
|
4
|
+
require "toaster/model/automation_attribute"
|
|
5
|
+
require "toaster/chef/chef_util"
|
|
6
|
+
|
|
7
|
+
skip_before_action :verify_authenticity_token
|
|
8
|
+
|
|
9
|
+
def scripts
|
|
10
|
+
cur_auto_reset()
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def edit
|
|
14
|
+
if request.post? || request.patch?
|
|
15
|
+
if params[:add_param]
|
|
16
|
+
auto = cur_auto
|
|
17
|
+
auto.automation_attributes << Toaster::AutomationAttribute.new(
|
|
18
|
+
:key => "", :value => "")
|
|
19
|
+
elsif params[:del_param]
|
|
20
|
+
params[:auto][:attr].each do |index,attr|
|
|
21
|
+
if params[:del_param][index]
|
|
22
|
+
to_delete = cur_auto.automation_attributes[index.to_i - 1]
|
|
23
|
+
cur_auto.automation_attributes.destroy(to_delete) if to_delete
|
|
24
|
+
break
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
elsif params[:add_ignoreprop]
|
|
28
|
+
auto = cur_auto
|
|
29
|
+
auto.ignore_properties << Toaster::IgnoreProperty.new(
|
|
30
|
+
:key => "", :value => "")
|
|
31
|
+
elsif params[:del_ignoreprop]
|
|
32
|
+
params[:auto][:ignoreprop].each do |index,attr|
|
|
33
|
+
if params[:del_ignoreprop][index]
|
|
34
|
+
to_delete = cur_auto.ignore_properties[index.to_i - 1]
|
|
35
|
+
cur_auto.ignore_properties.destroy(to_delete) if to_delete
|
|
36
|
+
break
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
elsif params[:add_additionalprop]
|
|
40
|
+
auto = cur_auto
|
|
41
|
+
auto.additional_properties << Toaster::AdditionalProperty.new(
|
|
42
|
+
:key => "", :value => "")
|
|
43
|
+
elsif params[:del_additionalprop]
|
|
44
|
+
params[:auto][:additionalprop].each do |index,attr|
|
|
45
|
+
if params[:del_additionalprop][index]
|
|
46
|
+
to_delete = cur_auto.additional_properties[index.to_i - 1]
|
|
47
|
+
cur_auto.additional_properties.destroy(to_delete) if to_delete
|
|
48
|
+
break
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
elsif params[:save]
|
|
52
|
+
id = params[:auto_id]
|
|
53
|
+
auto = nil
|
|
54
|
+
if id == "0"
|
|
55
|
+
auto = Toaster::Automation.new(
|
|
56
|
+
:uuid => Toaster::Util.generate_short_uid)
|
|
57
|
+
else
|
|
58
|
+
auto = cur_auto
|
|
59
|
+
end
|
|
60
|
+
auto.name = params[:auto][:name]
|
|
61
|
+
auto.language = params[:auto][:language]
|
|
62
|
+
auto.visibility = params[:auto][:visibility]
|
|
63
|
+
auto.user = current_user
|
|
64
|
+
auto.script = params[:auto][:script]
|
|
65
|
+
if params[:auto][:attr]
|
|
66
|
+
params[:auto][:attr].each do |index,attr|
|
|
67
|
+
auto.automation_attributes[index.to_i - 1].key = attr["key"]
|
|
68
|
+
auto.automation_attributes[index.to_i - 1].value = attr["value"]
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
if params[:auto][:ignoreprop]
|
|
72
|
+
params[:auto][:ignoreprop].each do |index,prop|
|
|
73
|
+
auto.ignore_properties[index.to_i - 1].key = prop["key"]
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
if params[:auto][:additionalprop]
|
|
77
|
+
params[:auto][:additionalprop].each do |index,prop|
|
|
78
|
+
auto.additional_properties[index.to_i - 1].key = prop["key"]
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
auto.save
|
|
82
|
+
redirect_to scripts_url()
|
|
83
|
+
end
|
|
84
|
+
else
|
|
85
|
+
# TODO
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
def delete
|
|
90
|
+
id = params[:auto_id]
|
|
91
|
+
a = Toaster::Automation.find(id)
|
|
92
|
+
if a
|
|
93
|
+
a.delete
|
|
94
|
+
end
|
|
95
|
+
redirect_to scripts_url()
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
def import_chef
|
|
99
|
+
if params[:submitImport]
|
|
100
|
+
script_file = ChefUtil.get_cookbook_download_link(
|
|
101
|
+
params[:cookbook], params[:cookbook_version])
|
|
102
|
+
a = Automation.new(
|
|
103
|
+
:name => params[:auto_name],
|
|
104
|
+
:cookbook => params[:cookbook],
|
|
105
|
+
:cookbook_version => params[:cookbook_version],
|
|
106
|
+
:recipes => params[:recipes],
|
|
107
|
+
:user => current_user,
|
|
108
|
+
:script => script_file
|
|
109
|
+
)
|
|
110
|
+
#puts "params[:recipes].split(/[\s,;]+/) #{params[:recipes].split(/[\s,;]+/)}"
|
|
111
|
+
params[:recipes].split(/[\s,;]+/).each do |rec|
|
|
112
|
+
recipe_info = ChefUtil.parse_resources(
|
|
113
|
+
params[:cookbook], rec, params[:cookbook_version])[params[:cookbook]][rec]
|
|
114
|
+
recipe_info["resources"].each do |line,code|
|
|
115
|
+
action = "__action__"
|
|
116
|
+
resource = "__action__"
|
|
117
|
+
if recipe_info["resource_objs"][line]
|
|
118
|
+
action = recipe_info["resource_objs"][line].action
|
|
119
|
+
action = action.join(" , ") if action.kind_of?(Array)
|
|
120
|
+
resource = recipe_info["resource_objs"][line].resource_name
|
|
121
|
+
end
|
|
122
|
+
task = Task.new(
|
|
123
|
+
:automation => a,
|
|
124
|
+
:sourceline => line,
|
|
125
|
+
:sourcecode => code,
|
|
126
|
+
:sourcefile => recipe_info["file"],
|
|
127
|
+
:resource => resource,
|
|
128
|
+
:action => action
|
|
129
|
+
)
|
|
130
|
+
task.save
|
|
131
|
+
a.tasks << task
|
|
132
|
+
end
|
|
133
|
+
end
|
|
134
|
+
a.save
|
|
135
|
+
redirect_to scripts_url()
|
|
136
|
+
end
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
def cur_auto_reset()
|
|
140
|
+
session[:auto_cur] = nil
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
def cur_auto()
|
|
144
|
+
ScriptsController.cur_auto(session, params)
|
|
145
|
+
end
|
|
146
|
+
def self.cur_auto(session, params)
|
|
147
|
+
if !session[:auto_cur] || "#{session[:auto_cur].id}" != params[:auto_id]
|
|
148
|
+
session[:auto_cur] = nil
|
|
149
|
+
if params[:auto_id] == "0"
|
|
150
|
+
session[:auto_cur] = Toaster::Automation.new(
|
|
151
|
+
:uuid => Toaster::Util.generate_short_uid)
|
|
152
|
+
elsif params[:auto_id]
|
|
153
|
+
session[:auto_cur] = Toaster::Automation.find(params[:auto_id])
|
|
154
|
+
end
|
|
155
|
+
end
|
|
156
|
+
session[:auto_cur]
|
|
157
|
+
end
|
|
158
|
+
def cur_run()
|
|
159
|
+
ExecsController.cur_run(session, params)
|
|
160
|
+
end
|
|
161
|
+
def cur_task()
|
|
162
|
+
ExecsController.cur_task(session, params)
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
helper_method :get_automation_for_param, :cur_auto, :cur_auto_or_new, :cur_run, :cur_task
|
|
166
|
+
end
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
require "toaster/test/test_suite"
|
|
2
|
+
require "toaster/test/test_coverage"
|
|
3
|
+
require "toaster/test/test_generator"
|
|
4
|
+
require "toaster/api"
|
|
5
|
+
|
|
6
|
+
class TestController < ApplicationController
|
|
7
|
+
skip_before_action :verify_authenticity_token
|
|
8
|
+
def suites
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
skip_before_action :verify_authenticity_token
|
|
12
|
+
def cases
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def cur_auto
|
|
16
|
+
ScriptsController.cur_auto(session, params)
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def gen
|
|
20
|
+
if params[:selectAuto]
|
|
21
|
+
redirect_to "/test/gen/#{params[:automation]}"
|
|
22
|
+
elsif params[:submitGen]
|
|
23
|
+
auto = cur_auto
|
|
24
|
+
|
|
25
|
+
suite = TestSuite.new(
|
|
26
|
+
:automation => auto,
|
|
27
|
+
:user => current_user,
|
|
28
|
+
:lxc_prototype => params[:prototype],
|
|
29
|
+
:parameter_test_values => {}
|
|
30
|
+
)
|
|
31
|
+
idem = param('idempotenceN').gsub(/\s+/, "")
|
|
32
|
+
if idem.include?("..")
|
|
33
|
+
idem = eval("#{idem}").to_a
|
|
34
|
+
else
|
|
35
|
+
idem = [idem.to_i]
|
|
36
|
+
end
|
|
37
|
+
suite.test_coverage_goal = TestCoverageGoal.create(
|
|
38
|
+
idem,
|
|
39
|
+
params[:skipN].split(/[\s,;]+/).collect{|a| a.to_i},
|
|
40
|
+
params[:skipNsucc].split(/[\s,;]+/).collect{|a| a.to_i},
|
|
41
|
+
params[:combineN].split(/[\s,;]+/).collect{|a| a.to_i},
|
|
42
|
+
params[:combineNsucc].split(/[\s,;]+/).collect{|a| a.to_i},
|
|
43
|
+
params[:graphCoverage] == "transisions" ?
|
|
44
|
+
StateGraphCoverage::TRANSITIONS : StateGraphCoverage::STATES
|
|
45
|
+
)
|
|
46
|
+
gen = TestGenerator.new(suite)
|
|
47
|
+
tests = gen.gen_all_tests()
|
|
48
|
+
suite.test_cases = tests
|
|
49
|
+
suite.save
|
|
50
|
+
redirect_to "/test/suites/#{suite.id}"
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
def reset_case
|
|
55
|
+
test_case = cur_case
|
|
56
|
+
if test_case
|
|
57
|
+
test_case.start_time = nil
|
|
58
|
+
test_case.end_time = nil
|
|
59
|
+
if test_case.automation_run
|
|
60
|
+
test_case.automation_run.delete
|
|
61
|
+
end
|
|
62
|
+
test_case.save
|
|
63
|
+
redirect_to "/test/suites/#{test_case.test_suite.id}"
|
|
64
|
+
else
|
|
65
|
+
redirect_to "/test/suites"
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
def exec_case
|
|
70
|
+
test_case = cur_case
|
|
71
|
+
client = service_client
|
|
72
|
+
session[:suite_cur] = nil
|
|
73
|
+
blocking = false
|
|
74
|
+
session[:exec_output] = client.runtest(test_case.uuid, blocking)
|
|
75
|
+
redirect_to "/test/suites/#{params["suite_id"]}"
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
def exec_suite
|
|
79
|
+
test_suite = cur_suite
|
|
80
|
+
client = service_client
|
|
81
|
+
session[:suite_cur] = nil
|
|
82
|
+
client.runtests(test_suite.uuid)
|
|
83
|
+
redirect_to "/test/suites/#{params["suite_id"]}"
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
def delete_suite
|
|
87
|
+
puts "deleting suite ..."
|
|
88
|
+
if cur_suite
|
|
89
|
+
puts "deleting suite #{cur_suite}"
|
|
90
|
+
session[:suite_cur] = nil
|
|
91
|
+
cur_suite.delete
|
|
92
|
+
redirect_to "/test/suites"
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# HELPER METHODS #
|
|
97
|
+
|
|
98
|
+
def service_client
|
|
99
|
+
ToasterAppClient.new(session["service.host"], session["service.port"])
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
def cur_suite
|
|
103
|
+
TestController.cur_suite(session, params)
|
|
104
|
+
end
|
|
105
|
+
def self.cur_suite(session, params)
|
|
106
|
+
suite = nil
|
|
107
|
+
if !session[:suite_cur] || "#{session[:suite_cur].id}" != params[:suite_id]
|
|
108
|
+
session[:suite_cur] = nil
|
|
109
|
+
if params[:suite_id]
|
|
110
|
+
suite = TestSuite.find(params[:suite_id])
|
|
111
|
+
#session[:suite_cur] = suite # don't cache, to avoid inconsistencies...
|
|
112
|
+
end
|
|
113
|
+
end
|
|
114
|
+
suite
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
def cur_case
|
|
118
|
+
TestController.cur_case(session, params)
|
|
119
|
+
end
|
|
120
|
+
def self.cur_case(session, params)
|
|
121
|
+
if params[:case_id]
|
|
122
|
+
return TestCase.find(params[:case_id])
|
|
123
|
+
end
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
helper_method :l, :lk, :set_param, :param, :cur_auto, :cur_suite, :cur_case
|
|
127
|
+
end
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
<div>
|
|
2
|
+
<%
|
|
3
|
+
|
|
4
|
+
require 'toaster/state/convergence'
|
|
5
|
+
require 'toaster/util/util'
|
|
6
|
+
|
|
7
|
+
tasks = nil
|
|
8
|
+
convs = {}
|
|
9
|
+
|
|
10
|
+
begin
|
|
11
|
+
|
|
12
|
+
show_all_link = false
|
|
13
|
+
automation = nil
|
|
14
|
+
if param('task') != ""
|
|
15
|
+
tasks = [get_task_for_param()]
|
|
16
|
+
show_all_link = true
|
|
17
|
+
elsif param('auto') != ""
|
|
18
|
+
automation = get_automation_for_param()
|
|
19
|
+
tasks = automation.get_globally_executed_tasks() if automation
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
if tasks
|
|
23
|
+
tasks.each do |task|
|
|
24
|
+
if task
|
|
25
|
+
threshold = 1.0
|
|
26
|
+
convs[task] = Toaster::Convergence.convergence_for_task(task, threshold)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
%>
|
|
34
|
+
<h2>Convergence of System State</h2>
|
|
35
|
+
<form action="#" method="post">
|
|
36
|
+
<% if tasks %>
|
|
37
|
+
<% if show_all_link %>
|
|
38
|
+
<ul>
|
|
39
|
+
<li>Currently only displaying convergence of a single task. <a href="<%= l('task' => '') %>">Show All Tasks</a>
|
|
40
|
+
</li>
|
|
41
|
+
</ul>
|
|
42
|
+
<% end %>
|
|
43
|
+
|
|
44
|
+
<h3>Track State Properties</h3>
|
|
45
|
+
Enter state property name patterns (one per line):<br/>
|
|
46
|
+
<textarea rows="3" cols="40" name="trackProps"><%=
|
|
47
|
+
param("trackProps") != "" ? param("trackProps") : ".*"
|
|
48
|
+
%></textarea><br/>
|
|
49
|
+
<input type="submit" name="submitTrack" value="Find"/>
|
|
50
|
+
<%
|
|
51
|
+
if param("trackProps") != ""
|
|
52
|
+
patterns = param("trackProps").split(/\n+/)
|
|
53
|
+
|
|
54
|
+
%>
|
|
55
|
+
<h4>Execution Traces</h4>
|
|
56
|
+
<% traces = Toaster::Convergence.execution_traces(automation, patterns)
|
|
57
|
+
traces.each do |run,details|
|
|
58
|
+
props = []
|
|
59
|
+
traces[run].each do |prop,details1|
|
|
60
|
+
props << prop
|
|
61
|
+
end
|
|
62
|
+
exes = []
|
|
63
|
+
traces[run][props[0]].collect do |tuple|
|
|
64
|
+
exes << tuple[0]
|
|
65
|
+
end
|
|
66
|
+
%>
|
|
67
|
+
<table class="tablesorter"><thead><tr>
|
|
68
|
+
<th>#</th><th>Task</th>
|
|
69
|
+
<%
|
|
70
|
+
props.each do |prop|
|
|
71
|
+
%>
|
|
72
|
+
<th><%= prop %></th>
|
|
73
|
+
<%
|
|
74
|
+
end
|
|
75
|
+
%>
|
|
76
|
+
</tr></thead><tbody>
|
|
77
|
+
<%
|
|
78
|
+
exes.each_with_index do |exe,idx|
|
|
79
|
+
%>
|
|
80
|
+
<tr>
|
|
81
|
+
<td><%= idx+1 %></td>
|
|
82
|
+
<td><%= exe ? exe.task.name : "(Start)" %></td>
|
|
83
|
+
<%
|
|
84
|
+
props.each do |prop|
|
|
85
|
+
%>
|
|
86
|
+
<td><%= traces[run][prop].select { |tuple|
|
|
87
|
+
tuple[0] == exe
|
|
88
|
+
} %></td>
|
|
89
|
+
<%
|
|
90
|
+
end
|
|
91
|
+
%></tr><%
|
|
92
|
+
end
|
|
93
|
+
%>
|
|
94
|
+
</tbody></table>
|
|
95
|
+
<%
|
|
96
|
+
end
|
|
97
|
+
%>
|
|
98
|
+
|
|
99
|
+
<h4>Tracked Pre-States and Post-States</h4>
|
|
100
|
+
<table class="tablesorter"><thead>
|
|
101
|
+
<tr><th>Task</th><th>State Type</th><th>Property Name</th><th>Property Value</th></tr>
|
|
102
|
+
</thead><tbody>
|
|
103
|
+
<%
|
|
104
|
+
tasks.each do |task|
|
|
105
|
+
pre_states = Set.new(task.global_pre_states_flat)
|
|
106
|
+
post_states = Set.new(task.global_post_states_flat)
|
|
107
|
+
%>
|
|
108
|
+
<tr><td colspan="4">Task
|
|
109
|
+
<b><a href="<%= l('t'=>'tasks', 'task'=>task.id) %>"><%= task.name %></a></b>
|
|
110
|
+
</td></tr>
|
|
111
|
+
<%
|
|
112
|
+
{"PRE-state" => pre_states,
|
|
113
|
+
"POST-state" => post_states}.each do |type,array|
|
|
114
|
+
array.each do |entry|
|
|
115
|
+
key,value = entry[0],entry[1]
|
|
116
|
+
if Toaster::Util.match_any(key,patterns)
|
|
117
|
+
%>
|
|
118
|
+
<tr>
|
|
119
|
+
<td> </td>
|
|
120
|
+
<td><b><%= type %></b></td>
|
|
121
|
+
<td><%= key %></td>
|
|
122
|
+
<td><%= value ? value : "*NULL*" %></td>
|
|
123
|
+
</tr>
|
|
124
|
+
<%
|
|
125
|
+
end
|
|
126
|
+
end
|
|
127
|
+
end
|
|
128
|
+
%>
|
|
129
|
+
<% end %>
|
|
130
|
+
</tbody></table>
|
|
131
|
+
<%
|
|
132
|
+
end
|
|
133
|
+
%>
|
|
134
|
+
|
|
135
|
+
<h3>State Convergence By Task</h3>
|
|
136
|
+
<% tasks.each do |task| %>
|
|
137
|
+
<h3>State Convergence of Task '<a href="<%= l('t'=>'tasks', 'task'=>task.id) %>"><%= task.name %></a>'</h3>
|
|
138
|
+
<% task_convs = convs[task] ? convs[task] : []
|
|
139
|
+
if task_convs.empty? %>
|
|
140
|
+
No convergent state property found for this task.
|
|
141
|
+
<% else %>
|
|
142
|
+
<table class="properties">
|
|
143
|
+
<tr><th>Property</th><th>Value(s)</th><th>Occurrences (%)</th></tr>
|
|
144
|
+
<% task_convs.each do |conv| %>
|
|
145
|
+
<tr><td><%= conv[0] %></td><td><%= conv[1] ? conv[1] : "*NULL*" %></td><td><%= conv[2] * 100.0 %></td></tr>
|
|
146
|
+
<% end %>
|
|
147
|
+
</table>
|
|
148
|
+
<% end %>
|
|
149
|
+
<% end %>
|
|
150
|
+
|
|
151
|
+
<% else %>
|
|
152
|
+
Please select an <b>automation</b> or a specific <b>task</b> from the list to perform state convergence analysis.
|
|
153
|
+
<% end %>
|
|
154
|
+
|
|
155
|
+
</form>
|
|
156
|
+
</div>
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
<%
|
|
2
|
+
require "toaster/model/automation_run"
|
|
3
|
+
|
|
4
|
+
runs = []
|
|
5
|
+
auto = nil
|
|
6
|
+
run = nil
|
|
7
|
+
|
|
8
|
+
begin
|
|
9
|
+
|
|
10
|
+
auto = cur_auto()
|
|
11
|
+
runs = cur_runs()
|
|
12
|
+
run = cur_run()
|
|
13
|
+
puts "run #{run}"
|
|
14
|
+
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
%>
|
|
18
|
+
<div>
|
|
19
|
+
<h1>Automation Runs</h1>
|
|
20
|
+
|
|
21
|
+
<ul><li>
|
|
22
|
+
<% if auto %>
|
|
23
|
+
Displaying runs of automation <b>'<%= auto.name %>'</b>.
|
|
24
|
+
(<a href="/execs">show all</a>)
|
|
25
|
+
<% else %>
|
|
26
|
+
Displaying runs of all automations. Use the 'Automation' section to filter the list for a specific automation.
|
|
27
|
+
<% end %>
|
|
28
|
+
</li></ul>
|
|
29
|
+
|
|
30
|
+
<table class="tablesorter">
|
|
31
|
+
<thead>
|
|
32
|
+
<tr><th>#</th><th>UUID</th><th>Automation</th><th>Start Time</th><!-- <th>Machine ID</th> -->
|
|
33
|
+
<th>Task Executions</th><th>Duration</th><th>Success</th><th colspan="2">Actions</th></tr>
|
|
34
|
+
</thead>
|
|
35
|
+
<tbody>
|
|
36
|
+
<% runs.each_with_index { |row,id|
|
|
37
|
+
clazz = row.success ? 'success' : 'error'
|
|
38
|
+
active = row.id.to_s == param('run')
|
|
39
|
+
clazz += ' active' if active
|
|
40
|
+
param_run = active ? "" : row.id
|
|
41
|
+
auto_name = row.automation ? row.automation.name : "n/a"
|
|
42
|
+
param_hash = {"run" => param_run}.merge(row.automation ? {'auto' => row.automation.id} : {})
|
|
43
|
+
%>
|
|
44
|
+
<tr class="<%= clazz %>">
|
|
45
|
+
<td><%= id+1 %></td>
|
|
46
|
+
<td><%= row.uuid %></td>
|
|
47
|
+
<td><% if row.automation %><a href="/scripts/<%= row.automation.id %>/details"><% end %><%= auto_name %></a></td>
|
|
48
|
+
<td><nobr><%= format_time(row.start_time) %></nobr></td>
|
|
49
|
+
<!-- <td><%= row.machine_id %></td> -->
|
|
50
|
+
<td class="center"><%= row.get_num_task_executions() %></td>
|
|
51
|
+
<td class="center"><%= to_minutes(row.end_time.to_i - row.start_time.to_i) %></td>
|
|
52
|
+
<td class="center"><%= row.success ? "true" : "false" %></td>
|
|
53
|
+
<td><% if row.automation %><a href="/execs/<%= row.automation.id %>/<%= row.id %>">details</a><% end %></nobr></td>
|
|
54
|
+
<td><% if row.automation %><a href="/execs/<%= row.automation.id %>/<%= row.id %>/tasks">executed tasks</a><% end %></nobr></td>
|
|
55
|
+
</tr>
|
|
56
|
+
<% } %>
|
|
57
|
+
</tbody>
|
|
58
|
+
</table>
|
|
59
|
+
|
|
60
|
+
<% if run %>
|
|
61
|
+
<h2>Details of Automation Run <%= run.uuid %></h2>
|
|
62
|
+
<h3>Automation Attributes</h3>
|
|
63
|
+
<% if !run.automation %>
|
|
64
|
+
<div class="error"></div><ul><li>Attributes could not be parsed because the automation run is not associated with any automation in the database.</li></ul></div>
|
|
65
|
+
<% else %>
|
|
66
|
+
<ul><li>Attributes with no user-specified value are printed in low opacity.</li></ul>
|
|
67
|
+
<table class="tablesorter">
|
|
68
|
+
<thead>
|
|
69
|
+
<tr><th>#</th><th>Attribute</th><th>Default Value</th><th>Specified Value</th></tr>
|
|
70
|
+
</thead>
|
|
71
|
+
<tbody>
|
|
72
|
+
<% id = 0
|
|
73
|
+
default_attributes = run.automation.get_flat_attributes()
|
|
74
|
+
specific_attributes = run.get_flat_attributes()
|
|
75
|
+
attrs = default_attributes.dup.merge(specific_attributes)
|
|
76
|
+
attrs.each { |name,val|
|
|
77
|
+
default_val = default_attributes[name]
|
|
78
|
+
clazz = val == default_val ? " class=\"unremarkable\"".html_safe : ""
|
|
79
|
+
%>
|
|
80
|
+
<tr<%= clazz %>>
|
|
81
|
+
<td><%= id=id+1 %></td>
|
|
82
|
+
<td><%= name %></td>
|
|
83
|
+
<td><%= default_val %></td>
|
|
84
|
+
<td><%= val %></td>
|
|
85
|
+
</tr>
|
|
86
|
+
<% } %>
|
|
87
|
+
</tbody>
|
|
88
|
+
</table>
|
|
89
|
+
<% end %>
|
|
90
|
+
|
|
91
|
+
<% if run.error_details && !run.error_details.empty? && %>
|
|
92
|
+
<h3>Error Details</h3>
|
|
93
|
+
<pre><%= run.error_details %></pre>
|
|
94
|
+
<% end %>
|
|
95
|
+
|
|
96
|
+
<% end %>
|
|
97
|
+
|
|
98
|
+
</div>
|