knife-ionoscloud 5.0.0.beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (272) hide show
  1. checksums.yaml +7 -0
  2. data/.gitbook.yaml +4 -0
  3. data/.github/ISSUE_TEMPLATE/bug_report.md +54 -0
  4. data/.github/ISSUE_TEMPLATE/config.yml +5 -0
  5. data/.github/ISSUE_TEMPLATE/feature_request.md +51 -0
  6. data/.github/workflows/ci.yml +38 -0
  7. data/.github/workflows/publish.yml +58 -0
  8. data/.gitignore +26 -0
  9. data/.rubocop.yml +148 -0
  10. data/Gemfile +4 -0
  11. data/LICENSE.txt +201 -0
  12. data/Rakefile +7 -0
  13. data/docs/README.md +67 -0
  14. data/docs/changelog.md +1 -0
  15. data/docs/docs_generator.rb +107 -0
  16. data/docs/subcommands/backupunit_create.md +38 -0
  17. data/docs/subcommands/backupunit_delete.md +26 -0
  18. data/docs/subcommands/backupunit_list.md +26 -0
  19. data/docs/subcommands/backupunit_ssourl.md +30 -0
  20. data/docs/subcommands/composite_server_create.md +97 -0
  21. data/docs/subcommands/contract_list.md +26 -0
  22. data/docs/subcommands/datacenter_create.md +41 -0
  23. data/docs/subcommands/datacenter_delete.md +26 -0
  24. data/docs/subcommands/datacenter_list.md +26 -0
  25. data/docs/subcommands/firewall_create.md +65 -0
  26. data/docs/subcommands/firewall_delete.md +38 -0
  27. data/docs/subcommands/firewall_list.md +38 -0
  28. data/docs/subcommands/group_create.md +48 -0
  29. data/docs/subcommands/group_delete.md +26 -0
  30. data/docs/subcommands/group_get.md +30 -0
  31. data/docs/subcommands/group_list.md +29 -0
  32. data/docs/subcommands/group_user_add.md +30 -0
  33. data/docs/subcommands/group_user_remove.md +30 -0
  34. data/docs/subcommands/image_list.md +26 -0
  35. data/docs/subcommands/ipblock_create.md +37 -0
  36. data/docs/subcommands/ipblock_delete.md +26 -0
  37. data/docs/subcommands/ipblock_list.md +26 -0
  38. data/docs/subcommands/ipfailover_add.md +46 -0
  39. data/docs/subcommands/ipfailover_remove.md +42 -0
  40. data/docs/subcommands/k8s_create.md +39 -0
  41. data/docs/subcommands/k8s_delete.md +26 -0
  42. data/docs/subcommands/k8s_list.md +26 -0
  43. data/docs/subcommands/kubeconfig_get.md +30 -0
  44. data/docs/subcommands/label_add.md +45 -0
  45. data/docs/subcommands/label_list.md +35 -0
  46. data/docs/subcommands/label_remove.md +37 -0
  47. data/docs/subcommands/lan_create.md +36 -0
  48. data/docs/subcommands/lan_delete.md +30 -0
  49. data/docs/subcommands/lan_list.md +30 -0
  50. data/docs/subcommands/loadbalancer_create.md +43 -0
  51. data/docs/subcommands/loadbalancer_delete.md +30 -0
  52. data/docs/subcommands/loadbalancer_get.md +34 -0
  53. data/docs/subcommands/loadbalancer_list.md +30 -0
  54. data/docs/subcommands/loadbalancer_nic_add.md +34 -0
  55. data/docs/subcommands/loadbalancer_nic_remove.md +34 -0
  56. data/docs/subcommands/location_list.md +26 -0
  57. data/docs/subcommands/nic_create.md +51 -0
  58. data/docs/subcommands/nic_delete.md +34 -0
  59. data/docs/subcommands/nic_list.md +34 -0
  60. data/docs/subcommands/node_delete.md +34 -0
  61. data/docs/subcommands/node_list.md +34 -0
  62. data/docs/subcommands/node_replace.md +36 -0
  63. data/docs/subcommands/nodepool_create.md +87 -0
  64. data/docs/subcommands/nodepool_delete.md +30 -0
  65. data/docs/subcommands/nodepool_list.md +30 -0
  66. data/docs/subcommands/pcc_create.md +38 -0
  67. data/docs/subcommands/pcc_delete.md +26 -0
  68. data/docs/subcommands/pcc_list.md +26 -0
  69. data/docs/subcommands/request_list.md +32 -0
  70. data/docs/subcommands/request_status.md +30 -0
  71. data/docs/subcommands/request_wait.md +30 -0
  72. data/docs/subcommands/resource_list.md +34 -0
  73. data/docs/subcommands/s3key_create.md +30 -0
  74. data/docs/subcommands/s3key_delete.md +30 -0
  75. data/docs/subcommands/s3key_list.md +30 -0
  76. data/docs/subcommands/server_create.md +55 -0
  77. data/docs/subcommands/server_delete.md +32 -0
  78. data/docs/subcommands/server_list.md +30 -0
  79. data/docs/subcommands/server_reboot.md +30 -0
  80. data/docs/subcommands/server_start.md +30 -0
  81. data/docs/subcommands/server_stop.md +30 -0
  82. data/docs/subcommands/share_create.md +40 -0
  83. data/docs/subcommands/share_delete.md +30 -0
  84. data/docs/subcommands/share_list.md +30 -0
  85. data/docs/subcommands/snapshot_create.md +34 -0
  86. data/docs/subcommands/snapshot_delete.md +26 -0
  87. data/docs/subcommands/snapshot_list.md +26 -0
  88. data/docs/subcommands/snapshot_restore.md +38 -0
  89. data/docs/subcommands/user_create.md +49 -0
  90. data/docs/subcommands/user_delete.md +26 -0
  91. data/docs/subcommands/user_list.md +29 -0
  92. data/docs/subcommands/user_ssourl.md +30 -0
  93. data/docs/subcommands/volume_attach.md +34 -0
  94. data/docs/subcommands/volume_create.md +63 -0
  95. data/docs/subcommands/volume_delete.md +30 -0
  96. data/docs/subcommands/volume_detach.md +36 -0
  97. data/docs/subcommands/volume_list.md +33 -0
  98. data/docs/summary.md +89 -0
  99. data/docs/templates/subcommand_doc.mustache +26 -0
  100. data/docs/templates/summary.mustache +10 -0
  101. data/knife-ionoscloud.gemspec +27 -0
  102. data/lib/chef/knife/ionoscloud_backupunit_create.rb +63 -0
  103. data/lib/chef/knife/ionoscloud_backupunit_delete.rb +55 -0
  104. data/lib/chef/knife/ionoscloud_backupunit_list.rb +41 -0
  105. data/lib/chef/knife/ionoscloud_backupunit_ssourl.rb +39 -0
  106. data/lib/chef/knife/ionoscloud_base.rb +76 -0
  107. data/lib/chef/knife/ionoscloud_composite_server_create.rb +217 -0
  108. data/lib/chef/knife/ionoscloud_contract_list.rb +50 -0
  109. data/lib/chef/knife/ionoscloud_datacenter_create.rb +66 -0
  110. data/lib/chef/knife/ionoscloud_datacenter_delete.rb +56 -0
  111. data/lib/chef/knife/ionoscloud_datacenter_list.rb +50 -0
  112. data/lib/chef/knife/ionoscloud_firewall_create.rb +135 -0
  113. data/lib/chef/knife/ionoscloud_firewall_delete.rb +76 -0
  114. data/lib/chef/knife/ionoscloud_firewall_list.rb +72 -0
  115. data/lib/chef/knife/ionoscloud_group_create.rb +89 -0
  116. data/lib/chef/knife/ionoscloud_group_delete.rb +61 -0
  117. data/lib/chef/knife/ionoscloud_group_get.rb +46 -0
  118. data/lib/chef/knife/ionoscloud_group_list.rb +62 -0
  119. data/lib/chef/knife/ionoscloud_group_user_add.rb +72 -0
  120. data/lib/chef/knife/ionoscloud_group_user_remove.rb +72 -0
  121. data/lib/chef/knife/ionoscloud_image_list.rb +47 -0
  122. data/lib/chef/knife/ionoscloud_ipblock_create.rb +63 -0
  123. data/lib/chef/knife/ionoscloud_ipblock_delete.rb +50 -0
  124. data/lib/chef/knife/ionoscloud_ipblock_list.rb +42 -0
  125. data/lib/chef/knife/ionoscloud_ipfailover_add.rb +76 -0
  126. data/lib/chef/knife/ionoscloud_ipfailover_remove.rb +76 -0
  127. data/lib/chef/knife/ionoscloud_k8s_create.rb +79 -0
  128. data/lib/chef/knife/ionoscloud_k8s_delete.rb +67 -0
  129. data/lib/chef/knife/ionoscloud_k8s_list.rb +45 -0
  130. data/lib/chef/knife/ionoscloud_kubeconfig_get.rb +37 -0
  131. data/lib/chef/knife/ionoscloud_label_add.rb +84 -0
  132. data/lib/chef/knife/ionoscloud_label_list.rb +83 -0
  133. data/lib/chef/knife/ionoscloud_label_remove.rb +77 -0
  134. data/lib/chef/knife/ionoscloud_lan_create.rb +69 -0
  135. data/lib/chef/knife/ionoscloud_lan_delete.rb +54 -0
  136. data/lib/chef/knife/ionoscloud_lan_list.rb +46 -0
  137. data/lib/chef/knife/ionoscloud_loadbalancer_create.rb +87 -0
  138. data/lib/chef/knife/ionoscloud_loadbalancer_delete.rb +68 -0
  139. data/lib/chef/knife/ionoscloud_loadbalancer_get.rb +51 -0
  140. data/lib/chef/knife/ionoscloud_loadbalancer_list.rb +50 -0
  141. data/lib/chef/knife/ionoscloud_loadbalancer_nic_add.rb +75 -0
  142. data/lib/chef/knife/ionoscloud_loadbalancer_nic_remove.rb +76 -0
  143. data/lib/chef/knife/ionoscloud_location_list.rb +38 -0
  144. data/lib/chef/knife/ionoscloud_nic_create.rb +104 -0
  145. data/lib/chef/knife/ionoscloud_nic_delete.rb +62 -0
  146. data/lib/chef/knife/ionoscloud_nic_list.rb +57 -0
  147. data/lib/chef/knife/ionoscloud_node_delete.rb +65 -0
  148. data/lib/chef/knife/ionoscloud_node_list.rb +55 -0
  149. data/lib/chef/knife/ionoscloud_node_replace.rb +54 -0
  150. data/lib/chef/knife/ionoscloud_nodepool_create.rb +163 -0
  151. data/lib/chef/knife/ionoscloud_nodepool_delete.rb +60 -0
  152. data/lib/chef/knife/ionoscloud_nodepool_list.rb +51 -0
  153. data/lib/chef/knife/ionoscloud_pcc_create.rb +68 -0
  154. data/lib/chef/knife/ionoscloud_pcc_delete.rb +57 -0
  155. data/lib/chef/knife/ionoscloud_pcc_list.rb +41 -0
  156. data/lib/chef/knife/ionoscloud_request_list.rb +94 -0
  157. data/lib/chef/knife/ionoscloud_request_status.rb +37 -0
  158. data/lib/chef/knife/ionoscloud_request_wait.rb +41 -0
  159. data/lib/chef/knife/ionoscloud_resource_list.rb +81 -0
  160. data/lib/chef/knife/ionoscloud_s3key_create.rb +45 -0
  161. data/lib/chef/knife/ionoscloud_s3key_delete.rb +57 -0
  162. data/lib/chef/knife/ionoscloud_s3key_list.rb +46 -0
  163. data/lib/chef/knife/ionoscloud_server_create.rb +104 -0
  164. data/lib/chef/knife/ionoscloud_server_delete.rb +62 -0
  165. data/lib/chef/knife/ionoscloud_server_list.rb +58 -0
  166. data/lib/chef/knife/ionoscloud_server_reboot.rb +45 -0
  167. data/lib/chef/knife/ionoscloud_server_start.rb +43 -0
  168. data/lib/chef/knife/ionoscloud_server_stop.rb +44 -0
  169. data/lib/chef/knife/ionoscloud_share_create.rb +71 -0
  170. data/lib/chef/knife/ionoscloud_share_delete.rb +55 -0
  171. data/lib/chef/knife/ionoscloud_share_list.rb +47 -0
  172. data/lib/chef/knife/ionoscloud_snapshot_create.rb +58 -0
  173. data/lib/chef/knife/ionoscloud_snapshot_delete.rb +54 -0
  174. data/lib/chef/knife/ionoscloud_snapshot_list.rb +45 -0
  175. data/lib/chef/knife/ionoscloud_snapshot_restore.rb +69 -0
  176. data/lib/chef/knife/ionoscloud_user_create.rb +83 -0
  177. data/lib/chef/knife/ionoscloud_user_delete.rb +56 -0
  178. data/lib/chef/knife/ionoscloud_user_list.rb +60 -0
  179. data/lib/chef/knife/ionoscloud_user_ssourl.rb +37 -0
  180. data/lib/chef/knife/ionoscloud_volume_attach.rb +52 -0
  181. data/lib/chef/knife/ionoscloud_volume_create.rb +133 -0
  182. data/lib/chef/knife/ionoscloud_volume_delete.rb +67 -0
  183. data/lib/chef/knife/ionoscloud_volume_detach.rb +77 -0
  184. data/lib/chef/knife/ionoscloud_volume_list.rb +70 -0
  185. data/lib/knife-ionoscloud/version.rb +6 -0
  186. data/spec/chef/knife/ionoscloud_backupunit_create_spec.rb +65 -0
  187. data/spec/chef/knife/ionoscloud_backupunit_delete_spec.rb +101 -0
  188. data/spec/chef/knife/ionoscloud_backupunit_list_spec.rb +72 -0
  189. data/spec/chef/knife/ionoscloud_backupunit_ssourl_spec.rb +93 -0
  190. data/spec/chef/knife/ionoscloud_base_spec.rb +157 -0
  191. data/spec/chef/knife/ionoscloud_composite_server_create_spec.rb +111 -0
  192. data/spec/chef/knife/ionoscloud_contract_list_spec.rb +81 -0
  193. data/spec/chef/knife/ionoscloud_datacenter_create_spec.rb +72 -0
  194. data/spec/chef/knife/ionoscloud_datacenter_delete_spec.rb +102 -0
  195. data/spec/chef/knife/ionoscloud_datacenter_list_spec.rb +76 -0
  196. data/spec/chef/knife/ionoscloud_firewall_create_spec.rb +90 -0
  197. data/spec/chef/knife/ionoscloud_firewall_delete_spec.rb +117 -0
  198. data/spec/chef/knife/ionoscloud_firewall_list_spec.rb +90 -0
  199. data/spec/chef/knife/ionoscloud_group_create_spec.rb +76 -0
  200. data/spec/chef/knife/ionoscloud_group_delete_spec.rb +109 -0
  201. data/spec/chef/knife/ionoscloud_group_get_spec.rb +73 -0
  202. data/spec/chef/knife/ionoscloud_group_list_spec.rb +115 -0
  203. data/spec/chef/knife/ionoscloud_group_user_add_spec.rb +134 -0
  204. data/spec/chef/knife/ionoscloud_group_user_remove_spec.rb +130 -0
  205. data/spec/chef/knife/ionoscloud_image_list_spec.rb +75 -0
  206. data/spec/chef/knife/ionoscloud_ipblock_create_spec.rb +72 -0
  207. data/spec/chef/knife/ionoscloud_ipblock_delete_spec.rb +102 -0
  208. data/spec/chef/knife/ionoscloud_ipblock_list_spec.rb +74 -0
  209. data/spec/chef/knife/ionoscloud_ipfailover_add_spec.rb +83 -0
  210. data/spec/chef/knife/ionoscloud_ipfailover_remove_spec.rb +122 -0
  211. data/spec/chef/knife/ionoscloud_k8s_create_spec.rb +83 -0
  212. data/spec/chef/knife/ionoscloud_k8s_delete_spec.rb +172 -0
  213. data/spec/chef/knife/ionoscloud_k8s_list_spec.rb +73 -0
  214. data/spec/chef/knife/ionoscloud_kubeconfig_get_spec.rb +91 -0
  215. data/spec/chef/knife/ionoscloud_label_add_spec.rb +287 -0
  216. data/spec/chef/knife/ionoscloud_label_list_spec.rb +337 -0
  217. data/spec/chef/knife/ionoscloud_label_remove_spec.rb +391 -0
  218. data/spec/chef/knife/ionoscloud_lan_create_spec.rb +77 -0
  219. data/spec/chef/knife/ionoscloud_lan_delete_spec.rb +103 -0
  220. data/spec/chef/knife/ionoscloud_lan_list_spec.rb +73 -0
  221. data/spec/chef/knife/ionoscloud_loadbalancer_create_spec.rb +82 -0
  222. data/spec/chef/knife/ionoscloud_loadbalancer_delete_spec.rb +107 -0
  223. data/spec/chef/knife/ionoscloud_loadbalancer_get_spec.rb +68 -0
  224. data/spec/chef/knife/ionoscloud_loadbalancer_list_spec.rb +74 -0
  225. data/spec/chef/knife/ionoscloud_loadbalancer_nic_add_spec.rb +128 -0
  226. data/spec/chef/knife/ionoscloud_loadbalancer_nic_remove_spec.rb +124 -0
  227. data/spec/chef/knife/ionoscloud_location_list_spec.rb +67 -0
  228. data/spec/chef/knife/ionoscloud_nic_create_spec.rb +85 -0
  229. data/spec/chef/knife/ionoscloud_nic_delete_spec.rb +108 -0
  230. data/spec/chef/knife/ionoscloud_nic_list_spec.rb +83 -0
  231. data/spec/chef/knife/ionoscloud_node_delete_spec.rb +107 -0
  232. data/spec/chef/knife/ionoscloud_node_list_spec.rb +75 -0
  233. data/spec/chef/knife/ionoscloud_node_replace_spec.rb +94 -0
  234. data/spec/chef/knife/ionoscloud_nodepool_create_spec.rb +99 -0
  235. data/spec/chef/knife/ionoscloud_nodepool_delete_spec.rb +106 -0
  236. data/spec/chef/knife/ionoscloud_nodepool_list_spec.rb +76 -0
  237. data/spec/chef/knife/ionoscloud_pcc_create_spec.rb +70 -0
  238. data/spec/chef/knife/ionoscloud_pcc_delete_spec.rb +106 -0
  239. data/spec/chef/knife/ionoscloud_pcc_list_spec.rb +69 -0
  240. data/spec/chef/knife/ionoscloud_request_list_spec.rb +165 -0
  241. data/spec/chef/knife/ionoscloud_request_status_spec.rb +92 -0
  242. data/spec/chef/knife/ionoscloud_request_wait_spec.rb +74 -0
  243. data/spec/chef/knife/ionoscloud_resource_list_spec.rb +155 -0
  244. data/spec/chef/knife/ionoscloud_s3key_create_spec.rb +64 -0
  245. data/spec/chef/knife/ionoscloud_s3key_delete_spec.rb +103 -0
  246. data/spec/chef/knife/ionoscloud_s3key_list_spec.rb +70 -0
  247. data/spec/chef/knife/ionoscloud_server_create_spec.rb +84 -0
  248. data/spec/chef/knife/ionoscloud_server_delete_spec.rb +108 -0
  249. data/spec/chef/knife/ionoscloud_server_list_spec.rb +85 -0
  250. data/spec/chef/knife/ionoscloud_server_reboot_spec.rb +95 -0
  251. data/spec/chef/knife/ionoscloud_server_start_spec.rb +95 -0
  252. data/spec/chef/knife/ionoscloud_server_stop_spec.rb +95 -0
  253. data/spec/chef/knife/ionoscloud_share_create_spec.rb +68 -0
  254. data/spec/chef/knife/ionoscloud_share_delete_spec.rb +103 -0
  255. data/spec/chef/knife/ionoscloud_share_list_spec.rb +70 -0
  256. data/spec/chef/knife/ionoscloud_snapshot_create_spec.rb +74 -0
  257. data/spec/chef/knife/ionoscloud_snapshot_delete_spec.rb +103 -0
  258. data/spec/chef/knife/ionoscloud_snapshot_list_spec.rb +73 -0
  259. data/spec/chef/knife/ionoscloud_snapshot_restore_spec.rb +78 -0
  260. data/spec/chef/knife/ionoscloud_user_create_spec.rb +73 -0
  261. data/spec/chef/knife/ionoscloud_user_delete_spec.rb +104 -0
  262. data/spec/chef/knife/ionoscloud_user_list_spec.rb +103 -0
  263. data/spec/chef/knife/ionoscloud_user_ssourl_spec.rb +93 -0
  264. data/spec/chef/knife/ionoscloud_volume_attach_spec.rb +99 -0
  265. data/spec/chef/knife/ionoscloud_volume_create_spec.rb +143 -0
  266. data/spec/chef/knife/ionoscloud_volume_delete_spec.rb +108 -0
  267. data/spec/chef/knife/ionoscloud_volume_detach_spec.rb +110 -0
  268. data/spec/chef/knife/ionoscloud_volume_list_spec.rb +118 -0
  269. data/spec/spec_helper.rb +702 -0
  270. data/spec/test.sh +3 -0
  271. data/summary.md +0 -0
  272. metadata +460 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: bbe911ee22d8bcb3ce365bcbaa01e4f694f204bf87863f3b732b634bf15da4e9
4
+ data.tar.gz: 78618ab79c08a9a86286e0016d547f1c8e85415fe5cffde4a0de2470f33cd69b
5
+ SHA512:
6
+ metadata.gz: 473405e0ff5e916d40bba13014e3aa97cd44ee810e982ab809c1249122176f805429edf99cde6cce082d2e7c5b40a2838df2bd1fc068021b93aec17b86843c7e
7
+ data.tar.gz: a6a7a513bd6ff8f561f7000f156e93614afdc3a1cc248abd18f25973aba4a804511be8766f1b07466d1bdca8c0ca399fb4baef4122c9cf35ed691a0e0de35e3c
data/.gitbook.yaml ADDED
@@ -0,0 +1,4 @@
1
+ root: docs
2
+ structure:
3
+ readme: README.md
4
+ summary: summary.md
@@ -0,0 +1,54 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to help us improve
4
+ title: ''
5
+ labels: bug
6
+ assignees: LiviusP
7
+
8
+ ---
9
+
10
+ ## Description
11
+ <!-- A clear and concise description of what the bug is. -->
12
+
13
+ ## Expected behavior
14
+ <!-- A clear and concise description of what you expected to happen. -->
15
+
16
+ ## Environment
17
+
18
+ Knife Version:
19
+ ```
20
+ ```
21
+ SDK version:
22
+ ```
23
+ ```
24
+ OS:
25
+ ```
26
+ ```
27
+
28
+ ## Configuration Files
29
+ <!-- could also be environment settings, e.g. LANG=de_DE -->
30
+
31
+ ## How to Reproduce
32
+ <!--
33
+ Steps to reproduce the behavior:
34
+ 1. Go to '...'
35
+ 2. Execute `acme --emca template.xml`
36
+ 3. ...
37
+ Might be omitted if there are no choices, eg. the single command is already in the description
38
+ -->
39
+
40
+ ## Error and Debug Output
41
+ <!--
42
+ Add anything, that could help here.
43
+ You can increase the debug level by .. ' hello --whatsover=example`
44
+ -->
45
+
46
+ ## Additional Notes
47
+ <!--
48
+ Add any other content about the problem here.
49
+ -->
50
+
51
+ ## References
52
+ <!--
53
+ Add any other related issues or other links that you think are important for fixing the bug.
54
+ -->
@@ -0,0 +1,5 @@
1
+ blank_issues_enabled: false
2
+ contact_links:
3
+ - name: IONOS Cloud API
4
+ url: https://devops.ionos.com/api/
5
+ about: View API documentation
@@ -0,0 +1,51 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an idea for this project
4
+ title: ''
5
+ labels: enhancement
6
+ assignees: LiviusP
7
+
8
+ ---
9
+
10
+ ### Current Knife Version
11
+ <!---
12
+ If you're not using the latest version, please check to see if something related to your request has already been implemented in a later version.
13
+ -->
14
+
15
+ ```
16
+ ...
17
+ ```
18
+
19
+ ### Use-cases
20
+ <!---
21
+ In order to properly evaluate a feature request, it is necessary to understand the use-cases for it.
22
+
23
+ Please describe below the end goal you are trying to achieve that has led you to request this feature.
24
+
25
+ Please keep this section focused on the problem and not on the suggested solution. We'll get to that in a moment, below!
26
+ -->
27
+
28
+ ### Attempted Solutions
29
+ <!---
30
+ If you've already tried to solve the problem within SDKs existing features and found a limitation that prevented you from succeeding, please describe it below in as much detail as possible.
31
+
32
+ Ideally, this would include real code snippets that you tried and what results you got in each case.
33
+
34
+ Please remove any sensitive information such as passwords before sharing configuration snippets and command lines.
35
+ --->
36
+
37
+ ### Proposal
38
+ <!---
39
+ If you have an idea for a way to address the problem, please describe it below.
40
+
41
+ In this section, it's helpful to include specific examples of how what you are suggesting might look in configuration files, or on the command line, since that allows us to understand the full picture of what you are proposing.
42
+
43
+ -->
44
+
45
+ ### References
46
+ <!--
47
+ Are there any other GitHub issues, whether open or closed, that are related to the problem you've described above or to the suggested solution? If so, please create a list below that mentions each of them. For example:
48
+
49
+ - #6017
50
+
51
+ -->
@@ -0,0 +1,38 @@
1
+ # CI workflow
2
+
3
+ name: CI
4
+
5
+ on:
6
+ workflow_dispatch:
7
+ pull_request:
8
+ types: [ assigned, opened, synchronize, reopened ]
9
+ push:
10
+ branches: [ master ]
11
+
12
+ jobs:
13
+ test:
14
+ env:
15
+ ruby-version: 2.7
16
+
17
+ runs-on: ubuntu-latest
18
+
19
+ steps:
20
+ - name: Checkout
21
+ uses: actions/checkout@v2
22
+
23
+ - name: Setup Ruby
24
+ uses: ruby/setup-ruby@v1.61.1
25
+ with:
26
+ ruby-version: ${{ env.ruby-version }}
27
+
28
+ - name: Install Rubocop
29
+ run: gem install rubocop
30
+
31
+ - name: Run Rubocop
32
+ run: rubocop
33
+
34
+ - name: Install the knife plugin
35
+ run: bundle
36
+
37
+ - name: Run the tests
38
+ run: rspec
@@ -0,0 +1,58 @@
1
+ # Publish workflow
2
+
3
+ name: Publish
4
+
5
+ on:
6
+ workflow_dispatch:
7
+ inputs:
8
+ version:
9
+ description: 'Version to publish (e.g. v1.2.3)'
10
+ required: true
11
+
12
+ jobs:
13
+ publish:
14
+ env:
15
+ ruby-version: 2.7
16
+
17
+ runs-on: ubuntu-latest
18
+
19
+ steps:
20
+ - name: Checkout
21
+ uses: actions/checkout@v2
22
+
23
+ - name: Validate the version
24
+ shell: bash
25
+ run: |
26
+ if [ "${{ github.event.inputs.version }}" != cat lib/knife-ionoscloud/version.rb | grep 'VERSION =' | tr -s ' ' | cut -d ' ' -f 4 | sed 's/^.//;s/.$//' ]; then
27
+ echo "Specified version does not match the one from version.rb!"
28
+ exit 1
29
+ fi
30
+ echo Next version will be: v${{ github.event.inputs.version }}
31
+
32
+ - name: Setup Ruby
33
+ uses: ruby/setup-ruby@v1.61.1
34
+ with:
35
+ ruby-version: ${{ env.ruby-version }}
36
+
37
+ - name: Install Rubocop
38
+ run: gem install rubocop
39
+
40
+ - name: Run Rubocop
41
+ run: rubocop
42
+
43
+ - name: Install the knife plugin
44
+ run: bundle
45
+
46
+ - name: Run the tests
47
+ run: rspec
48
+
49
+ - name: Create RubyGems release of the Knife plugin
50
+ shell: bash
51
+ run: |
52
+ mkdir -p ~/.gem
53
+ cat << EOF > ~/.gem/credentials
54
+ ---
55
+ :rubygems_api_key: ${{ secrets.RUBYGEMS }}
56
+ EOF
57
+ chmod 0600 ~/.gem/credentials
58
+ gem push $(gem build knife-ionoscloud.gemspec | grep 'File' | tr -s ' ' | cut -d ' ' -f 3)
data/.gitignore ADDED
@@ -0,0 +1,26 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .DS_Store
6
+ .yardoc
7
+ Gemfile.lock
8
+ InstalledFiles
9
+ _yardoc
10
+ coverage
11
+ doc/
12
+ lib/bundler/man
13
+ pkg
14
+ vendor
15
+ rdoc
16
+ spec/reports
17
+ test/tmp
18
+ test/version_tmp
19
+ tmp
20
+ *.bundle
21
+ *.so
22
+ *.o
23
+ *.a
24
+ mkmf.log
25
+ knife.rb
26
+ reset.sh
data/.rubocop.yml ADDED
@@ -0,0 +1,148 @@
1
+ # This file is based on https://github.com/rails/rails/blob/master/.rubocop.yml (MIT license)
2
+ # Automatically generated by OpenAPI Generator (https://openapi-generator.tech)
3
+ AllCops:
4
+ TargetRubyVersion: 2.4
5
+ # RuboCop has a bunch of cops enabled by default. This setting tells RuboCop
6
+ # to ignore them, so only the ones explicitly set in this file are enabled.
7
+ DisabledByDefault: true
8
+ Exclude:
9
+ - '**/templates/**/*'
10
+ - '**/vendor/**/*'
11
+ - 'actionpack/lib/action_dispatch/journey/parser.rb'
12
+
13
+ # Prefer &&/|| over and/or.
14
+ Style/AndOr:
15
+ Enabled: true
16
+
17
+ # Align `when` with `case`.
18
+ Layout/CaseIndentation:
19
+ Enabled: true
20
+
21
+ # Align comments with method definitions.
22
+ Layout/CommentIndentation:
23
+ Enabled: true
24
+
25
+ Layout/ElseAlignment:
26
+ Enabled: true
27
+
28
+ Layout/EmptyLineAfterMagicComment:
29
+ Enabled: true
30
+
31
+ # In a regular class definition, no empty lines around the body.
32
+ Layout/EmptyLinesAroundClassBody:
33
+ Enabled: true
34
+
35
+ # In a regular method definition, no empty lines around the body.
36
+ Layout/EmptyLinesAroundMethodBody:
37
+ Enabled: true
38
+
39
+ # In a regular module definition, no empty lines around the body.
40
+ Layout/EmptyLinesAroundModuleBody:
41
+ Enabled: true
42
+
43
+ Layout/FirstArgumentIndentation:
44
+ Enabled: true
45
+
46
+ # Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }.
47
+ Style/HashSyntax:
48
+ Enabled: false
49
+
50
+ # Method definitions after `private` or `protected` isolated calls need one
51
+ # extra level of indentation.
52
+ Layout/IndentationConsistency:
53
+ Enabled: true
54
+ EnforcedStyle: indented_internal_methods
55
+
56
+ # Two spaces, no tabs (for indentation).
57
+ Layout/IndentationWidth:
58
+ Enabled: true
59
+
60
+ Layout/LeadingCommentSpace:
61
+ Enabled: true
62
+
63
+ Layout/SpaceAfterColon:
64
+ Enabled: true
65
+
66
+ Layout/SpaceAfterComma:
67
+ Enabled: true
68
+
69
+ Layout/SpaceAroundEqualsInParameterDefault:
70
+ Enabled: true
71
+
72
+ Layout/SpaceAroundKeyword:
73
+ Enabled: true
74
+
75
+ Layout/SpaceAroundOperators:
76
+ Enabled: true
77
+
78
+ Layout/SpaceBeforeComma:
79
+ Enabled: true
80
+
81
+ Layout/SpaceBeforeFirstArg:
82
+ Enabled: true
83
+
84
+ Style/DefWithParentheses:
85
+ Enabled: true
86
+
87
+ # Defining a method with parameters needs parentheses.
88
+ Style/MethodDefParentheses:
89
+ Enabled: true
90
+
91
+ Style/FrozenStringLiteralComment:
92
+ Enabled: false
93
+ EnforcedStyle: always
94
+
95
+ # Use `foo {}` not `foo{}`.
96
+ Layout/SpaceBeforeBlockBraces:
97
+ Enabled: true
98
+
99
+ # Use `foo { bar }` not `foo {bar}`.
100
+ Layout/SpaceInsideBlockBraces:
101
+ Enabled: true
102
+
103
+ # Use `{ a: 1 }` not `{a:1}`.
104
+ Layout/SpaceInsideHashLiteralBraces:
105
+ Enabled: true
106
+
107
+ Layout/SpaceInsideParens:
108
+ Enabled: true
109
+
110
+ # Check quotes usage according to lint rule below.
111
+ #Style/StringLiterals:
112
+ # Enabled: true
113
+ # EnforcedStyle: single_quotes
114
+
115
+ # Detect hard tabs, no hard tabs.
116
+ Layout/IndentationStyle:
117
+ Enabled: true
118
+
119
+ # Blank lines should not have any spaces.
120
+ Layout/TrailingEmptyLines:
121
+ Enabled: true
122
+
123
+ # No trailing whitespace.
124
+ Layout/TrailingWhitespace:
125
+ Enabled: true
126
+
127
+ # Use quotes for string literals when they are enough.
128
+ Style/RedundantPercentQ:
129
+ Enabled: true
130
+
131
+ # Align `end` with the matching keyword or starting expression except for
132
+ # assignments, where it should be aligned with the LHS.
133
+ Layout/EndAlignment:
134
+ Enabled: true
135
+ EnforcedStyleAlignWith: variable
136
+ AutoCorrect: true
137
+
138
+ # Use my_method(my_arg) not my_method( my_arg ) or my_method my_arg.
139
+ Lint/RequireParentheses:
140
+ Enabled: true
141
+
142
+ Style/RedundantReturn:
143
+ Enabled: true
144
+ AllowMultipleReturnValues: true
145
+
146
+ Style/Semicolon:
147
+ Enabled: true
148
+ AllowAsExpressionSeparator: true
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in knife-ionoscloud.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "{}"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright {yyyy} {name of copyright owner}
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.