knife-ionoscloud 5.0.0 → 6.0.0.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +4 -4
- data/.github/workflows/publish.yml +4 -1
- data/.rubocop.yml +0 -1
- data/docs/README.md +20 -0
- data/docs/docs_generator.rb +2 -2
- data/docs/subcommands/backupunit_create.md +5 -3
- data/docs/subcommands/backupunit_delete.md +5 -3
- data/docs/subcommands/backupunit_list.md +5 -3
- data/docs/subcommands/backupunit_ssourl.md +5 -3
- data/docs/subcommands/composite_server_create.md +13 -5
- data/docs/subcommands/contract_list.md +5 -3
- data/docs/subcommands/cube_server_create.md +91 -0
- data/docs/subcommands/datacenter_create.md +7 -4
- data/docs/subcommands/datacenter_delete.md +5 -3
- data/docs/subcommands/datacenter_list.md +5 -3
- data/docs/subcommands/firewall_create.md +9 -4
- data/docs/subcommands/firewall_delete.md +4 -2
- data/docs/subcommands/firewall_list.md +5 -3
- data/docs/subcommands/flowlog_create.md +63 -0
- data/docs/subcommands/flowlog_delete.md +51 -0
- data/docs/subcommands/flowlog_list.md +51 -0
- data/docs/subcommands/group_create.md +23 -3
- data/docs/subcommands/group_delete.md +5 -3
- data/docs/subcommands/group_get.md +5 -3
- data/docs/subcommands/group_list.md +5 -3
- data/docs/subcommands/group_user_add.md +4 -2
- data/docs/subcommands/group_user_remove.md +4 -2
- data/docs/subcommands/image_list.md +5 -3
- data/docs/subcommands/ipblock_create.md +5 -3
- data/docs/subcommands/ipblock_delete.md +5 -3
- data/docs/subcommands/ipblock_list.md +5 -3
- data/docs/subcommands/ipfailover_add.md +6 -4
- data/docs/subcommands/ipfailover_remove.md +5 -3
- data/docs/subcommands/k8s_create.md +11 -3
- data/docs/subcommands/k8s_delete.md +5 -3
- data/docs/subcommands/k8s_list.md +5 -3
- data/docs/subcommands/kubeconfig_get.md +5 -3
- data/docs/subcommands/label_add.md +5 -3
- data/docs/subcommands/label_list.md +5 -3
- data/docs/subcommands/label_remove.md +4 -2
- data/docs/subcommands/lan_create.md +8 -3
- data/docs/subcommands/lan_delete.md +4 -2
- data/docs/subcommands/lan_list.md +5 -3
- data/docs/subcommands/loadbalancer_create.md +5 -3
- data/docs/subcommands/loadbalancer_delete.md +4 -2
- data/docs/subcommands/loadbalancer_get.md +5 -3
- data/docs/subcommands/loadbalancer_list.md +5 -3
- data/docs/subcommands/loadbalancer_nic_add.md +4 -2
- data/docs/subcommands/loadbalancer_nic_remove.md +4 -2
- data/docs/subcommands/location_list.md +5 -3
- data/docs/subcommands/natgateway_create.md +41 -0
- data/docs/subcommands/natgateway_delete.md +35 -0
- data/docs/subcommands/natgateway_lan_add.md +46 -0
- data/docs/subcommands/natgateway_lan_remove.md +39 -0
- data/docs/subcommands/natgateway_list.md +35 -0
- data/docs/subcommands/natgateway_rule_add.md +66 -0
- data/docs/subcommands/natgateway_rule_list.md +38 -0
- data/docs/subcommands/natgateway_rule_remove.md +39 -0
- data/docs/subcommands/networkloadbalancer_create.md +54 -0
- data/docs/subcommands/networkloadbalancer_delete.md +35 -0
- data/docs/subcommands/networkloadbalancer_list.md +35 -0
- data/docs/subcommands/networkloadbalancer_rule_add.md +72 -0
- data/docs/subcommands/networkloadbalancer_rule_list.md +39 -0
- data/docs/subcommands/networkloadbalancer_rule_remove.md +39 -0
- data/docs/subcommands/networkloadbalancer_rule_target_add.md +64 -0
- data/docs/subcommands/networkloadbalancer_rule_target_list.md +43 -0
- data/docs/subcommands/networkloadbalancer_rule_target_remove.md +51 -0
- data/docs/subcommands/nic_create.md +7 -5
- data/docs/subcommands/nic_delete.md +4 -2
- data/docs/subcommands/nic_list.md +5 -3
- data/docs/subcommands/node_delete.md +4 -2
- data/docs/subcommands/node_list.md +5 -3
- data/docs/subcommands/node_replace.md +4 -2
- data/docs/subcommands/nodepool_create.md +8 -3
- data/docs/subcommands/nodepool_delete.md +4 -2
- data/docs/subcommands/nodepool_lan_add.md +49 -0
- data/docs/subcommands/nodepool_lan_remove.md +39 -0
- data/docs/subcommands/nodepool_list.md +5 -3
- data/docs/subcommands/pcc_create.md +6 -7
- data/docs/subcommands/pcc_delete.md +5 -3
- data/docs/subcommands/pcc_list.md +5 -3
- data/docs/subcommands/request_list.md +12 -4
- data/docs/subcommands/request_status.md +5 -3
- data/docs/subcommands/request_wait.md +5 -3
- data/docs/subcommands/resource_list.md +7 -3
- data/docs/subcommands/s3key_create.md +5 -3
- data/docs/subcommands/s3key_delete.md +4 -2
- data/docs/subcommands/s3key_list.md +5 -3
- data/docs/subcommands/server_console.md +39 -0
- data/docs/subcommands/server_create.md +5 -3
- data/docs/subcommands/server_delete.md +4 -2
- data/docs/subcommands/server_list.md +8 -3
- data/docs/subcommands/server_reboot.md +4 -2
- data/docs/subcommands/server_resume.md +35 -0
- data/docs/subcommands/server_start.md +4 -2
- data/docs/subcommands/server_stop.md +4 -2
- data/docs/subcommands/server_suspend.md +35 -0
- data/docs/subcommands/server_token.md +39 -0
- data/docs/subcommands/server_upgrade.md +39 -0
- data/docs/subcommands/share_create.md +5 -3
- data/docs/subcommands/share_delete.md +4 -2
- data/docs/subcommands/share_list.md +5 -3
- data/docs/subcommands/snapshot_create.md +17 -3
- data/docs/subcommands/snapshot_delete.md +5 -3
- data/docs/subcommands/snapshot_list.md +5 -3
- data/docs/subcommands/snapshot_restore.md +5 -3
- data/docs/subcommands/template_list.md +31 -0
- data/docs/subcommands/user_create.md +6 -4
- data/docs/subcommands/user_delete.md +5 -3
- data/docs/subcommands/user_list.md +5 -3
- data/docs/subcommands/user_ssourl.md +5 -3
- data/docs/subcommands/volume_attach.md +4 -2
- data/docs/subcommands/volume_create.md +12 -7
- data/docs/subcommands/volume_delete.md +4 -2
- data/docs/subcommands/volume_detach.md +4 -2
- data/docs/subcommands/volume_list.md +5 -3
- data/docs/summary.md +29 -1
- data/docs/templates/subcommand_doc.mustache +9 -7
- data/knife-ionoscloud.gemspec +1 -1
- data/lib/chef/knife/ionoscloud_backupunit_create.rb +2 -1
- data/lib/chef/knife/ionoscloud_backupunit_delete.rb +2 -1
- data/lib/chef/knife/ionoscloud_backupunit_list.rb +2 -1
- data/lib/chef/knife/ionoscloud_backupunit_ssourl.rb +3 -2
- data/lib/chef/knife/ionoscloud_base.rb +24 -1
- data/lib/chef/knife/ionoscloud_composite_server_create.rb +26 -23
- data/lib/chef/knife/ionoscloud_contract_list.rb +33 -23
- data/lib/chef/knife/ionoscloud_cube_server_create.rb +216 -0
- data/lib/chef/knife/ionoscloud_datacenter_create.rb +3 -2
- data/lib/chef/knife/ionoscloud_datacenter_delete.rb +2 -1
- data/lib/chef/knife/ionoscloud_datacenter_list.rb +5 -2
- data/lib/chef/knife/ionoscloud_firewall_create.rb +12 -4
- data/lib/chef/knife/ionoscloud_firewall_delete.rb +5 -3
- data/lib/chef/knife/ionoscloud_firewall_list.rb +6 -3
- data/lib/chef/knife/ionoscloud_flowlog_create.rb +122 -0
- data/lib/chef/knife/ionoscloud_flowlog_delete.rb +107 -0
- data/lib/chef/knife/ionoscloud_flowlog_list.rb +101 -0
- data/lib/chef/knife/ionoscloud_group_create.rb +51 -11
- data/lib/chef/knife/ionoscloud_group_delete.rb +8 -0
- data/lib/chef/knife/ionoscloud_group_get.rb +7 -0
- data/lib/chef/knife/ionoscloud_group_list.rb +20 -7
- data/lib/chef/knife/ionoscloud_group_user_add.rb +1 -0
- data/lib/chef/knife/ionoscloud_group_user_remove.rb +1 -0
- data/lib/chef/knife/ionoscloud_image_list.rb +5 -4
- data/lib/chef/knife/ionoscloud_ipblock_create.rb +2 -1
- data/lib/chef/knife/ionoscloud_ipblock_delete.rb +1 -0
- data/lib/chef/knife/ionoscloud_ipblock_list.rb +4 -1
- data/lib/chef/knife/ionoscloud_ipfailover_add.rb +2 -1
- data/lib/chef/knife/ionoscloud_ipfailover_remove.rb +2 -1
- data/lib/chef/knife/ionoscloud_k8s_create.rb +19 -0
- data/lib/chef/knife/ionoscloud_k8s_delete.rb +6 -2
- data/lib/chef/knife/ionoscloud_k8s_list.rb +1 -0
- data/lib/chef/knife/ionoscloud_kubeconfig_get.rb +1 -0
- data/lib/chef/knife/ionoscloud_label_add.rb +2 -1
- data/lib/chef/knife/ionoscloud_label_list.rb +2 -1
- data/lib/chef/knife/ionoscloud_label_remove.rb +2 -1
- data/lib/chef/knife/ionoscloud_lan_create.rb +8 -1
- data/lib/chef/knife/ionoscloud_lan_delete.rb +2 -1
- data/lib/chef/knife/ionoscloud_lan_list.rb +5 -2
- data/lib/chef/knife/ionoscloud_loadbalancer_create.rb +4 -2
- data/lib/chef/knife/ionoscloud_loadbalancer_delete.rb +2 -1
- data/lib/chef/knife/ionoscloud_loadbalancer_get.rb +2 -1
- data/lib/chef/knife/ionoscloud_loadbalancer_list.rb +2 -1
- data/lib/chef/knife/ionoscloud_loadbalancer_nic_add.rb +2 -1
- data/lib/chef/knife/ionoscloud_loadbalancer_nic_remove.rb +2 -1
- data/lib/chef/knife/ionoscloud_location_list.rb +6 -3
- data/lib/chef/knife/ionoscloud_natgateway_create.rb +70 -0
- data/lib/chef/knife/ionoscloud_natgateway_delete.rb +70 -0
- data/lib/chef/knife/ionoscloud_natgateway_lan_add.rb +81 -0
- data/lib/chef/knife/ionoscloud_natgateway_lan_remove.rb +59 -0
- data/lib/chef/knife/ionoscloud_natgateway_list.rb +50 -0
- data/lib/chef/knife/ionoscloud_natgateway_rule_add.rb +125 -0
- data/lib/chef/knife/ionoscloud_natgateway_rule_list.rb +64 -0
- data/lib/chef/knife/ionoscloud_natgateway_rule_remove.rb +73 -0
- data/lib/chef/knife/ionoscloud_networkloadbalancer_create.rb +96 -0
- data/lib/chef/knife/ionoscloud_networkloadbalancer_delete.rb +82 -0
- data/lib/chef/knife/ionoscloud_networkloadbalancer_list.rb +57 -0
- data/lib/chef/knife/ionoscloud_networkloadbalancer_rule_add.rb +151 -0
- data/lib/chef/knife/ionoscloud_networkloadbalancer_rule_list.rb +64 -0
- data/lib/chef/knife/ionoscloud_networkloadbalancer_rule_remove.rb +79 -0
- data/lib/chef/knife/ionoscloud_networkloadbalancer_rule_target_add.rb +142 -0
- data/lib/chef/knife/ionoscloud_networkloadbalancer_rule_target_list.rb +69 -0
- data/lib/chef/knife/ionoscloud_networkloadbalancer_rule_target_remove.rb +106 -0
- data/lib/chef/knife/ionoscloud_nic_create.rb +17 -14
- data/lib/chef/knife/ionoscloud_nic_delete.rb +5 -2
- data/lib/chef/knife/ionoscloud_nic_list.rb +10 -5
- data/lib/chef/knife/ionoscloud_node_delete.rb +1 -0
- data/lib/chef/knife/ionoscloud_node_list.rb +4 -2
- data/lib/chef/knife/ionoscloud_node_replace.rb +1 -0
- data/lib/chef/knife/ionoscloud_nodepool_create.rb +43 -16
- data/lib/chef/knife/ionoscloud_nodepool_delete.rb +26 -0
- data/lib/chef/knife/ionoscloud_nodepool_lan_add.rb +129 -0
- data/lib/chef/knife/ionoscloud_nodepool_lan_remove.rb +97 -0
- data/lib/chef/knife/ionoscloud_nodepool_list.rb +4 -1
- data/lib/chef/knife/ionoscloud_pcc_create.rb +36 -8
- data/lib/chef/knife/ionoscloud_pcc_delete.rb +2 -1
- data/lib/chef/knife/ionoscloud_pcc_list.rb +2 -1
- data/lib/chef/knife/ionoscloud_request_list.rb +26 -12
- data/lib/chef/knife/ionoscloud_request_status.rb +2 -1
- data/lib/chef/knife/ionoscloud_request_wait.rb +1 -0
- data/lib/chef/knife/ionoscloud_resource_list.rb +1 -0
- data/lib/chef/knife/ionoscloud_s3key_create.rb +3 -2
- data/lib/chef/knife/ionoscloud_s3key_delete.rb +4 -3
- data/lib/chef/knife/ionoscloud_s3key_list.rb +3 -2
- data/lib/chef/knife/ionoscloud_server_console.rb +43 -0
- data/lib/chef/knife/ionoscloud_server_create.rb +10 -9
- data/lib/chef/knife/ionoscloud_server_delete.rb +5 -4
- data/lib/chef/knife/ionoscloud_server_list.rb +19 -7
- data/lib/chef/knife/ionoscloud_server_reboot.rb +2 -1
- data/lib/chef/knife/ionoscloud_server_resume.rb +44 -0
- data/lib/chef/knife/ionoscloud_server_start.rb +2 -1
- data/lib/chef/knife/ionoscloud_server_stop.rb +2 -1
- data/lib/chef/knife/ionoscloud_server_suspend.rb +45 -0
- data/lib/chef/knife/ionoscloud_server_token.rb +43 -0
- data/lib/chef/knife/ionoscloud_server_upgrade.rb +45 -0
- data/lib/chef/knife/ionoscloud_share_create.rb +1 -0
- data/lib/chef/knife/ionoscloud_share_delete.rb +1 -0
- data/lib/chef/knife/ionoscloud_share_list.rb +1 -0
- data/lib/chef/knife/ionoscloud_snapshot_create.rb +27 -2
- data/lib/chef/knife/ionoscloud_snapshot_delete.rb +2 -1
- data/lib/chef/knife/ionoscloud_snapshot_list.rb +2 -1
- data/lib/chef/knife/ionoscloud_snapshot_restore.rb +3 -2
- data/lib/chef/knife/ionoscloud_template_list.rb +47 -0
- data/lib/chef/knife/ionoscloud_user_create.rb +5 -4
- data/lib/chef/knife/ionoscloud_user_delete.rb +1 -0
- data/lib/chef/knife/ionoscloud_user_list.rb +2 -1
- data/lib/chef/knife/ionoscloud_user_ssourl.rb +2 -1
- data/lib/chef/knife/ionoscloud_volume_attach.rb +2 -1
- data/lib/chef/knife/ionoscloud_volume_create.rb +34 -35
- data/lib/chef/knife/ionoscloud_volume_delete.rb +2 -1
- data/lib/chef/knife/ionoscloud_volume_detach.rb +2 -1
- data/lib/chef/knife/ionoscloud_volume_list.rb +4 -3
- data/lib/knife-ionoscloud/version.rb +1 -1
- data/spec/chef/knife/ionoscloud_backupunit_create_spec.rb +2 -2
- data/spec/chef/knife/ionoscloud_backupunit_delete_spec.rb +5 -5
- data/spec/chef/knife/ionoscloud_backupunit_list_spec.rb +1 -1
- data/spec/chef/knife/ionoscloud_backupunit_ssourl_spec.rb +3 -3
- data/spec/chef/knife/ionoscloud_base_spec.rb +4 -4
- data/spec/chef/knife/ionoscloud_composite_server_create_spec.rb +11 -8
- data/spec/chef/knife/ionoscloud_contract_list_spec.rb +32 -27
- data/spec/chef/knife/ionoscloud_cube_server_create_spec.rb +249 -0
- data/spec/chef/knife/ionoscloud_datacenter_create_spec.rb +3 -2
- data/spec/chef/knife/ionoscloud_datacenter_delete_spec.rb +5 -5
- data/spec/chef/knife/ionoscloud_datacenter_list_spec.rb +5 -3
- data/spec/chef/knife/ionoscloud_firewall_create_spec.rb +5 -3
- data/spec/chef/knife/ionoscloud_firewall_delete_spec.rb +6 -5
- data/spec/chef/knife/ionoscloud_firewall_list_spec.rb +5 -3
- data/spec/chef/knife/ionoscloud_flowlog_create_spec.rb +254 -0
- data/spec/chef/knife/ionoscloud_flowlog_delete_spec.rb +360 -0
- data/spec/chef/knife/ionoscloud_flowlog_list_spec.rb +264 -0
- data/spec/chef/knife/ionoscloud_group_create_spec.rb +12 -0
- data/spec/chef/knife/ionoscloud_group_delete_spec.rb +6 -0
- data/spec/chef/knife/ionoscloud_group_get_spec.rb +6 -0
- data/spec/chef/knife/ionoscloud_group_list_spec.rb +26 -8
- data/spec/chef/knife/ionoscloud_image_list_spec.rb +4 -4
- data/spec/chef/knife/ionoscloud_ipblock_list_spec.rb +3 -1
- data/spec/chef/knife/ionoscloud_ipfailover_add_spec.rb +3 -3
- data/spec/chef/knife/ionoscloud_ipfailover_remove_spec.rb +4 -4
- data/spec/chef/knife/ionoscloud_k8s_delete_spec.rb +5 -2
- data/spec/chef/knife/ionoscloud_kubeconfig_get_spec.rb +2 -2
- data/spec/chef/knife/ionoscloud_label_add_spec.rb +10 -10
- data/spec/chef/knife/ionoscloud_label_list_spec.rb +14 -14
- data/spec/chef/knife/ionoscloud_label_remove_spec.rb +20 -20
- data/spec/chef/knife/ionoscloud_lan_create_spec.rb +5 -3
- data/spec/chef/knife/ionoscloud_lan_delete_spec.rb +5 -5
- data/spec/chef/knife/ionoscloud_lan_list_spec.rb +5 -3
- data/spec/chef/knife/ionoscloud_loadbalancer_create_spec.rb +3 -3
- data/spec/chef/knife/ionoscloud_loadbalancer_delete_spec.rb +5 -5
- data/spec/chef/knife/ionoscloud_loadbalancer_get_spec.rb +2 -2
- data/spec/chef/knife/ionoscloud_loadbalancer_list_spec.rb +2 -2
- data/spec/chef/knife/ionoscloud_loadbalancer_nic_add_spec.rb +6 -6
- data/spec/chef/knife/ionoscloud_loadbalancer_nic_remove_spec.rb +6 -6
- data/spec/chef/knife/ionoscloud_location_list_spec.rb +5 -3
- data/spec/chef/knife/ionoscloud_natgateway_create_spec.rb +77 -0
- data/spec/chef/knife/ionoscloud_natgateway_delete_spec.rb +118 -0
- data/spec/chef/knife/ionoscloud_natgateway_lan_add_spec.rb +143 -0
- data/spec/chef/knife/ionoscloud_natgateway_lan_remove_spec.rb +194 -0
- data/spec/chef/knife/ionoscloud_natgateway_list_spec.rb +79 -0
- data/spec/chef/knife/ionoscloud_natgateway_rule_add_spec.rb +98 -0
- data/spec/chef/knife/ionoscloud_natgateway_rule_list_spec.rb +92 -0
- data/spec/chef/knife/ionoscloud_natgateway_rule_remove_spec.rb +77 -0
- data/spec/chef/knife/ionoscloud_networkloadbalancer_create_spec.rb +80 -0
- data/spec/chef/knife/ionoscloud_networkloadbalancer_delete_spec.rb +119 -0
- data/spec/chef/knife/ionoscloud_networkloadbalancer_list_spec.rb +88 -0
- data/spec/chef/knife/ionoscloud_networkloadbalancer_rule_add_spec.rb +104 -0
- data/spec/chef/knife/ionoscloud_networkloadbalancer_rule_list_spec.rb +89 -0
- data/spec/chef/knife/ionoscloud_networkloadbalancer_rule_remove_spec.rb +124 -0
- data/spec/chef/knife/ionoscloud_networkloadbalancer_rule_target_add_spec.rb +109 -0
- data/spec/chef/knife/ionoscloud_networkloadbalancer_rule_target_list_spec.rb +85 -0
- data/spec/chef/knife/ionoscloud_networkloadbalancer_rule_target_remove_spec.rb +263 -0
- data/spec/chef/knife/ionoscloud_nic_create_spec.rb +9 -5
- data/spec/chef/knife/ionoscloud_nic_delete_spec.rb +8 -6
- data/spec/chef/knife/ionoscloud_nic_list_spec.rb +12 -6
- data/spec/chef/knife/ionoscloud_node_list_spec.rb +3 -1
- data/spec/chef/knife/ionoscloud_nodepool_create_spec.rb +15 -1
- data/spec/chef/knife/ionoscloud_nodepool_lan_add_spec.rb +226 -0
- data/spec/chef/knife/ionoscloud_nodepool_lan_remove.rb +199 -0
- data/spec/chef/knife/ionoscloud_nodepool_list_spec.rb +3 -1
- data/spec/chef/knife/ionoscloud_pcc_create_spec.rb +36 -5
- data/spec/chef/knife/ionoscloud_pcc_delete_spec.rb +5 -5
- data/spec/chef/knife/ionoscloud_pcc_list_spec.rb +2 -2
- data/spec/chef/knife/ionoscloud_request_list_spec.rb +127 -8
- data/spec/chef/knife/ionoscloud_request_status_spec.rb +3 -3
- data/spec/chef/knife/ionoscloud_s3key_create_spec.rb +2 -2
- data/spec/chef/knife/ionoscloud_s3key_delete_spec.rb +5 -5
- data/spec/chef/knife/ionoscloud_s3key_list_spec.rb +2 -2
- data/spec/chef/knife/ionoscloud_server_console_spec.rb +97 -0
- data/spec/chef/knife/ionoscloud_server_create_spec.rb +3 -3
- data/spec/chef/knife/ionoscloud_server_delete_spec.rb +5 -5
- data/spec/chef/knife/ionoscloud_server_list_spec.rb +65 -7
- data/spec/chef/knife/ionoscloud_server_reboot_spec.rb +3 -5
- data/spec/chef/knife/ionoscloud_server_resume_spec.rb +93 -0
- data/spec/chef/knife/ionoscloud_server_start_spec.rb +3 -5
- data/spec/chef/knife/ionoscloud_server_stop_spec.rb +3 -5
- data/spec/chef/knife/ionoscloud_server_suspend_spec.rb +93 -0
- data/spec/chef/knife/ionoscloud_server_token_spec.rb +97 -0
- data/spec/chef/knife/ionoscloud_server_upgrade_spec.rb +96 -0
- data/spec/chef/knife/ionoscloud_snapshot_create_spec.rb +13 -3
- data/spec/chef/knife/ionoscloud_snapshot_delete_spec.rb +5 -5
- data/spec/chef/knife/ionoscloud_snapshot_list_spec.rb +2 -2
- data/spec/chef/knife/ionoscloud_snapshot_restore_spec.rb +3 -3
- data/spec/chef/knife/ionoscloud_template_list_spec.rb +78 -0
- data/spec/chef/knife/ionoscloud_user_ssourl_spec.rb +3 -3
- data/spec/chef/knife/ionoscloud_volume_attach_spec.rb +4 -4
- data/spec/chef/knife/ionoscloud_volume_create_spec.rb +6 -58
- data/spec/chef/knife/ionoscloud_volume_delete_spec.rb +5 -5
- data/spec/chef/knife/ionoscloud_volume_detach_spec.rb +5 -5
- data/spec/chef/knife/ionoscloud_volume_list_spec.rb +4 -4
- data/spec/spec_helper.rb +235 -36
- metadata +122 -6
@@ -24,6 +24,12 @@ describe Chef::Knife::IonoscloudGroupCreate do
|
|
24
24
|
access_activity_log: group.properties.access_activity_log,
|
25
25
|
s3_privilege: group.properties.s3_privilege,
|
26
26
|
create_backup_unit: group.properties.create_backup_unit,
|
27
|
+
create_k8s_cluster: group.properties.create_k8s_cluster,
|
28
|
+
create_pcc: group.properties.create_pcc,
|
29
|
+
create_internet_access: group.properties.create_internet_access,
|
30
|
+
create_flow_log: group.properties.create_flow_log,
|
31
|
+
access_and_manage_monitoring: group.properties.access_and_manage_monitoring,
|
32
|
+
access_and_manage_certificates: group.properties.access_and_manage_certificates,
|
27
33
|
}
|
28
34
|
|
29
35
|
subject_config.each { |key, value| subject.config[key] = value }
|
@@ -36,6 +42,12 @@ describe Chef::Knife::IonoscloudGroupCreate do
|
|
36
42
|
expect(subject).to receive(:puts).with("Access Activity Log: #{group.properties.access_activity_log.to_s}")
|
37
43
|
expect(subject).to receive(:puts).with("S3 Privilege: #{group.properties.s3_privilege.to_s}")
|
38
44
|
expect(subject).to receive(:puts).with("Create Backup Unit: #{group.properties.create_backup_unit.to_s}")
|
45
|
+
expect(subject).to receive(:puts).with("Create K8s Clusters: #{group.properties.create_k8s_cluster.to_s}")
|
46
|
+
expect(subject).to receive(:puts).with("Create PCC: #{group.properties.create_pcc.to_s}")
|
47
|
+
expect(subject).to receive(:puts).with("Create Internet Acess: #{group.properties.create_internet_access.to_s}")
|
48
|
+
expect(subject).to receive(:puts).with("Create Flow Logs: #{group.properties.create_flow_log.to_s}")
|
49
|
+
expect(subject).to receive(:puts).with("Access and Manage Monitoring: #{group.properties.access_and_manage_monitoring.to_s}")
|
50
|
+
expect(subject).to receive(:puts).with("Access and Manage Certificates: #{group.properties.access_and_manage_certificates.to_s}")
|
39
51
|
|
40
52
|
mock_wait_for(subject)
|
41
53
|
mock_call_api(
|
@@ -33,6 +33,12 @@ describe Chef::Knife::IonoscloudGroupDelete do
|
|
33
33
|
expect(subject).to receive(:puts).with("Access Activity Log: #{group.properties.access_activity_log.to_s}")
|
34
34
|
expect(subject).to receive(:puts).with("S3 Privilege: #{group.properties.s3_privilege.to_s}")
|
35
35
|
expect(subject).to receive(:puts).with("Create Backup Unit: #{group.properties.create_backup_unit.to_s}")
|
36
|
+
expect(subject).to receive(:puts).with("Create K8s Clusters: #{group.properties.create_k8s_cluster.to_s}")
|
37
|
+
expect(subject).to receive(:puts).with("Create PCC: #{group.properties.create_pcc.to_s}")
|
38
|
+
expect(subject).to receive(:puts).with("Create Internet Acess: #{group.properties.create_internet_access.to_s}")
|
39
|
+
expect(subject).to receive(:puts).with("Create Flow Logs: #{group.properties.create_flow_log.to_s}")
|
40
|
+
expect(subject).to receive(:puts).with("Access and Manage Monitoring: #{group.properties.access_and_manage_monitoring.to_s}")
|
41
|
+
expect(subject).to receive(:puts).with("Access and Manage Certificates: #{group.properties.access_and_manage_certificates.to_s}")
|
36
42
|
expect(subject).to receive(:puts).with("Users: #{users.to_s}")
|
37
43
|
expect(subject.ui).to receive(:warn).with("Deleted Group #{group.id}. Request ID: ")
|
38
44
|
|
@@ -34,6 +34,12 @@ describe Chef::Knife::IonoscloudGroupGet do
|
|
34
34
|
expect(subject).to receive(:puts).with("Access Activity Log: #{group.properties.access_activity_log.to_s}")
|
35
35
|
expect(subject).to receive(:puts).with("S3 Privilege: #{group.properties.s3_privilege.to_s}")
|
36
36
|
expect(subject).to receive(:puts).with("Create Backup Unit: #{group.properties.create_backup_unit.to_s}")
|
37
|
+
expect(subject).to receive(:puts).with("Create K8s Clusters: #{group.properties.create_k8s_cluster.to_s}")
|
38
|
+
expect(subject).to receive(:puts).with("Create PCC: #{group.properties.create_pcc.to_s}")
|
39
|
+
expect(subject).to receive(:puts).with("Create Internet Acess: #{group.properties.create_internet_access.to_s}")
|
40
|
+
expect(subject).to receive(:puts).with("Create Flow Logs: #{group.properties.create_flow_log.to_s}")
|
41
|
+
expect(subject).to receive(:puts).with("Access and Manage Monitoring: #{group.properties.access_and_manage_monitoring.to_s}")
|
42
|
+
expect(subject).to receive(:puts).with("Access and Manage Certificates: #{group.properties.access_and_manage_certificates.to_s}")
|
37
43
|
expect(subject).to receive(:puts).with("Users: #{users.to_s}")
|
38
44
|
|
39
45
|
mock_call_api(
|
@@ -11,12 +11,18 @@ describe Chef::Knife::IonoscloudGroupList do
|
|
11
11
|
@group_list = group_list = [
|
12
12
|
subject.ui.color('ID', :bold),
|
13
13
|
subject.ui.color('Name', :bold),
|
14
|
-
subject.ui.color('
|
15
|
-
subject.ui.color('
|
16
|
-
subject.ui.color('
|
17
|
-
subject.ui.color('
|
18
|
-
subject.ui.color('S3
|
19
|
-
subject.ui.color('
|
14
|
+
subject.ui.color('Datacenter', :bold),
|
15
|
+
subject.ui.color('Snapshot', :bold),
|
16
|
+
subject.ui.color('IP', :bold),
|
17
|
+
subject.ui.color('Activity', :bold),
|
18
|
+
subject.ui.color('S3', :bold),
|
19
|
+
subject.ui.color('Backup', :bold),
|
20
|
+
subject.ui.color('K8s', :bold),
|
21
|
+
subject.ui.color('PCC', :bold),
|
22
|
+
subject.ui.color('Internet', :bold),
|
23
|
+
subject.ui.color('FlowLogs', :bold),
|
24
|
+
subject.ui.color('Monitoring', :bold),
|
25
|
+
subject.ui.color('Certificates', :bold),
|
20
26
|
@groups.items.first.id,
|
21
27
|
@groups.items.first.properties.name,
|
22
28
|
@groups.items.first.properties.create_data_center.to_s,
|
@@ -25,6 +31,12 @@ describe Chef::Knife::IonoscloudGroupList do
|
|
25
31
|
@groups.items.first.properties.access_activity_log.to_s,
|
26
32
|
@groups.items.first.properties.s3_privilege.to_s,
|
27
33
|
@groups.items.first.properties.create_backup_unit.to_s,
|
34
|
+
@groups.items.first.properties.create_k8s_cluster.to_s,
|
35
|
+
@groups.items.first.properties.create_pcc.to_s,
|
36
|
+
@groups.items.first.properties.create_internet_access.to_s,
|
37
|
+
@groups.items.first.properties.create_flow_log.to_s,
|
38
|
+
@groups.items.first.properties.access_and_manage_monitoring.to_s,
|
39
|
+
@groups.items.first.properties.access_and_manage_certificates.to_s,
|
28
40
|
@groups.items[1].id,
|
29
41
|
@groups.items[1].properties.name,
|
30
42
|
@groups.items[1].properties.create_data_center.to_s,
|
@@ -33,6 +45,12 @@ describe Chef::Knife::IonoscloudGroupList do
|
|
33
45
|
@groups.items[1].properties.access_activity_log.to_s,
|
34
46
|
@groups.items[1].properties.s3_privilege.to_s,
|
35
47
|
@groups.items[1].properties.create_backup_unit.to_s,
|
48
|
+
@groups.items[1].properties.create_k8s_cluster.to_s,
|
49
|
+
@groups.items[1].properties.create_pcc.to_s,
|
50
|
+
@groups.items[1].properties.create_internet_access.to_s,
|
51
|
+
@groups.items[1].properties.create_flow_log.to_s,
|
52
|
+
@groups.items[1].properties.access_and_manage_monitoring.to_s,
|
53
|
+
@groups.items[1].properties.access_and_manage_certificates.to_s,
|
36
54
|
]
|
37
55
|
|
38
56
|
allow(subject).to receive(:puts)
|
@@ -48,7 +66,7 @@ describe Chef::Knife::IonoscloudGroupList do
|
|
48
66
|
|
49
67
|
subject_config.each { |key, value| subject.config[key] = value }
|
50
68
|
|
51
|
-
expect(subject.ui).to receive(:list).with(@group_list, :uneven_columns_across,
|
69
|
+
expect(subject.ui).to receive(:list).with(@group_list, :uneven_columns_across, 14)
|
52
70
|
|
53
71
|
mock_call_api(
|
54
72
|
subject,
|
@@ -75,7 +93,7 @@ describe Chef::Knife::IonoscloudGroupList do
|
|
75
93
|
|
76
94
|
subject_config.each { |key, value| subject.config[key] = value }
|
77
95
|
|
78
|
-
expect(subject.ui).to receive(:list).with(@group_list, :uneven_columns_across,
|
96
|
+
expect(subject.ui).to receive(:list).with(@group_list, :uneven_columns_across, 14)
|
79
97
|
|
80
98
|
expect(subject.api_client).not_to receive(:wait_for)
|
81
99
|
mock_call_api(
|
@@ -12,7 +12,7 @@ describe Chef::Knife::IonoscloudImageList do
|
|
12
12
|
end
|
13
13
|
|
14
14
|
describe '#run' do
|
15
|
-
it 'should call
|
15
|
+
it 'should call ImagesApi.images_get' do
|
16
16
|
images = images_mock
|
17
17
|
subject_config = {
|
18
18
|
ionoscloud_username: 'email',
|
@@ -24,16 +24,16 @@ describe Chef::Knife::IonoscloudImageList do
|
|
24
24
|
image_list = [
|
25
25
|
subject.ui.color('ID', :bold),
|
26
26
|
subject.ui.color('Name', :bold),
|
27
|
-
subject.ui.color('Description', :bold),
|
28
27
|
subject.ui.color('Location', :bold),
|
29
28
|
subject.ui.color('Size', :bold),
|
30
29
|
subject.ui.color('Public', :bold),
|
30
|
+
subject.ui.color('Aliases', :bold),
|
31
31
|
images.items.first.id,
|
32
32
|
images.items.first.properties.name,
|
33
|
-
images.items.first.properties.description,
|
34
33
|
images.items.first.properties.location,
|
35
34
|
images.items.first.properties.size.to_s,
|
36
35
|
images.items.first.properties.public.to_s,
|
36
|
+
images.items.first.properties.image_aliases,
|
37
37
|
]
|
38
38
|
|
39
39
|
expect(subject.ui).to receive(:list).with(image_list, :uneven_columns_across, 6)
|
@@ -44,7 +44,7 @@ describe Chef::Knife::IonoscloudImageList do
|
|
44
44
|
{
|
45
45
|
method: 'GET',
|
46
46
|
path: '/images',
|
47
|
-
operation: :'
|
47
|
+
operation: :'ImagesApi.images_get',
|
48
48
|
return_type: 'Images',
|
49
49
|
result: images,
|
50
50
|
},
|
@@ -26,6 +26,7 @@ describe Chef::Knife::IonoscloudIpblockList do
|
|
26
26
|
subject.ui.color('Name', :bold),
|
27
27
|
subject.ui.color('Location', :bold),
|
28
28
|
subject.ui.color('IP Addresses', :bold),
|
29
|
+
subject.ui.color('IP Consumers count', :bold),
|
29
30
|
]
|
30
31
|
|
31
32
|
ipblocks.items.each do |ipblock|
|
@@ -33,9 +34,10 @@ describe Chef::Knife::IonoscloudIpblockList do
|
|
33
34
|
ipblock_list << ipblock.properties.name
|
34
35
|
ipblock_list << ipblock.properties.location
|
35
36
|
ipblock_list << ipblock.properties.ips.join(', ')
|
37
|
+
ipblock_list << ipblock.properties.ip_consumers.nil? ? 0 : ipblock.properties.ip_consumers.length
|
36
38
|
end
|
37
39
|
|
38
|
-
expect(subject.ui).to receive(:list).with(ipblock_list, :uneven_columns_across,
|
40
|
+
expect(subject.ui).to receive(:list).with(ipblock_list, :uneven_columns_across, 5)
|
39
41
|
|
40
42
|
mock_call_api(
|
41
43
|
subject,
|
@@ -38,21 +38,21 @@ describe Chef::Knife::IonoscloudIpfailoverAdd do
|
|
38
38
|
{
|
39
39
|
method: 'GET',
|
40
40
|
path: "/datacenters/#{subject_config[:datacenter_id]}/lans/#{lan.id}",
|
41
|
-
operation: :'
|
41
|
+
operation: :'LansApi.datacenters_lans_find_by_id',
|
42
42
|
return_type: 'Lan',
|
43
43
|
result: lan,
|
44
44
|
},
|
45
45
|
{
|
46
46
|
method: 'PATCH',
|
47
47
|
path: "/datacenters/#{subject_config[:datacenter_id]}/lans/#{lan.id}",
|
48
|
-
operation: :'
|
48
|
+
operation: :'LansApi.datacenters_lans_patch',
|
49
49
|
body: Ionoscloud::LanProperties.new({ ip_failover: [({ ip: subject_config[:ip], nicUuid: subject_config[:nic_id] })] }).to_hash,
|
50
50
|
return_type: 'Lan',
|
51
51
|
},
|
52
52
|
{
|
53
53
|
method: 'GET',
|
54
54
|
path: "/datacenters/#{subject_config[:datacenter_id]}/lans/#{lan.id}",
|
55
|
-
operation: :'
|
55
|
+
operation: :'LansApi.datacenters_lans_find_by_id',
|
56
56
|
return_type: 'Lan',
|
57
57
|
result: lan,
|
58
58
|
},
|
@@ -41,21 +41,21 @@ describe Chef::Knife::IonoscloudIpfailoverRemove do
|
|
41
41
|
{
|
42
42
|
method: 'GET',
|
43
43
|
path: "/datacenters/#{subject_config[:datacenter_id]}/lans/#{lan.id}",
|
44
|
-
operation: :'
|
44
|
+
operation: :'LansApi.datacenters_lans_find_by_id',
|
45
45
|
return_type: 'Lan',
|
46
46
|
result: lan,
|
47
47
|
},
|
48
48
|
{
|
49
49
|
method: 'PATCH',
|
50
50
|
path: "/datacenters/#{subject_config[:datacenter_id]}/lans/#{lan.id}",
|
51
|
-
operation: :'
|
51
|
+
operation: :'LansApi.datacenters_lans_patch',
|
52
52
|
body: Ionoscloud::LanProperties.new({ ip_failover: [] }).to_hash,
|
53
53
|
return_type: 'Lan',
|
54
54
|
},
|
55
55
|
{
|
56
56
|
method: 'GET',
|
57
57
|
path: "/datacenters/#{subject_config[:datacenter_id]}/lans/#{lan.id}",
|
58
|
-
operation: :'
|
58
|
+
operation: :'LansApi.datacenters_lans_find_by_id',
|
59
59
|
return_type: 'Lan',
|
60
60
|
result: lan_copy,
|
61
61
|
},
|
@@ -91,7 +91,7 @@ describe Chef::Knife::IonoscloudIpfailoverRemove do
|
|
91
91
|
{
|
92
92
|
method: 'GET',
|
93
93
|
path: "/datacenters/#{subject_config[:datacenter_id]}/lans/#{lan.id}",
|
94
|
-
operation: :'
|
94
|
+
operation: :'LansApi.datacenters_lans_find_by_id',
|
95
95
|
return_type: 'Lan',
|
96
96
|
result: lan,
|
97
97
|
},
|
@@ -86,7 +86,7 @@ describe Chef::Knife::IonoscloudK8sDelete do
|
|
86
86
|
expect { subject.run }.not_to raise_error(Exception)
|
87
87
|
end
|
88
88
|
|
89
|
-
it 'should not call KubernetesApi.k8s_delete when the cluster is not
|
89
|
+
it 'should not call KubernetesApi.k8s_delete when the cluster is not one of ["ACTIVE", "TERMINATED"]' do
|
90
90
|
k8s_cluster = k8s_cluster_mock(
|
91
91
|
{
|
92
92
|
state: 'DEPLOYING',
|
@@ -103,7 +103,10 @@ describe Chef::Knife::IonoscloudK8sDelete do
|
|
103
103
|
subject_config.each { |key, value| subject.config[key] = value }
|
104
104
|
subject.name_args = [k8s_cluster.id]
|
105
105
|
|
106
|
-
expect(subject.ui).to receive(:error).with(
|
106
|
+
expect(subject.ui).to receive(:error).with(
|
107
|
+
"K8s Cluster #{k8s_cluster.id} state must be one of ['ACTIVE', 'TERMINATED'], "\
|
108
|
+
"actual state is '#{k8s_cluster.metadata.state}'. Skipping."
|
109
|
+
)
|
107
110
|
|
108
111
|
expect(subject.api_client).not_to receive(:wait_for)
|
109
112
|
mock_call_api(
|
@@ -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: '
|
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: '
|
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
|
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: :'
|
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
|
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: :'
|
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
|
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: :'
|
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
|
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: :'
|
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
|
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: :'
|
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
|
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: :'
|
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
|
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: :'
|
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
|
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: :'
|
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
|
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: :'
|
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
|
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: :'
|
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
|
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: :'
|
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
|
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: :'
|
252
|
+
operation: :'LabelsApi.labels_get',
|
253
253
|
return_type: 'Labels',
|
254
254
|
result: @labels,
|
255
255
|
},
|