knife-ionoscloud 5.1.1 → 6.0.0.beta.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.
Files changed (326) hide show
  1. checksums.yaml +4 -4
  2. data/docs/README.md +1 -1
  3. data/docs/subcommands/composite_server_create.md +9 -3
  4. data/docs/subcommands/cube_server_create.md +91 -0
  5. data/docs/subcommands/firewall_create.md +5 -2
  6. data/docs/subcommands/flowlog_create.md +63 -0
  7. data/docs/subcommands/flowlog_delete.md +51 -0
  8. data/docs/subcommands/flowlog_list.md +51 -0
  9. data/docs/subcommands/group_create.md +10 -1
  10. data/docs/subcommands/natgateway_create.md +41 -0
  11. data/docs/subcommands/natgateway_delete.md +35 -0
  12. data/docs/subcommands/natgateway_lan_add.md +46 -0
  13. data/docs/subcommands/natgateway_lan_remove.md +39 -0
  14. data/docs/subcommands/natgateway_list.md +35 -0
  15. data/docs/subcommands/natgateway_rule_add.md +66 -0
  16. data/docs/subcommands/natgateway_rule_list.md +38 -0
  17. data/docs/subcommands/natgateway_rule_remove.md +39 -0
  18. data/docs/subcommands/networkloadbalancer_create.md +54 -0
  19. data/docs/subcommands/networkloadbalancer_delete.md +35 -0
  20. data/docs/subcommands/networkloadbalancer_list.md +35 -0
  21. data/docs/subcommands/networkloadbalancer_rule_add.md +72 -0
  22. data/docs/subcommands/networkloadbalancer_rule_list.md +39 -0
  23. data/docs/subcommands/networkloadbalancer_rule_remove.md +39 -0
  24. data/docs/subcommands/networkloadbalancer_rule_target_add.md +64 -0
  25. data/docs/subcommands/networkloadbalancer_rule_target_list.md +43 -0
  26. data/docs/subcommands/networkloadbalancer_rule_target_remove.md +51 -0
  27. data/docs/subcommands/nic_create.md +3 -3
  28. data/docs/subcommands/nodepool_lan_add.md +49 -0
  29. data/docs/subcommands/nodepool_lan_remove.md +39 -0
  30. data/docs/subcommands/server_console.md +39 -0
  31. data/docs/subcommands/server_list.md +4 -1
  32. data/docs/subcommands/server_resume.md +35 -0
  33. data/docs/subcommands/server_suspend.md +35 -0
  34. data/docs/subcommands/server_token.md +39 -0
  35. data/docs/subcommands/server_upgrade.md +39 -0
  36. data/docs/subcommands/template_list.md +31 -0
  37. data/docs/subcommands/volume_create.md +2 -5
  38. data/docs/summary.md +29 -0
  39. data/knife-ionoscloud.gemspec +1 -1
  40. data/lib/chef/knife/ionoscloud_backupunit_create.rb +12 -16
  41. data/lib/chef/knife/ionoscloud_backupunit_delete.rb +2 -5
  42. data/lib/chef/knife/ionoscloud_backupunit_get.rb +33 -0
  43. data/lib/chef/knife/ionoscloud_backupunit_list.rb +1 -1
  44. data/lib/chef/knife/ionoscloud_backupunit_ssourl.rb +1 -1
  45. data/lib/chef/knife/ionoscloud_backupunit_update.rb +62 -0
  46. data/lib/chef/knife/ionoscloud_base.rb +309 -1
  47. data/lib/chef/knife/ionoscloud_composite_server_create.rb +23 -5
  48. data/lib/chef/knife/ionoscloud_contract_list.rb +32 -23
  49. data/lib/chef/knife/ionoscloud_cube_server_create.rb +212 -0
  50. data/lib/chef/knife/ionoscloud_datacenter_create.rb +11 -14
  51. data/lib/chef/knife/ionoscloud_datacenter_delete.rb +2 -7
  52. data/lib/chef/knife/ionoscloud_datacenter_get.rb +33 -0
  53. data/lib/chef/knife/ionoscloud_datacenter_list.rb +4 -2
  54. data/lib/chef/knife/ionoscloud_datacenter_update.rb +67 -0
  55. data/lib/chef/knife/ionoscloud_firewall_create.rb +16 -21
  56. data/lib/chef/knife/ionoscloud_firewall_delete.rb +5 -13
  57. data/lib/chef/knife/ionoscloud_firewall_get.rb +52 -0
  58. data/lib/chef/knife/ionoscloud_firewall_list.rb +5 -3
  59. data/lib/chef/knife/ionoscloud_firewall_update.rb +133 -0
  60. data/lib/chef/knife/ionoscloud_flowlog_create.rb +116 -0
  61. data/lib/chef/knife/ionoscloud_flowlog_delete.rb +103 -0
  62. data/lib/chef/knife/ionoscloud_flowlog_get.rb +84 -0
  63. data/lib/chef/knife/ionoscloud_flowlog_list.rb +101 -0
  64. data/lib/chef/knife/ionoscloud_flowlog_update.rb +127 -0
  65. data/lib/chef/knife/ionoscloud_group_create.rb +33 -27
  66. data/lib/chef/knife/ionoscloud_group_delete.rb +1 -11
  67. data/lib/chef/knife/ionoscloud_group_get.rb +1 -13
  68. data/lib/chef/knife/ionoscloud_group_list.rb +19 -7
  69. data/lib/chef/knife/ionoscloud_group_update.rb +131 -0
  70. data/lib/chef/knife/ionoscloud_group_user_add.rb +1 -18
  71. data/lib/chef/knife/ionoscloud_group_user_remove.rb +1 -18
  72. data/lib/chef/knife/ionoscloud_image_list.rb +1 -1
  73. data/lib/chef/knife/ionoscloud_ipblock_create.rb +10 -13
  74. data/lib/chef/knife/ionoscloud_ipblock_delete.rb +1 -4
  75. data/lib/chef/knife/ionoscloud_ipblock_get.rb +33 -0
  76. data/lib/chef/knife/ionoscloud_ipblock_update.rb +57 -0
  77. data/lib/chef/knife/ionoscloud_ipfailover_add.rb +1 -1
  78. data/lib/chef/knife/ionoscloud_ipfailover_remove.rb +1 -1
  79. data/lib/chef/knife/ionoscloud_k8s_create.rb +27 -35
  80. data/lib/chef/knife/ionoscloud_k8s_delete.rb +1 -9
  81. data/lib/chef/knife/ionoscloud_k8s_get.rb +33 -0
  82. data/lib/chef/knife/ionoscloud_k8s_update.rb +99 -0
  83. data/lib/chef/knife/ionoscloud_label_add.rb +1 -1
  84. data/lib/chef/knife/ionoscloud_label_list.rb +1 -1
  85. data/lib/chef/knife/ionoscloud_label_remove.rb +1 -1
  86. data/lib/chef/knife/ionoscloud_lan_create.rb +6 -14
  87. data/lib/chef/knife/ionoscloud_lan_delete.rb +3 -4
  88. data/lib/chef/knife/ionoscloud_lan_get.rb +38 -0
  89. data/lib/chef/knife/ionoscloud_lan_list.rb +2 -1
  90. data/lib/chef/knife/ionoscloud_lan_update.rb +76 -0
  91. data/lib/chef/knife/ionoscloud_loadbalancer_create.rb +4 -14
  92. data/lib/chef/knife/ionoscloud_loadbalancer_delete.rb +2 -9
  93. data/lib/chef/knife/ionoscloud_loadbalancer_get.rb +3 -13
  94. data/lib/chef/knife/ionoscloud_loadbalancer_list.rb +1 -1
  95. data/lib/chef/knife/ionoscloud_loadbalancer_nic_add.rb +3 -15
  96. data/lib/chef/knife/ionoscloud_loadbalancer_nic_remove.rb +3 -16
  97. data/lib/chef/knife/ionoscloud_loadbalancer_update.rb +73 -0
  98. data/lib/chef/knife/ionoscloud_location_list.rb +5 -3
  99. data/lib/chef/knife/ionoscloud_natgateway_create.rb +60 -0
  100. data/lib/chef/knife/ionoscloud_natgateway_delete.rb +54 -0
  101. data/lib/chef/knife/ionoscloud_natgateway_get.rb +42 -0
  102. data/lib/chef/knife/ionoscloud_natgateway_lan_add.rb +74 -0
  103. data/lib/chef/knife/ionoscloud_natgateway_lan_remove.rb +52 -0
  104. data/lib/chef/knife/ionoscloud_natgateway_list.rb +51 -0
  105. data/lib/chef/knife/ionoscloud_natgateway_rule_add.rb +107 -0
  106. data/lib/chef/knife/ionoscloud_natgateway_rule_list.rb +65 -0
  107. data/lib/chef/knife/ionoscloud_natgateway_rule_remove.rb +55 -0
  108. data/lib/chef/knife/ionoscloud_natgateway_rule_update.rb +116 -0
  109. data/lib/chef/knife/ionoscloud_natgateway_update.rb +84 -0
  110. data/lib/chef/knife/ionoscloud_networkloadbalancer_create.rb +89 -0
  111. data/lib/chef/knife/ionoscloud_networkloadbalancer_delete.rb +62 -0
  112. data/lib/chef/knife/ionoscloud_networkloadbalancer_get.rb +42 -0
  113. data/lib/chef/knife/ionoscloud_networkloadbalancer_list.rb +57 -0
  114. data/lib/chef/knife/ionoscloud_networkloadbalancer_rule_add.rb +141 -0
  115. data/lib/chef/knife/ionoscloud_networkloadbalancer_rule_list.rb +65 -0
  116. data/lib/chef/knife/ionoscloud_networkloadbalancer_rule_remove.rb +68 -0
  117. data/lib/chef/knife/ionoscloud_networkloadbalancer_rule_target_add.rb +124 -0
  118. data/lib/chef/knife/ionoscloud_networkloadbalancer_rule_target_list.rb +70 -0
  119. data/lib/chef/knife/ionoscloud_networkloadbalancer_rule_target_remove.rb +88 -0
  120. data/lib/chef/knife/ionoscloud_networkloadbalancer_rule_update.rb +148 -0
  121. data/lib/chef/knife/ionoscloud_networkloadbalancer_update.rb +98 -0
  122. data/lib/chef/knife/ionoscloud_nic_create.rb +17 -22
  123. data/lib/chef/knife/ionoscloud_nic_delete.rb +3 -7
  124. data/lib/chef/knife/ionoscloud_nic_get.rb +49 -0
  125. data/lib/chef/knife/ionoscloud_nic_list.rb +9 -5
  126. data/lib/chef/knife/ionoscloud_nic_update.rb +96 -0
  127. data/lib/chef/knife/ionoscloud_node_get.rb +49 -0
  128. data/lib/chef/knife/ionoscloud_node_list.rb +0 -1
  129. data/lib/chef/knife/ionoscloud_nodepool_create.rb +35 -48
  130. data/lib/chef/knife/ionoscloud_nodepool_delete.rb +1 -7
  131. data/lib/chef/knife/ionoscloud_nodepool_get.rb +43 -0
  132. data/lib/chef/knife/ionoscloud_nodepool_lan_add.rb +104 -0
  133. data/lib/chef/knife/ionoscloud_nodepool_lan_remove.rb +72 -0
  134. data/lib/chef/knife/ionoscloud_nodepool_list.rb +3 -1
  135. data/lib/chef/knife/ionoscloud_nodepool_update.rb +124 -0
  136. data/lib/chef/knife/ionoscloud_pcc_create.rb +12 -18
  137. data/lib/chef/knife/ionoscloud_pcc_delete.rb +2 -10
  138. data/lib/chef/knife/ionoscloud_pcc_get.rb +33 -0
  139. data/lib/chef/knife/ionoscloud_pcc_list.rb +1 -1
  140. data/lib/chef/knife/ionoscloud_pcc_update.rb +63 -0
  141. data/lib/chef/knife/ionoscloud_request_get.rb +40 -0
  142. data/lib/chef/knife/ionoscloud_request_list.rb +1 -1
  143. data/lib/chef/knife/ionoscloud_request_status.rb +1 -1
  144. data/lib/chef/knife/ionoscloud_s3key_create.rb +3 -7
  145. data/lib/chef/knife/ionoscloud_s3key_delete.rb +4 -7
  146. data/lib/chef/knife/ionoscloud_s3key_get.rb +38 -0
  147. data/lib/chef/knife/ionoscloud_s3key_list.rb +2 -2
  148. data/lib/chef/knife/ionoscloud_server_console.rb +43 -0
  149. data/lib/chef/knife/ionoscloud_server_create.rb +14 -26
  150. data/lib/chef/knife/ionoscloud_server_delete.rb +3 -9
  151. data/lib/chef/knife/ionoscloud_server_get.rb +43 -0
  152. data/lib/chef/knife/ionoscloud_server_list.rb +16 -5
  153. data/lib/chef/knife/ionoscloud_server_reboot.rb +1 -1
  154. data/lib/chef/knife/ionoscloud_server_resume.rb +44 -0
  155. data/lib/chef/knife/ionoscloud_server_start.rb +1 -1
  156. data/lib/chef/knife/ionoscloud_server_stop.rb +1 -1
  157. data/lib/chef/knife/ionoscloud_server_suspend.rb +45 -0
  158. data/lib/chef/knife/ionoscloud_server_token.rb +43 -0
  159. data/lib/chef/knife/ionoscloud_server_update.rb +97 -0
  160. data/lib/chef/knife/ionoscloud_server_upgrade.rb +45 -0
  161. data/lib/chef/knife/ionoscloud_share_create.rb +7 -11
  162. data/lib/chef/knife/ionoscloud_share_delete.rb +2 -3
  163. data/lib/chef/knife/ionoscloud_share_get.rb +38 -0
  164. data/lib/chef/knife/ionoscloud_share_update.rb +70 -0
  165. data/lib/chef/knife/ionoscloud_snapshot_create.rb +2 -10
  166. data/lib/chef/knife/ionoscloud_snapshot_delete.rb +2 -7
  167. data/lib/chef/knife/ionoscloud_snapshot_get.rb +32 -0
  168. data/lib/chef/knife/ionoscloud_snapshot_list.rb +1 -1
  169. data/lib/chef/knife/ionoscloud_snapshot_restore.rb +3 -14
  170. data/lib/chef/knife/ionoscloud_snapshot_update.rb +126 -0
  171. data/lib/chef/knife/ionoscloud_template_list.rb +47 -0
  172. data/lib/chef/knife/ionoscloud_user_create.rb +1 -8
  173. data/lib/chef/knife/ionoscloud_user_delete.rb +1 -6
  174. data/lib/chef/knife/ionoscloud_user_get.rb +32 -0
  175. data/lib/chef/knife/ionoscloud_user_ssourl.rb +1 -1
  176. data/lib/chef/knife/ionoscloud_user_update.rb +92 -0
  177. data/lib/chef/knife/ionoscloud_volume_attach.rb +1 -1
  178. data/lib/chef/knife/ionoscloud_volume_create.rb +18 -34
  179. data/lib/chef/knife/ionoscloud_volume_delete.rb +3 -9
  180. data/lib/chef/knife/ionoscloud_volume_detach.rb +1 -1
  181. data/lib/chef/knife/ionoscloud_volume_get.rb +36 -0
  182. data/lib/chef/knife/ionoscloud_volume_list.rb +2 -2
  183. data/lib/chef/knife/ionoscloud_volume_update.rb +106 -0
  184. data/lib/knife-ionoscloud/version.rb +1 -1
  185. data/spec/chef/knife/ionoscloud_backupunit_create_spec.rb +2 -2
  186. data/spec/chef/knife/ionoscloud_backupunit_delete_spec.rb +5 -5
  187. data/spec/chef/knife/ionoscloud_backupunit_get_spec.rb +65 -0
  188. data/spec/chef/knife/ionoscloud_backupunit_list_spec.rb +1 -1
  189. data/spec/chef/knife/ionoscloud_backupunit_ssourl_spec.rb +3 -3
  190. data/spec/chef/knife/ionoscloud_backupunit_update_spec.rb +78 -0
  191. data/spec/chef/knife/ionoscloud_base_spec.rb +4 -4
  192. data/spec/chef/knife/ionoscloud_composite_server_create_spec.rb +11 -8
  193. data/spec/chef/knife/ionoscloud_contract_list_spec.rb +32 -27
  194. data/spec/chef/knife/ionoscloud_cube_server_create_spec.rb +249 -0
  195. data/spec/chef/knife/ionoscloud_datacenter_create_spec.rb +6 -2
  196. data/spec/chef/knife/ionoscloud_datacenter_delete_spec.rb +8 -5
  197. data/spec/chef/knife/ionoscloud_datacenter_get_spec.rb +69 -0
  198. data/spec/chef/knife/ionoscloud_datacenter_list_spec.rb +5 -3
  199. data/spec/chef/knife/ionoscloud_datacenter_update_spec.rb +82 -0
  200. data/spec/chef/knife/ionoscloud_firewall_create_spec.rb +5 -3
  201. data/spec/chef/knife/ionoscloud_firewall_delete_spec.rb +6 -5
  202. data/spec/chef/knife/ionoscloud_firewall_get_spec.rb +77 -0
  203. data/spec/chef/knife/ionoscloud_firewall_list_spec.rb +5 -3
  204. data/spec/chef/knife/ionoscloud_firewall_update_spec.rb +117 -0
  205. data/spec/chef/knife/ionoscloud_flowlog_create_spec.rb +254 -0
  206. data/spec/chef/knife/ionoscloud_flowlog_delete_spec.rb +360 -0
  207. data/spec/chef/knife/ionoscloud_flowlog_get_spec.rb +171 -0
  208. data/spec/chef/knife/ionoscloud_flowlog_list_spec.rb +264 -0
  209. data/spec/chef/knife/ionoscloud_flowlog_update_spec.rb +244 -0
  210. data/spec/chef/knife/ionoscloud_group_create_spec.rb +9 -0
  211. data/spec/chef/knife/ionoscloud_group_delete_spec.rb +6 -0
  212. data/spec/chef/knife/ionoscloud_group_get_spec.rb +6 -0
  213. data/spec/chef/knife/ionoscloud_group_list_spec.rb +26 -8
  214. data/spec/chef/knife/ionoscloud_group_update_spec.rb +121 -0
  215. data/spec/chef/knife/ionoscloud_group_user_add_spec.rb +6 -0
  216. data/spec/chef/knife/ionoscloud_group_user_remove_spec.rb +6 -0
  217. data/spec/chef/knife/ionoscloud_image_list_spec.rb +2 -2
  218. data/spec/chef/knife/ionoscloud_ipblock_get_spec.rb +66 -0
  219. data/spec/chef/knife/ionoscloud_ipblock_update_spec.rb +79 -0
  220. data/spec/chef/knife/ionoscloud_ipfailover_add_spec.rb +4 -4
  221. data/spec/chef/knife/ionoscloud_ipfailover_remove_spec.rb +7 -7
  222. data/spec/chef/knife/ionoscloud_k8s_create_spec.rb +7 -0
  223. data/spec/chef/knife/ionoscloud_k8s_delete_spec.rb +16 -11
  224. data/spec/chef/knife/ionoscloud_k8s_get_spec.rb +72 -0
  225. data/spec/chef/knife/ionoscloud_k8s_update_spec.rb +114 -0
  226. data/spec/chef/knife/ionoscloud_kubeconfig_get_spec.rb +2 -2
  227. data/spec/chef/knife/ionoscloud_label_add_spec.rb +10 -10
  228. data/spec/chef/knife/ionoscloud_label_list_spec.rb +14 -14
  229. data/spec/chef/knife/ionoscloud_label_remove_spec.rb +20 -20
  230. data/spec/chef/knife/ionoscloud_lan_create_spec.rb +4 -3
  231. data/spec/chef/knife/ionoscloud_lan_delete_spec.rb +7 -5
  232. data/spec/chef/knife/ionoscloud_lan_get_spec.rb +68 -0
  233. data/spec/chef/knife/ionoscloud_lan_list_spec.rb +2 -2
  234. data/spec/chef/knife/ionoscloud_lan_update_spec.rb +87 -0
  235. data/spec/chef/knife/ionoscloud_loadbalancer_create_spec.rb +3 -3
  236. data/spec/chef/knife/ionoscloud_loadbalancer_delete_spec.rb +5 -5
  237. data/spec/chef/knife/ionoscloud_loadbalancer_get_spec.rb +2 -2
  238. data/spec/chef/knife/ionoscloud_loadbalancer_list_spec.rb +2 -2
  239. data/spec/chef/knife/ionoscloud_loadbalancer_nic_add_spec.rb +6 -6
  240. data/spec/chef/knife/ionoscloud_loadbalancer_nic_remove_spec.rb +6 -6
  241. data/spec/chef/knife/ionoscloud_loadbalancer_update_spec.rb +89 -0
  242. data/spec/chef/knife/ionoscloud_location_list_spec.rb +5 -3
  243. data/spec/chef/knife/ionoscloud_natgateway_create_spec.rb +92 -0
  244. data/spec/chef/knife/ionoscloud_natgateway_delete_spec.rb +118 -0
  245. data/spec/chef/knife/ionoscloud_natgateway_get_spec.rb +81 -0
  246. data/spec/chef/knife/ionoscloud_natgateway_lan_add_spec.rb +158 -0
  247. data/spec/chef/knife/ionoscloud_natgateway_lan_remove_spec.rb +209 -0
  248. data/spec/chef/knife/ionoscloud_natgateway_list_spec.rb +79 -0
  249. data/spec/chef/knife/ionoscloud_natgateway_rule_add_spec.rb +99 -0
  250. data/spec/chef/knife/ionoscloud_natgateway_rule_list_spec.rb +92 -0
  251. data/spec/chef/knife/ionoscloud_natgateway_rule_remove_spec.rb +78 -0
  252. data/spec/chef/knife/ionoscloud_natgateway_rule_update_spec.rb +121 -0
  253. data/spec/chef/knife/ionoscloud_natgateway_update_spec.rb +121 -0
  254. data/spec/chef/knife/ionoscloud_networkloadbalancer_create_spec.rb +93 -0
  255. data/spec/chef/knife/ionoscloud_networkloadbalancer_delete_spec.rb +120 -0
  256. data/spec/chef/knife/ionoscloud_networkloadbalancer_get_spec.rb +82 -0
  257. data/spec/chef/knife/ionoscloud_networkloadbalancer_list_spec.rb +88 -0
  258. data/spec/chef/knife/ionoscloud_networkloadbalancer_rule_add_spec.rb +105 -0
  259. data/spec/chef/knife/ionoscloud_networkloadbalancer_rule_list_spec.rb +89 -0
  260. data/spec/chef/knife/ionoscloud_networkloadbalancer_rule_remove_spec.rb +150 -0
  261. data/spec/chef/knife/ionoscloud_networkloadbalancer_rule_target_add_spec.rb +113 -0
  262. data/spec/chef/knife/ionoscloud_networkloadbalancer_rule_target_list_spec.rb +85 -0
  263. data/spec/chef/knife/ionoscloud_networkloadbalancer_rule_target_remove_spec.rb +281 -0
  264. data/spec/chef/knife/ionoscloud_networkloadbalancer_rule_update_spec.rb +163 -0
  265. data/spec/chef/knife/ionoscloud_networkloadbalancer_update_spec.rb +107 -0
  266. data/spec/chef/knife/ionoscloud_nic_create_spec.rb +9 -5
  267. data/spec/chef/knife/ionoscloud_nic_delete_spec.rb +8 -6
  268. data/spec/chef/knife/ionoscloud_nic_get_spec.rb +72 -0
  269. data/spec/chef/knife/ionoscloud_nic_list_spec.rb +12 -6
  270. data/spec/chef/knife/ionoscloud_nic_update_spec.rb +97 -0
  271. data/spec/chef/knife/ionoscloud_node_get_spec.rb +70 -0
  272. data/spec/chef/knife/ionoscloud_nodepool_create_spec.rb +10 -5
  273. data/spec/chef/knife/ionoscloud_nodepool_delete_spec.rb +14 -0
  274. data/spec/chef/knife/ionoscloud_nodepool_get_spec.rb +83 -0
  275. data/spec/chef/knife/ionoscloud_nodepool_lan_add_spec.rb +222 -0
  276. data/spec/chef/knife/ionoscloud_nodepool_lan_remove.rb +196 -0
  277. data/spec/chef/knife/ionoscloud_nodepool_list_spec.rb +3 -1
  278. data/spec/chef/knife/ionoscloud_nodepool_update_spec.rb +134 -0
  279. data/spec/chef/knife/ionoscloud_pcc_create_spec.rb +11 -8
  280. data/spec/chef/knife/ionoscloud_pcc_delete_spec.rb +7 -7
  281. data/spec/chef/knife/ionoscloud_pcc_get_spec.rb +71 -0
  282. data/spec/chef/knife/ionoscloud_pcc_list_spec.rb +2 -2
  283. data/spec/chef/knife/ionoscloud_pcc_update_spec.rb +83 -0
  284. data/spec/chef/knife/ionoscloud_request_get_spec.rb +69 -0
  285. data/spec/chef/knife/ionoscloud_request_list_spec.rb +16 -16
  286. data/spec/chef/knife/ionoscloud_request_status_spec.rb +3 -3
  287. data/spec/chef/knife/ionoscloud_s3key_create_spec.rb +2 -2
  288. data/spec/chef/knife/ionoscloud_s3key_delete_spec.rb +5 -5
  289. data/spec/chef/knife/ionoscloud_s3key_get_spec.rb +66 -0
  290. data/spec/chef/knife/ionoscloud_s3key_list_spec.rb +2 -2
  291. data/spec/chef/knife/ionoscloud_server_console_spec.rb +97 -0
  292. data/spec/chef/knife/ionoscloud_server_create_spec.rb +6 -3
  293. data/spec/chef/knife/ionoscloud_server_delete_spec.rb +8 -5
  294. data/spec/chef/knife/ionoscloud_server_get_spec.rb +74 -0
  295. data/spec/chef/knife/ionoscloud_server_list_spec.rb +63 -5
  296. data/spec/chef/knife/ionoscloud_server_reboot_spec.rb +3 -5
  297. data/spec/chef/knife/ionoscloud_server_resume_spec.rb +93 -0
  298. data/spec/chef/knife/ionoscloud_server_start_spec.rb +3 -5
  299. data/spec/chef/knife/ionoscloud_server_stop_spec.rb +3 -5
  300. data/spec/chef/knife/ionoscloud_server_suspend_spec.rb +93 -0
  301. data/spec/chef/knife/ionoscloud_server_token_spec.rb +97 -0
  302. data/spec/chef/knife/ionoscloud_server_update_spec.rb +105 -0
  303. data/spec/chef/knife/ionoscloud_server_upgrade_spec.rb +96 -0
  304. data/spec/chef/knife/ionoscloud_share_get_spec.rb +66 -0
  305. data/spec/chef/knife/ionoscloud_share_update_spec.rb +91 -0
  306. data/spec/chef/knife/ionoscloud_snapshot_create_spec.rb +15 -3
  307. data/spec/chef/knife/ionoscloud_snapshot_delete_spec.rb +17 -5
  308. data/spec/chef/knife/ionoscloud_snapshot_get_spec.rb +79 -0
  309. data/spec/chef/knife/ionoscloud_snapshot_list_spec.rb +2 -2
  310. data/spec/chef/knife/ionoscloud_snapshot_restore_spec.rb +12 -3
  311. data/spec/chef/knife/ionoscloud_snapshot_update_spec.rb +113 -0
  312. data/spec/chef/knife/ionoscloud_template_list_spec.rb +78 -0
  313. data/spec/chef/knife/ionoscloud_user_create_spec.rb +3 -1
  314. data/spec/chef/knife/ionoscloud_user_delete_spec.rb +4 -2
  315. data/spec/chef/knife/ionoscloud_user_get_spec.rb +70 -0
  316. data/spec/chef/knife/ionoscloud_user_ssourl_spec.rb +3 -3
  317. data/spec/chef/knife/ionoscloud_user_update_spec.rb +110 -0
  318. data/spec/chef/knife/ionoscloud_volume_attach_spec.rb +4 -4
  319. data/spec/chef/knife/ionoscloud_volume_create_spec.rb +21 -11
  320. data/spec/chef/knife/ionoscloud_volume_delete_spec.rb +15 -5
  321. data/spec/chef/knife/ionoscloud_volume_detach_spec.rb +5 -5
  322. data/spec/chef/knife/ionoscloud_volume_get_spec.rb +81 -0
  323. data/spec/chef/knife/ionoscloud_volume_list_spec.rb +4 -4
  324. data/spec/chef/knife/ionoscloud_volume_update_spec.rb +116 -0
  325. data/spec/spec_helper.rb +251 -39
  326. metadata +245 -6
@@ -0,0 +1,72 @@
1
+ require 'spec_helper'
2
+ require 'ionoscloud_k8s_get'
3
+
4
+ Chef::Knife::IonoscloudK8sGet.load_deps
5
+
6
+ describe Chef::Knife::IonoscloudK8sGet do
7
+ before :each do
8
+ subject { Chef::Knife::IonoscloudK8sGet.new }
9
+
10
+ allow(subject).to receive(:puts)
11
+ allow(subject).to receive(:print)
12
+ end
13
+
14
+ describe '#run' do
15
+ it 'should call KubernetesApi.k8s_find_by_cluster_id' do
16
+ cluster = k8s_cluster_mock
17
+ subject_config = {
18
+ ionoscloud_username: 'email',
19
+ ionoscloud_password: 'password',
20
+ cluster_id: cluster.id,
21
+ }
22
+
23
+ subject_config.each { |key, value| subject.config[key] = value }
24
+
25
+ maintenance_window = "#{cluster.properties.maintenance_window.day_of_the_week}, #{cluster.properties.maintenance_window.time}"
26
+ s3_buckets = (cluster.properties.s3_buckets.nil? ? [] : cluster.properties.s3_buckets.map { |el| el.name })
27
+
28
+ expect(subject).to receive(:puts).with("ID: #{cluster.id}")
29
+ expect(subject).to receive(:puts).with("Name: #{cluster.properties.name}")
30
+ expect(subject).to receive(:puts).with("k8s Version: #{cluster.properties.k8s_version}")
31
+ expect(subject).to receive(:puts).with("Maintenance Window: #{maintenance_window}")
32
+ expect(subject).to receive(:puts).with("State: #{cluster.metadata.state}")
33
+ expect(subject).to receive(:puts).with("Api Subnet Allow List: #{cluster.properties.api_subnet_allow_list}")
34
+ expect(subject).to receive(:puts).with("S3 Buckets: #{s3_buckets}")
35
+ expect(subject).to receive(:puts).with("Available Upgrade Versions: #{cluster.properties.available_upgrade_versions}")
36
+ expect(subject).to receive(:puts).with("Viable NodePool Versions: #{cluster.properties.viable_node_pool_versions}")
37
+
38
+ mock_call_api(
39
+ subject,
40
+ [
41
+ {
42
+ method: 'GET',
43
+ path: "/k8s/#{cluster.id}",
44
+ operation: :'KubernetesApi.k8s_find_by_cluster_id',
45
+ return_type: 'KubernetesCluster',
46
+ result: cluster,
47
+ },
48
+ ],
49
+ )
50
+
51
+ expect { subject.run }.not_to raise_error(Exception)
52
+ end
53
+
54
+ it 'should not make any call if any required option is missing' do
55
+ required_options = subject.instance_variable_get(:@required_options)
56
+
57
+ arrays_without_one_element(required_options).each do |test_case|
58
+
59
+ test_case[:array].each { |value| subject.config[value] = 'test' }
60
+
61
+ expect(subject).to receive(:puts).with("Missing required parameters #{test_case[:removed]}")
62
+ expect(subject.api_client).not_to receive(:call_api)
63
+
64
+ expect { subject.run }.to raise_error(SystemExit) do |error|
65
+ expect(error.status).to eq(1)
66
+ end
67
+
68
+ required_options.each { |value| subject.config[value] = nil }
69
+ end
70
+ end
71
+ end
72
+ end
@@ -0,0 +1,114 @@
1
+ require 'spec_helper'
2
+ require 'ionoscloud_k8s_update'
3
+
4
+ Chef::Knife::IonoscloudK8sUpdate.load_deps
5
+
6
+ describe Chef::Knife::IonoscloudK8sUpdate do
7
+ before :each do
8
+ subject { Chef::Knife::IonoscloudK8sUpdate.new }
9
+
10
+ allow(subject).to receive(:puts)
11
+ allow(subject).to receive(:print)
12
+ end
13
+
14
+ describe '#run' do
15
+ it 'should call NicApi.datacenters_servers_nics_clusterrules_patch' do
16
+ cluster = k8s_cluster_mock
17
+
18
+ subject_config = {
19
+ ionoscloud_username: 'email',
20
+ ionoscloud_password: 'password',
21
+ cluster_id: cluster.id,
22
+ name: cluster.properties.name + '_edited',
23
+ version: '19.9.9',
24
+ maintenance_day: 'Monday',
25
+ maintenance_time: '13:03:19Z',
26
+ api_subnet_allow_list: (cluster.properties.api_subnet_allow_list + ['1.1.1.1']).join(','),
27
+ s3_buckets: (cluster.properties.s3_buckets.map { |el| el.name } + ['new_bucket']).join(','),
28
+ yes: true,
29
+ }
30
+
31
+ subject_config.each { |key, value| subject.config[key] = value }
32
+
33
+ maintenance_window = "#{subject_config[:maintenance_day]}, #{subject_config[:maintenance_time]}"
34
+ s3_buckets = (cluster.properties.s3_buckets.map { |el| el.name } + ['new_bucket'])
35
+
36
+ expect(subject).to receive(:puts).with("ID: #{cluster.id}")
37
+ expect(subject).to receive(:puts).with("Name: #{subject_config[:name]}")
38
+ expect(subject).to receive(:puts).with("k8s Version: #{subject_config[:version]}")
39
+ expect(subject).to receive(:puts).with("Maintenance Window: #{maintenance_window}")
40
+ expect(subject).to receive(:puts).with("State: #{cluster.metadata.state}")
41
+ expect(subject).to receive(:puts).with("Api Subnet Allow List: #{cluster.properties.api_subnet_allow_list + ['1.1.1.1']}")
42
+ expect(subject).to receive(:puts).with("S3 Buckets: #{s3_buckets}")
43
+ expect(subject).to receive(:puts).with("Available Upgrade Versions: #{cluster.properties.available_upgrade_versions}")
44
+ expect(subject).to receive(:puts).with("Viable NodePool Versions: #{cluster.properties.viable_node_pool_versions}")
45
+
46
+ cluster.properties.name = subject_config[:name]
47
+ cluster.properties.k8s_version = subject_config[:version]
48
+ cluster.properties.maintenance_window.day_of_the_week = subject_config[:maintenance_day]
49
+ cluster.properties.maintenance_window.time = subject_config[:maintenance_time]
50
+ cluster.properties.api_subnet_allow_list = subject_config[:api_subnet_allow_list].split(',')
51
+ cluster.properties.s3_buckets = subject_config[:s3_buckets].split(',').map { |el| Ionoscloud::S3Bucket.new(name: el) }
52
+
53
+ expected_body = {
54
+ name: subject_config[:name],
55
+ k8sVersion: subject_config[:version],
56
+ maintenanceWindow: {
57
+ dayOfTheWeek: subject_config[:maintenance_day],
58
+ time: subject_config[:maintenance_time],
59
+ },
60
+ apiSubnetAllowList: subject_config[:api_subnet_allow_list].split(','),
61
+ s3Buckets: subject_config[:s3_buckets].split(',').map { |el| { name: el } },
62
+ }
63
+
64
+ expect(subject.api_client).not_to receive(:wait_for)
65
+ mock_call_api(
66
+ subject,
67
+ [
68
+ {
69
+ method: 'GET',
70
+ path: "/k8s/#{cluster.id}",
71
+ operation: :'KubernetesApi.k8s_find_by_cluster_id',
72
+ return_type: 'KubernetesCluster',
73
+ result: cluster,
74
+ },
75
+ {
76
+ method: 'PUT',
77
+ path: "/k8s/#{cluster.id}",
78
+ operation: :'KubernetesApi.k8s_put',
79
+ return_type: 'KubernetesCluster',
80
+ body: { properties: expected_body },
81
+ result: cluster,
82
+ },
83
+ {
84
+ method: 'GET',
85
+ path: "/k8s/#{cluster.id}",
86
+ operation: :'KubernetesApi.k8s_find_by_cluster_id',
87
+ return_type: 'KubernetesCluster',
88
+ result: cluster,
89
+ },
90
+ ],
91
+ )
92
+
93
+ expect { subject.run }.not_to raise_error(Exception)
94
+ end
95
+
96
+ it 'should not make any call if any required option is missing' do
97
+ required_options = subject.instance_variable_get(:@required_options)
98
+
99
+ arrays_without_one_element(required_options).each do |test_case|
100
+
101
+ test_case[:array].each { |value| subject.config[value] = 'test' }
102
+
103
+ expect(subject).to receive(:puts).with("Missing required parameters #{test_case[:removed]}")
104
+ expect(subject.api_client).not_to receive(:call_api)
105
+
106
+ expect { subject.run }.to raise_error(SystemExit) do |error|
107
+ expect(error.status).to eq(1)
108
+ end
109
+
110
+ required_options.each { |value| subject.config[value] = nil }
111
+ end
112
+ end
113
+ end
114
+ end
@@ -27,7 +27,7 @@ describe Chef::Knife::IonoscloudKubeconfigGet do
27
27
  method: 'GET',
28
28
  path: "/k8s/#{subject_config[:cluster_id]}/kubeconfig",
29
29
  operation: :'KubernetesApi.k8s_kubeconfig_get',
30
- return_type: 'KubernetesConfig',
30
+ return_type: 'String',
31
31
  result: kubeconfig,
32
32
  },
33
33
  ],
@@ -58,7 +58,7 @@ describe Chef::Knife::IonoscloudKubeconfigGet do
58
58
  method: 'GET',
59
59
  path: "/k8s/#{subject_config[:cluster_id]}/kubeconfig",
60
60
  operation: :'KubernetesApi.k8s_kubeconfig_get',
61
- return_type: 'KubernetesConfig',
61
+ return_type: 'String',
62
62
  exception: Ionoscloud::ApiError.new(code: 404),
63
63
  },
64
64
  ],
@@ -12,7 +12,7 @@ describe Chef::Knife::IonoscloudLabelAdd do
12
12
  end
13
13
 
14
14
  describe '#run' do
15
- it 'should call LabelApi.datacenters_labels_post when the type is datacenter and output based on what it receives' do
15
+ it 'should call LabelsApi.datacenters_labels_post when the type is datacenter and output based on what it receives' do
16
16
  label = label_resource_mock
17
17
  subject_config = {
18
18
  ionoscloud_username: 'email',
@@ -42,7 +42,7 @@ describe Chef::Knife::IonoscloudLabelAdd do
42
42
  {
43
43
  method: 'POST',
44
44
  path: "/datacenters/#{subject_config[:resource_id]}/labels",
45
- operation: :'LabelApi.datacenters_labels_post',
45
+ operation: :'LabelsApi.datacenters_labels_post',
46
46
  return_type: 'LabelResource',
47
47
  body: { properties: expected_body },
48
48
  result: label,
@@ -53,7 +53,7 @@ describe Chef::Knife::IonoscloudLabelAdd do
53
53
  expect { subject.run }.not_to raise_error(Exception)
54
54
  end
55
55
 
56
- it 'should call LabelApi.datacenters_servers_labels_post when the type is server and output based on what it receives' do
56
+ it 'should call LabelsApi.datacenters_servers_labels_post when the type is server and output based on what it receives' do
57
57
  label = label_resource_mock
58
58
  subject_config = {
59
59
  ionoscloud_username: 'email',
@@ -84,7 +84,7 @@ describe Chef::Knife::IonoscloudLabelAdd do
84
84
  {
85
85
  method: 'POST',
86
86
  path: "/datacenters/#{subject_config[:datacenter_id]}/servers/#{subject_config[:resource_id]}/labels",
87
- operation: :'LabelApi.datacenters_servers_labels_post',
87
+ operation: :'LabelsApi.datacenters_servers_labels_post',
88
88
  return_type: 'LabelResource',
89
89
  body: { properties: expected_body },
90
90
  result: label,
@@ -95,7 +95,7 @@ describe Chef::Knife::IonoscloudLabelAdd do
95
95
  expect { subject.run }.not_to raise_error(Exception)
96
96
  end
97
97
 
98
- it 'should call LabelApi.datacenters_volumes_labels_post when the type is volume and output based on what it receives' do
98
+ it 'should call LabelsApi.datacenters_volumes_labels_post when the type is volume and output based on what it receives' do
99
99
  label = label_resource_mock
100
100
  subject_config = {
101
101
  ionoscloud_username: 'email',
@@ -126,7 +126,7 @@ describe Chef::Knife::IonoscloudLabelAdd do
126
126
  {
127
127
  method: 'POST',
128
128
  path: "/datacenters/#{subject_config[:datacenter_id]}/volumes/#{subject_config[:resource_id]}/labels",
129
- operation: :'LabelApi.datacenters_volumes_labels_post',
129
+ operation: :'LabelsApi.datacenters_volumes_labels_post',
130
130
  return_type: 'LabelResource',
131
131
  body: { properties: expected_body },
132
132
  result: label,
@@ -137,7 +137,7 @@ describe Chef::Knife::IonoscloudLabelAdd do
137
137
  expect { subject.run }.not_to raise_error(Exception)
138
138
  end
139
139
 
140
- it 'should call LabelApi.ipblocks_labels_post when the type is ipblock and output based on what it receives' do
140
+ it 'should call LabelsApi.ipblocks_labels_post when the type is ipblock and output based on what it receives' do
141
141
  label = label_resource_mock
142
142
  subject_config = {
143
143
  ionoscloud_username: 'email',
@@ -167,7 +167,7 @@ describe Chef::Knife::IonoscloudLabelAdd do
167
167
  {
168
168
  method: 'POST',
169
169
  path: "/ipblocks/#{subject_config[:resource_id]}/labels",
170
- operation: :'LabelApi.ipblocks_labels_post',
170
+ operation: :'LabelsApi.ipblocks_labels_post',
171
171
  return_type: 'LabelResource',
172
172
  body: { properties: expected_body },
173
173
  result: label,
@@ -178,7 +178,7 @@ describe Chef::Knife::IonoscloudLabelAdd do
178
178
  expect { subject.run }.not_to raise_error(Exception)
179
179
  end
180
180
 
181
- it 'should call LabelApi.snapshots_labels_post when the type is snapshot and output based on what it receives' do
181
+ it 'should call LabelsApi.snapshots_labels_post when the type is snapshot and output based on what it receives' do
182
182
  label = label_resource_mock
183
183
  subject_config = {
184
184
  ionoscloud_username: 'email',
@@ -208,7 +208,7 @@ describe Chef::Knife::IonoscloudLabelAdd do
208
208
  {
209
209
  method: 'POST',
210
210
  path: "/snapshots/#{subject_config[:resource_id]}/labels",
211
- operation: :'LabelApi.snapshots_labels_post',
211
+ operation: :'LabelsApi.snapshots_labels_post',
212
212
  return_type: 'LabelResource',
213
213
  body: { properties: expected_body },
214
214
  result: label,
@@ -44,7 +44,7 @@ describe Chef::Knife::IonoscloudLabelList do
44
44
  end
45
45
 
46
46
  describe '#run' do
47
- it 'should call LabelApi.datacenters_labels_get when the type is datacenter and output based on what it receives' do
47
+ it 'should call LabelsApi.datacenters_labels_get when the type is datacenter and output based on what it receives' do
48
48
  subject_config = {
49
49
  ionoscloud_username: 'email',
50
50
  ionoscloud_password: 'password',
@@ -65,7 +65,7 @@ describe Chef::Knife::IonoscloudLabelList do
65
65
  {
66
66
  method: 'GET',
67
67
  path: "/datacenters/#{subject_config[:resource_id]}/labels",
68
- operation: :'LabelApi.datacenters_labels_get',
68
+ operation: :'LabelsApi.datacenters_labels_get',
69
69
  return_type: 'LabelResources',
70
70
  result: @label_resources,
71
71
  },
@@ -75,7 +75,7 @@ describe Chef::Knife::IonoscloudLabelList do
75
75
  expect { subject.run }.not_to raise_error(Exception)
76
76
  end
77
77
 
78
- it 'should call LabelApi.datacenters_servers_labels_get when the type is server and output based on what it receives' do
78
+ it 'should call LabelsApi.datacenters_servers_labels_get when the type is server and output based on what it receives' do
79
79
  subject_config = {
80
80
  ionoscloud_username: 'email',
81
81
  ionoscloud_password: 'password',
@@ -97,7 +97,7 @@ describe Chef::Knife::IonoscloudLabelList do
97
97
  {
98
98
  method: 'GET',
99
99
  path: "/datacenters/#{subject_config[:datacenter_id]}/servers/#{subject_config[:resource_id]}/labels",
100
- operation: :'LabelApi.datacenters_servers_labels_get',
100
+ operation: :'LabelsApi.datacenters_servers_labels_get',
101
101
  return_type: 'LabelResources',
102
102
  result: @label_resources,
103
103
  },
@@ -107,7 +107,7 @@ describe Chef::Knife::IonoscloudLabelList do
107
107
  expect { subject.run }.not_to raise_error(Exception)
108
108
  end
109
109
 
110
- it 'should call LabelApi.datacenters_volumes_labels_get when the type is volume and output based on what it receives' do
110
+ it 'should call LabelsApi.datacenters_volumes_labels_get when the type is volume and output based on what it receives' do
111
111
  subject_config = {
112
112
  ionoscloud_username: 'email',
113
113
  ionoscloud_password: 'password',
@@ -129,7 +129,7 @@ describe Chef::Knife::IonoscloudLabelList do
129
129
  {
130
130
  method: 'GET',
131
131
  path: "/datacenters/#{subject_config[:datacenter_id]}/volumes/#{subject_config[:resource_id]}/labels",
132
- operation: :'LabelApi.datacenters_volumes_labels_get',
132
+ operation: :'LabelsApi.datacenters_volumes_labels_get',
133
133
  return_type: 'LabelResources',
134
134
  result: @label_resources,
135
135
  },
@@ -139,7 +139,7 @@ describe Chef::Knife::IonoscloudLabelList do
139
139
  expect { subject.run }.not_to raise_error(Exception)
140
140
  end
141
141
 
142
- it 'should call LabelApi.ipblocks_labels_get when the type is ipblock and output based on what it receives' do
142
+ it 'should call LabelsApi.ipblocks_labels_get when the type is ipblock and output based on what it receives' do
143
143
  subject_config = {
144
144
  ionoscloud_username: 'email',
145
145
  ionoscloud_password: 'password',
@@ -160,7 +160,7 @@ describe Chef::Knife::IonoscloudLabelList do
160
160
  {
161
161
  method: 'GET',
162
162
  path: "/ipblocks/#{subject_config[:resource_id]}/labels",
163
- operation: :'LabelApi.ipblocks_labels_get',
163
+ operation: :'LabelsApi.ipblocks_labels_get',
164
164
  return_type: 'LabelResources',
165
165
  result: @label_resources,
166
166
  },
@@ -170,7 +170,7 @@ describe Chef::Knife::IonoscloudLabelList do
170
170
  expect { subject.run }.not_to raise_error(Exception)
171
171
  end
172
172
 
173
- it 'should call LabelApi.snapshots_labels_get when the type is snapshot and output based on what it receives' do
173
+ it 'should call LabelsApi.snapshots_labels_get when the type is snapshot and output based on what it receives' do
174
174
  subject_config = {
175
175
  ionoscloud_username: 'email',
176
176
  ionoscloud_password: 'password',
@@ -191,7 +191,7 @@ describe Chef::Knife::IonoscloudLabelList do
191
191
  {
192
192
  method: 'GET',
193
193
  path: "/snapshots/#{subject_config[:resource_id]}/labels",
194
- operation: :'LabelApi.snapshots_labels_get',
194
+ operation: :'LabelsApi.snapshots_labels_get',
195
195
  return_type: 'LabelResources',
196
196
  result: @label_resources,
197
197
  },
@@ -201,7 +201,7 @@ describe Chef::Knife::IonoscloudLabelList do
201
201
  expect { subject.run }.not_to raise_error(Exception)
202
202
  end
203
203
 
204
- it 'should call LabelApi.labels_get when the type is not one of [datacenter, server, volume, ipblock, snapshot]' do
204
+ it 'should call LabelsApi.labels_get when the type is not one of [datacenter, server, volume, ipblock, snapshot]' do
205
205
  subject_config = {
206
206
  ionoscloud_username: 'email',
207
207
  ionoscloud_password: 'password',
@@ -221,7 +221,7 @@ describe Chef::Knife::IonoscloudLabelList do
221
221
  {
222
222
  method: 'GET',
223
223
  path: '/labels',
224
- operation: :'LabelApi.labels_get',
224
+ operation: :'LabelsApi.labels_get',
225
225
  return_type: 'Labels',
226
226
  result: @labels,
227
227
  },
@@ -231,7 +231,7 @@ describe Chef::Knife::IonoscloudLabelList do
231
231
  expect { subject.run }.not_to raise_error(Exception)
232
232
  end
233
233
 
234
- it 'should call LabelApi.labels_get when the type is missing' do
234
+ it 'should call LabelsApi.labels_get when the type is missing' do
235
235
  subject_config = {
236
236
  ionoscloud_username: 'email',
237
237
  ionoscloud_password: 'password',
@@ -249,7 +249,7 @@ describe Chef::Knife::IonoscloudLabelList do
249
249
  {
250
250
  method: 'GET',
251
251
  path: '/labels',
252
- operation: :'LabelApi.labels_get',
252
+ operation: :'LabelsApi.labels_get',
253
253
  return_type: 'Labels',
254
254
  result: @labels,
255
255
  },
@@ -12,7 +12,7 @@ describe Chef::Knife::IonoscloudLabelRemove do
12
12
  end
13
13
 
14
14
  describe '#run' do
15
- it 'should call LabelApi.datacenters_labels_delete when the type is datacenter and output based on what it receives' do
15
+ it 'should call LabelsApi.datacenters_labels_delete when the type is datacenter and output based on what it receives' do
16
16
  label = label_mock
17
17
  subject_config = {
18
18
  ionoscloud_username: 'email',
@@ -34,7 +34,7 @@ describe Chef::Knife::IonoscloudLabelRemove do
34
34
  {
35
35
  method: 'DELETE',
36
36
  path: "/datacenters/#{subject_config[:resource_id]}/labels/#{label.id}",
37
- operation: :'LabelApi.datacenters_labels_delete',
37
+ operation: :'LabelsApi.datacenters_labels_delete',
38
38
  result: label,
39
39
  },
40
40
  ],
@@ -43,7 +43,7 @@ describe Chef::Knife::IonoscloudLabelRemove do
43
43
  expect { subject.run }.not_to raise_error(Exception)
44
44
  end
45
45
 
46
- it 'should print when LabelApi.datacenters_labels_delete returns 404' do
46
+ it 'should print when LabelsApi.datacenters_labels_delete returns 404' do
47
47
  label = label_mock
48
48
  subject_config = {
49
49
  ionoscloud_username: 'email',
@@ -65,7 +65,7 @@ describe Chef::Knife::IonoscloudLabelRemove do
65
65
  {
66
66
  method: 'DELETE',
67
67
  path: "/datacenters/#{subject_config[:resource_id]}/labels/#{label.id}",
68
- operation: :'LabelApi.datacenters_labels_delete',
68
+ operation: :'LabelsApi.datacenters_labels_delete',
69
69
  exception: Ionoscloud::ApiError.new(code: 404),
70
70
  },
71
71
  ],
@@ -74,7 +74,7 @@ describe Chef::Knife::IonoscloudLabelRemove do
74
74
  expect { subject.run }.not_to raise_error(Exception)
75
75
  end
76
76
 
77
- it 'should call LabelApi.datacenters_servers_labels_delete when the type is datacenter and output based on what it receives' do
77
+ it 'should call LabelsApi.datacenters_servers_labels_delete when the type is datacenter and output based on what it receives' do
78
78
  label = label_mock
79
79
  subject_config = {
80
80
  ionoscloud_username: 'email',
@@ -97,7 +97,7 @@ describe Chef::Knife::IonoscloudLabelRemove do
97
97
  {
98
98
  method: 'DELETE',
99
99
  path: "/datacenters/#{subject_config[:datacenter_id]}/servers/#{subject_config[:resource_id]}/labels/#{label.id}",
100
- operation: :'LabelApi.datacenters_servers_labels_delete',
100
+ operation: :'LabelsApi.datacenters_servers_labels_delete',
101
101
  result: label,
102
102
  },
103
103
  ],
@@ -106,7 +106,7 @@ describe Chef::Knife::IonoscloudLabelRemove do
106
106
  expect { subject.run }.not_to raise_error(Exception)
107
107
  end
108
108
 
109
- it 'should print when LabelApi.datacenters_servers_labels_delete returns 404' do
109
+ it 'should print when LabelsApi.datacenters_servers_labels_delete returns 404' do
110
110
  label = label_mock
111
111
  subject_config = {
112
112
  ionoscloud_username: 'email',
@@ -129,7 +129,7 @@ describe Chef::Knife::IonoscloudLabelRemove do
129
129
  {
130
130
  method: 'DELETE',
131
131
  path: "/datacenters/#{subject_config[:datacenter_id]}/servers/#{subject_config[:resource_id]}/labels/#{label.id}",
132
- operation: :'LabelApi.datacenters_servers_labels_delete',
132
+ operation: :'LabelsApi.datacenters_servers_labels_delete',
133
133
  exception: Ionoscloud::ApiError.new(code: 404),
134
134
  },
135
135
  ],
@@ -138,7 +138,7 @@ describe Chef::Knife::IonoscloudLabelRemove do
138
138
  expect { subject.run }.not_to raise_error(Exception)
139
139
  end
140
140
 
141
- it 'should call LabelApi.datacenters_volumes_labels_delete when the type is datacenter and output based on what it receives' do
141
+ it 'should call LabelsApi.datacenters_volumes_labels_delete when the type is datacenter and output based on what it receives' do
142
142
  label = label_mock
143
143
  subject_config = {
144
144
  ionoscloud_username: 'email',
@@ -161,7 +161,7 @@ describe Chef::Knife::IonoscloudLabelRemove do
161
161
  {
162
162
  method: 'DELETE',
163
163
  path: "/datacenters/#{subject_config[:datacenter_id]}/volumes/#{subject_config[:resource_id]}/labels/#{label.id}",
164
- operation: :'LabelApi.datacenters_volumes_labels_delete',
164
+ operation: :'LabelsApi.datacenters_volumes_labels_delete',
165
165
  result: label,
166
166
  },
167
167
  ],
@@ -170,7 +170,7 @@ describe Chef::Knife::IonoscloudLabelRemove do
170
170
  expect { subject.run }.not_to raise_error(Exception)
171
171
  end
172
172
 
173
- it 'should print when LabelApi.datacenters_volumes_labels_delete returns 404' do
173
+ it 'should print when LabelsApi.datacenters_volumes_labels_delete returns 404' do
174
174
  label = label_mock
175
175
  subject_config = {
176
176
  ionoscloud_username: 'email',
@@ -193,7 +193,7 @@ describe Chef::Knife::IonoscloudLabelRemove do
193
193
  {
194
194
  method: 'DELETE',
195
195
  path: "/datacenters/#{subject_config[:datacenter_id]}/volumes/#{subject_config[:resource_id]}/labels/#{label.id}",
196
- operation: :'LabelApi.datacenters_volumes_labels_delete',
196
+ operation: :'LabelsApi.datacenters_volumes_labels_delete',
197
197
  exception: Ionoscloud::ApiError.new(code: 404),
198
198
  },
199
199
  ],
@@ -201,7 +201,7 @@ describe Chef::Knife::IonoscloudLabelRemove do
201
201
 
202
202
  expect { subject.run }.not_to raise_error(Exception)
203
203
  end
204
- it 'should call LabelApi.ipblocks_labels_delete when the type is ipblock and output based on what it receives' do
204
+ it 'should call LabelsApi.ipblocks_labels_delete when the type is ipblock and output based on what it receives' do
205
205
  label = label_mock
206
206
  subject_config = {
207
207
  ionoscloud_username: 'email',
@@ -223,7 +223,7 @@ describe Chef::Knife::IonoscloudLabelRemove do
223
223
  {
224
224
  method: 'DELETE',
225
225
  path: "/ipblocks/#{subject_config[:resource_id]}/labels/#{label.id}",
226
- operation: :'LabelApi.ipblocks_labels_delete',
226
+ operation: :'LabelsApi.ipblocks_labels_delete',
227
227
  result: label,
228
228
  },
229
229
  ],
@@ -232,7 +232,7 @@ describe Chef::Knife::IonoscloudLabelRemove do
232
232
  expect { subject.run }.not_to raise_error(Exception)
233
233
  end
234
234
 
235
- it 'should print when LabelApi.ipblocks_labels_delete returns 404' do
235
+ it 'should print when LabelsApi.ipblocks_labels_delete returns 404' do
236
236
  label = label_mock
237
237
  subject_config = {
238
238
  ionoscloud_username: 'email',
@@ -254,7 +254,7 @@ describe Chef::Knife::IonoscloudLabelRemove do
254
254
  {
255
255
  method: 'DELETE',
256
256
  path: "/ipblocks/#{subject_config[:resource_id]}/labels/#{label.id}",
257
- operation: :'LabelApi.ipblocks_labels_delete',
257
+ operation: :'LabelsApi.ipblocks_labels_delete',
258
258
  exception: Ionoscloud::ApiError.new(code: 404),
259
259
  },
260
260
  ],
@@ -263,7 +263,7 @@ describe Chef::Knife::IonoscloudLabelRemove do
263
263
  expect { subject.run }.not_to raise_error(Exception)
264
264
  end
265
265
 
266
- it 'should call LabelApi.snapshots_labels_delete when the type is snapshot and output based on what it receives' do
266
+ it 'should call LabelsApi.snapshots_labels_delete when the type is snapshot and output based on what it receives' do
267
267
  label = label_mock
268
268
  subject_config = {
269
269
  ionoscloud_username: 'email',
@@ -285,7 +285,7 @@ describe Chef::Knife::IonoscloudLabelRemove do
285
285
  {
286
286
  method: 'DELETE',
287
287
  path: "/snapshots/#{subject_config[:resource_id]}/labels/#{label.id}",
288
- operation: :'LabelApi.snapshots_labels_delete',
288
+ operation: :'LabelsApi.snapshots_labels_delete',
289
289
  result: label,
290
290
  },
291
291
  ],
@@ -294,7 +294,7 @@ describe Chef::Knife::IonoscloudLabelRemove do
294
294
  expect { subject.run }.not_to raise_error(Exception)
295
295
  end
296
296
 
297
- it 'should print when LabelApi.snapshots_labels_delete returns 404' do
297
+ it 'should print when LabelsApi.snapshots_labels_delete returns 404' do
298
298
  label = label_mock
299
299
  subject_config = {
300
300
  ionoscloud_username: 'email',
@@ -316,7 +316,7 @@ describe Chef::Knife::IonoscloudLabelRemove do
316
316
  {
317
317
  method: 'DELETE',
318
318
  path: "/snapshots/#{subject_config[:resource_id]}/labels/#{label.id}",
319
- operation: :'LabelApi.snapshots_labels_delete',
319
+ operation: :'LabelsApi.snapshots_labels_delete',
320
320
  exception: Ionoscloud::ApiError.new(code: 404),
321
321
  },
322
322
  ],
@@ -12,7 +12,7 @@ describe Chef::Knife::IonoscloudLanCreate do
12
12
  end
13
13
 
14
14
  describe '#run' do
15
- it 'should call LanApi.datacenters_lans_post with the expected arguments and output based on what it receives' do
15
+ it 'should call LansApi.datacenters_lans_post with the expected arguments and output based on what it receives' do
16
16
  lan = lan_mock
17
17
  subject_config = {
18
18
  ionoscloud_username: 'email',
@@ -29,6 +29,7 @@ describe Chef::Knife::IonoscloudLanCreate do
29
29
  expect(subject).to receive(:puts).with("Name: #{lan.properties.name}")
30
30
  expect(subject).to receive(:puts).with("Public: #{lan.properties.public.to_s}")
31
31
  expect(subject).to receive(:puts).with("PCC: #{lan.properties.pcc}")
32
+ expect(subject).to receive(:puts).with("IP Failover: #{[]}")
32
33
 
33
34
  expected_body = lan.properties.to_hash
34
35
  expected_body.delete(:ipFailover)
@@ -40,7 +41,7 @@ describe Chef::Knife::IonoscloudLanCreate do
40
41
  {
41
42
  method: 'POST',
42
43
  path: "/datacenters/#{subject_config[:datacenter_id]}/lans",
43
- operation: :'LanApi.datacenters_lans_post',
44
+ operation: :'LansApi.datacenters_lans_post',
44
45
  return_type: 'LanPost',
45
46
  body: { properties: expected_body },
46
47
  result: lan,
@@ -48,7 +49,7 @@ describe Chef::Knife::IonoscloudLanCreate do
48
49
  {
49
50
  method: 'GET',
50
51
  path: "/datacenters/#{subject_config[:datacenter_id]}/lans/#{lan.id}",
51
- operation: :'LanApi.datacenters_lans_find_by_id',
52
+ operation: :'LansApi.datacenters_lans_find_by_id',
52
53
  return_type: 'Lan',
53
54
  result: lan,
54
55
  },