foreman_acd 0.2.1 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (195) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +107 -56
  3. data/app/controllers/foreman_acd/ansible_playbooks_controller.rb +199 -0
  4. data/app/controllers/foreman_acd/api/v2/ansible_playbooks_controller.rb +72 -0
  5. data/app/controllers/foreman_acd/api/v2/app_definitions_controller.rb +1 -0
  6. data/app/controllers/foreman_acd/api/v2/app_instances_controller.rb +62 -0
  7. data/app/controllers/foreman_acd/app_definitions_controller.rb +19 -10
  8. data/app/controllers/foreman_acd/app_instances_controller.rb +111 -137
  9. data/app/controllers/foreman_acd/concerns/ansible_playbook_parameters.rb +23 -0
  10. data/app/controllers/foreman_acd/concerns/app_definition_parameters.rb +1 -1
  11. data/app/controllers/foreman_acd/concerns/app_instance_parameters.rb +1 -1
  12. data/app/controllers/foreman_acd/remote_execution_controller.rb +62 -0
  13. data/app/controllers/ui_acd_controller.rb +20 -3
  14. data/app/lib/actions/foreman_acd/deploy_all_hosts.rb +47 -0
  15. data/app/lib/actions/foreman_acd/run_configurator.rb +44 -0
  16. data/app/models/concerns/foreman_acd/host_managed_extensions.rb +51 -0
  17. data/app/models/foreman_acd/acd_provider.rb +36 -0
  18. data/app/models/foreman_acd/ansible_playbook.rb +68 -0
  19. data/app/models/foreman_acd/app_definition.rb +25 -0
  20. data/app/models/foreman_acd/app_instance.rb +42 -0
  21. data/app/models/foreman_acd/foreman_host.rb +23 -0
  22. data/app/models/foreman_acd/taxonomy_extensions.rb +17 -0
  23. data/app/services/foreman_acd/acd_proxy_proxy_selector.rb +17 -0
  24. data/app/services/foreman_acd/app_configurator.rb +98 -0
  25. data/app/services/foreman_acd/app_deployer.rb +157 -0
  26. data/app/services/foreman_acd/inventory_creator.rb +68 -0
  27. data/app/views/foreman_acd/ansible_playbooks/_form.html.erb +64 -0
  28. data/app/views/foreman_acd/ansible_playbooks/edit.html.erb +11 -0
  29. data/app/views/foreman_acd/ansible_playbooks/index.html.erb +30 -0
  30. data/app/views/foreman_acd/ansible_playbooks/new.html.erb +3 -0
  31. data/app/views/foreman_acd/api/v2/ansible_playbooks/base.json.rabl +5 -0
  32. data/app/views/foreman_acd/api/v2/ansible_playbooks/index.json.rabl +5 -0
  33. data/app/views/foreman_acd/api/v2/ansible_playbooks/show.json.rabl +9 -0
  34. data/app/views/foreman_acd/api/v2/app_definitions/base.json.rabl +5 -0
  35. data/app/views/foreman_acd/api/v2/app_definitions/index.json.rabl +5 -0
  36. data/app/views/foreman_acd/api/v2/app_definitions/show.json.rabl +9 -0
  37. data/app/views/foreman_acd/api/v2/app_instances/base.json.rabl +5 -0
  38. data/app/views/foreman_acd/api/v2/app_instances/index.json.rabl +5 -0
  39. data/app/views/foreman_acd/api/v2/app_instances/show.json.rabl +5 -0
  40. data/app/views/foreman_acd/app_definitions/_form.html.erb +34 -12
  41. data/app/views/foreman_acd/app_definitions/edit.html.erb +10 -0
  42. data/app/views/foreman_acd/app_definitions/index.html.erb +4 -4
  43. data/app/views/foreman_acd/app_instances/_form.html.erb +11 -9
  44. data/app/views/foreman_acd/app_instances/edit.html.erb +10 -0
  45. data/app/views/foreman_acd/app_instances/index.html.erb +89 -10
  46. data/app/views/foreman_acd/app_instances/report.html.erb +6 -3
  47. data/app/views/templates/job/run_acd_ansible_playbook.erb +62 -0
  48. data/app/views/ui_acd/ansible_data.json.rabl +6 -0
  49. data/app/views/ui_acd/app.json.rabl +6 -2
  50. data/app/views/ui_acd/app_definition.json.rabl +1 -1
  51. data/app/views/ui_acd/{fdata.json.rabl → foreman_data.json.rabl} +1 -1
  52. data/config/routes.rb +32 -2
  53. data/db/migrate/20200916091018_create_ansible_playbooks.rb +20 -0
  54. data/db/migrate/20200917120220_add_ansible_playbook_id.rb +14 -0
  55. data/db/migrate/20201016002819_add_ansible_vars_all_to_app_definitions.rb +8 -0
  56. data/db/migrate/20201016104338_add_ansible_vars_all_to_app_instances.rb +8 -0
  57. data/db/migrate/20210112111548_add_organization_to_app_instance.rb +22 -0
  58. data/db/migrate/20210112113853_add_location_to_app_instance.rb +8 -0
  59. data/db/migrate/20210202141658_create_foreman_hosts.rb +24 -0
  60. data/db/migrate/20210204111306_remove_hosts_from_app_instances.rb +8 -0
  61. data/db/migrate/20210209091014_rename_acd_tables.rb +16 -0
  62. data/db/migrate/20210216083522_add_last_progress_report.rb +8 -0
  63. data/db/migrate/20210216091529_add_last_deploy_task.rb +8 -0
  64. data/db/migrate/20210316151145_add_git_commit_to_ansible_playbooks.rb +8 -0
  65. data/db/migrate/20210503122809_add_git_url_to_ansible_playbooks.rb +8 -0
  66. data/db/seeds.d/62_acd_proxy_feature.rb +4 -0
  67. data/db/seeds.d/75-job_templates.rb +13 -0
  68. data/lib/foreman_acd.rb +12 -0
  69. data/lib/foreman_acd/engine.rb +43 -3
  70. data/lib/foreman_acd/plugin.rb +88 -22
  71. data/lib/foreman_acd/version.rb +1 -1
  72. data/lib/tasks/foreman_acd_tasks.rake +0 -12
  73. data/locale/en/foreman_acd.edit.po +326 -0
  74. data/locale/en/foreman_acd.po +232 -2
  75. data/locale/en/foreman_acd.po.time_stamp +0 -0
  76. data/locale/foreman_acd.pot +343 -8
  77. data/package.json +9 -9
  78. data/test/controllers/ansible_playbooks_controller_test.rb +27 -0
  79. data/test/controllers/app_instances_controller_test.rb +8 -3
  80. data/test/controllers/ui_acd_controller_test.rb +22 -6
  81. data/test/factories/foreman_acd_factories.rb +18 -4
  82. data/test/models/acd_provider_test.rb +37 -0
  83. data/test/models/ansible_playbook_test.rb +11 -0
  84. data/test/models/app_definition_test.rb +1 -1
  85. data/test/models/app_instance_test.rb +2 -0
  86. data/test/models/concerns/host_extensions_test.rb +26 -0
  87. data/test/models/foreman_host_test.rb +12 -0
  88. data/webpack/__mocks__/foremanReact/API.js +2 -0
  89. data/webpack/__mocks__/foremanReact/common/I18n.js +3 -0
  90. data/webpack/__mocks__/foremanReact/common/helpers.js +2 -0
  91. data/webpack/__mocks__/foremanReact/components/ForemanModal.js +7 -0
  92. data/webpack/__mocks__/foremanReact/components/common/forms/CommonForm.js +2 -0
  93. data/webpack/__mocks__/foremanReact/components/common/forms/TextInput.js +2 -0
  94. data/webpack/__mocks__/foremanReact/components/hosts/powerStatus.js +1 -0
  95. data/webpack/__snapshots__/helper.test.js.snap +14 -0
  96. data/webpack/components/ApplicationDefinition/ApplicationDefinition.js +159 -29
  97. data/webpack/components/ApplicationDefinition/ApplicationDefinitionActions.js +106 -14
  98. data/webpack/components/ApplicationDefinition/ApplicationDefinitionConstants.js +8 -2
  99. data/webpack/components/ApplicationDefinition/ApplicationDefinitionHelper.js +26 -0
  100. data/webpack/components/ApplicationDefinition/ApplicationDefinitionReducer.js +143 -21
  101. data/webpack/components/ApplicationDefinition/ApplicationDefinitionSelectors.js +3 -0
  102. data/webpack/components/ApplicationDefinition/__fixtures__/applicationDefinitionConfData_1.fixtures.js +288 -0
  103. data/webpack/components/ApplicationDefinition/__fixtures__/applicationDefinitionReducer.fixtures.js +79 -0
  104. data/webpack/components/ApplicationDefinition/__tests__/ApplicationDefinition.test.js +25 -0
  105. data/webpack/components/ApplicationDefinition/__tests__/ApplicationDefinitionReducer.test.js +119 -0
  106. data/webpack/components/ApplicationDefinition/__tests__/ApplicationDefinitionSelectors.test.js +41 -0
  107. data/webpack/components/ApplicationDefinition/__tests__/__snapshots__/ApplicationDefinition.test.js.snap +200 -0
  108. data/webpack/components/ApplicationDefinition/__tests__/__snapshots__/ApplicationDefinitionReducer.test.js.snap +3033 -0
  109. data/webpack/components/ApplicationDefinition/__tests__/__snapshots__/ApplicationDefinitionSelectors.test.js.snap +299 -0
  110. data/webpack/components/ApplicationDefinition/components/AnsiblePlaybookSelector.js +50 -0
  111. data/webpack/components/ApplicationDefinition/components/__tests__/AnsiblePlaybookSelector.test.js +41 -0
  112. data/webpack/components/ApplicationDefinition/components/__tests__/__snapshots__/AnsiblePlaybookSelector.test.js.snap +121 -0
  113. data/webpack/components/ApplicationDefinition/index.js +6 -0
  114. data/webpack/components/ApplicationInstance/ApplicationInstance.js +151 -44
  115. data/webpack/components/ApplicationInstance/ApplicationInstanceActions.js +47 -10
  116. data/webpack/components/ApplicationInstance/ApplicationInstanceConstants.js +5 -2
  117. data/webpack/components/ApplicationInstance/ApplicationInstanceReducer.js +114 -28
  118. data/webpack/components/ApplicationInstance/ApplicationInstanceSelectors.js +3 -1
  119. data/webpack/components/ApplicationInstance/__fixtures__/applicationInstanceConfData_1.fixtures.js +263 -0
  120. data/webpack/components/ApplicationInstance/__fixtures__/applicationInstanceReducer.fixtures.js +78 -0
  121. data/webpack/components/ApplicationInstance/__tests__/ApplicationInstance.test.js +23 -0
  122. data/webpack/components/ApplicationInstance/__tests__/ApplicationInstanceReducer.test.js +119 -0
  123. data/webpack/components/ApplicationInstance/__tests__/ApplicationInstanceSelectors.test.js +44 -0
  124. data/webpack/components/ApplicationInstance/__tests__/__snapshots__/ApplicationInstance.test.js.snap +209 -0
  125. data/webpack/components/ApplicationInstance/__tests__/__snapshots__/ApplicationInstanceReducer.test.js.snap +2719 -0
  126. data/webpack/components/ApplicationInstance/__tests__/__snapshots__/ApplicationInstanceSelectors.test.js.snap +276 -0
  127. data/webpack/components/ApplicationInstance/components/Service.js +1 -1
  128. data/webpack/components/ApplicationInstance/index.js +4 -0
  129. data/webpack/components/ApplicationInstanceReport/ApplicationInstanceReport.js +53 -60
  130. data/webpack/components/ApplicationInstanceReport/ApplicationInstanceReport.scss +17 -0
  131. data/webpack/components/ApplicationInstanceReport/ApplicationInstanceReportActions.js +7 -51
  132. data/webpack/components/ApplicationInstanceReport/ApplicationInstanceReportConstants.js +2 -4
  133. data/webpack/components/ApplicationInstanceReport/ApplicationInstanceReportReducer.js +4 -18
  134. data/webpack/components/ApplicationInstanceReport/ApplicationInstanceReportSelectors.js +0 -1
  135. data/webpack/components/ApplicationInstanceReport/__fixtures__/applicationInstanceReportData_1.fixtures.js +349 -0
  136. data/webpack/components/ApplicationInstanceReport/__fixtures__/applicationInstanceReportReducer.fixtures.js +20 -0
  137. data/webpack/components/ApplicationInstanceReport/__tests__/ApplicationInstanceReport.test.js +47 -0
  138. data/webpack/components/ApplicationInstanceReport/__tests__/ApplicationInstanceReportReducer.test.js +41 -0
  139. data/webpack/components/ApplicationInstanceReport/__tests__/ApplicationInstanceReportSelectors.test.js +26 -0
  140. data/webpack/components/ApplicationInstanceReport/__tests__/__snapshots__/ApplicationInstanceReport.test.js.snap +130 -0
  141. data/webpack/components/ApplicationInstanceReport/__tests__/__snapshots__/ApplicationInstanceReportReducer.test.js.snap +718 -0
  142. data/webpack/components/ApplicationInstanceReport/__tests__/__snapshots__/ApplicationInstanceReportSelectors.test.js.snap +347 -0
  143. data/webpack/components/ApplicationInstanceReport/components/ReportViewer.js +1 -1
  144. data/webpack/components/ApplicationInstanceReport/components/__tests__/ReportViewer.test.js +24 -0
  145. data/webpack/components/ApplicationInstanceReport/components/__tests__/__snapshots__/ReportViewer.test.js.snap +24 -0
  146. data/webpack/components/ApplicationInstanceReport/index.js +0 -2
  147. data/webpack/components/ParameterSelection/ParameterSelection.js +85 -50
  148. data/webpack/components/ParameterSelection/ParameterSelectionActions.js +68 -62
  149. data/webpack/components/ParameterSelection/ParameterSelectionConstants.js +6 -3
  150. data/webpack/components/ParameterSelection/ParameterSelectionHelper.js +0 -32
  151. data/webpack/components/ParameterSelection/ParameterSelectionReducer.js +47 -35
  152. data/webpack/components/ParameterSelection/ParameterSelectionSelectors.js +2 -2
  153. data/webpack/components/ParameterSelection/__fixtures__/parameterSelectionData_1.fixtures.js +116 -84
  154. data/webpack/components/ParameterSelection/__fixtures__/parameterSelectionReducer.fixtures.js +10 -4
  155. data/webpack/components/ParameterSelection/__tests__/ParameterSelection.test.js +36 -46
  156. data/webpack/components/ParameterSelection/__tests__/ParameterSelectionReducer.test.js +31 -25
  157. data/webpack/components/ParameterSelection/__tests__/ParameterSelectionSelectors.test.js +6 -6
  158. data/webpack/components/ParameterSelection/__tests__/__snapshots__/ParameterSelection.test.js.snap +2 -126
  159. data/webpack/components/ParameterSelection/__tests__/__snapshots__/ParameterSelectionReducer.test.js.snap +1483 -872
  160. data/webpack/components/ParameterSelection/__tests__/__snapshots__/ParameterSelectionSelectors.test.js.snap +117 -79
  161. data/webpack/components/ParameterSelection/index.js +4 -4
  162. data/webpack/components/SyncGitRepo/SyncGitRepo.js +210 -0
  163. data/webpack/components/SyncGitRepo/SyncGitRepo.scss +1 -0
  164. data/webpack/components/SyncGitRepo/SyncGitRepoActions.js +124 -0
  165. data/webpack/components/SyncGitRepo/SyncGitRepoConstants.js +9 -0
  166. data/webpack/components/SyncGitRepo/SyncGitRepoReducer.js +80 -0
  167. data/webpack/components/SyncGitRepo/SyncGitRepoSelectors.js +6 -0
  168. data/webpack/components/SyncGitRepo/__fixtures__/syncGitRepoConfData_1.fixtures.js +7 -0
  169. data/webpack/components/SyncGitRepo/__fixtures__/syncGitRepoReducer.fixtures.js +44 -0
  170. data/webpack/components/SyncGitRepo/__tests__/SyncGitRepo.test.js +27 -0
  171. data/webpack/components/SyncGitRepo/__tests__/SyncGitRepoReducer.test.js +95 -0
  172. data/webpack/components/SyncGitRepo/__tests__/SyncGitRepoSelectors.test.js +32 -0
  173. data/webpack/components/SyncGitRepo/__tests__/__snapshots__/SyncGitRepo.test.js.snap +30 -0
  174. data/webpack/components/SyncGitRepo/__tests__/__snapshots__/SyncGitRepoReducer.test.js.snap +137 -0
  175. data/webpack/components/SyncGitRepo/__tests__/__snapshots__/SyncGitRepoSelectors.test.js.snap +13 -0
  176. data/webpack/components/SyncGitRepo/components/FormTextInput.js +42 -0
  177. data/webpack/components/SyncGitRepo/components/ScmTypeSelector.js +46 -0
  178. data/webpack/components/SyncGitRepo/index.js +28 -0
  179. data/webpack/components/common/DeleteTableEntry.js +3 -3
  180. data/webpack/components/common/EditTableEntry.js +50 -0
  181. data/webpack/components/common/ExtTextInput.js +43 -0
  182. data/webpack/components/common/LockTableEntry.js +60 -0
  183. data/webpack/components/common/__tests__/EditTableEntry.test.js +53 -0
  184. data/webpack/components/common/__tests__/LockTableEntry.test.js +35 -0
  185. data/webpack/components/common/__tests__/__snapshots__/DeleteTableEntry.test.js.snap +2 -2
  186. data/webpack/components/common/__tests__/__snapshots__/EditTableEntry.test.js.snap +81 -0
  187. data/webpack/components/common/__tests__/__snapshots__/LockTableEntry.test.js.snap +60 -0
  188. data/webpack/helper.js +15 -1
  189. data/webpack/helper.test.js +37 -0
  190. data/webpack/index.js +2 -0
  191. data/webpack/reducer.js +18 -11
  192. metadata +184 -10
  193. data/app/views/foreman_acd/app_instances/deploy.html.erb +0 -19
  194. data/webpack/components/common/__tests__/__snapshots__/AddParameter.test.js.snap +0 -35
  195. data/webpack/components/common/__tests__/__snapshots__/DeleteParameter.test.js.snap +0 -41
File without changes
@@ -1,19 +1,354 @@
1
- # foreman_acd
2
- #
3
- # This file is distributed under the same license as foreman_acd.
1
+ # SOME DESCRIPTIVE TITLE.
2
+ # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3
+ # This file is distributed under the same license as the foreman_acd package.
4
+ # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
4
5
  #
5
6
  #, fuzzy
6
7
  msgid ""
7
8
  msgstr ""
8
- "Project-Id-Version: version 0.0.1\n"
9
+ "Project-Id-Version: foreman_acd 1.0.0\n"
9
10
  "Report-Msgid-Bugs-To: \n"
10
- "POT-Creation-Date: 2014-08-20 08:46+0100\n"
11
- "PO-Revision-Date: 2014-08-20 08:46+0100\n"
12
- "Last-Translator: Foreman Team <foreman-dev@googlegroups.com>\n"
13
- "Language-Team: Foreman Team <foreman-dev@googlegroups.com>\n"
11
+ "POT-Creation-Date: 2021-02-05 21:21+0000\n"
12
+ "PO-Revision-Date: 2021-02-05 21:21+0000\n"
13
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
+ "Language-Team: LANGUAGE <LL@li.org>\n"
14
15
  "Language: \n"
15
16
  "MIME-Version: 1.0\n"
16
17
  "Content-Type: text/plain; charset=UTF-8\n"
17
18
  "Content-Transfer-Encoding: 8bit\n"
18
19
  "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
19
20
 
21
+ #: ../app/controllers/foreman_acd/ansible_playbooks_controller.rb:22
22
+ msgid ""
23
+ "Successfully created %s. You need to press the \"Import groups\" button\n"
24
+ " before this ansible playbook can be"
25
+ " used in App Definitions!"
26
+ msgstr ""
27
+
28
+ #: ../app/controllers/foreman_acd/ansible_playbooks_controller.rb:116
29
+ msgid "Successfully loaded ansible group variables from %s"
30
+ msgstr ""
31
+
32
+ #: ../app/controllers/foreman_acd/api/v2/ansible_playbooks_controller.rb:15
33
+ msgid "Show ansible playbook"
34
+ msgstr ""
35
+
36
+ #: ../app/controllers/foreman_acd/api/v2/ansible_playbooks_controller.rb:19
37
+ msgid "List ansible playbooks"
38
+ msgstr ""
39
+
40
+ #: ../app/controllers/foreman_acd/api/v2/ansible_playbooks_controller.rb:35
41
+ msgid "Create a ansible playbook"
42
+ msgstr ""
43
+
44
+ #: ../app/controllers/foreman_acd/api/v2/ansible_playbooks_controller.rb:42
45
+ msgid "Deletes ansible playbook"
46
+ msgstr ""
47
+
48
+ #: ../app/controllers/foreman_acd/api/v2/ansible_playbooks_controller.rb:48
49
+ msgid "Grab ansible playbook"
50
+ msgstr ""
51
+
52
+ #: ../app/controllers/foreman_acd/api/v2/app_definitions_controller.rb:12
53
+ msgid "Show application definition"
54
+ msgstr ""
55
+
56
+ #: ../app/controllers/foreman_acd/api/v2/app_definitions_controller.rb:16
57
+ msgid "List application definitions"
58
+ msgstr ""
59
+
60
+ #: ../app/controllers/foreman_acd/api/v2/app_definitions_controller.rb:32
61
+ msgid "Create a application definition"
62
+ msgstr ""
63
+
64
+ #: ../app/controllers/foreman_acd/api/v2/app_definitions_controller.rb:39
65
+ msgid "Deletes application definition"
66
+ msgstr ""
67
+
68
+ #: ../app/controllers/foreman_acd/api/v2/app_instances_controller.rb:12
69
+ msgid "Show application instance"
70
+ msgstr ""
71
+
72
+ #: ../app/controllers/foreman_acd/api/v2/app_instances_controller.rb:18
73
+ msgid "List application instances"
74
+ msgstr ""
75
+
76
+ #: ../app/controllers/foreman_acd/api/v2/app_instances_controller.rb:39
77
+ msgid "Create a application instance"
78
+ msgstr ""
79
+
80
+ #: ../app/controllers/foreman_acd/api/v2/app_instances_controller.rb:46
81
+ msgid "Deletes application instance"
82
+ msgstr ""
83
+
84
+ #: ../app/models/foreman_acd/ansible_playbook.rb:37
85
+ msgid "Ansible playbook"
86
+ msgstr ""
87
+
88
+ #: ../app/models/foreman_acd/app_definition.rb:37
89
+ msgid "App Definition"
90
+ msgstr ""
91
+
92
+ #: ../app/models/foreman_acd/app_instance.rb:19
93
+ msgid "App Instance"
94
+ msgstr ""
95
+
96
+ #: ../app/views/foreman_acd/ansible_playbooks/_form.html.erb:5
97
+ msgid "Ansible playbooks"
98
+ msgstr ""
99
+
100
+ #: ../app/views/foreman_acd/ansible_playbooks/_form.html.erb:7
101
+ #: ../app/views/foreman_acd/app_definitions/_form.html.erb:34
102
+ msgid "Locations"
103
+ msgstr ""
104
+
105
+ #: ../app/views/foreman_acd/ansible_playbooks/_form.html.erb:10
106
+ #: ../app/views/foreman_acd/app_definitions/_form.html.erb:37
107
+ msgid "Organizations"
108
+ msgstr ""
109
+
110
+ #: ../app/views/foreman_acd/ansible_playbooks/edit.html.erb:4
111
+ #: ../app/views/foreman_acd/ansible_playbooks/index.html.erb:1
112
+ msgid "Ansible Playbooks"
113
+ msgstr ""
114
+
115
+ #: ../app/views/foreman_acd/ansible_playbooks/edit.html.erb:10
116
+ msgid "Edit Ansible Playbook %s"
117
+ msgstr ""
118
+
119
+ #: ../app/views/foreman_acd/ansible_playbooks/index.html.erb:4
120
+ #: ../app/views/foreman_acd/ansible_playbooks/new.html.erb:1
121
+ msgid "New Ansible Playbook"
122
+ msgstr ""
123
+
124
+ #: ../app/views/foreman_acd/ansible_playbooks/index.html.erb:9
125
+ msgid "AnsiblePlaybook|Name"
126
+ msgstr ""
127
+
128
+ #: ../app/views/foreman_acd/ansible_playbooks/index.html.erb:10
129
+ #: ../app/views/foreman_acd/app_definitions/index.html.erb:11
130
+ #: ../app/views/foreman_acd/app_instances/index.html.erb:9
131
+ #: ../webpack/components/ParameterSelection/ParameterSelectionActions.js:97
132
+ msgid "Description"
133
+ msgstr ""
134
+
135
+ #: ../app/views/foreman_acd/ansible_playbooks/index.html.erb:19
136
+ msgid "Import groups"
137
+ msgstr ""
138
+
139
+ #: ../app/views/foreman_acd/ansible_playbooks/index.html.erb:21
140
+ #: ../app/views/foreman_acd/app_definitions/index.html.erb:21
141
+ #: ../app/views/foreman_acd/app_instances/index.html.erb:27
142
+ msgid "Delete %s?"
143
+ msgstr ""
144
+
145
+ #: ../app/views/foreman_acd/app_definitions/_form.html.erb:32
146
+ #: ../app/views/foreman_acd/app_definitions/import.html.erb:6
147
+ #: ../app/views/foreman_acd/app_definitions/index.html.erb:1
148
+ msgid "Application Definitions"
149
+ msgstr ""
150
+
151
+ #: ../app/views/foreman_acd/app_definitions/edit.html.erb:4
152
+ msgid "App Definitions"
153
+ msgstr ""
154
+
155
+ #: ../app/views/foreman_acd/app_definitions/edit.html.erb:11
156
+ msgid "Edit Application Definition %s"
157
+ msgstr ""
158
+
159
+ #: ../app/views/foreman_acd/app_definitions/import.html.erb:1
160
+ msgid "Import Application Definition"
161
+ msgstr ""
162
+
163
+ #: ../app/views/foreman_acd/app_definitions/import.html.erb:13
164
+ msgid "Application Definition file"
165
+ msgstr ""
166
+
167
+ #: ../app/views/foreman_acd/app_definitions/index.html.erb:4
168
+ #: ../app/views/foreman_acd/app_definitions/new.html.erb:1
169
+ msgid "New Application Definition"
170
+ msgstr ""
171
+
172
+ #: ../app/views/foreman_acd/app_definitions/index.html.erb:5
173
+ msgid "Import"
174
+ msgstr ""
175
+
176
+ #: ../app/views/foreman_acd/app_definitions/index.html.erb:10
177
+ msgid "AppDefinition|Name"
178
+ msgstr ""
179
+
180
+ #: ../app/views/foreman_acd/app_definitions/index.html.erb:22
181
+ msgid "Export"
182
+ msgstr ""
183
+
184
+ #: ../app/views/foreman_acd/app_instances/_form.html.erb:32
185
+ #: ../app/views/foreman_acd/app_instances/index.html.erb:1
186
+ msgid "Application Instances"
187
+ msgstr ""
188
+
189
+ #: ../app/views/foreman_acd/app_instances/edit.html.erb:4
190
+ msgid "App Instances"
191
+ msgstr ""
192
+
193
+ #: ../app/views/foreman_acd/app_instances/edit.html.erb:11
194
+ msgid "Edit Application Instance %s"
195
+ msgstr ""
196
+
197
+ #: ../app/views/foreman_acd/app_instances/index.html.erb:3
198
+ #: ../app/views/foreman_acd/app_instances/new.html.erb:1
199
+ msgid "New Application Instance"
200
+ msgstr ""
201
+
202
+ #: ../app/views/foreman_acd/app_instances/index.html.erb:7
203
+ msgid "AppInstance|Name"
204
+ msgstr ""
205
+
206
+ #: ../app/views/foreman_acd/app_instances/index.html.erb:8
207
+ msgid "Application"
208
+ msgstr ""
209
+
210
+ #: ../app/views/foreman_acd/app_instances/index.html.erb:18
211
+ msgid "Deploy"
212
+ msgstr ""
213
+
214
+ #: ../app/views/foreman_acd/app_instances/index.html.erb:20
215
+ msgid "Run Playbook"
216
+ msgstr ""
217
+
218
+ #: ../app/views/foreman_acd/app_instances/index.html.erb:22
219
+ msgid "Run Playbook - customize first"
220
+ msgstr ""
221
+
222
+ #: ../app/views/foreman_acd/app_instances/index.html.erb:24
223
+ msgid "Report"
224
+ msgstr ""
225
+
226
+ #: ../lib/foreman_acd/plugin.rb:9
227
+ msgid "Applications"
228
+ msgstr ""
229
+
230
+ #: ../lib/foreman_acd/plugin.rb:145
231
+ msgid "Run playbook for ACD"
232
+ msgstr ""
233
+
234
+ #: ../lib/foreman_acd/plugin.rb:147
235
+ msgid "Run an Ansible playbook to configure ACD application"
236
+ msgstr ""
237
+
238
+ #: ../webpack/components/ApplicationDefinition/ApplicationDefinition.js:74
239
+ #: ../webpack/components/ApplicationInstance/ApplicationInstance.js:114
240
+ msgid "edit entry"
241
+ msgstr ""
242
+
243
+ #: ../webpack/components/ApplicationDefinition/ApplicationDefinition.js:81
244
+ #: ../webpack/components/ApplicationInstance/ApplicationInstance.js:121
245
+ msgid "change parameters"
246
+ msgstr ""
247
+
248
+ #: ../webpack/components/ApplicationDefinition/ApplicationDefinition.js:88
249
+ #: ../webpack/components/ApplicationInstance/ApplicationInstance.js:128
250
+ msgid "change ansible variables"
251
+ msgstr ""
252
+
253
+ #: ../webpack/components/ApplicationDefinition/ApplicationDefinition.js:102
254
+ #: ../webpack/components/ApplicationInstance/ApplicationInstance.js:142
255
+ msgid "edit"
256
+ msgstr ""
257
+
258
+ #: ../webpack/components/ApplicationDefinition/ApplicationDefinition.js:106
259
+ #: ../webpack/components/ApplicationInstance/ApplicationInstance.js:146
260
+ msgid "settings"
261
+ msgstr ""
262
+
263
+ #: ../webpack/components/ApplicationDefinition/ApplicationDefinition.js:277
264
+ #: ../webpack/components/ApplicationInstance/ApplicationInstance.js:324
265
+ msgid "change ansible variables for 'all'"
266
+ msgstr ""
267
+
268
+ #: ../webpack/components/ApplicationDefinition/ApplicationDefinition.js:285
269
+ msgid "Foreman Parameter definition for Application Definition"
270
+ msgstr ""
271
+
272
+ #: ../webpack/components/ApplicationDefinition/ApplicationDefinition.js:303
273
+ #: ../webpack/components/ApplicationDefinition/ApplicationDefinition.js:330
274
+ #: ../webpack/components/ApplicationInstance/ApplicationInstance.js:350
275
+ #: ../webpack/components/ApplicationInstance/ApplicationInstance.js:377
276
+ msgid "Save"
277
+ msgstr ""
278
+
279
+ #: ../webpack/components/ApplicationDefinition/ApplicationDefinition.js:304
280
+ #: ../webpack/components/ApplicationDefinition/ApplicationDefinition.js:331
281
+ #: ../webpack/components/ApplicationInstance/ApplicationInstance.js:351
282
+ #: ../webpack/components/ApplicationInstance/ApplicationInstance.js:378
283
+ msgid "Cancel"
284
+ msgstr ""
285
+
286
+ #: ../webpack/components/ApplicationDefinition/ApplicationDefinition.js:313
287
+ msgid "Ansible variables for Application Definition"
288
+ msgstr ""
289
+
290
+ #: ../webpack/components/ApplicationInstance/ApplicationInstance.js:53
291
+ msgid ""
292
+ "For some hosts the values for some parameters are missing. Check the values fo"
293
+ "r these hosts:\\n"
294
+ msgstr ""
295
+
296
+ #: ../webpack/components/ApplicationInstance/ApplicationInstance.js:71
297
+ msgid "Unachieved service counts:"
298
+ msgstr ""
299
+
300
+ #: ../webpack/components/ApplicationInstance/ApplicationInstance.js:75
301
+ msgid "- service ${s.name} expects at ${s.minCount} least configured hosts\\n"
302
+ msgstr ""
303
+
304
+ #: ../webpack/components/ApplicationInstance/ApplicationInstance.js:79
305
+ msgid "- service ${s.name} expects no more than ${s.axCount} configured hosts\\n"
306
+ msgstr ""
307
+
308
+ #: ../webpack/components/ApplicationInstance/ApplicationInstance.js:332
309
+ msgid "Foreman Parameter specification for Application Instance"
310
+ msgstr ""
311
+
312
+ #: ../webpack/components/ApplicationInstance/ApplicationInstance.js:360
313
+ msgid "Ansible group variables for Application Instance"
314
+ msgstr ""
315
+
316
+ #: ../webpack/components/ApplicationInstance/components/Service.js:12
317
+ msgid "Min/Max"
318
+ msgstr ""
319
+
320
+ #: ../webpack/components/ParameterSelection/ParameterSelectionActions.js:63
321
+ msgid "Value"
322
+ msgstr ""
323
+
324
+ #: ../webpack/components/ParameterSelection/ParameterSelectionActions.js:65
325
+ msgid "Default value"
326
+ msgstr ""
327
+
328
+ #: ../webpack/components/ParameterSelection/ParameterSelectionActions.js:78
329
+ msgid "Name"
330
+ msgstr ""
331
+
332
+ #: ../webpack/components/ParameterSelection/ParameterSelectionActions.js:120
333
+ msgid "Type"
334
+ msgstr ""
335
+
336
+ #: ../webpack/components/ParameterSelection/ParameterSelectionActions.js:161
337
+ msgid "Actions"
338
+ msgstr ""
339
+
340
+ #: ../webpack/components/ParameterSelection/ParameterSelectionActions.js:188
341
+ msgid "Failed to fetch data from server."
342
+ msgstr ""
343
+
344
+ #: ../webpack/components/common/DeleteTableEntry.js:24
345
+ msgid "Are you sure you wish to delete this item?"
346
+ msgstr ""
347
+
348
+ #: ../webpack/components/common/DeleteTableEntry.js:26
349
+ msgid "Delete entry"
350
+ msgstr ""
351
+
352
+ #: gemspec.rb:2
353
+ msgid "TODO: Description of ForemanAcd."
354
+ msgstr ""
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "foreman_acd",
3
- "version": "0.0.6",
3
+ "version": "0.3.0",
4
4
  "description": "foreman application centric deployment",
5
5
  "main": "index.js",
6
6
  "directories": {
@@ -14,26 +14,26 @@
14
14
  "@theforeman/vendor-dev": "^1.7.0",
15
15
  "babel-eslint": "^8.2.1",
16
16
  "babel-jest": "^23.6.0",
17
- "babel-plugin-dynamic-import-node": "^2.0.0",
17
+ "babel-plugin-dynamic-import-node": "^2.3.3",
18
+ "babel-plugin-syntax-dynamic-import": "^6.18.0",
18
19
  "babel-plugin-transform-class-properties": "^6.24.1",
19
20
  "babel-plugin-transform-object-assign": "^6.22.0",
20
21
  "babel-plugin-transform-object-rest-spread": "^6.26.0",
21
- "babel-plugin-syntax-dynamic-import": "^6.18.0",
22
22
  "babel-preset-env": "^1.6.0",
23
23
  "babel-preset-react": "^6.24.1",
24
- "enzyme": "^3.7.0",
25
- "enzyme-adapter-react-16": "^1.7.0",
26
- "enzyme-to-json": "^3.3.5",
24
+ "enzyme": "^3.11.0",
25
+ "enzyme-adapter-react-16": "^1.15.6",
26
+ "enzyme-to-json": "^3.6.1",
27
27
  "eslint": "^4.18.1",
28
- "eslint-plugin-import": "^2.8.0",
28
+ "eslint-plugin-import": "^2.22.1",
29
29
  "eslint-plugin-jest": "^21.2.0",
30
30
  "eslint-plugin-patternfly-react": "^0.2.1",
31
- "eslint-plugin-react": "^7.4.0",
31
+ "eslint-plugin-react": "^7.22.0",
32
32
  "identity-obj-proxy": "^3.0.0",
33
- "lodash": "^4.17.11",
34
33
  "jest": "^23.6.0",
35
34
  "jest-cli": "^23.6.0",
36
35
  "jest-prop-type-error": "^1.1.0",
36
+ "lodash": "^4.17.21",
37
37
  "react-redux-test-utils": "^0.1.1",
38
38
  "sortabular": "~1.5.1",
39
39
  "table-resolver": "~3.2.0"
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'test_plugin_helper'
4
+ require 'nokogiri'
5
+
6
+ module ForemanAcd
7
+ # Ansible Playbooks Controller tests
8
+ class AnsiblePlaybooksControllerTest < ActionController::TestCase
9
+ setup do
10
+ as_admin { FactoryBot.create(:ansible_playbook) }
11
+ @model = ForemanAcd::AnsiblePlaybook.first
12
+ end
13
+
14
+ basic_index_test('ansible_playbooks')
15
+ basic_new_test
16
+ basic_edit_test('ansible_playbook')
17
+
18
+ test 'should destroy ansible playbook' do
19
+ assert_difference('AnsiblePlaybook.count', -1) do
20
+ delete :destroy,
21
+ :params => { :id => @model.id },
22
+ :session => set_session_user
23
+ end
24
+ assert_redirected_to ansible_playbooks_url
25
+ end
26
+ end
27
+ end
@@ -11,17 +11,22 @@ module ForemanAcd
11
11
  @model = ForemanAcd::AppInstance.first
12
12
  end
13
13
 
14
+ def set_session_user
15
+ org_a = Organization.find_by(:name => 'Organization 1')
16
+ loc_a = Location.find_by(:name => 'Location 1')
17
+ super.merge(:location_id => loc_a.id, :organization_id => org_a.id)
18
+ end
19
+
14
20
  basic_index_test('app_instances')
15
21
  basic_new_test
16
- basic_edit_test('app_instance')
22
+ # basic_edit_test('app_instance')
17
23
 
18
24
  test 'should destroy app instance' do
19
25
  assert_difference('AppInstance.count', -1) do
20
- delete :destroy,
26
+ delete :destroy_with_hosts,
21
27
  :params => { :id => @model.id },
22
28
  :session => set_session_user
23
29
  end
24
- assert_redirected_to app_instances_url
25
30
  end
26
31
  end
27
32
  end