knife-ionoscloud 6.0.0 → 6.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/IONOS.CLOUD.BLU.svg +1 -0
- data/README.md +9 -0
- data/docs/README.md +6 -0
- data/docs/changelog.md +10 -0
- data/docs/docs_generator.rb +44 -9
- data/docs/subcommands/{backupunit_create.md → backup/backupunit_create.md} +1 -1
- data/docs/subcommands/{backupunit_delete.md → backup/backupunit_delete.md} +0 -0
- data/docs/subcommands/{backupunit_get.md → backup/backupunit_get.md} +0 -0
- data/docs/subcommands/{backupunit_list.md → backup/backupunit_list.md} +0 -0
- data/docs/subcommands/{backupunit_ssourl.md → backup/backupunit_ssourl.md} +0 -0
- data/docs/subcommands/{backupunit_update.md → backup/backupunit_update.md} +0 -0
- data/docs/subcommands/{composite_server_create.md → compute-engine/composite_server_create.md} +9 -3
- data/docs/subcommands/{cube_server_create.md → compute-engine/cube_server_create.md} +0 -0
- data/docs/subcommands/{datacenter_create.md → compute-engine/datacenter_create.md} +0 -0
- data/docs/subcommands/{datacenter_delete.md → compute-engine/datacenter_delete.md} +0 -0
- data/docs/subcommands/{datacenter_get.md → compute-engine/datacenter_get.md} +0 -0
- data/docs/subcommands/{datacenter_list.md → compute-engine/datacenter_list.md} +0 -0
- data/docs/subcommands/{datacenter_update.md → compute-engine/datacenter_update.md} +0 -0
- data/docs/subcommands/{firewall_create.md → compute-engine/firewall_create.md} +6 -3
- data/docs/subcommands/{firewall_delete.md → compute-engine/firewall_delete.md} +0 -0
- data/docs/subcommands/{firewall_get.md → compute-engine/firewall_get.md} +0 -0
- data/docs/subcommands/{firewall_list.md → compute-engine/firewall_list.md} +0 -0
- data/docs/subcommands/{firewall_update.md → compute-engine/firewall_update.md} +0 -0
- data/docs/subcommands/{flowlog_create.md → compute-engine/flowlog_create.md} +0 -0
- data/docs/subcommands/{flowlog_delete.md → compute-engine/flowlog_delete.md} +0 -0
- data/docs/subcommands/{flowlog_get.md → compute-engine/flowlog_get.md} +0 -0
- data/docs/subcommands/{flowlog_list.md → compute-engine/flowlog_list.md} +0 -0
- data/docs/subcommands/{flowlog_update.md → compute-engine/flowlog_update.md} +0 -0
- data/docs/subcommands/{image_list.md → compute-engine/image_list.md} +0 -0
- data/docs/subcommands/{ipblock_create.md → compute-engine/ipblock_create.md} +0 -0
- data/docs/subcommands/{ipblock_delete.md → compute-engine/ipblock_delete.md} +0 -0
- data/docs/subcommands/{ipblock_get.md → compute-engine/ipblock_get.md} +0 -0
- data/docs/subcommands/{ipblock_list.md → compute-engine/ipblock_list.md} +0 -0
- data/docs/subcommands/{ipblock_update.md → compute-engine/ipblock_update.md} +0 -0
- data/docs/subcommands/{ipfailover_add.md → compute-engine/ipfailover_add.md} +0 -0
- data/docs/subcommands/{ipfailover_remove.md → compute-engine/ipfailover_remove.md} +0 -0
- data/docs/subcommands/{label_add.md → compute-engine/label_add.md} +0 -0
- data/docs/subcommands/{label_list.md → compute-engine/label_list.md} +0 -0
- data/docs/subcommands/{label_remove.md → compute-engine/label_remove.md} +0 -0
- data/docs/subcommands/{lan_create.md → compute-engine/lan_create.md} +0 -0
- data/docs/subcommands/{lan_delete.md → compute-engine/lan_delete.md} +0 -0
- data/docs/subcommands/{lan_get.md → compute-engine/lan_get.md} +0 -0
- data/docs/subcommands/{lan_list.md → compute-engine/lan_list.md} +0 -0
- data/docs/subcommands/{lan_update.md → compute-engine/lan_update.md} +1 -4
- data/docs/subcommands/{loadbalancer_create.md → compute-engine/loadbalancer_create.md} +1 -1
- data/docs/subcommands/{loadbalancer_delete.md → compute-engine/loadbalancer_delete.md} +0 -0
- data/docs/subcommands/{loadbalancer_get.md → compute-engine/loadbalancer_get.md} +0 -0
- data/docs/subcommands/{loadbalancer_list.md → compute-engine/loadbalancer_list.md} +0 -0
- data/docs/subcommands/{loadbalancer_nic_add.md → compute-engine/loadbalancer_nic_add.md} +0 -0
- data/docs/subcommands/{loadbalancer_nic_remove.md → compute-engine/loadbalancer_nic_remove.md} +0 -0
- data/docs/subcommands/{loadbalancer_update.md → compute-engine/loadbalancer_update.md} +0 -0
- data/docs/subcommands/{location_list.md → compute-engine/location_list.md} +0 -0
- data/docs/subcommands/{natgateway_create.md → compute-engine/natgateway_create.md} +0 -0
- data/docs/subcommands/{natgateway_delete.md → compute-engine/natgateway_delete.md} +0 -0
- data/docs/subcommands/{natgateway_get.md → compute-engine/natgateway_get.md} +0 -0
- data/docs/subcommands/{natgateway_lan_add.md → compute-engine/natgateway_lan_add.md} +0 -0
- data/docs/subcommands/{natgateway_lan_remove.md → compute-engine/natgateway_lan_remove.md} +0 -0
- data/docs/subcommands/{natgateway_list.md → compute-engine/natgateway_list.md} +0 -0
- data/docs/subcommands/{natgateway_rule_add.md → compute-engine/natgateway_rule_add.md} +0 -0
- data/docs/subcommands/{natgateway_rule_list.md → compute-engine/natgateway_rule_list.md} +0 -0
- data/docs/subcommands/{natgateway_rule_remove.md → compute-engine/natgateway_rule_remove.md} +0 -0
- data/docs/subcommands/{natgateway_rule_update.md → compute-engine/natgateway_rule_update.md} +0 -0
- data/docs/subcommands/{natgateway_update.md → compute-engine/natgateway_update.md} +0 -0
- data/docs/subcommands/{networkloadbalancer_create.md → compute-engine/networkloadbalancer_create.md} +0 -0
- data/docs/subcommands/{networkloadbalancer_delete.md → compute-engine/networkloadbalancer_delete.md} +0 -0
- data/docs/subcommands/{networkloadbalancer_get.md → compute-engine/networkloadbalancer_get.md} +0 -0
- data/docs/subcommands/{networkloadbalancer_list.md → compute-engine/networkloadbalancer_list.md} +0 -0
- data/docs/subcommands/{networkloadbalancer_rule_add.md → compute-engine/networkloadbalancer_rule_add.md} +0 -0
- data/docs/subcommands/{networkloadbalancer_rule_list.md → compute-engine/networkloadbalancer_rule_list.md} +0 -0
- data/docs/subcommands/{networkloadbalancer_rule_remove.md → compute-engine/networkloadbalancer_rule_remove.md} +0 -0
- data/docs/subcommands/{networkloadbalancer_rule_target_add.md → compute-engine/networkloadbalancer_rule_target_add.md} +0 -0
- data/docs/subcommands/{networkloadbalancer_rule_target_list.md → compute-engine/networkloadbalancer_rule_target_list.md} +0 -0
- data/docs/subcommands/{networkloadbalancer_rule_target_remove.md → compute-engine/networkloadbalancer_rule_target_remove.md} +0 -0
- data/docs/subcommands/{networkloadbalancer_rule_update.md → compute-engine/networkloadbalancer_rule_update.md} +0 -0
- data/docs/subcommands/{networkloadbalancer_update.md → compute-engine/networkloadbalancer_update.md} +0 -0
- data/docs/subcommands/{nic_create.md → compute-engine/nic_create.md} +4 -4
- data/docs/subcommands/{nic_delete.md → compute-engine/nic_delete.md} +1 -1
- data/docs/subcommands/{nic_get.md → compute-engine/nic_get.md} +0 -0
- data/docs/subcommands/{nic_list.md → compute-engine/nic_list.md} +0 -0
- data/docs/subcommands/{nic_update.md → compute-engine/nic_update.md} +3 -3
- data/docs/subcommands/{pcc_create.md → compute-engine/pcc_create.md} +0 -0
- data/docs/subcommands/{pcc_delete.md → compute-engine/pcc_delete.md} +0 -0
- data/docs/subcommands/{pcc_get.md → compute-engine/pcc_get.md} +0 -0
- data/docs/subcommands/{pcc_list.md → compute-engine/pcc_list.md} +0 -0
- data/docs/subcommands/{pcc_update.md → compute-engine/pcc_update.md} +0 -0
- data/docs/subcommands/{request_get.md → compute-engine/request_get.md} +0 -0
- data/docs/subcommands/{request_list.md → compute-engine/request_list.md} +0 -0
- data/docs/subcommands/{request_status.md → compute-engine/request_status.md} +0 -0
- data/docs/subcommands/{request_wait.md → compute-engine/request_wait.md} +0 -0
- data/docs/subcommands/{server_console.md → compute-engine/server_console.md} +0 -0
- data/docs/subcommands/{server_create.md → compute-engine/server_create.md} +0 -0
- data/docs/subcommands/{server_delete.md → compute-engine/server_delete.md} +0 -0
- data/docs/subcommands/{server_get.md → compute-engine/server_get.md} +0 -0
- data/docs/subcommands/{server_list.md → compute-engine/server_list.md} +4 -1
- data/docs/subcommands/{server_reboot.md → compute-engine/server_reboot.md} +0 -0
- data/docs/subcommands/{server_resume.md → compute-engine/server_resume.md} +0 -0
- data/docs/subcommands/{server_start.md → compute-engine/server_start.md} +0 -0
- data/docs/subcommands/{server_stop.md → compute-engine/server_stop.md} +0 -0
- data/docs/subcommands/{server_suspend.md → compute-engine/server_suspend.md} +0 -0
- data/docs/subcommands/{server_token.md → compute-engine/server_token.md} +0 -0
- data/docs/subcommands/{server_update.md → compute-engine/server_update.md} +0 -0
- data/docs/subcommands/{server_upgrade.md → compute-engine/server_upgrade.md} +0 -0
- data/docs/subcommands/{snapshot_create.md → compute-engine/snapshot_create.md} +0 -0
- data/docs/subcommands/{snapshot_delete.md → compute-engine/snapshot_delete.md} +0 -0
- data/docs/subcommands/{snapshot_get.md → compute-engine/snapshot_get.md} +0 -0
- data/docs/subcommands/{snapshot_list.md → compute-engine/snapshot_list.md} +0 -0
- data/docs/subcommands/{snapshot_restore.md → compute-engine/snapshot_restore.md} +0 -0
- data/docs/subcommands/{snapshot_update.md → compute-engine/snapshot_update.md} +10 -10
- data/docs/subcommands/{template_list.md → compute-engine/template_list.md} +0 -0
- data/docs/subcommands/{volume_attach.md → compute-engine/volume_attach.md} +0 -0
- data/docs/subcommands/{volume_create.md → compute-engine/volume_create.md} +2 -23
- data/docs/subcommands/{volume_delete.md → compute-engine/volume_delete.md} +0 -0
- data/docs/subcommands/{volume_detach.md → compute-engine/volume_detach.md} +0 -0
- data/docs/subcommands/{volume_get.md → compute-engine/volume_get.md} +0 -0
- data/docs/subcommands/{volume_list.md → compute-engine/volume_list.md} +0 -0
- data/docs/subcommands/{volume_update.md → compute-engine/volume_update.md} +0 -0
- data/docs/subcommands/dbaas-postgres/dbaas_postgres_backup_get.md +38 -0
- data/docs/subcommands/dbaas-postgres/dbaas_postgres_backup_list.md +38 -0
- data/docs/subcommands/dbaas-postgres/dbaas_postgres_cluster_create.md +100 -0
- data/docs/subcommands/dbaas-postgres/dbaas_postgres_cluster_delete.md +34 -0
- data/docs/subcommands/dbaas-postgres/dbaas_postgres_cluster_get.md +38 -0
- data/docs/subcommands/dbaas-postgres/dbaas_postgres_cluster_list.md +34 -0
- data/docs/subcommands/dbaas-postgres/dbaas_postgres_cluster_restore.md +44 -0
- data/docs/subcommands/dbaas-postgres/dbaas_postgres_cluster_update.md +65 -0
- data/docs/subcommands/dbaas-postgres/dbaas_postgres_logs_get.md +47 -0
- data/docs/subcommands/dbaas-postgres/dbaas_postgres_version_list.md +38 -0
- data/docs/subcommands/{k8s_create.md → kubernetes/k8s_create.md} +5 -5
- data/docs/subcommands/{k8s_delete.md → kubernetes/k8s_delete.md} +0 -0
- data/docs/subcommands/{k8s_get.md → kubernetes/k8s_get.md} +0 -0
- data/docs/subcommands/{k8s_list.md → kubernetes/k8s_list.md} +0 -0
- data/docs/subcommands/{k8s_update.md → kubernetes/k8s_update.md} +0 -0
- data/docs/subcommands/{kubeconfig_get.md → kubernetes/kubeconfig_get.md} +0 -0
- data/docs/subcommands/{node_delete.md → kubernetes/node_delete.md} +0 -0
- data/docs/subcommands/{node_get.md → kubernetes/node_get.md} +0 -0
- data/docs/subcommands/{node_list.md → kubernetes/node_list.md} +0 -0
- data/docs/subcommands/{node_replace.md → kubernetes/node_replace.md} +0 -0
- data/docs/subcommands/{nodepool_create.md → kubernetes/nodepool_create.md} +4 -4
- data/docs/subcommands/{nodepool_delete.md → kubernetes/nodepool_delete.md} +0 -0
- data/docs/subcommands/{nodepool_get.md → kubernetes/nodepool_get.md} +0 -0
- data/docs/subcommands/{nodepool_lan_add.md → kubernetes/nodepool_lan_add.md} +0 -0
- data/docs/subcommands/{nodepool_lan_remove.md → kubernetes/nodepool_lan_remove.md} +0 -0
- data/docs/subcommands/{nodepool_list.md → kubernetes/nodepool_list.md} +0 -0
- data/docs/subcommands/{nodepool_update.md → kubernetes/nodepool_update.md} +0 -0
- data/docs/subcommands/{contract_list.md → user/contract_list.md} +0 -0
- data/docs/subcommands/{group_create.md → user/group_create.md} +10 -1
- data/docs/subcommands/{group_delete.md → user/group_delete.md} +0 -0
- data/docs/subcommands/{group_get.md → user/group_get.md} +0 -0
- data/docs/subcommands/{group_list.md → user/group_list.md} +0 -0
- data/docs/subcommands/{group_update.md → user/group_update.md} +10 -1
- data/docs/subcommands/{group_user_add.md → user/group_user_add.md} +0 -0
- data/docs/subcommands/{group_user_remove.md → user/group_user_remove.md} +0 -0
- data/docs/subcommands/{resource_list.md → user/resource_list.md} +0 -0
- data/docs/subcommands/{s3key_create.md → user/s3key_create.md} +0 -0
- data/docs/subcommands/{s3key_delete.md → user/s3key_delete.md} +0 -0
- data/docs/subcommands/{s3key_get.md → user/s3key_get.md} +0 -0
- data/docs/subcommands/{s3key_list.md → user/s3key_list.md} +0 -0
- data/docs/subcommands/{share_create.md → user/share_create.md} +1 -1
- data/docs/subcommands/{share_delete.md → user/share_delete.md} +2 -2
- data/docs/subcommands/{share_get.md → user/share_get.md} +0 -0
- data/docs/subcommands/{share_list.md → user/share_list.md} +0 -0
- data/docs/subcommands/{share_update.md → user/share_update.md} +0 -0
- data/docs/subcommands/{user_create.md → user/user_create.md} +3 -9
- data/docs/subcommands/{user_delete.md → user/user_delete.md} +0 -0
- data/docs/subcommands/{user_get.md → user/user_get.md} +0 -0
- data/docs/subcommands/{user_list.md → user/user_list.md} +0 -0
- data/docs/subcommands/{user_ssourl.md → user/user_ssourl.md} +0 -0
- data/docs/subcommands/{user_update.md → user/user_update.md} +0 -0
- data/docs/summary.md +167 -152
- data/docs/templates/summary.mustache +6 -3
- data/knife-ionoscloud.gemspec +1 -0
- data/lib/chef/knife/ionoscloud_backupunit_create.rb +1 -2
- data/lib/chef/knife/ionoscloud_backupunit_delete.rb +1 -2
- data/lib/chef/knife/ionoscloud_backupunit_get.rb +1 -2
- 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_backupunit_update.rb +1 -2
- data/lib/chef/knife/ionoscloud_base.rb +57 -0
- data/lib/chef/knife/ionoscloud_composite_server_create.rb +1 -2
- data/lib/chef/knife/ionoscloud_contract_list.rb +1 -2
- data/lib/chef/knife/ionoscloud_cube_server_create.rb +1 -2
- data/lib/chef/knife/ionoscloud_datacenter_create.rb +1 -2
- data/lib/chef/knife/ionoscloud_datacenter_delete.rb +1 -2
- data/lib/chef/knife/ionoscloud_datacenter_get.rb +1 -2
- data/lib/chef/knife/ionoscloud_datacenter_list.rb +1 -2
- data/lib/chef/knife/ionoscloud_datacenter_update.rb +1 -2
- data/lib/chef/knife/ionoscloud_dbaas_postgres_backup_get.rb +33 -0
- data/lib/chef/knife/ionoscloud_dbaas_postgres_backup_list.rb +59 -0
- data/lib/chef/knife/ionoscloud_dbaas_postgres_cluster_create.rb +158 -0
- data/lib/chef/knife/ionoscloud_dbaas_postgres_cluster_delete.rb +49 -0
- data/lib/chef/knife/ionoscloud_dbaas_postgres_cluster_get.rb +34 -0
- data/lib/chef/knife/ionoscloud_dbaas_postgres_cluster_list.rb +53 -0
- data/lib/chef/knife/ionoscloud_dbaas_postgres_cluster_restore.rb +48 -0
- data/lib/chef/knife/ionoscloud_dbaas_postgres_cluster_update.rb +102 -0
- data/lib/chef/knife/ionoscloud_dbaas_postgres_logs_get.rb +59 -0
- data/lib/chef/knife/ionoscloud_dbaas_postgres_version_list.rb +49 -0
- data/lib/chef/knife/ionoscloud_firewall_create.rb +1 -2
- data/lib/chef/knife/ionoscloud_firewall_delete.rb +1 -2
- data/lib/chef/knife/ionoscloud_firewall_get.rb +1 -2
- data/lib/chef/knife/ionoscloud_firewall_list.rb +1 -2
- data/lib/chef/knife/ionoscloud_firewall_update.rb +1 -2
- data/lib/chef/knife/ionoscloud_flowlog_create.rb +1 -2
- data/lib/chef/knife/ionoscloud_flowlog_delete.rb +1 -2
- data/lib/chef/knife/ionoscloud_flowlog_get.rb +1 -2
- data/lib/chef/knife/ionoscloud_flowlog_list.rb +1 -2
- data/lib/chef/knife/ionoscloud_flowlog_update.rb +1 -2
- data/lib/chef/knife/ionoscloud_group_create.rb +1 -2
- data/lib/chef/knife/ionoscloud_group_delete.rb +1 -2
- data/lib/chef/knife/ionoscloud_group_get.rb +1 -2
- data/lib/chef/knife/ionoscloud_group_list.rb +1 -2
- data/lib/chef/knife/ionoscloud_group_update.rb +1 -2
- data/lib/chef/knife/ionoscloud_group_user_add.rb +1 -2
- data/lib/chef/knife/ionoscloud_group_user_remove.rb +1 -2
- data/lib/chef/knife/ionoscloud_image_list.rb +1 -2
- data/lib/chef/knife/ionoscloud_ipblock_create.rb +1 -2
- data/lib/chef/knife/ionoscloud_ipblock_delete.rb +1 -2
- data/lib/chef/knife/ionoscloud_ipblock_get.rb +1 -2
- data/lib/chef/knife/ionoscloud_ipblock_list.rb +1 -2
- data/lib/chef/knife/ionoscloud_ipblock_update.rb +1 -2
- data/lib/chef/knife/ionoscloud_ipfailover_add.rb +1 -2
- data/lib/chef/knife/ionoscloud_ipfailover_remove.rb +1 -2
- data/lib/chef/knife/ionoscloud_k8s_create.rb +1 -2
- data/lib/chef/knife/ionoscloud_k8s_delete.rb +1 -2
- data/lib/chef/knife/ionoscloud_k8s_get.rb +1 -2
- data/lib/chef/knife/ionoscloud_k8s_list.rb +1 -2
- data/lib/chef/knife/ionoscloud_k8s_update.rb +1 -2
- data/lib/chef/knife/ionoscloud_kubeconfig_get.rb +1 -2
- 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 +1 -2
- data/lib/chef/knife/ionoscloud_lan_delete.rb +1 -2
- data/lib/chef/knife/ionoscloud_lan_get.rb +1 -2
- data/lib/chef/knife/ionoscloud_lan_list.rb +1 -2
- data/lib/chef/knife/ionoscloud_lan_update.rb +1 -2
- data/lib/chef/knife/ionoscloud_loadbalancer_create.rb +1 -2
- data/lib/chef/knife/ionoscloud_loadbalancer_delete.rb +1 -2
- data/lib/chef/knife/ionoscloud_loadbalancer_get.rb +1 -2
- data/lib/chef/knife/ionoscloud_loadbalancer_list.rb +1 -2
- data/lib/chef/knife/ionoscloud_loadbalancer_nic_add.rb +1 -2
- data/lib/chef/knife/ionoscloud_loadbalancer_nic_remove.rb +1 -2
- data/lib/chef/knife/ionoscloud_loadbalancer_update.rb +1 -2
- data/lib/chef/knife/ionoscloud_location_list.rb +1 -2
- data/lib/chef/knife/ionoscloud_natgateway_create.rb +1 -2
- data/lib/chef/knife/ionoscloud_natgateway_delete.rb +1 -2
- data/lib/chef/knife/ionoscloud_natgateway_get.rb +1 -2
- data/lib/chef/knife/ionoscloud_natgateway_lan_add.rb +1 -2
- data/lib/chef/knife/ionoscloud_natgateway_lan_remove.rb +1 -2
- data/lib/chef/knife/ionoscloud_natgateway_list.rb +1 -2
- data/lib/chef/knife/ionoscloud_natgateway_rule_add.rb +1 -2
- data/lib/chef/knife/ionoscloud_natgateway_rule_list.rb +1 -2
- data/lib/chef/knife/ionoscloud_natgateway_rule_remove.rb +1 -2
- data/lib/chef/knife/ionoscloud_natgateway_rule_update.rb +1 -2
- data/lib/chef/knife/ionoscloud_natgateway_update.rb +1 -2
- data/lib/chef/knife/ionoscloud_networkloadbalancer_create.rb +1 -2
- data/lib/chef/knife/ionoscloud_networkloadbalancer_delete.rb +1 -2
- data/lib/chef/knife/ionoscloud_networkloadbalancer_get.rb +1 -2
- data/lib/chef/knife/ionoscloud_networkloadbalancer_list.rb +1 -2
- data/lib/chef/knife/ionoscloud_networkloadbalancer_rule_add.rb +1 -2
- data/lib/chef/knife/ionoscloud_networkloadbalancer_rule_list.rb +1 -2
- data/lib/chef/knife/ionoscloud_networkloadbalancer_rule_remove.rb +1 -2
- data/lib/chef/knife/ionoscloud_networkloadbalancer_rule_target_add.rb +1 -2
- data/lib/chef/knife/ionoscloud_networkloadbalancer_rule_target_list.rb +1 -2
- data/lib/chef/knife/ionoscloud_networkloadbalancer_rule_target_remove.rb +1 -2
- data/lib/chef/knife/ionoscloud_networkloadbalancer_rule_update.rb +1 -2
- data/lib/chef/knife/ionoscloud_networkloadbalancer_update.rb +1 -2
- data/lib/chef/knife/ionoscloud_nic_create.rb +1 -2
- data/lib/chef/knife/ionoscloud_nic_delete.rb +1 -2
- data/lib/chef/knife/ionoscloud_nic_get.rb +1 -2
- data/lib/chef/knife/ionoscloud_nic_list.rb +1 -2
- data/lib/chef/knife/ionoscloud_nic_update.rb +1 -2
- data/lib/chef/knife/ionoscloud_node_delete.rb +1 -2
- data/lib/chef/knife/ionoscloud_node_get.rb +1 -2
- data/lib/chef/knife/ionoscloud_node_list.rb +1 -2
- data/lib/chef/knife/ionoscloud_node_replace.rb +1 -2
- data/lib/chef/knife/ionoscloud_nodepool_create.rb +1 -2
- data/lib/chef/knife/ionoscloud_nodepool_delete.rb +1 -2
- data/lib/chef/knife/ionoscloud_nodepool_get.rb +1 -2
- data/lib/chef/knife/ionoscloud_nodepool_lan_add.rb +1 -2
- data/lib/chef/knife/ionoscloud_nodepool_lan_remove.rb +1 -2
- data/lib/chef/knife/ionoscloud_nodepool_list.rb +1 -2
- data/lib/chef/knife/ionoscloud_nodepool_update.rb +1 -2
- data/lib/chef/knife/ionoscloud_pcc_create.rb +1 -2
- data/lib/chef/knife/ionoscloud_pcc_delete.rb +1 -2
- data/lib/chef/knife/ionoscloud_pcc_get.rb +1 -2
- data/lib/chef/knife/ionoscloud_pcc_list.rb +1 -2
- data/lib/chef/knife/ionoscloud_pcc_update.rb +1 -2
- data/lib/chef/knife/ionoscloud_request_get.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 +1 -2
- data/lib/chef/knife/ionoscloud_resource_list.rb +1 -2
- data/lib/chef/knife/ionoscloud_s3key_create.rb +1 -2
- data/lib/chef/knife/ionoscloud_s3key_delete.rb +1 -2
- data/lib/chef/knife/ionoscloud_s3key_get.rb +1 -2
- data/lib/chef/knife/ionoscloud_s3key_list.rb +1 -2
- data/lib/chef/knife/ionoscloud_server_console.rb +1 -2
- data/lib/chef/knife/ionoscloud_server_create.rb +1 -2
- data/lib/chef/knife/ionoscloud_server_delete.rb +1 -2
- data/lib/chef/knife/ionoscloud_server_get.rb +1 -2
- data/lib/chef/knife/ionoscloud_server_list.rb +1 -2
- data/lib/chef/knife/ionoscloud_server_reboot.rb +1 -2
- data/lib/chef/knife/ionoscloud_server_resume.rb +1 -2
- 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 +1 -2
- data/lib/chef/knife/ionoscloud_server_token.rb +1 -2
- data/lib/chef/knife/ionoscloud_server_update.rb +1 -2
- data/lib/chef/knife/ionoscloud_server_upgrade.rb +1 -2
- data/lib/chef/knife/ionoscloud_share_create.rb +1 -2
- data/lib/chef/knife/ionoscloud_share_delete.rb +1 -2
- data/lib/chef/knife/ionoscloud_share_get.rb +1 -2
- data/lib/chef/knife/ionoscloud_share_list.rb +1 -2
- data/lib/chef/knife/ionoscloud_share_update.rb +1 -2
- data/lib/chef/knife/ionoscloud_snapshot_create.rb +1 -2
- data/lib/chef/knife/ionoscloud_snapshot_delete.rb +1 -2
- data/lib/chef/knife/ionoscloud_snapshot_get.rb +1 -2
- data/lib/chef/knife/ionoscloud_snapshot_list.rb +1 -2
- data/lib/chef/knife/ionoscloud_snapshot_restore.rb +1 -2
- data/lib/chef/knife/ionoscloud_snapshot_update.rb +1 -2
- data/lib/chef/knife/ionoscloud_template_list.rb +1 -2
- data/lib/chef/knife/ionoscloud_user_create.rb +1 -2
- data/lib/chef/knife/ionoscloud_user_delete.rb +1 -2
- data/lib/chef/knife/ionoscloud_user_get.rb +1 -2
- data/lib/chef/knife/ionoscloud_user_list.rb +1 -2
- data/lib/chef/knife/ionoscloud_user_ssourl.rb +1 -2
- data/lib/chef/knife/ionoscloud_user_update.rb +1 -2
- data/lib/chef/knife/ionoscloud_volume_attach.rb +1 -2
- data/lib/chef/knife/ionoscloud_volume_create.rb +1 -2
- data/lib/chef/knife/ionoscloud_volume_delete.rb +1 -2
- data/lib/chef/knife/ionoscloud_volume_detach.rb +1 -2
- data/lib/chef/knife/ionoscloud_volume_get.rb +1 -2
- data/lib/chef/knife/ionoscloud_volume_list.rb +1 -2
- data/lib/chef/knife/ionoscloud_volume_update.rb +1 -2
- data/lib/knife-ionoscloud/version.rb +1 -1
- data/spec/chef/knife/ionoscloud_dbaas_postgres_backup_get_spec.rb +67 -0
- data/spec/chef/knife/ionoscloud_dbaas_postgres_backup_list_spec.rb +111 -0
- data/spec/chef/knife/ionoscloud_dbaas_postgres_cluster_create_spec.rb +99 -0
- data/spec/chef/knife/ionoscloud_dbaas_postgres_cluster_delete_spec.rb +109 -0
- data/spec/chef/knife/ionoscloud_dbaas_postgres_cluster_get_spec.rb +73 -0
- data/spec/chef/knife/ionoscloud_dbaas_postgres_cluster_list_spec.rb +84 -0
- data/spec/chef/knife/ionoscloud_dbaas_postgres_cluster_restore_spec.rb +59 -0
- data/spec/chef/knife/ionoscloud_dbaas_postgres_cluster_update_spec.rb +89 -0
- data/spec/chef/knife/ionoscloud_dbaas_postgres_logs_get_spec.rb +67 -0
- data/spec/chef/knife/ionoscloud_dbaas_postgres_version_list_spec.rb +94 -0
- data/spec/spec_helper.rb +107 -0
- metadata +209 -156
- data/spec/test.sh +0 -3
@@ -27,14 +27,13 @@ class Chef
|
|
27
27
|
long: '--share',
|
28
28
|
description: 'The group has permission to share this resource.'
|
29
29
|
|
30
|
-
attr_reader :description, :required_options
|
31
|
-
|
32
30
|
def initialize(args = [])
|
33
31
|
super(args)
|
34
32
|
@description =
|
35
33
|
'Adds a specific resource share to a group and optionally allows the setting of permissions '\
|
36
34
|
'for that resource. As an example, you might use this to grant permissions to use an image '\
|
37
35
|
'or snapshot to a specific group.'
|
36
|
+
@directory = 'user'
|
38
37
|
@required_options = [:group_id, :resource_id, :ionoscloud_username, :ionoscloud_password]
|
39
38
|
end
|
40
39
|
|
@@ -12,12 +12,11 @@ class Chef
|
|
12
12
|
long: '--group-id GROUP_ID',
|
13
13
|
description: 'ID of the group.'
|
14
14
|
|
15
|
-
attr_reader :description, :required_options
|
16
|
-
|
17
15
|
def initialize(args = [])
|
18
16
|
super(args)
|
19
17
|
@description =
|
20
18
|
'Removes a resource share from a specified group.'
|
19
|
+
@directory = 'user'
|
21
20
|
@required_options = [:group_id, :ionoscloud_username, :ionoscloud_password]
|
22
21
|
end
|
23
22
|
|
@@ -17,12 +17,11 @@ class Chef
|
|
17
17
|
long: '--resource-id RESOURCE_ID',
|
18
18
|
description: 'The ID of the resource.'
|
19
19
|
|
20
|
-
attr_reader :description, :required_options
|
21
|
-
|
22
20
|
def initialize(args = [])
|
23
21
|
super(args)
|
24
22
|
@description =
|
25
23
|
'Retrieves the attributes of a given Group Share.'
|
24
|
+
@directory = 'user'
|
26
25
|
@required_options = [:group_id, :resource_id, :ionoscloud_username, :ionoscloud_password]
|
27
26
|
end
|
28
27
|
|
@@ -12,13 +12,12 @@ class Chef
|
|
12
12
|
long: '--group-id GROUP_ID',
|
13
13
|
description: 'ID of the group.'
|
14
14
|
|
15
|
-
attr_reader :description, :required_options
|
16
|
-
|
17
15
|
def initialize(args = [])
|
18
16
|
super(args)
|
19
17
|
@description =
|
20
18
|
'Retrieves a full list of all the resources that are shared through this '\
|
21
19
|
'group and lists the permissions granted to the group members for each shared resource.'
|
20
|
+
@directory = 'user'
|
22
21
|
@required_options = [:group_id, :ionoscloud_username, :ionoscloud_password]
|
23
22
|
end
|
24
23
|
|
@@ -26,12 +26,11 @@ class Chef
|
|
26
26
|
long: '--share SHARE_PRIVILEGE',
|
27
27
|
description: 'The group has permission to share this resource.'
|
28
28
|
|
29
|
-
attr_reader :description, :required_options
|
30
|
-
|
31
29
|
def initialize(args = [])
|
32
30
|
super(args)
|
33
31
|
@description =
|
34
32
|
'Updates information about a Ionoscloud Group Share.'
|
33
|
+
@directory = 'user'
|
35
34
|
@required_options = [:group_id, :resource_id, :ionoscloud_username, :ionoscloud_password]
|
36
35
|
@updatable_fields = [:edit_privilege, :share_privilege]
|
37
36
|
end
|
@@ -35,13 +35,12 @@ class Chef
|
|
35
35
|
long: '--licence LICENCE_TYPE',
|
36
36
|
description: 'The OS type of this Snapshot'
|
37
37
|
|
38
|
-
attr_reader :description, :required_options
|
39
|
-
|
40
38
|
def initialize(args = [])
|
41
39
|
super(args)
|
42
40
|
@description =
|
43
41
|
'Creates a snapshot of a volume within the virtual data center. '\
|
44
42
|
'You can use a snapshot to create a new storage volume or to restore a storage volume.'
|
43
|
+
@directory = 'compute-engine'
|
45
44
|
@required_options = [:datacenter_id, :volume_id, :ionoscloud_username, :ionoscloud_password]
|
46
45
|
end
|
47
46
|
|
@@ -7,12 +7,11 @@ class Chef
|
|
7
7
|
|
8
8
|
banner 'knife ionoscloud snapshot delete SNAPSHOT_ID [SNAPSHOT_ID]'
|
9
9
|
|
10
|
-
attr_reader :description, :required_options
|
11
|
-
|
12
10
|
def initialize(args = [])
|
13
11
|
super(args)
|
14
12
|
@description =
|
15
13
|
'Deletes the specified snapshot.'
|
14
|
+
@directory = 'compute-engine'
|
16
15
|
@required_options = [:ionoscloud_username, :ionoscloud_password]
|
17
16
|
end
|
18
17
|
|
@@ -12,12 +12,11 @@ class Chef
|
|
12
12
|
long: '--snapshot-id SNAPSHOT_ID',
|
13
13
|
description: 'ID of the group.'
|
14
14
|
|
15
|
-
attr_reader :description, :required_options
|
16
|
-
|
17
15
|
def initialize(args = [])
|
18
16
|
super(args)
|
19
17
|
@description =
|
20
18
|
'Retrieves the attributes of a given Snapshot.'
|
19
|
+
@directory = 'compute-engine'
|
21
20
|
@required_options = [:snapshot_id, :ionoscloud_username, :ionoscloud_password]
|
22
21
|
end
|
23
22
|
|
@@ -7,12 +7,11 @@ class Chef
|
|
7
7
|
|
8
8
|
banner 'knife ionoscloud snapshot list'
|
9
9
|
|
10
|
-
attr_reader :description, :required_options
|
11
|
-
|
12
10
|
def initialize(args = [])
|
13
11
|
super(args)
|
14
12
|
@description =
|
15
13
|
'Retrieve a list of snapshots.'
|
14
|
+
@directory = 'compute-engine'
|
16
15
|
@required_options = [:ionoscloud_username, :ionoscloud_password]
|
17
16
|
end
|
18
17
|
|
@@ -22,13 +22,12 @@ class Chef
|
|
22
22
|
long: '--snapshot SNAPSHOT_ID',
|
23
23
|
description: 'ID of the Snapshot'
|
24
24
|
|
25
|
-
attr_reader :description, :required_options
|
26
|
-
|
27
25
|
def initialize(args = [])
|
28
26
|
super(args)
|
29
27
|
@description =
|
30
28
|
'This will restore a snapshot onto a volume. A snapshot is created as just another image that '\
|
31
29
|
'can be used to create new volumes or to restore an existing volume.'
|
30
|
+
@directory = 'compute-engine'
|
32
31
|
@required_options = [:datacenter_id, :volume_id, :snapshot_id, :ionoscloud_username, :ionoscloud_password]
|
33
32
|
end
|
34
33
|
|
@@ -70,12 +70,11 @@ class Chef
|
|
70
70
|
long: '--disc-scsi-hot-unplug DISC_SCSI_HOT_UNPLUG',
|
71
71
|
description: 'The licence type of the snapshot (LINUX, WINDOWS, UNKNOWN, OTHER)'
|
72
72
|
|
73
|
-
attr_reader :description, :required_options
|
74
|
-
|
75
73
|
def initialize(args = [])
|
76
74
|
super(args)
|
77
75
|
@description =
|
78
76
|
'Updates information about a Ionoscloud Snapshot.'
|
77
|
+
@directory = 'compute-engine'
|
79
78
|
@required_options = [:snapshot_id, :ionoscloud_username, :ionoscloud_password]
|
80
79
|
@updatable_fields = [
|
81
80
|
:name, :description, :sec_auth_protection, :licence_type, :cpu_hot_plug, :cpu_hot_unplug, :ram_hot_plug, :ram_hot_unplug,
|
@@ -7,12 +7,11 @@ class Chef
|
|
7
7
|
|
8
8
|
banner 'knife ionoscloud template list'
|
9
9
|
|
10
|
-
attr_reader :description, :required_options
|
11
|
-
|
12
10
|
def initialize(args = [])
|
13
11
|
super(args)
|
14
12
|
@description =
|
15
13
|
'Retrieve a list of available templates. Templates can be used on specific server types only (CUBE at the moment)'
|
14
|
+
@directory = 'compute-engine'
|
16
15
|
@required_options = [:ionoscloud_username, :ionoscloud_password]
|
17
16
|
end
|
18
17
|
|
@@ -36,14 +36,13 @@ class Chef
|
|
36
36
|
long: '--sec-auth',
|
37
37
|
description: 'Indicates if secure (two-factor) authentication should be forced for the user.'
|
38
38
|
|
39
|
-
attr_reader :description, :required_options
|
40
|
-
|
41
39
|
def initialize(args = [])
|
42
40
|
super(args)
|
43
41
|
@description =
|
44
42
|
'Creates a new user under a particular contract. **Please Note**: The password set '\
|
45
43
|
'here cannot be updated through the API currently. It is recommended that a new user '\
|
46
44
|
'log into the DCD and change their password.'
|
45
|
+
@directory = 'user'
|
47
46
|
@required_options = [:firstname, :lastname, :email, :password, :ionoscloud_username, :ionoscloud_password]
|
48
47
|
end
|
49
48
|
|
@@ -7,14 +7,13 @@ class Chef
|
|
7
7
|
|
8
8
|
banner 'knife ionoscloud user delete USER_ID [USER_ID]'
|
9
9
|
|
10
|
-
attr_reader :description, :required_options
|
11
|
-
|
12
10
|
def initialize(args = [])
|
13
11
|
super(args)
|
14
12
|
@description =
|
15
13
|
'Blacklists the user, disabling them. The user is not completely purged, '\
|
16
14
|
'therefore if you anticipate needing to create a user with the same name '\
|
17
15
|
'in the future, we suggest renaming the user before you delete it.'
|
16
|
+
@directory = 'user'
|
18
17
|
@required_options = [:ionoscloud_username, :ionoscloud_password]
|
19
18
|
end
|
20
19
|
|
@@ -12,12 +12,11 @@ class Chef
|
|
12
12
|
long: '--user-id USER_ID',
|
13
13
|
description: 'ID of the group.'
|
14
14
|
|
15
|
-
attr_reader :description, :required_options
|
16
|
-
|
17
15
|
def initialize(args = [])
|
18
16
|
super(args)
|
19
17
|
@description =
|
20
18
|
'Retrieves the attributes of a given Ionoscloud User.'
|
19
|
+
@directory = 'user'
|
21
20
|
@required_options = [:user_id, :ionoscloud_username, :ionoscloud_password]
|
22
21
|
end
|
23
22
|
|
@@ -12,14 +12,13 @@ class Chef
|
|
12
12
|
long: '--group-id GROUP_ID',
|
13
13
|
description: 'ID of the group.'
|
14
14
|
|
15
|
-
attr_reader :description, :required_options
|
16
|
-
|
17
15
|
def initialize(args = [])
|
18
16
|
super(args)
|
19
17
|
@description =
|
20
18
|
'Retrieve a list of all the users that have been created under a contract. '\
|
21
19
|
'You can retrieve a list of users who are members of the group by passing the '\
|
22
20
|
'_group\_id_ option.'
|
21
|
+
@directory = 'user'
|
23
22
|
@required_options = [:ionoscloud_username, :ionoscloud_password]
|
24
23
|
end
|
25
24
|
|
@@ -12,12 +12,11 @@ class Chef
|
|
12
12
|
long: '--user-id USER_ID',
|
13
13
|
description: 'The ID of the Backup unit.'
|
14
14
|
|
15
|
-
attr_reader :description, :required_options
|
16
|
-
|
17
15
|
def initialize(args = [])
|
18
16
|
super(args)
|
19
17
|
@description =
|
20
18
|
'Retrieve S3 object storage single signon URL for the given user.'
|
19
|
+
@directory = 'user'
|
21
20
|
@required_options = [:user_id, :ionoscloud_username, :ionoscloud_password]
|
22
21
|
end
|
23
22
|
|
@@ -43,12 +43,11 @@ class Chef
|
|
43
43
|
long: '--active ACTIVE',
|
44
44
|
description: 'Indicates if the user is active.'
|
45
45
|
|
46
|
-
attr_reader :description, :required_options
|
47
|
-
|
48
46
|
def initialize(args = [])
|
49
47
|
super(args)
|
50
48
|
@description =
|
51
49
|
'Updates information about a Ionoscloud User.'
|
50
|
+
@directory = 'user'
|
52
51
|
@required_options = [:user_id, :ionoscloud_username, :ionoscloud_password]
|
53
52
|
@updatable_fields = [:firstname, :lastname, :email, :administrator, :force_sec_auth, :sec_auth_active, :active]
|
54
53
|
end
|
@@ -17,12 +17,11 @@ class Chef
|
|
17
17
|
long: '--server-id SERVER_ID',
|
18
18
|
description: 'The ID of the server'
|
19
19
|
|
20
|
-
attr_reader :description, :required_options
|
21
|
-
|
22
20
|
def initialize(args = [])
|
23
21
|
super(args)
|
24
22
|
@description =
|
25
23
|
'This will attach a pre-existing storage volume to the server.'
|
24
|
+
@directory = 'compute-engine'
|
26
25
|
@required_options = [:datacenter_id, :server_id, :ionoscloud_username, :ionoscloud_password]
|
27
26
|
end
|
28
27
|
|
@@ -71,13 +71,12 @@ class Chef
|
|
71
71
|
'immutable and is only allowed to be set on a new volume creation. It is mandatory to provide either \'public image\' '\
|
72
72
|
'or \'imageAlias\' that has cloud-init compatibility in conjunction with this property.'
|
73
73
|
|
74
|
-
attr_reader :description, :required_options
|
75
|
-
|
76
74
|
def initialize(args = [])
|
77
75
|
super(args)
|
78
76
|
@description =
|
79
77
|
'Creates a volume within the data center. This will NOT attach the volume to a server. '\
|
80
78
|
'Please see the Servers section for details on how to attach storage volumes.'
|
79
|
+
@directory = 'compute-engine'
|
81
80
|
@required_options = [:datacenter_id, :name, :type, :size, :ionoscloud_username, :ionoscloud_password]
|
82
81
|
end
|
83
82
|
|
@@ -12,13 +12,12 @@ class Chef
|
|
12
12
|
long: '--datacenter-id DATACENTER_ID',
|
13
13
|
description: 'Name of the data center'
|
14
14
|
|
15
|
-
attr_reader :description, :required_options
|
16
|
-
|
17
15
|
def initialize(args = [])
|
18
16
|
super(args)
|
19
17
|
@description =
|
20
18
|
'Deletes the specified volume. This will result in the volume being '\
|
21
19
|
'removed from your virtual data center. Please use this with caution!'
|
20
|
+
@directory = 'compute-engine'
|
22
21
|
@required_options = [:datacenter_id, :ionoscloud_username, :ionoscloud_password]
|
23
22
|
end
|
24
23
|
|
@@ -17,8 +17,6 @@ class Chef
|
|
17
17
|
long: '--server-id SERVER_ID',
|
18
18
|
description: 'The ID of the server'
|
19
19
|
|
20
|
-
attr_reader :description, :required_options
|
21
|
-
|
22
20
|
def initialize(args = [])
|
23
21
|
super(args)
|
24
22
|
@description =
|
@@ -26,6 +24,7 @@ class Chef
|
|
26
24
|
"HotUnplug settings, this may result in the server being rebooted.\n\n"\
|
27
25
|
"This will NOT delete the volume from your virtual data center. You will "\
|
28
26
|
"need to make a separate request to delete a volume."
|
27
|
+
@directory = 'compute-engine'
|
29
28
|
@required_options = [:datacenter_id, :server_id, :ionoscloud_username, :ionoscloud_password]
|
30
29
|
end
|
31
30
|
|
@@ -16,12 +16,11 @@ class Chef
|
|
16
16
|
long: '--volume VOLUME_ID',
|
17
17
|
description: 'ID of the volume.'
|
18
18
|
|
19
|
-
attr_reader :description, :required_options
|
20
|
-
|
21
19
|
def initialize(args = [])
|
22
20
|
super(args)
|
23
21
|
@description =
|
24
22
|
'Retrieves the attributes of a given Volume.'
|
23
|
+
@directory = 'compute-engine'
|
25
24
|
@required_options = [:datacenter_id, :volume_id, :ionoscloud_username, :ionoscloud_password]
|
26
25
|
end
|
27
26
|
|
@@ -17,13 +17,12 @@ class Chef
|
|
17
17
|
long: '--server-id SERVER_ID',
|
18
18
|
description: 'The ID of the server'
|
19
19
|
|
20
|
-
attr_reader :description, :required_options
|
21
|
-
|
22
20
|
def initialize(args = [])
|
23
21
|
super(args)
|
24
22
|
@description =
|
25
23
|
'List all available volumes under a data center. '\
|
26
24
|
'You can also list all volumes attached to a specific server.'
|
25
|
+
@directory = 'compute-engine'
|
27
26
|
@required_options = [:datacenter_id, :ionoscloud_username, :ionoscloud_password]
|
28
27
|
end
|
29
28
|
|
@@ -55,12 +55,11 @@ class Chef
|
|
55
55
|
long: '--disc-virtio-hot_unplug DISC_VIRTIO_HOT_UNPLUG',
|
56
56
|
description: 'The licence type of the volume (LINUX, WINDOWS, UNKNOWN, OTHER)'
|
57
57
|
|
58
|
-
attr_reader :description, :required_options
|
59
|
-
|
60
58
|
def initialize(args = [])
|
61
59
|
super(args)
|
62
60
|
@description =
|
63
61
|
'Updates information about a Ionoscloud Volume.'
|
62
|
+
@directory = 'compute-engine'
|
64
63
|
@required_options = [:datacenter_id, :volume_id, :ionoscloud_username, :ionoscloud_password]
|
65
64
|
@updatable_fields = [
|
66
65
|
:name, :size, :bus, :cpu_hot_plug, :ram_hot_plug, :nic_hot_plug, :nic_hot_unplug, :disc_virtio_hot_plug, :disc_virtio_hot_unplug,
|
@@ -0,0 +1,67 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'ionoscloud_dbaas_postgres_backup_get'
|
3
|
+
|
4
|
+
Chef::Knife::IonoscloudDbaasPostgresBackupGet.load_deps
|
5
|
+
|
6
|
+
describe Chef::Knife::IonoscloudDbaasPostgresBackupGet do
|
7
|
+
before :each do
|
8
|
+
subject { Chef::Knife::IonoscloudDbaasPostgresBackupGet.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 BackupsApi.clusters_backups_find_by_id' do
|
16
|
+
backup = cluster_backup_mock
|
17
|
+
subject_config = {
|
18
|
+
ionoscloud_username: 'email',
|
19
|
+
ionoscloud_password: 'password',
|
20
|
+
backup_id: backup.id,
|
21
|
+
yes: true,
|
22
|
+
}
|
23
|
+
|
24
|
+
subject_config.each { |key, value| subject.config[key] = value }
|
25
|
+
|
26
|
+
expect(subject).to receive(:puts).with("ID: #{backup.id}")
|
27
|
+
expect(subject).to receive(:puts).with("Cluster ID: #{backup.properties.cluster_id}")
|
28
|
+
expect(subject).to receive(:puts).with("Is Active: #{backup.properties.is_active}")
|
29
|
+
expect(subject).to receive(:puts).with("Version: #{backup.properties.version}")
|
30
|
+
expect(subject).to receive(:puts).with("Earliest Recovery Target Time: #{backup.properties.earliest_recovery_target_time}")
|
31
|
+
expect(subject).to receive(:puts).with("Created Date: #{backup.metadata.created_date}")
|
32
|
+
|
33
|
+
mock_dbaas_call_api(
|
34
|
+
subject,
|
35
|
+
[
|
36
|
+
{
|
37
|
+
method: 'GET',
|
38
|
+
path: "/clusters/backups/#{backup.id}",
|
39
|
+
operation: :'BackupsApi.clusters_backups_find_by_id',
|
40
|
+
return_type: 'BackupResponse',
|
41
|
+
result: backup,
|
42
|
+
},
|
43
|
+
],
|
44
|
+
)
|
45
|
+
|
46
|
+
expect { subject.run }.not_to raise_error(Exception)
|
47
|
+
end
|
48
|
+
|
49
|
+
it 'should not make any call if any required option is missing' do
|
50
|
+
required_options = subject.instance_variable_get(:@required_options)
|
51
|
+
|
52
|
+
arrays_without_one_element(required_options).each do |test_case|
|
53
|
+
|
54
|
+
test_case[:array].each { |value| subject.config[value] = 'test' }
|
55
|
+
|
56
|
+
expect(subject).to receive(:puts).with("Missing required parameters #{test_case[:removed]}")
|
57
|
+
expect(subject.api_client_dbaas).not_to receive(:call_api)
|
58
|
+
|
59
|
+
expect { subject.run }.to raise_error(SystemExit) do |error|
|
60
|
+
expect(error.status).to eq(1)
|
61
|
+
end
|
62
|
+
|
63
|
+
required_options.each { |value| subject.config[value] = nil }
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
@@ -0,0 +1,111 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'ionoscloud_dbaas_postgres_backup_list'
|
3
|
+
|
4
|
+
Chef::Knife::IonoscloudDbaasPostgresBackupList.load_deps
|
5
|
+
|
6
|
+
describe Chef::Knife::IonoscloudDbaasPostgresBackupList do
|
7
|
+
before :each do
|
8
|
+
subject { Chef::Knife::IonoscloudDbaasPostgresBackupList.new }
|
9
|
+
|
10
|
+
@cluster_backups = cluster_backups_mock
|
11
|
+
|
12
|
+
@cluster_backup_list = [
|
13
|
+
subject.ui.color('ID', :bold),
|
14
|
+
subject.ui.color('Type', :bold),
|
15
|
+
subject.ui.color('Cluster ID', :bold),
|
16
|
+
subject.ui.color('Is Active', :bold),
|
17
|
+
subject.ui.color('Earliest Recovery Target Time', :bold),
|
18
|
+
subject.ui.color('Created Date', :bold),
|
19
|
+
|
20
|
+
@cluster_backups.items.first.id,
|
21
|
+
@cluster_backups.items.first.type,
|
22
|
+
@cluster_backups.items.first.properties.cluster_id,
|
23
|
+
@cluster_backups.items.first.properties.is_active,
|
24
|
+
@cluster_backups.items.first.properties.earliest_recovery_target_time,
|
25
|
+
@cluster_backups.items.first.metadata.created_date,
|
26
|
+
|
27
|
+
@cluster_backups.items[1].id,
|
28
|
+
@cluster_backups.items[1].type,
|
29
|
+
@cluster_backups.items[1].properties.cluster_id,
|
30
|
+
@cluster_backups.items[1].properties.is_active,
|
31
|
+
@cluster_backups.items[1].properties.earliest_recovery_target_time,
|
32
|
+
@cluster_backups.items[1].metadata.created_date,
|
33
|
+
]
|
34
|
+
|
35
|
+
allow(subject).to receive(:puts)
|
36
|
+
allow(subject).to receive(:print)
|
37
|
+
end
|
38
|
+
|
39
|
+
describe '#run' do
|
40
|
+
it 'should call BackupsApi.clusters_backups_get when no cluster_id is set' do
|
41
|
+
subject_config = {
|
42
|
+
ionoscloud_username: 'email',
|
43
|
+
ionoscloud_password: 'password',
|
44
|
+
}
|
45
|
+
|
46
|
+
subject_config.each { |key, value| subject.config[key] = value }
|
47
|
+
|
48
|
+
expect(subject.ui).to receive(:list).with(@cluster_backup_list, :uneven_columns_across, 6)
|
49
|
+
|
50
|
+
mock_dbaas_call_api(
|
51
|
+
subject,
|
52
|
+
[
|
53
|
+
{
|
54
|
+
method: 'GET',
|
55
|
+
path: '/clusters/backups',
|
56
|
+
operation: :'BackupsApi.clusters_backups_get',
|
57
|
+
return_type: 'ClusterBackupList',
|
58
|
+
result: @cluster_backups,
|
59
|
+
},
|
60
|
+
],
|
61
|
+
)
|
62
|
+
|
63
|
+
expect { subject.run }.not_to raise_error(Exception)
|
64
|
+
end
|
65
|
+
|
66
|
+
it 'should call BackupsApi.cluster_backups_get when cluster_id is set' do
|
67
|
+
subject_config = {
|
68
|
+
ionoscloud_username: 'email',
|
69
|
+
ionoscloud_password: 'password',
|
70
|
+
cluster_id: 'cluster_id'
|
71
|
+
}
|
72
|
+
|
73
|
+
subject_config.each { |key, value| subject.config[key] = value }
|
74
|
+
|
75
|
+
expect(subject.ui).to receive(:list).with(@cluster_backup_list, :uneven_columns_across, 6)
|
76
|
+
|
77
|
+
mock_dbaas_call_api(
|
78
|
+
subject,
|
79
|
+
[
|
80
|
+
{
|
81
|
+
method: 'GET',
|
82
|
+
path: "/clusters/#{subject_config[:cluster_id]}/backups",
|
83
|
+
operation: :'BackupsApi.cluster_backups_get',
|
84
|
+
return_type: 'ClusterBackupList',
|
85
|
+
result: @cluster_backups,
|
86
|
+
},
|
87
|
+
],
|
88
|
+
)
|
89
|
+
|
90
|
+
expect { subject.run }.not_to raise_error(Exception)
|
91
|
+
end
|
92
|
+
|
93
|
+
it 'should not make any call if any required option is missing' do
|
94
|
+
required_options = subject.instance_variable_get(:@required_options)
|
95
|
+
|
96
|
+
arrays_without_one_element(required_options).each do |test_case|
|
97
|
+
|
98
|
+
test_case[:array].each { |value| subject.config[value] = 'test' }
|
99
|
+
|
100
|
+
expect(subject).to receive(:puts).with("Missing required parameters #{test_case[:removed]}")
|
101
|
+
expect(subject.api_client_dbaas).not_to receive(:call_api)
|
102
|
+
|
103
|
+
expect { subject.run }.to raise_error(SystemExit) do |error|
|
104
|
+
expect(error.status).to eq(1)
|
105
|
+
end
|
106
|
+
|
107
|
+
required_options.each { |value| subject.config[value] = nil }
|
108
|
+
end
|
109
|
+
end
|
110
|
+
end
|
111
|
+
end
|