knife-ionoscloud 5.1.2 → 6.0.0.alpha.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/publish.yml +1 -4
- data/docs/README.md +0 -19
- data/docs/docs_generator.rb +1 -1
- data/docs/subcommands/backupunit_create.md +2 -5
- data/docs/subcommands/backupunit_delete.md +1 -4
- data/docs/subcommands/backupunit_list.md +1 -4
- data/docs/subcommands/backupunit_ssourl.md +1 -4
- data/docs/subcommands/composite_server_create.md +1 -4
- data/docs/subcommands/contract_list.md +1 -4
- data/docs/subcommands/datacenter_create.md +1 -4
- data/docs/subcommands/datacenter_delete.md +1 -4
- data/docs/subcommands/datacenter_list.md +1 -4
- data/docs/subcommands/firewall_create.md +2 -5
- data/docs/subcommands/firewall_delete.md +0 -3
- data/docs/subcommands/firewall_list.md +1 -4
- data/docs/subcommands/group_create.md +1 -4
- data/docs/subcommands/group_delete.md +1 -4
- data/docs/subcommands/group_get.md +1 -4
- data/docs/subcommands/group_list.md +1 -4
- data/docs/subcommands/group_user_add.md +0 -3
- data/docs/subcommands/group_user_remove.md +0 -3
- data/docs/subcommands/image_list.md +1 -4
- data/docs/subcommands/ipblock_create.md +1 -4
- data/docs/subcommands/ipblock_delete.md +1 -4
- data/docs/subcommands/ipblock_list.md +1 -4
- data/docs/subcommands/ipfailover_add.md +1 -4
- data/docs/subcommands/ipfailover_remove.md +1 -4
- data/docs/subcommands/k8s_create.md +5 -11
- data/docs/subcommands/k8s_delete.md +1 -4
- data/docs/subcommands/k8s_list.md +1 -4
- data/docs/subcommands/kubeconfig_get.md +1 -4
- data/docs/subcommands/label_add.md +1 -4
- data/docs/subcommands/label_list.md +1 -4
- data/docs/subcommands/label_remove.md +0 -3
- data/docs/subcommands/lan_create.md +1 -4
- data/docs/subcommands/lan_delete.md +0 -3
- data/docs/subcommands/lan_list.md +1 -4
- data/docs/subcommands/loadbalancer_create.md +2 -5
- data/docs/subcommands/loadbalancer_delete.md +0 -3
- data/docs/subcommands/loadbalancer_get.md +1 -4
- data/docs/subcommands/loadbalancer_list.md +1 -4
- data/docs/subcommands/loadbalancer_nic_add.md +0 -3
- data/docs/subcommands/loadbalancer_nic_remove.md +0 -3
- data/docs/subcommands/location_list.md +1 -4
- data/docs/subcommands/nic_create.md +3 -6
- data/docs/subcommands/nic_delete.md +1 -4
- data/docs/subcommands/nic_list.md +1 -4
- data/docs/subcommands/node_delete.md +0 -3
- data/docs/subcommands/node_list.md +1 -4
- data/docs/subcommands/node_replace.md +0 -3
- data/docs/subcommands/nodepool_create.md +5 -17
- data/docs/subcommands/nodepool_delete.md +0 -3
- data/docs/subcommands/nodepool_list.md +1 -4
- data/docs/subcommands/pcc_create.md +1 -4
- data/docs/subcommands/pcc_delete.md +1 -4
- data/docs/subcommands/pcc_list.md +1 -4
- data/docs/subcommands/request_list.md +1 -4
- data/docs/subcommands/request_status.md +1 -4
- data/docs/subcommands/request_wait.md +1 -4
- data/docs/subcommands/resource_list.md +1 -4
- data/docs/subcommands/s3key_create.md +1 -4
- data/docs/subcommands/s3key_delete.md +0 -3
- data/docs/subcommands/s3key_list.md +1 -4
- data/docs/subcommands/server_create.md +1 -4
- data/docs/subcommands/server_delete.md +0 -3
- data/docs/subcommands/server_list.md +1 -4
- data/docs/subcommands/server_reboot.md +0 -3
- data/docs/subcommands/server_start.md +0 -3
- data/docs/subcommands/server_stop.md +0 -3
- data/docs/subcommands/share_create.md +2 -5
- data/docs/subcommands/share_delete.md +2 -5
- data/docs/subcommands/share_list.md +1 -4
- data/docs/subcommands/snapshot_create.md +1 -4
- data/docs/subcommands/snapshot_delete.md +1 -4
- data/docs/subcommands/snapshot_list.md +1 -4
- data/docs/subcommands/snapshot_restore.md +1 -4
- data/docs/subcommands/user_create.md +3 -12
- data/docs/subcommands/user_delete.md +1 -4
- data/docs/subcommands/user_list.md +1 -4
- data/docs/subcommands/user_ssourl.md +1 -4
- data/docs/subcommands/volume_attach.md +0 -3
- data/docs/subcommands/volume_create.md +1 -28
- data/docs/subcommands/volume_delete.md +0 -3
- data/docs/subcommands/volume_detach.md +0 -3
- data/docs/subcommands/volume_list.md +1 -4
- data/docs/summary.md +0 -33
- data/knife-ionoscloud.gemspec +1 -1
- data/lib/chef/knife/ionoscloud_backupunit_create.rb +16 -12
- data/lib/chef/knife/ionoscloud_backupunit_delete.rb +5 -3
- data/lib/chef/knife/ionoscloud_backupunit_list.rb +1 -2
- data/lib/chef/knife/ionoscloud_backupunit_ssourl.rb +1 -2
- data/lib/chef/knife/ionoscloud_base.rb +6 -259
- data/lib/chef/knife/ionoscloud_composite_server_create.rb +38 -9
- data/lib/chef/knife/ionoscloud_contract_list.rb +32 -24
- data/lib/chef/knife/ionoscloud_cube_server_create.rb +215 -0
- data/lib/chef/knife/ionoscloud_datacenter_create.rb +14 -12
- data/lib/chef/knife/ionoscloud_datacenter_delete.rb +8 -3
- data/lib/chef/knife/ionoscloud_datacenter_list.rb +3 -4
- data/lib/chef/knife/ionoscloud_firewall_create.rb +24 -7
- data/lib/chef/knife/ionoscloud_firewall_delete.rb +14 -6
- data/lib/chef/knife/ionoscloud_firewall_list.rb +5 -4
- data/lib/chef/knife/ionoscloud_flowlog_create.rb +121 -0
- data/lib/chef/knife/ionoscloud_flowlog_delete.rb +106 -0
- data/lib/chef/knife/ionoscloud_flowlog_list.rb +100 -0
- data/lib/chef/knife/ionoscloud_group_create.rb +46 -16
- data/lib/chef/knife/ionoscloud_group_delete.rb +18 -2
- data/lib/chef/knife/ionoscloud_group_get.rb +17 -2
- data/lib/chef/knife/ionoscloud_group_list.rb +7 -2
- data/lib/chef/knife/ionoscloud_group_user_add.rb +13 -2
- data/lib/chef/knife/ionoscloud_group_user_remove.rb +13 -2
- data/lib/chef/knife/ionoscloud_image_list.rb +1 -2
- data/lib/chef/knife/ionoscloud_ipblock_create.rb +13 -11
- data/lib/chef/knife/ionoscloud_ipblock_delete.rb +4 -3
- data/lib/chef/knife/ionoscloud_ipblock_list.rb +1 -2
- data/lib/chef/knife/ionoscloud_ipfailover_add.rb +15 -9
- data/lib/chef/knife/ionoscloud_ipfailover_remove.rb +9 -3
- data/lib/chef/knife/ionoscloud_k8s_create.rb +30 -28
- data/lib/chef/knife/ionoscloud_k8s_delete.rb +9 -2
- data/lib/chef/knife/ionoscloud_k8s_list.rb +0 -1
- data/lib/chef/knife/ionoscloud_kubeconfig_get.rb +0 -1
- data/lib/chef/knife/ionoscloud_label_add.rb +1 -2
- data/lib/chef/knife/ionoscloud_label_list.rb +1 -2
- data/lib/chef/knife/ionoscloud_label_remove.rb +1 -2
- data/lib/chef/knife/ionoscloud_lan_create.rb +14 -7
- data/lib/chef/knife/ionoscloud_lan_delete.rb +4 -4
- data/lib/chef/knife/ionoscloud_lan_list.rb +2 -5
- data/lib/chef/knife/ionoscloud_loadbalancer_create.rb +16 -7
- data/lib/chef/knife/ionoscloud_loadbalancer_delete.rb +10 -3
- data/lib/chef/knife/ionoscloud_loadbalancer_get.rb +13 -4
- data/lib/chef/knife/ionoscloud_loadbalancer_list.rb +1 -2
- data/lib/chef/knife/ionoscloud_loadbalancer_nic_add.rb +14 -5
- data/lib/chef/knife/ionoscloud_loadbalancer_nic_remove.rb +14 -5
- data/lib/chef/knife/ionoscloud_location_list.rb +5 -4
- data/lib/chef/knife/ionoscloud_natgateway_create.rb +71 -0
- data/lib/chef/knife/ionoscloud_natgateway_delete.rb +69 -0
- data/lib/chef/knife/ionoscloud_natgateway_lan_add.rb +82 -0
- data/lib/chef/knife/ionoscloud_natgateway_lan_remove.rb +58 -0
- data/lib/chef/knife/ionoscloud_natgateway_list.rb +49 -0
- data/lib/chef/knife/ionoscloud_natgateway_rule_add.rb +124 -0
- data/lib/chef/knife/ionoscloud_natgateway_rule_list.rb +63 -0
- data/lib/chef/knife/ionoscloud_natgateway_rule_remove.rb +72 -0
- data/lib/chef/knife/ionoscloud_networkloadbalancer_create.rb +95 -0
- data/lib/chef/knife/ionoscloud_networkloadbalancer_delete.rb +81 -0
- data/lib/chef/knife/ionoscloud_networkloadbalancer_list.rb +56 -0
- data/lib/chef/knife/ionoscloud_networkloadbalancer_rule_add.rb +150 -0
- data/lib/chef/knife/ionoscloud_networkloadbalancer_rule_list.rb +63 -0
- data/lib/chef/knife/ionoscloud_networkloadbalancer_rule_remove.rb +78 -0
- data/lib/chef/knife/ionoscloud_networkloadbalancer_rule_target_add.rb +141 -0
- data/lib/chef/knife/ionoscloud_networkloadbalancer_rule_target_list.rb +68 -0
- data/lib/chef/knife/ionoscloud_networkloadbalancer_rule_target_remove.rb +105 -0
- data/lib/chef/knife/ionoscloud_nic_create.rb +38 -19
- data/lib/chef/knife/ionoscloud_nic_delete.rb +11 -5
- data/lib/chef/knife/ionoscloud_nic_list.rb +9 -6
- data/lib/chef/knife/ionoscloud_node_delete.rb +6 -2
- data/lib/chef/knife/ionoscloud_node_list.rb +0 -2
- data/lib/chef/knife/ionoscloud_node_replace.rb +0 -1
- data/lib/chef/knife/ionoscloud_nodepool_create.rb +60 -38
- data/lib/chef/knife/ionoscloud_nodepool_delete.rb +32 -2
- data/lib/chef/knife/ionoscloud_nodepool_lan_add.rb +130 -0
- data/lib/chef/knife/ionoscloud_nodepool_lan_remove.rb +96 -0
- data/lib/chef/knife/ionoscloud_nodepool_list.rb +3 -2
- data/lib/chef/knife/ionoscloud_pcc_create.rb +18 -13
- data/lib/chef/knife/ionoscloud_pcc_delete.rb +10 -3
- data/lib/chef/knife/ionoscloud_pcc_list.rb +1 -2
- data/lib/chef/knife/ionoscloud_request_list.rb +1 -2
- data/lib/chef/knife/ionoscloud_request_status.rb +1 -2
- data/lib/chef/knife/ionoscloud_request_wait.rb +0 -1
- data/lib/chef/knife/ionoscloud_resource_list.rb +0 -1
- data/lib/chef/knife/ionoscloud_s3key_create.rb +7 -4
- data/lib/chef/knife/ionoscloud_s3key_delete.rb +7 -5
- data/lib/chef/knife/ionoscloud_s3key_list.rb +2 -3
- data/lib/chef/knife/{ionoscloud_server_get.rb → ionoscloud_server_console.rb} +11 -10
- data/lib/chef/knife/ionoscloud_server_create.rb +26 -15
- data/lib/chef/knife/ionoscloud_server_delete.rb +10 -3
- data/lib/chef/knife/ionoscloud_server_list.rb +16 -6
- data/lib/chef/knife/ionoscloud_server_reboot.rb +1 -2
- data/lib/chef/knife/ionoscloud_server_resume.rb +43 -0
- data/lib/chef/knife/ionoscloud_server_start.rb +1 -2
- data/lib/chef/knife/ionoscloud_server_stop.rb +1 -2
- data/lib/chef/knife/ionoscloud_server_suspend.rb +44 -0
- data/lib/chef/knife/ionoscloud_server_token.rb +42 -0
- data/lib/chef/knife/ionoscloud_server_upgrade.rb +44 -0
- data/lib/chef/knife/ionoscloud_share_create.rb +12 -8
- data/lib/chef/knife/ionoscloud_share_delete.rb +4 -3
- data/lib/chef/knife/ionoscloud_share_list.rb +0 -1
- data/lib/chef/knife/ionoscloud_snapshot_create.rb +10 -3
- data/lib/chef/knife/ionoscloud_snapshot_delete.rb +7 -3
- data/lib/chef/knife/ionoscloud_snapshot_list.rb +1 -2
- data/lib/chef/knife/ionoscloud_snapshot_restore.rb +2 -3
- data/lib/chef/knife/ionoscloud_template_list.rb +46 -0
- data/lib/chef/knife/ionoscloud_user_create.rb +20 -25
- data/lib/chef/knife/ionoscloud_user_delete.rb +7 -2
- data/lib/chef/knife/ionoscloud_user_list.rb +0 -1
- data/lib/chef/knife/ionoscloud_user_ssourl.rb +1 -2
- data/lib/chef/knife/ionoscloud_volume_attach.rb +1 -2
- data/lib/chef/knife/ionoscloud_volume_create.rb +31 -57
- data/lib/chef/knife/ionoscloud_volume_delete.rb +9 -3
- data/lib/chef/knife/ionoscloud_volume_detach.rb +9 -3
- data/lib/chef/knife/ionoscloud_volume_list.rb +2 -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 -12
- data/spec/chef/knife/ionoscloud_datacenter_delete_spec.rb +5 -8
- data/spec/chef/knife/ionoscloud_datacenter_list_spec.rb +4 -4
- 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 +6 -7
- data/spec/chef/knife/ionoscloud_group_delete_spec.rb +3 -0
- data/spec/chef/knife/ionoscloud_group_get_spec.rb +3 -0
- data/spec/chef/knife/ionoscloud_group_list_spec.rb +11 -2
- data/spec/chef/knife/ionoscloud_group_user_add_spec.rb +0 -3
- data/spec/chef/knife/ionoscloud_group_user_remove_spec.rb +0 -3
- data/spec/chef/knife/ionoscloud_image_list_spec.rb +2 -2
- data/spec/chef/knife/ionoscloud_ipblock_delete_spec.rb +0 -2
- data/spec/chef/knife/ionoscloud_ipblock_list_spec.rb +1 -1
- data/spec/chef/knife/ionoscloud_ipfailover_add_spec.rb +4 -5
- data/spec/chef/knife/ionoscloud_ipfailover_remove_spec.rb +7 -8
- data/spec/chef/knife/ionoscloud_k8s_create_spec.rb +0 -8
- data/spec/chef/knife/ionoscloud_k8s_delete_spec.rb +1 -7
- 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 +3 -4
- data/spec/chef/knife/ionoscloud_lan_delete_spec.rb +5 -7
- data/spec/chef/knife/ionoscloud_lan_list_spec.rb +3 -5
- 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_nodepool_create_spec.rb +20 -13
- data/spec/chef/knife/ionoscloud_nodepool_delete_spec.rb +13 -27
- 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 +8 -11
- data/spec/chef/knife/ionoscloud_pcc_delete_spec.rb +6 -6
- data/spec/chef/knife/ionoscloud_pcc_list_spec.rb +2 -2
- data/spec/chef/knife/ionoscloud_request_list_spec.rb +24 -25
- 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 +63 -5
- 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 +3 -16
- data/spec/chef/knife/ionoscloud_snapshot_delete_spec.rb +5 -17
- 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_create_spec.rb +1 -3
- data/spec/chef/knife/ionoscloud_user_delete_spec.rb +2 -4
- 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 -15
- data/spec/chef/knife/ionoscloud_volume_delete_spec.rb +5 -14
- data/spec/chef/knife/ionoscloud_volume_detach_spec.rb +5 -14
- data/spec/chef/knife/ionoscloud_volume_list_spec.rb +4 -4
- data/spec/spec_helper.rb +270 -116
- metadata +93 -138
- data/docs/subcommands/backupunit_get.md +0 -35
- data/docs/subcommands/backupunit_update.md +0 -41
- data/docs/subcommands/datacenter_get.md +0 -35
- data/docs/subcommands/datacenter_update.md +0 -44
- data/docs/subcommands/firewall_get.md +0 -47
- data/docs/subcommands/firewall_update.md +0 -71
- data/docs/subcommands/group_update.md +0 -65
- data/docs/subcommands/ipblock_get.md +0 -35
- data/docs/subcommands/ipblock_update.md +0 -38
- data/docs/subcommands/k8s_get.md +0 -35
- data/docs/subcommands/k8s_update.md +0 -53
- data/docs/subcommands/lan_get.md +0 -39
- data/docs/subcommands/lan_update.md +0 -51
- data/docs/subcommands/loadbalancer_update.md +0 -48
- data/docs/subcommands/nic_get.md +0 -43
- data/docs/subcommands/nic_update.md +0 -58
- data/docs/subcommands/node_get.md +0 -43
- data/docs/subcommands/nodepool_get.md +0 -39
- data/docs/subcommands/nodepool_update.md +0 -69
- data/docs/subcommands/pcc_get.md +0 -35
- data/docs/subcommands/pcc_update.md +0 -41
- data/docs/subcommands/request_get.md +0 -35
- data/docs/subcommands/s3key_get.md +0 -39
- data/docs/subcommands/server_get.md +0 -39
- data/docs/subcommands/server_update.md +0 -60
- data/docs/subcommands/share_get.md +0 -39
- data/docs/subcommands/share_update.md +0 -45
- data/docs/subcommands/snapshot_get.md +0 -35
- data/docs/subcommands/snapshot_update.md +0 -77
- data/docs/subcommands/user_get.md +0 -35
- data/docs/subcommands/user_update.md +0 -56
- data/docs/subcommands/volume_get.md +0 -39
- data/docs/subcommands/volume_update.md +0 -66
- data/lib/chef/knife/ionoscloud_backupunit_get.rb +0 -33
- data/lib/chef/knife/ionoscloud_backupunit_update.rb +0 -62
- data/lib/chef/knife/ionoscloud_datacenter_get.rb +0 -33
- data/lib/chef/knife/ionoscloud_datacenter_update.rb +0 -67
- data/lib/chef/knife/ionoscloud_firewall_get.rb +0 -50
- data/lib/chef/knife/ionoscloud_firewall_update.rb +0 -131
- data/lib/chef/knife/ionoscloud_group_update.rb +0 -114
- data/lib/chef/knife/ionoscloud_ipblock_get.rb +0 -33
- data/lib/chef/knife/ionoscloud_ipblock_update.rb +0 -57
- data/lib/chef/knife/ionoscloud_k8s_get.rb +0 -33
- data/lib/chef/knife/ionoscloud_k8s_update.rb +0 -99
- data/lib/chef/knife/ionoscloud_lan_get.rb +0 -38
- data/lib/chef/knife/ionoscloud_lan_update.rb +0 -87
- data/lib/chef/knife/ionoscloud_loadbalancer_update.rb +0 -73
- data/lib/chef/knife/ionoscloud_nic_get.rb +0 -47
- data/lib/chef/knife/ionoscloud_nic_update.rb +0 -93
- data/lib/chef/knife/ionoscloud_node_get.rb +0 -47
- data/lib/chef/knife/ionoscloud_nodepool_get.rb +0 -41
- data/lib/chef/knife/ionoscloud_nodepool_update.rb +0 -124
- data/lib/chef/knife/ionoscloud_pcc_get.rb +0 -33
- data/lib/chef/knife/ionoscloud_pcc_update.rb +0 -63
- data/lib/chef/knife/ionoscloud_request_get.rb +0 -40
- data/lib/chef/knife/ionoscloud_s3key_get.rb +0 -38
- data/lib/chef/knife/ionoscloud_server_update.rb +0 -97
- data/lib/chef/knife/ionoscloud_share_get.rb +0 -38
- data/lib/chef/knife/ionoscloud_share_update.rb +0 -70
- data/lib/chef/knife/ionoscloud_snapshot_get.rb +0 -32
- data/lib/chef/knife/ionoscloud_snapshot_update.rb +0 -126
- data/lib/chef/knife/ionoscloud_user_get.rb +0 -32
- data/lib/chef/knife/ionoscloud_user_update.rb +0 -92
- data/lib/chef/knife/ionoscloud_volume_get.rb +0 -36
- data/lib/chef/knife/ionoscloud_volume_update.rb +0 -106
- data/spec/chef/knife/ionoscloud_backupunit_get_spec.rb +0 -65
- data/spec/chef/knife/ionoscloud_backupunit_update_spec.rb +0 -78
- data/spec/chef/knife/ionoscloud_datacenter_get_spec.rb +0 -69
- data/spec/chef/knife/ionoscloud_datacenter_update_spec.rb +0 -82
- data/spec/chef/knife/ionoscloud_firewall_get_spec.rb +0 -76
- data/spec/chef/knife/ionoscloud_firewall_update_spec.rb +0 -116
- data/spec/chef/knife/ionoscloud_group_update_spec.rb +0 -109
- data/spec/chef/knife/ionoscloud_ipblock_get_spec.rb +0 -66
- data/spec/chef/knife/ionoscloud_ipblock_update_spec.rb +0 -79
- data/spec/chef/knife/ionoscloud_k8s_get_spec.rb +0 -73
- data/spec/chef/knife/ionoscloud_k8s_update_spec.rb +0 -115
- data/spec/chef/knife/ionoscloud_lan_get_spec.rb +0 -68
- data/spec/chef/knife/ionoscloud_lan_update_spec.rb +0 -91
- data/spec/chef/knife/ionoscloud_loadbalancer_update_spec.rb +0 -89
- data/spec/chef/knife/ionoscloud_nic_get_spec.rb +0 -70
- data/spec/chef/knife/ionoscloud_nic_update_spec.rb +0 -92
- data/spec/chef/knife/ionoscloud_node_get_spec.rb +0 -70
- data/spec/chef/knife/ionoscloud_nodepool_get_spec.rb +0 -83
- data/spec/chef/knife/ionoscloud_nodepool_update_spec.rb +0 -130
- data/spec/chef/knife/ionoscloud_pcc_get_spec.rb +0 -71
- data/spec/chef/knife/ionoscloud_pcc_update_spec.rb +0 -83
- data/spec/chef/knife/ionoscloud_request_get_spec.rb +0 -69
- data/spec/chef/knife/ionoscloud_s3key_get_spec.rb +0 -66
- data/spec/chef/knife/ionoscloud_server_get_spec.rb +0 -71
- data/spec/chef/knife/ionoscloud_server_update_spec.rb +0 -102
- data/spec/chef/knife/ionoscloud_share_get_spec.rb +0 -66
- data/spec/chef/knife/ionoscloud_share_update_spec.rb +0 -91
- data/spec/chef/knife/ionoscloud_snapshot_get_spec.rb +0 -79
- data/spec/chef/knife/ionoscloud_snapshot_update_spec.rb +0 -113
- data/spec/chef/knife/ionoscloud_user_get_spec.rb +0 -70
- data/spec/chef/knife/ionoscloud_user_update_spec.rb +0 -110
- data/spec/chef/knife/ionoscloud_volume_get_spec.rb +0 -80
- data/spec/chef/knife/ionoscloud_volume_update_spec.rb +0 -115
@@ -12,7 +12,7 @@ describe Chef::Knife::IonoscloudLabelRemove do
|
|
12
12
|
end
|
13
13
|
|
14
14
|
describe '#run' do
|
15
|
-
it 'should call
|
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: :'
|
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
|
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: :'
|
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
|
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: :'
|
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
|
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: :'
|
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
|
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: :'
|
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
|
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: :'
|
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
|
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: :'
|
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
|
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: :'
|
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
|
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: :'
|
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
|
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: :'
|
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
|
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,7 +29,6 @@ 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: #{[]}")
|
33
32
|
|
34
33
|
expected_body = lan.properties.to_hash
|
35
34
|
expected_body.delete(:ipFailover)
|
@@ -41,7 +40,7 @@ describe Chef::Knife::IonoscloudLanCreate do
|
|
41
40
|
{
|
42
41
|
method: 'POST',
|
43
42
|
path: "/datacenters/#{subject_config[:datacenter_id]}/lans",
|
44
|
-
operation: :'
|
43
|
+
operation: :'LansApi.datacenters_lans_post',
|
45
44
|
return_type: 'LanPost',
|
46
45
|
body: { properties: expected_body },
|
47
46
|
result: lan,
|
@@ -49,7 +48,7 @@ describe Chef::Knife::IonoscloudLanCreate do
|
|
49
48
|
{
|
50
49
|
method: 'GET',
|
51
50
|
path: "/datacenters/#{subject_config[:datacenter_id]}/lans/#{lan.id}",
|
52
|
-
operation: :'
|
51
|
+
operation: :'LansApi.datacenters_lans_find_by_id',
|
53
52
|
return_type: 'Lan',
|
54
53
|
result: lan,
|
55
54
|
},
|
@@ -12,7 +12,7 @@ describe Chef::Knife::IonoscloudLanDelete do
|
|
12
12
|
end
|
13
13
|
|
14
14
|
describe '#run' do
|
15
|
-
it 'should call
|
15
|
+
it 'should call LansApi.datacenters_lans_delete when the ID is valid' do
|
16
16
|
lan = lan_mock
|
17
17
|
subject_config = {
|
18
18
|
ionoscloud_username: 'email',
|
@@ -27,8 +27,6 @@ describe Chef::Knife::IonoscloudLanDelete do
|
|
27
27
|
expect(subject).to receive(:puts).with("ID: #{lan.id}")
|
28
28
|
expect(subject).to receive(:puts).with("Name: #{lan.properties.name}")
|
29
29
|
expect(subject).to receive(:puts).with("Public: #{lan.properties.public.to_s}")
|
30
|
-
expect(subject).to receive(:puts).with("PCC: #{lan.properties.pcc}")
|
31
|
-
expect(subject).to receive(:puts).with("IP Failover: #{[]}")
|
32
30
|
expect(subject.ui).to receive(:warn).with("Deleted Lan #{lan.id}. Request ID: ")
|
33
31
|
|
34
32
|
expect(subject.api_client).not_to receive(:wait_for)
|
@@ -39,14 +37,14 @@ describe Chef::Knife::IonoscloudLanDelete do
|
|
39
37
|
{
|
40
38
|
method: 'GET',
|
41
39
|
path: "/datacenters/#{subject_config[:datacenter_id]}/lans/#{lan.id}",
|
42
|
-
operation: :'
|
40
|
+
operation: :'LansApi.datacenters_lans_find_by_id',
|
43
41
|
return_type: 'Lan',
|
44
42
|
result: lan,
|
45
43
|
},
|
46
44
|
{
|
47
45
|
method: 'DELETE',
|
48
46
|
path: "/datacenters/#{subject_config[:datacenter_id]}/lans/#{lan.id}",
|
49
|
-
operation: :'
|
47
|
+
operation: :'LansApi.datacenters_lans_delete',
|
50
48
|
},
|
51
49
|
],
|
52
50
|
)
|
@@ -54,7 +52,7 @@ describe Chef::Knife::IonoscloudLanDelete do
|
|
54
52
|
expect { subject.run }.not_to raise_error(Exception)
|
55
53
|
end
|
56
54
|
|
57
|
-
it 'should not call
|
55
|
+
it 'should not call LansApi.datacenters_lans_delete when the user ID is not valid' do
|
58
56
|
lan_id = 'invalid_id'
|
59
57
|
subject_config = {
|
60
58
|
ionoscloud_username: 'email',
|
@@ -74,7 +72,7 @@ describe Chef::Knife::IonoscloudLanDelete do
|
|
74
72
|
{
|
75
73
|
method: 'GET',
|
76
74
|
path: "/datacenters/#{subject_config[:datacenter_id]}/lans/#{lan_id}",
|
77
|
-
operation: :'
|
75
|
+
operation: :'LansApi.datacenters_lans_find_by_id',
|
78
76
|
return_type: 'Lan',
|
79
77
|
exception: Ionoscloud::ApiError.new(code: 404),
|
80
78
|
},
|
@@ -12,7 +12,7 @@ describe Chef::Knife::IonoscloudLanList do
|
|
12
12
|
end
|
13
13
|
|
14
14
|
describe '#run' do
|
15
|
-
it 'should call
|
15
|
+
it 'should call LansApi.datacenters_lans_get' do
|
16
16
|
lans = lans_mock
|
17
17
|
subject_config = {
|
18
18
|
ionoscloud_username: 'email',
|
@@ -27,7 +27,6 @@ describe Chef::Knife::IonoscloudLanList do
|
|
27
27
|
subject.ui.color('Name', :bold),
|
28
28
|
subject.ui.color('Public', :bold),
|
29
29
|
subject.ui.color('PCC', :bold),
|
30
|
-
subject.ui.color('IP Failover Count', :bold),
|
31
30
|
]
|
32
31
|
|
33
32
|
lans.items.each do |lan|
|
@@ -35,10 +34,9 @@ describe Chef::Knife::IonoscloudLanList do
|
|
35
34
|
lan_list << lan.properties.name
|
36
35
|
lan_list << lan.properties.public.to_s
|
37
36
|
lan_list << lan.properties.pcc
|
38
|
-
lan_list << (lan.properties.ip_failover.nil? ? 0 : lan.properties.ip_failover.length)
|
39
37
|
end
|
40
38
|
|
41
|
-
expect(subject.ui).to receive(:list).with(lan_list, :uneven_columns_across,
|
39
|
+
expect(subject.ui).to receive(:list).with(lan_list, :uneven_columns_across, 4)
|
42
40
|
|
43
41
|
mock_call_api(
|
44
42
|
subject,
|
@@ -46,7 +44,7 @@ describe Chef::Knife::IonoscloudLanList do
|
|
46
44
|
{
|
47
45
|
method: 'GET',
|
48
46
|
path: "/datacenters/#{subject_config[:datacenter_id]}/lans",
|
49
|
-
operation: :'
|
47
|
+
operation: :'LansApi.datacenters_lans_get',
|
50
48
|
return_type: 'Lans',
|
51
49
|
result: lans,
|
52
50
|
},
|
@@ -12,7 +12,7 @@ describe Chef::Knife::IonoscloudLoadbalancerCreate do
|
|
12
12
|
end
|
13
13
|
|
14
14
|
describe '#run' do
|
15
|
-
it 'should call
|
15
|
+
it 'should call LoadBalancersApi.datacenters_loadbalancers_post with the expected arguments and output based on what it receives' do
|
16
16
|
load_balancer = load_balancer_mock
|
17
17
|
subject_config = {
|
18
18
|
ionoscloud_username: 'email',
|
@@ -43,7 +43,7 @@ describe Chef::Knife::IonoscloudLoadbalancerCreate do
|
|
43
43
|
{
|
44
44
|
method: 'POST',
|
45
45
|
path: "/datacenters/#{subject_config[:datacenter_id]}/loadbalancers",
|
46
|
-
operation: :'
|
46
|
+
operation: :'LoadBalancersApi.datacenters_loadbalancers_post',
|
47
47
|
return_type: 'Loadbalancer',
|
48
48
|
body: { properties: load_balancer.properties.to_hash, entities: expected_entities },
|
49
49
|
result: load_balancer,
|
@@ -51,7 +51,7 @@ describe Chef::Knife::IonoscloudLoadbalancerCreate do
|
|
51
51
|
{
|
52
52
|
method: 'GET',
|
53
53
|
path: "/datacenters/#{subject_config[:datacenter_id]}/loadbalancers/#{load_balancer.id}",
|
54
|
-
operation: :'
|
54
|
+
operation: :'LoadBalancersApi.datacenters_loadbalancers_find_by_id',
|
55
55
|
return_type: 'Loadbalancer',
|
56
56
|
result: load_balancer,
|
57
57
|
},
|
@@ -12,7 +12,7 @@ describe Chef::Knife::IonoscloudLoadbalancerDelete do
|
|
12
12
|
end
|
13
13
|
|
14
14
|
describe '#run' do
|
15
|
-
it 'should call
|
15
|
+
it 'should call LoadBalancersApi.datacenters_loadbalancers_delete when the ID is valid' do
|
16
16
|
load_balancer = load_balancer_mock
|
17
17
|
subject_config = {
|
18
18
|
ionoscloud_username: 'email',
|
@@ -41,14 +41,14 @@ describe Chef::Knife::IonoscloudLoadbalancerDelete do
|
|
41
41
|
{
|
42
42
|
method: 'GET',
|
43
43
|
path: "/datacenters/#{subject_config[:datacenter_id]}/loadbalancers/#{load_balancer.id}",
|
44
|
-
operation: :'
|
44
|
+
operation: :'LoadBalancersApi.datacenters_loadbalancers_find_by_id',
|
45
45
|
return_type: 'Loadbalancer',
|
46
46
|
result: load_balancer,
|
47
47
|
},
|
48
48
|
{
|
49
49
|
method: 'DELETE',
|
50
50
|
path: "/datacenters/#{subject_config[:datacenter_id]}/loadbalancers/#{load_balancer.id}",
|
51
|
-
operation: :'
|
51
|
+
operation: :'LoadBalancersApi.datacenters_loadbalancers_delete',
|
52
52
|
},
|
53
53
|
],
|
54
54
|
)
|
@@ -56,7 +56,7 @@ describe Chef::Knife::IonoscloudLoadbalancerDelete do
|
|
56
56
|
expect { subject.run }.not_to raise_error(Exception)
|
57
57
|
end
|
58
58
|
|
59
|
-
it 'should not call
|
59
|
+
it 'should not call LoadBalancersApi.datacenters_loadbalancers_delete when the ID is not valid' do
|
60
60
|
load_balancer_id = 'invalid_id'
|
61
61
|
subject_config = {
|
62
62
|
ionoscloud_username: 'email',
|
@@ -76,7 +76,7 @@ describe Chef::Knife::IonoscloudLoadbalancerDelete do
|
|
76
76
|
{
|
77
77
|
method: 'GET',
|
78
78
|
path: "/datacenters/#{subject_config[:datacenter_id]}/loadbalancers/#{load_balancer_id}",
|
79
|
-
operation: :'
|
79
|
+
operation: :'LoadBalancersApi.datacenters_loadbalancers_find_by_id',
|
80
80
|
return_type: 'Loadbalancer',
|
81
81
|
exception: Ionoscloud::ApiError.new(code: 404),
|
82
82
|
},
|
@@ -12,7 +12,7 @@ describe Chef::Knife::IonoscloudLoadbalancerGet do
|
|
12
12
|
end
|
13
13
|
|
14
14
|
describe '#run' do
|
15
|
-
it 'should call
|
15
|
+
it 'should call LoadBalancersApi.datacenters_loadbalancers_get' do
|
16
16
|
load_balancer = load_balancer_mock
|
17
17
|
subject_config = {
|
18
18
|
ionoscloud_username: 'email',
|
@@ -37,7 +37,7 @@ describe Chef::Knife::IonoscloudLoadbalancerGet do
|
|
37
37
|
{
|
38
38
|
method: 'GET',
|
39
39
|
path: "/datacenters/#{subject_config[:datacenter_id]}/loadbalancers/#{subject_config[:loadbalancer_id]}",
|
40
|
-
operation: :'
|
40
|
+
operation: :'LoadBalancersApi.datacenters_loadbalancers_find_by_id',
|
41
41
|
return_type: 'Loadbalancer',
|
42
42
|
result: load_balancer,
|
43
43
|
},
|
@@ -12,7 +12,7 @@ describe Chef::Knife::IonoscloudLoadbalancerList do
|
|
12
12
|
end
|
13
13
|
|
14
14
|
describe '#run' do
|
15
|
-
it 'should call
|
15
|
+
it 'should call LoadBalancersApi.datacenters_loadbalancers_get' do
|
16
16
|
load_balancers = load_balancers_mock
|
17
17
|
subject_config = {
|
18
18
|
ionoscloud_username: 'email',
|
@@ -43,7 +43,7 @@ describe Chef::Knife::IonoscloudLoadbalancerList do
|
|
43
43
|
{
|
44
44
|
method: 'GET',
|
45
45
|
path: "/datacenters/#{subject_config[:datacenter_id]}/loadbalancers",
|
46
|
-
operation: :'
|
46
|
+
operation: :'LoadBalancersApi.datacenters_loadbalancers_get',
|
47
47
|
return_type: 'Loadbalancers',
|
48
48
|
result: load_balancers,
|
49
49
|
},
|
@@ -12,7 +12,7 @@ describe Chef::Knife::IonoscloudLoadbalancerNicAdd do
|
|
12
12
|
end
|
13
13
|
|
14
14
|
describe '#run' do
|
15
|
-
it 'should call
|
15
|
+
it 'should call LoadBalancersApi.datacenters_loadbalancers_delete when the ID is valid' do
|
16
16
|
load_balancer = load_balancer_mock
|
17
17
|
nic = nic_mock
|
18
18
|
subject_config = {
|
@@ -43,14 +43,14 @@ describe Chef::Knife::IonoscloudLoadbalancerNicAdd do
|
|
43
43
|
{
|
44
44
|
method: 'POST',
|
45
45
|
path: "/datacenters/#{subject_config[:datacenter_id]}/loadbalancers/#{load_balancer.id}/balancednics",
|
46
|
-
operation: :'
|
46
|
+
operation: :'LoadBalancersApi.datacenters_loadbalancers_balancednics_post',
|
47
47
|
body: { id: nic.id },
|
48
48
|
return_type: 'Nic',
|
49
49
|
},
|
50
50
|
{
|
51
51
|
method: 'GET',
|
52
52
|
path: "/datacenters/#{subject_config[:datacenter_id]}/loadbalancers/#{load_balancer.id}",
|
53
|
-
operation: :'
|
53
|
+
operation: :'LoadBalancersApi.datacenters_loadbalancers_find_by_id',
|
54
54
|
return_type: 'Loadbalancer',
|
55
55
|
result: load_balancer,
|
56
56
|
},
|
@@ -60,7 +60,7 @@ describe Chef::Knife::IonoscloudLoadbalancerNicAdd do
|
|
60
60
|
expect { subject.run }.not_to raise_error(Exception)
|
61
61
|
end
|
62
62
|
|
63
|
-
it 'should not call
|
63
|
+
it 'should not call LoadBalancersApi.datacenters_loadbalancers_delete when the ID is not valid' do
|
64
64
|
load_balancer = load_balancer_mock
|
65
65
|
nic_id = 'invalid_id'
|
66
66
|
subject_config = {
|
@@ -89,7 +89,7 @@ describe Chef::Knife::IonoscloudLoadbalancerNicAdd do
|
|
89
89
|
{
|
90
90
|
method: 'POST',
|
91
91
|
path: "/datacenters/#{subject_config[:datacenter_id]}/loadbalancers/#{subject_config[:loadbalancer_id]}/balancednics",
|
92
|
-
operation: :'
|
92
|
+
operation: :'LoadBalancersApi.datacenters_loadbalancers_balancednics_post',
|
93
93
|
body: { id: nic_id },
|
94
94
|
return_type: 'Nic',
|
95
95
|
exception: Ionoscloud::ApiError.new(code: 404),
|
@@ -97,7 +97,7 @@ describe Chef::Knife::IonoscloudLoadbalancerNicAdd do
|
|
97
97
|
{
|
98
98
|
method: 'GET',
|
99
99
|
path: "/datacenters/#{subject_config[:datacenter_id]}/loadbalancers/#{load_balancer.id}",
|
100
|
-
operation: :'
|
100
|
+
operation: :'LoadBalancersApi.datacenters_loadbalancers_find_by_id',
|
101
101
|
return_type: 'Loadbalancer',
|
102
102
|
result: load_balancer,
|
103
103
|
},
|
@@ -12,7 +12,7 @@ describe Chef::Knife::IonoscloudLoadbalancerNicRemove do
|
|
12
12
|
end
|
13
13
|
|
14
14
|
describe '#run' do
|
15
|
-
it 'should call
|
15
|
+
it 'should call LoadBalancersApi.datacenters_loadbalancers_delete when the ID is valid' do
|
16
16
|
load_balancer = load_balancer_mock
|
17
17
|
nic = nic_mock
|
18
18
|
subject_config = {
|
@@ -43,12 +43,12 @@ describe Chef::Knife::IonoscloudLoadbalancerNicRemove do
|
|
43
43
|
{
|
44
44
|
method: 'DELETE',
|
45
45
|
path: "/datacenters/#{subject_config[:datacenter_id]}/loadbalancers/#{load_balancer.id}/balancednics/#{nic.id}",
|
46
|
-
operation: :'
|
46
|
+
operation: :'LoadBalancersApi.datacenters_loadbalancers_balancednics_delete',
|
47
47
|
},
|
48
48
|
{
|
49
49
|
method: 'GET',
|
50
50
|
path: "/datacenters/#{subject_config[:datacenter_id]}/loadbalancers/#{load_balancer.id}",
|
51
|
-
operation: :'
|
51
|
+
operation: :'LoadBalancersApi.datacenters_loadbalancers_find_by_id',
|
52
52
|
return_type: 'Loadbalancer',
|
53
53
|
result: load_balancer,
|
54
54
|
},
|
@@ -58,7 +58,7 @@ describe Chef::Knife::IonoscloudLoadbalancerNicRemove do
|
|
58
58
|
expect { subject.run }.not_to raise_error(Exception)
|
59
59
|
end
|
60
60
|
|
61
|
-
it 'should not call
|
61
|
+
it 'should not call LoadBalancersApi.datacenters_loadbalancers_delete when the ID is not valid' do
|
62
62
|
load_balancer = load_balancer_mock
|
63
63
|
nic_id = 'invalid_id'
|
64
64
|
subject_config = {
|
@@ -87,13 +87,13 @@ describe Chef::Knife::IonoscloudLoadbalancerNicRemove do
|
|
87
87
|
{
|
88
88
|
method: 'DELETE',
|
89
89
|
path: "/datacenters/#{subject_config[:datacenter_id]}/loadbalancers/#{subject_config[:loadbalancer_id]}/balancednics/#{nic_id}",
|
90
|
-
operation: :'
|
90
|
+
operation: :'LoadBalancersApi.datacenters_loadbalancers_balancednics_delete',
|
91
91
|
exception: Ionoscloud::ApiError.new(code: 404),
|
92
92
|
},
|
93
93
|
{
|
94
94
|
method: 'GET',
|
95
95
|
path: "/datacenters/#{subject_config[:datacenter_id]}/loadbalancers/#{load_balancer.id}",
|
96
|
-
operation: :'
|
96
|
+
operation: :'LoadBalancersApi.datacenters_loadbalancers_find_by_id',
|
97
97
|
return_type: 'Loadbalancer',
|
98
98
|
result: load_balancer,
|
99
99
|
},
|
@@ -12,7 +12,7 @@ describe Chef::Knife::IonoscloudLocationList do
|
|
12
12
|
end
|
13
13
|
|
14
14
|
describe '#run' do
|
15
|
-
it 'should call
|
15
|
+
it 'should call LocationsApi.locations_get' do
|
16
16
|
locations = locations_mock
|
17
17
|
subject_config = {
|
18
18
|
ionoscloud_username: 'email',
|
@@ -24,11 +24,13 @@ describe Chef::Knife::IonoscloudLocationList do
|
|
24
24
|
location_list = [
|
25
25
|
subject.ui.color('ID', :bold),
|
26
26
|
subject.ui.color('Name', :bold),
|
27
|
+
subject.ui.color('CPU Architectures', :bold),
|
27
28
|
locations.items.first.id,
|
28
29
|
locations.items.first.properties.name,
|
30
|
+
locations.items.first.properties.cpu_architecture.map { |arch| arch.cpu_family }
|
29
31
|
]
|
30
32
|
|
31
|
-
expect(subject.ui).to receive(:list).with(location_list, :uneven_columns_across,
|
33
|
+
expect(subject.ui).to receive(:list).with(location_list, :uneven_columns_across, 3)
|
32
34
|
|
33
35
|
mock_call_api(
|
34
36
|
subject,
|
@@ -36,7 +38,7 @@ describe Chef::Knife::IonoscloudLocationList do
|
|
36
38
|
{
|
37
39
|
method: 'GET',
|
38
40
|
path: '/locations',
|
39
|
-
operation: :'
|
41
|
+
operation: :'LocationsApi.locations_get',
|
40
42
|
return_type: 'Locations',
|
41
43
|
result: locations,
|
42
44
|
},
|
@@ -0,0 +1,77 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'ionoscloud_natgateway_create'
|
3
|
+
|
4
|
+
Chef::Knife::IonoscloudNatgatewayCreate.load_deps
|
5
|
+
|
6
|
+
describe Chef::Knife::IonoscloudNatgatewayCreate do
|
7
|
+
before :each do
|
8
|
+
subject { Chef::Knife::IonoscloudNatgatewayCreate.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 NATGatewaysApi.datacenters_natgateways_post with the expected arguments and output based on what it receives' do
|
16
|
+
natgateway = natgateway_mock
|
17
|
+
subject_config = {
|
18
|
+
ionoscloud_username: 'email',
|
19
|
+
ionoscloud_password: 'password',
|
20
|
+
datacenter_id: 'datacenter_id',
|
21
|
+
name: natgateway.properties.name,
|
22
|
+
ips: natgateway.properties.public_ips.join(','),
|
23
|
+
}.each do |key, value|
|
24
|
+
subject.config[key] = value
|
25
|
+
end
|
26
|
+
|
27
|
+
expect(subject).to receive(:puts).with("ID: #{natgateway.id}")
|
28
|
+
expect(subject).to receive(:puts).with("Name: #{natgateway.properties.name}")
|
29
|
+
expect(subject).to receive(:puts).with("IPS: #{natgateway.properties.public_ips}")
|
30
|
+
|
31
|
+
expected_properties = natgateway.properties.to_hash
|
32
|
+
expected_properties.delete(:lans)
|
33
|
+
|
34
|
+
mock_wait_for(subject)
|
35
|
+
mock_call_api(
|
36
|
+
subject,
|
37
|
+
[
|
38
|
+
{
|
39
|
+
method: 'POST',
|
40
|
+
path: "/datacenters/#{subject_config[:datacenter_id]}/natgateways",
|
41
|
+
operation: :'NATGatewaysApi.datacenters_natgateways_post',
|
42
|
+
return_type: 'NatGateway',
|
43
|
+
body: { properties: expected_properties },
|
44
|
+
result: natgateway,
|
45
|
+
},
|
46
|
+
{
|
47
|
+
method: 'GET',
|
48
|
+
path: "/datacenters/#{subject_config[:datacenter_id]}/natgateways/#{natgateway.id}",
|
49
|
+
operation: :'NATGatewaysApi.datacenters_natgateways_find_by_nat_gateway_id',
|
50
|
+
return_type: 'NatGateway',
|
51
|
+
result: natgateway,
|
52
|
+
},
|
53
|
+
],
|
54
|
+
)
|
55
|
+
|
56
|
+
expect { subject.run }.not_to raise_error(Exception)
|
57
|
+
end
|
58
|
+
|
59
|
+
it 'should not make any call if any required option is missing' do
|
60
|
+
required_options = subject.instance_variable_get(:@required_options)
|
61
|
+
|
62
|
+
arrays_without_one_element(required_options).each do |test_case|
|
63
|
+
|
64
|
+
test_case[:array].each { |value| subject.config[value] = 'test' }
|
65
|
+
|
66
|
+
expect(subject).to receive(:puts).with("Missing required parameters #{test_case[:removed]}")
|
67
|
+
expect(subject.api_client).not_to receive(:call_api)
|
68
|
+
|
69
|
+
expect { subject.run }.to raise_error(SystemExit) do |error|
|
70
|
+
expect(error.status).to eq(1)
|
71
|
+
end
|
72
|
+
|
73
|
+
required_options.each { |value| subject.config[value] = nil }
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|