knife-ionoscloud 6.0.0.alpha.1 → 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/.github/workflows/publish.yml +4 -1
- data/README.md +9 -0
- data/docs/README.md +37 -0
- data/docs/changelog.md +10 -0
- data/docs/docs_generator.rb +45 -10
- data/docs/subcommands/{backupunit_create.md → backup/backupunit_create.md} +7 -1
- data/docs/subcommands/{backupunit_delete.md → backup/backupunit_delete.md} +7 -1
- data/docs/subcommands/backup/backupunit_get.md +38 -0
- data/docs/subcommands/{backupunit_list.md → backup/backupunit_list.md} +7 -1
- data/docs/subcommands/{backupunit_ssourl.md → backup/backupunit_ssourl.md} +7 -1
- data/docs/subcommands/backup/backupunit_update.md +44 -0
- data/docs/subcommands/{composite_server_create.md → compute-engine/composite_server_create.md} +15 -3
- data/docs/subcommands/compute-engine/cube_server_create.md +94 -0
- data/docs/subcommands/{datacenter_create.md → compute-engine/datacenter_create.md} +7 -1
- data/docs/subcommands/{datacenter_delete.md → compute-engine/datacenter_delete.md} +7 -1
- data/docs/subcommands/compute-engine/datacenter_get.md +38 -0
- data/docs/subcommands/{datacenter_list.md → compute-engine/datacenter_list.md} +7 -1
- data/docs/subcommands/compute-engine/datacenter_update.md +47 -0
- data/docs/subcommands/{firewall_create.md → compute-engine/firewall_create.md} +11 -2
- data/docs/subcommands/{firewall_delete.md → compute-engine/firewall_delete.md} +6 -0
- data/docs/subcommands/compute-engine/firewall_get.md +50 -0
- data/docs/subcommands/{firewall_list.md → compute-engine/firewall_list.md} +7 -1
- data/docs/subcommands/compute-engine/firewall_update.md +74 -0
- data/docs/subcommands/compute-engine/flowlog_create.md +66 -0
- data/docs/subcommands/compute-engine/flowlog_delete.md +54 -0
- data/docs/subcommands/compute-engine/flowlog_get.md +58 -0
- data/docs/subcommands/compute-engine/flowlog_list.md +54 -0
- data/docs/subcommands/compute-engine/flowlog_update.md +70 -0
- data/docs/subcommands/{image_list.md → compute-engine/image_list.md} +7 -1
- data/docs/subcommands/{ipblock_create.md → compute-engine/ipblock_create.md} +7 -1
- data/docs/subcommands/{ipblock_delete.md → compute-engine/ipblock_delete.md} +7 -1
- data/docs/subcommands/compute-engine/ipblock_get.md +38 -0
- data/docs/subcommands/{ipblock_list.md → compute-engine/ipblock_list.md} +7 -1
- data/docs/subcommands/compute-engine/ipblock_update.md +41 -0
- data/docs/subcommands/{ipfailover_add.md → compute-engine/ipfailover_add.md} +7 -1
- data/docs/subcommands/{ipfailover_remove.md → compute-engine/ipfailover_remove.md} +7 -1
- data/docs/subcommands/{label_add.md → compute-engine/label_add.md} +7 -1
- data/docs/subcommands/{label_list.md → compute-engine/label_list.md} +7 -1
- data/docs/subcommands/{label_remove.md → compute-engine/label_remove.md} +6 -0
- data/docs/subcommands/{lan_create.md → compute-engine/lan_create.md} +7 -1
- data/docs/subcommands/{lan_delete.md → compute-engine/lan_delete.md} +6 -0
- data/docs/subcommands/compute-engine/lan_get.md +42 -0
- data/docs/subcommands/{lan_list.md → compute-engine/lan_list.md} +7 -1
- data/docs/subcommands/compute-engine/lan_update.md +51 -0
- data/docs/subcommands/{loadbalancer_create.md → compute-engine/loadbalancer_create.md} +7 -1
- data/docs/subcommands/{loadbalancer_delete.md → compute-engine/loadbalancer_delete.md} +6 -0
- data/docs/subcommands/{loadbalancer_get.md → compute-engine/loadbalancer_get.md} +7 -1
- data/docs/subcommands/{loadbalancer_list.md → compute-engine/loadbalancer_list.md} +7 -1
- data/docs/subcommands/{loadbalancer_nic_add.md → compute-engine/loadbalancer_nic_add.md} +6 -0
- data/docs/subcommands/{loadbalancer_nic_remove.md → compute-engine/loadbalancer_nic_remove.md} +6 -0
- data/docs/subcommands/compute-engine/loadbalancer_update.md +51 -0
- data/docs/subcommands/{location_list.md → compute-engine/location_list.md} +7 -1
- data/docs/subcommands/compute-engine/natgateway_create.md +44 -0
- data/docs/subcommands/compute-engine/natgateway_delete.md +38 -0
- data/docs/subcommands/compute-engine/natgateway_get.md +42 -0
- data/docs/subcommands/compute-engine/natgateway_lan_add.md +49 -0
- data/docs/subcommands/compute-engine/natgateway_lan_remove.md +42 -0
- data/docs/subcommands/compute-engine/natgateway_list.md +38 -0
- data/docs/subcommands/compute-engine/natgateway_rule_add.md +69 -0
- data/docs/subcommands/compute-engine/natgateway_rule_list.md +41 -0
- data/docs/subcommands/compute-engine/natgateway_rule_remove.md +42 -0
- data/docs/subcommands/compute-engine/natgateway_rule_update.md +69 -0
- data/docs/subcommands/compute-engine/natgateway_update.md +51 -0
- data/docs/subcommands/compute-engine/networkloadbalancer_create.md +57 -0
- data/docs/subcommands/compute-engine/networkloadbalancer_delete.md +38 -0
- data/docs/subcommands/compute-engine/networkloadbalancer_get.md +42 -0
- data/docs/subcommands/compute-engine/networkloadbalancer_list.md +38 -0
- data/docs/subcommands/compute-engine/networkloadbalancer_rule_add.md +75 -0
- data/docs/subcommands/compute-engine/networkloadbalancer_rule_list.md +42 -0
- data/docs/subcommands/compute-engine/networkloadbalancer_rule_remove.md +42 -0
- data/docs/subcommands/compute-engine/networkloadbalancer_rule_target_add.md +67 -0
- data/docs/subcommands/compute-engine/networkloadbalancer_rule_target_list.md +46 -0
- data/docs/subcommands/compute-engine/networkloadbalancer_rule_target_remove.md +54 -0
- data/docs/subcommands/compute-engine/networkloadbalancer_rule_update.md +75 -0
- data/docs/subcommands/compute-engine/networkloadbalancer_update.md +57 -0
- data/docs/subcommands/{nic_create.md → compute-engine/nic_create.md} +9 -3
- data/docs/subcommands/{nic_delete.md → compute-engine/nic_delete.md} +6 -0
- data/docs/subcommands/compute-engine/nic_get.md +46 -0
- data/docs/subcommands/{nic_list.md → compute-engine/nic_list.md} +7 -1
- data/docs/subcommands/compute-engine/nic_update.md +61 -0
- data/docs/subcommands/{pcc_create.md → compute-engine/pcc_create.md} +7 -1
- data/docs/subcommands/{pcc_delete.md → compute-engine/pcc_delete.md} +7 -1
- data/docs/subcommands/compute-engine/pcc_get.md +38 -0
- data/docs/subcommands/{pcc_list.md → compute-engine/pcc_list.md} +7 -1
- data/docs/subcommands/compute-engine/pcc_update.md +44 -0
- data/docs/subcommands/compute-engine/request_get.md +38 -0
- data/docs/subcommands/{request_list.md → compute-engine/request_list.md} +7 -1
- data/docs/subcommands/{request_status.md → compute-engine/request_status.md} +7 -1
- data/docs/subcommands/{request_wait.md → compute-engine/request_wait.md} +7 -1
- data/docs/subcommands/compute-engine/server_console.md +42 -0
- data/docs/subcommands/{server_create.md → compute-engine/server_create.md} +7 -1
- data/docs/subcommands/{server_delete.md → compute-engine/server_delete.md} +6 -0
- data/docs/subcommands/compute-engine/server_get.md +42 -0
- data/docs/subcommands/{server_list.md → compute-engine/server_list.md} +10 -1
- data/docs/subcommands/{server_reboot.md → compute-engine/server_reboot.md} +6 -0
- data/docs/subcommands/compute-engine/server_resume.md +38 -0
- data/docs/subcommands/{server_start.md → compute-engine/server_start.md} +6 -0
- data/docs/subcommands/{server_stop.md → compute-engine/server_stop.md} +6 -0
- data/docs/subcommands/compute-engine/server_suspend.md +38 -0
- data/docs/subcommands/compute-engine/server_token.md +42 -0
- data/docs/subcommands/compute-engine/server_update.md +63 -0
- data/docs/subcommands/compute-engine/server_upgrade.md +42 -0
- data/docs/subcommands/{snapshot_create.md → compute-engine/snapshot_create.md} +7 -1
- data/docs/subcommands/{snapshot_delete.md → compute-engine/snapshot_delete.md} +7 -1
- data/docs/subcommands/compute-engine/snapshot_get.md +38 -0
- data/docs/subcommands/{snapshot_list.md → compute-engine/snapshot_list.md} +7 -1
- data/docs/subcommands/{snapshot_restore.md → compute-engine/snapshot_restore.md} +7 -1
- data/docs/subcommands/compute-engine/snapshot_update.md +80 -0
- data/docs/subcommands/compute-engine/template_list.md +34 -0
- data/docs/subcommands/{volume_attach.md → compute-engine/volume_attach.md} +6 -0
- data/docs/subcommands/{volume_create.md → compute-engine/volume_create.md} +14 -5
- data/docs/subcommands/{volume_delete.md → compute-engine/volume_delete.md} +6 -0
- data/docs/subcommands/{volume_detach.md → compute-engine/volume_detach.md} +6 -0
- data/docs/subcommands/compute-engine/volume_get.md +42 -0
- data/docs/subcommands/{volume_list.md → compute-engine/volume_list.md} +7 -1
- data/docs/subcommands/compute-engine/volume_update.md +69 -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/kubernetes/k8s_create.md +53 -0
- data/docs/subcommands/{k8s_delete.md → kubernetes/k8s_delete.md} +7 -1
- data/docs/subcommands/kubernetes/k8s_get.md +38 -0
- data/docs/subcommands/{k8s_list.md → kubernetes/k8s_list.md} +7 -1
- data/docs/subcommands/kubernetes/k8s_update.md +56 -0
- data/docs/subcommands/{kubeconfig_get.md → kubernetes/kubeconfig_get.md} +7 -1
- data/docs/subcommands/{node_delete.md → kubernetes/node_delete.md} +6 -0
- data/docs/subcommands/kubernetes/node_get.md +46 -0
- data/docs/subcommands/{node_list.md → kubernetes/node_list.md} +7 -1
- data/docs/subcommands/{node_replace.md → kubernetes/node_replace.md} +6 -0
- data/docs/subcommands/{nodepool_create.md → kubernetes/nodepool_create.md} +16 -1
- data/docs/subcommands/{nodepool_delete.md → kubernetes/nodepool_delete.md} +6 -0
- data/docs/subcommands/kubernetes/nodepool_get.md +42 -0
- data/docs/subcommands/kubernetes/nodepool_lan_add.md +52 -0
- data/docs/subcommands/kubernetes/nodepool_lan_remove.md +42 -0
- data/docs/subcommands/{nodepool_list.md → kubernetes/nodepool_list.md} +7 -1
- data/docs/subcommands/kubernetes/nodepool_update.md +72 -0
- data/docs/subcommands/{contract_list.md → user/contract_list.md} +7 -1
- data/docs/subcommands/{group_create.md → user/group_create.md} +16 -1
- data/docs/subcommands/{group_delete.md → user/group_delete.md} +7 -1
- data/docs/subcommands/{group_get.md → user/group_get.md} +7 -1
- data/docs/subcommands/{group_list.md → user/group_list.md} +7 -1
- data/docs/subcommands/user/group_update.md +77 -0
- data/docs/subcommands/{group_user_add.md → user/group_user_add.md} +6 -0
- data/docs/subcommands/{group_user_remove.md → user/group_user_remove.md} +6 -0
- data/docs/subcommands/{resource_list.md → user/resource_list.md} +7 -1
- data/docs/subcommands/{s3key_create.md → user/s3key_create.md} +7 -1
- data/docs/subcommands/{s3key_delete.md → user/s3key_delete.md} +6 -0
- data/docs/subcommands/user/s3key_get.md +42 -0
- data/docs/subcommands/{s3key_list.md → user/s3key_list.md} +7 -1
- data/docs/subcommands/{share_create.md → user/share_create.md} +7 -1
- data/docs/subcommands/{share_delete.md → user/share_delete.md} +6 -0
- data/docs/subcommands/user/share_get.md +42 -0
- data/docs/subcommands/{share_list.md → user/share_list.md} +7 -1
- data/docs/subcommands/user/share_update.md +48 -0
- data/docs/subcommands/{user_create.md → user/user_create.md} +7 -1
- data/docs/subcommands/{user_delete.md → user/user_delete.md} +7 -1
- data/docs/subcommands/user/user_get.md +38 -0
- data/docs/subcommands/{user_list.md → user/user_list.md} +7 -1
- data/docs/subcommands/{user_ssourl.md → user/user_ssourl.md} +7 -1
- data/docs/subcommands/user/user_update.md +59 -0
- data/docs/summary.md +167 -82
- data/docs/templates/summary.mustache +6 -3
- data/knife-ionoscloud.gemspec +2 -1
- data/lib/chef/knife/ionoscloud_backupunit_create.rb +12 -16
- data/lib/chef/knife/ionoscloud_backupunit_delete.rb +3 -6
- data/lib/chef/knife/ionoscloud_backupunit_get.rb +32 -0
- data/lib/chef/knife/ionoscloud_backupunit_list.rb +2 -2
- data/lib/chef/knife/ionoscloud_backupunit_ssourl.rb +2 -2
- data/lib/chef/knife/ionoscloud_backupunit_update.rb +61 -0
- data/lib/chef/knife/ionoscloud_base.rb +417 -1
- data/lib/chef/knife/ionoscloud_composite_server_create.rb +7 -11
- data/lib/chef/knife/ionoscloud_contract_list.rb +2 -2
- data/lib/chef/knife/ionoscloud_cube_server_create.rb +7 -11
- data/lib/chef/knife/ionoscloud_datacenter_create.rb +12 -15
- data/lib/chef/knife/ionoscloud_datacenter_delete.rb +3 -8
- data/lib/chef/knife/ionoscloud_datacenter_get.rb +32 -0
- data/lib/chef/knife/ionoscloud_datacenter_list.rb +2 -2
- data/lib/chef/knife/ionoscloud_datacenter_update.rb +66 -0
- 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 +10 -24
- data/lib/chef/knife/ionoscloud_firewall_delete.rb +4 -13
- data/lib/chef/knife/ionoscloud_firewall_get.rb +51 -0
- data/lib/chef/knife/ionoscloud_firewall_list.rb +2 -2
- data/lib/chef/knife/ionoscloud_firewall_update.rb +131 -0
- data/lib/chef/knife/ionoscloud_flowlog_create.rb +6 -14
- data/lib/chef/knife/ionoscloud_flowlog_delete.rb +10 -14
- data/lib/chef/knife/ionoscloud_flowlog_get.rb +83 -0
- data/lib/chef/knife/ionoscloud_flowlog_list.rb +4 -4
- data/lib/chef/knife/ionoscloud_flowlog_update.rb +124 -0
- data/lib/chef/knife/ionoscloud_group_create.rb +3 -18
- data/lib/chef/knife/ionoscloud_group_delete.rb +3 -20
- data/lib/chef/knife/ionoscloud_group_get.rb +3 -21
- data/lib/chef/knife/ionoscloud_group_list.rb +2 -2
- data/lib/chef/knife/ionoscloud_group_update.rb +130 -0
- data/lib/chef/knife/ionoscloud_group_user_add.rb +3 -20
- data/lib/chef/knife/ionoscloud_group_user_remove.rb +3 -20
- data/lib/chef/knife/ionoscloud_image_list.rb +2 -2
- data/lib/chef/knife/ionoscloud_ipblock_create.rb +12 -15
- data/lib/chef/knife/ionoscloud_ipblock_delete.rb +3 -6
- data/lib/chef/knife/ionoscloud_ipblock_get.rb +32 -0
- data/lib/chef/knife/ionoscloud_ipblock_list.rb +2 -2
- data/lib/chef/knife/ionoscloud_ipblock_update.rb +56 -0
- data/lib/chef/knife/ionoscloud_ipfailover_add.rb +3 -3
- data/lib/chef/knife/ionoscloud_ipfailover_remove.rb +3 -3
- data/lib/chef/knife/ionoscloud_k8s_create.rb +28 -36
- data/lib/chef/knife/ionoscloud_k8s_delete.rb +3 -11
- data/lib/chef/knife/ionoscloud_k8s_get.rb +32 -0
- data/lib/chef/knife/ionoscloud_k8s_list.rb +2 -2
- data/lib/chef/knife/ionoscloud_k8s_update.rb +98 -0
- data/lib/chef/knife/ionoscloud_kubeconfig_get.rb +2 -2
- data/lib/chef/knife/ionoscloud_label_add.rb +2 -2
- data/lib/chef/knife/ionoscloud_label_list.rb +2 -2
- data/lib/chef/knife/ionoscloud_label_remove.rb +2 -2
- data/lib/chef/knife/ionoscloud_lan_create.rb +8 -17
- data/lib/chef/knife/ionoscloud_lan_delete.rb +5 -6
- data/lib/chef/knife/ionoscloud_lan_get.rb +37 -0
- data/lib/chef/knife/ionoscloud_lan_list.rb +4 -3
- data/lib/chef/knife/ionoscloud_lan_update.rb +75 -0
- data/lib/chef/knife/ionoscloud_loadbalancer_create.rb +7 -16
- data/lib/chef/knife/ionoscloud_loadbalancer_delete.rb +3 -10
- data/lib/chef/knife/ionoscloud_loadbalancer_get.rb +4 -14
- data/lib/chef/knife/ionoscloud_loadbalancer_list.rb +2 -2
- data/lib/chef/knife/ionoscloud_loadbalancer_nic_add.rb +4 -16
- data/lib/chef/knife/ionoscloud_loadbalancer_nic_remove.rb +4 -17
- data/lib/chef/knife/ionoscloud_loadbalancer_update.rb +72 -0
- data/lib/chef/knife/ionoscloud_location_list.rb +2 -2
- data/lib/chef/knife/ionoscloud_natgateway_create.rb +7 -19
- data/lib/chef/knife/ionoscloud_natgateway_delete.rb +4 -20
- data/lib/chef/knife/ionoscloud_natgateway_get.rb +41 -0
- data/lib/chef/knife/ionoscloud_natgateway_lan_add.rb +4 -13
- data/lib/chef/knife/ionoscloud_natgateway_lan_remove.rb +3 -10
- data/lib/chef/knife/ionoscloud_natgateway_list.rb +3 -2
- data/lib/chef/knife/ionoscloud_natgateway_rule_add.rb +8 -28
- data/lib/chef/knife/ionoscloud_natgateway_rule_list.rb +3 -2
- data/lib/chef/knife/ionoscloud_natgateway_rule_remove.rb +5 -23
- data/lib/chef/knife/ionoscloud_natgateway_rule_update.rb +115 -0
- data/lib/chef/knife/ionoscloud_natgateway_update.rb +83 -0
- data/lib/chef/knife/ionoscloud_networkloadbalancer_create.rb +8 -15
- data/lib/chef/knife/ionoscloud_networkloadbalancer_delete.rb +4 -24
- data/lib/chef/knife/ionoscloud_networkloadbalancer_get.rb +41 -0
- data/lib/chef/knife/ionoscloud_networkloadbalancer_list.rb +2 -2
- data/lib/chef/knife/ionoscloud_networkloadbalancer_rule_add.rb +32 -48
- data/lib/chef/knife/ionoscloud_networkloadbalancer_rule_list.rb +3 -2
- data/lib/chef/knife/ionoscloud_networkloadbalancer_rule_remove.rb +21 -32
- data/lib/chef/knife/ionoscloud_networkloadbalancer_rule_target_add.rb +7 -26
- data/lib/chef/knife/ionoscloud_networkloadbalancer_rule_target_list.rb +3 -2
- data/lib/chef/knife/ionoscloud_networkloadbalancer_rule_target_remove.rb +6 -24
- data/lib/chef/knife/ionoscloud_networkloadbalancer_rule_update.rb +147 -0
- data/lib/chef/knife/ionoscloud_networkloadbalancer_update.rb +97 -0
- data/lib/chef/knife/ionoscloud_nic_create.rb +10 -24
- data/lib/chef/knife/ionoscloud_nic_delete.rb +4 -10
- data/lib/chef/knife/ionoscloud_nic_get.rb +48 -0
- data/lib/chef/knife/ionoscloud_nic_list.rb +2 -2
- data/lib/chef/knife/ionoscloud_nic_update.rb +95 -0
- data/lib/chef/knife/ionoscloud_node_delete.rb +2 -2
- data/lib/chef/knife/ionoscloud_node_get.rb +48 -0
- data/lib/chef/knife/ionoscloud_node_list.rb +2 -2
- data/lib/chef/knife/ionoscloud_node_replace.rb +2 -2
- data/lib/chef/knife/ionoscloud_nodepool_create.rb +27 -59
- data/lib/chef/knife/ionoscloud_nodepool_delete.rb +3 -34
- data/lib/chef/knife/ionoscloud_nodepool_get.rb +42 -0
- data/lib/chef/knife/ionoscloud_nodepool_lan_add.rb +4 -32
- data/lib/chef/knife/ionoscloud_nodepool_lan_remove.rb +3 -28
- data/lib/chef/knife/ionoscloud_nodepool_list.rb +2 -2
- data/lib/chef/knife/ionoscloud_nodepool_update.rb +123 -0
- data/lib/chef/knife/ionoscloud_pcc_create.rb +13 -19
- data/lib/chef/knife/ionoscloud_pcc_delete.rb +3 -11
- data/lib/chef/knife/ionoscloud_pcc_get.rb +32 -0
- data/lib/chef/knife/ionoscloud_pcc_list.rb +2 -2
- data/lib/chef/knife/ionoscloud_pcc_update.rb +62 -0
- data/lib/chef/knife/ionoscloud_request_get.rb +39 -0
- data/lib/chef/knife/ionoscloud_request_list.rb +2 -2
- data/lib/chef/knife/ionoscloud_request_status.rb +2 -2
- data/lib/chef/knife/ionoscloud_request_wait.rb +2 -2
- data/lib/chef/knife/ionoscloud_resource_list.rb +2 -2
- data/lib/chef/knife/ionoscloud_s3key_create.rb +3 -7
- data/lib/chef/knife/ionoscloud_s3key_delete.rb +3 -6
- data/lib/chef/knife/ionoscloud_s3key_get.rb +37 -0
- data/lib/chef/knife/ionoscloud_s3key_list.rb +2 -2
- data/lib/chef/knife/ionoscloud_server_console.rb +2 -2
- data/lib/chef/knife/ionoscloud_server_create.rb +16 -30
- data/lib/chef/knife/ionoscloud_server_delete.rb +4 -10
- data/lib/chef/knife/ionoscloud_server_get.rb +42 -0
- data/lib/chef/knife/ionoscloud_server_list.rb +2 -2
- data/lib/chef/knife/ionoscloud_server_reboot.rb +2 -2
- data/lib/chef/knife/ionoscloud_server_resume.rb +2 -2
- data/lib/chef/knife/ionoscloud_server_start.rb +2 -2
- data/lib/chef/knife/ionoscloud_server_stop.rb +2 -2
- data/lib/chef/knife/ionoscloud_server_suspend.rb +2 -2
- data/lib/chef/knife/ionoscloud_server_token.rb +2 -2
- data/lib/chef/knife/ionoscloud_server_update.rb +96 -0
- data/lib/chef/knife/ionoscloud_server_upgrade.rb +2 -2
- data/lib/chef/knife/ionoscloud_share_create.rb +9 -13
- data/lib/chef/knife/ionoscloud_share_delete.rb +4 -5
- data/lib/chef/knife/ionoscloud_share_get.rb +37 -0
- data/lib/chef/knife/ionoscloud_share_list.rb +2 -2
- data/lib/chef/knife/ionoscloud_share_update.rb +69 -0
- data/lib/chef/knife/ionoscloud_snapshot_create.rb +3 -11
- data/lib/chef/knife/ionoscloud_snapshot_delete.rb +3 -8
- data/lib/chef/knife/ionoscloud_snapshot_get.rb +31 -0
- data/lib/chef/knife/ionoscloud_snapshot_list.rb +2 -2
- data/lib/chef/knife/ionoscloud_snapshot_restore.rb +3 -14
- data/lib/chef/knife/ionoscloud_snapshot_update.rb +125 -0
- data/lib/chef/knife/ionoscloud_template_list.rb +2 -2
- data/lib/chef/knife/ionoscloud_user_create.rb +3 -10
- data/lib/chef/knife/ionoscloud_user_delete.rb +3 -8
- data/lib/chef/knife/ionoscloud_user_get.rb +31 -0
- data/lib/chef/knife/ionoscloud_user_list.rb +2 -2
- data/lib/chef/knife/ionoscloud_user_ssourl.rb +2 -2
- data/lib/chef/knife/ionoscloud_user_update.rb +91 -0
- data/lib/chef/knife/ionoscloud_volume_attach.rb +2 -2
- data/lib/chef/knife/ionoscloud_volume_create.rb +4 -15
- data/lib/chef/knife/ionoscloud_volume_delete.rb +4 -10
- data/lib/chef/knife/ionoscloud_volume_detach.rb +2 -2
- data/lib/chef/knife/ionoscloud_volume_get.rb +35 -0
- data/lib/chef/knife/ionoscloud_volume_list.rb +2 -2
- data/lib/chef/knife/ionoscloud_volume_update.rb +105 -0
- data/lib/knife-ionoscloud/version.rb +1 -1
- data/spec/chef/knife/ionoscloud_backupunit_get_spec.rb +65 -0
- data/spec/chef/knife/ionoscloud_backupunit_update_spec.rb +78 -0
- data/spec/chef/knife/ionoscloud_datacenter_create_spec.rb +3 -0
- data/spec/chef/knife/ionoscloud_datacenter_delete_spec.rb +3 -0
- data/spec/chef/knife/ionoscloud_datacenter_get_spec.rb +69 -0
- data/spec/chef/knife/ionoscloud_datacenter_update_spec.rb +82 -0
- 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/chef/knife/ionoscloud_firewall_create_spec.rb +1 -1
- data/spec/chef/knife/ionoscloud_firewall_delete_spec.rb +1 -1
- data/spec/chef/knife/ionoscloud_firewall_get_spec.rb +77 -0
- data/spec/chef/knife/ionoscloud_firewall_update_spec.rb +117 -0
- data/spec/chef/knife/ionoscloud_flowlog_create_spec.rb +3 -3
- data/spec/chef/knife/ionoscloud_flowlog_delete_spec.rb +10 -10
- data/spec/chef/knife/ionoscloud_flowlog_get_spec.rb +171 -0
- data/spec/chef/knife/ionoscloud_flowlog_list_spec.rb +3 -3
- data/spec/chef/knife/ionoscloud_flowlog_update_spec.rb +244 -0
- data/spec/chef/knife/ionoscloud_group_create_spec.rb +3 -0
- data/spec/chef/knife/ionoscloud_group_update_spec.rb +121 -0
- data/spec/chef/knife/ionoscloud_group_user_add_spec.rb +6 -0
- data/spec/chef/knife/ionoscloud_group_user_remove_spec.rb +6 -0
- data/spec/chef/knife/ionoscloud_ipblock_get_spec.rb +66 -0
- data/spec/chef/knife/ionoscloud_ipblock_update_spec.rb +79 -0
- data/spec/chef/knife/ionoscloud_ipfailover_add_spec.rb +4 -4
- data/spec/chef/knife/ionoscloud_ipfailover_remove_spec.rb +7 -7
- data/spec/chef/knife/ionoscloud_k8s_create_spec.rb +7 -0
- data/spec/chef/knife/ionoscloud_k8s_delete_spec.rb +16 -11
- data/spec/chef/knife/ionoscloud_k8s_get_spec.rb +72 -0
- data/spec/chef/knife/ionoscloud_k8s_update_spec.rb +114 -0
- data/spec/chef/knife/ionoscloud_lan_create_spec.rb +4 -3
- data/spec/chef/knife/ionoscloud_lan_delete_spec.rb +7 -5
- data/spec/chef/knife/ionoscloud_lan_get_spec.rb +68 -0
- data/spec/chef/knife/ionoscloud_lan_list_spec.rb +2 -2
- data/spec/chef/knife/ionoscloud_lan_update_spec.rb +87 -0
- data/spec/chef/knife/ionoscloud_loadbalancer_update_spec.rb +89 -0
- data/spec/chef/knife/ionoscloud_natgateway_create_spec.rb +15 -0
- data/spec/chef/knife/ionoscloud_natgateway_get_spec.rb +81 -0
- data/spec/chef/knife/ionoscloud_natgateway_lan_add_spec.rb +15 -0
- data/spec/chef/knife/ionoscloud_natgateway_lan_remove_spec.rb +15 -0
- data/spec/chef/knife/ionoscloud_natgateway_rule_add_spec.rb +1 -0
- data/spec/chef/knife/ionoscloud_natgateway_rule_remove_spec.rb +1 -0
- data/spec/chef/knife/ionoscloud_natgateway_rule_update_spec.rb +121 -0
- data/spec/chef/knife/ionoscloud_natgateway_update_spec.rb +121 -0
- data/spec/chef/knife/ionoscloud_networkloadbalancer_create_spec.rb +13 -0
- data/spec/chef/knife/ionoscloud_networkloadbalancer_delete_spec.rb +3 -2
- data/spec/chef/knife/ionoscloud_networkloadbalancer_get_spec.rb +82 -0
- data/spec/chef/knife/ionoscloud_networkloadbalancer_rule_add_spec.rb +4 -3
- data/spec/chef/knife/ionoscloud_networkloadbalancer_rule_remove_spec.rb +70 -44
- data/spec/chef/knife/ionoscloud_networkloadbalancer_rule_target_add_spec.rb +26 -22
- data/spec/chef/knife/ionoscloud_networkloadbalancer_rule_target_remove_spec.rb +79 -61
- data/spec/chef/knife/ionoscloud_networkloadbalancer_rule_update_spec.rb +163 -0
- data/spec/chef/knife/ionoscloud_networkloadbalancer_update_spec.rb +107 -0
- data/spec/chef/knife/ionoscloud_nic_get_spec.rb +72 -0
- data/spec/chef/knife/ionoscloud_nic_update_spec.rb +97 -0
- data/spec/chef/knife/ionoscloud_node_get_spec.rb +70 -0
- data/spec/chef/knife/ionoscloud_nodepool_create_spec.rb +8 -17
- data/spec/chef/knife/ionoscloud_nodepool_delete_spec.rb +14 -0
- data/spec/chef/knife/ionoscloud_nodepool_get_spec.rb +83 -0
- data/spec/chef/knife/ionoscloud_nodepool_lan_add_spec.rb +29 -33
- data/spec/chef/knife/ionoscloud_nodepool_lan_remove.rb +14 -17
- data/spec/chef/knife/ionoscloud_nodepool_update_spec.rb +134 -0
- data/spec/chef/knife/ionoscloud_pcc_create_spec.rb +7 -4
- data/spec/chef/knife/ionoscloud_pcc_delete_spec.rb +2 -2
- data/spec/chef/knife/ionoscloud_pcc_get_spec.rb +71 -0
- data/spec/chef/knife/ionoscloud_pcc_update_spec.rb +83 -0
- data/spec/chef/knife/ionoscloud_request_get_spec.rb +69 -0
- data/spec/chef/knife/ionoscloud_s3key_get_spec.rb +66 -0
- data/spec/chef/knife/ionoscloud_server_create_spec.rb +3 -0
- data/spec/chef/knife/ionoscloud_server_delete_spec.rb +3 -0
- data/spec/chef/knife/ionoscloud_server_get_spec.rb +74 -0
- data/spec/chef/knife/ionoscloud_server_update_spec.rb +105 -0
- data/spec/chef/knife/ionoscloud_share_get_spec.rb +66 -0
- data/spec/chef/knife/ionoscloud_share_update_spec.rb +91 -0
- data/spec/chef/knife/ionoscloud_snapshot_create_spec.rb +12 -0
- data/spec/chef/knife/ionoscloud_snapshot_delete_spec.rb +12 -0
- data/spec/chef/knife/ionoscloud_snapshot_get_spec.rb +79 -0
- data/spec/chef/knife/ionoscloud_snapshot_restore_spec.rb +9 -0
- data/spec/chef/knife/ionoscloud_snapshot_update_spec.rb +113 -0
- data/spec/chef/knife/ionoscloud_user_create_spec.rb +3 -1
- data/spec/chef/knife/ionoscloud_user_delete_spec.rb +4 -2
- data/spec/chef/knife/ionoscloud_user_get_spec.rb +70 -0
- data/spec/chef/knife/ionoscloud_user_update_spec.rb +110 -0
- data/spec/chef/knife/ionoscloud_volume_create_spec.rb +15 -5
- data/spec/chef/knife/ionoscloud_volume_delete_spec.rb +10 -0
- data/spec/chef/knife/ionoscloud_volume_get_spec.rb +81 -0
- data/spec/chef/knife/ionoscloud_volume_update_spec.rb +116 -0
- data/spec/spec_helper.rb +148 -23
- metadata +336 -90
- data/docs/subcommands/k8s_create.md +0 -47
- data/spec/test.sh +0 -3
@@ -0,0 +1,147 @@
|
|
1
|
+
require_relative 'ionoscloud_base'
|
2
|
+
|
3
|
+
class Chef
|
4
|
+
class Knife
|
5
|
+
class IonoscloudNetworkloadbalancerRuleUpdate < Knife
|
6
|
+
include Knife::IonoscloudBase
|
7
|
+
|
8
|
+
banner 'knife ionoscloud networkloadbalancer rule update (options)'
|
9
|
+
|
10
|
+
option :datacenter_id,
|
11
|
+
short: '-D DATACENTER_ID',
|
12
|
+
long: '--datacenter-id DATACENTER_ID',
|
13
|
+
description: 'ID of the data center'
|
14
|
+
|
15
|
+
option :network_loadbalancer_id,
|
16
|
+
short: '-L NETWORK_LOADBALANCER_ID',
|
17
|
+
long: '--network-loadbalancer NETWORK_LOADBALANCER_ID',
|
18
|
+
description: 'ID of the Network Loadbalancer'
|
19
|
+
|
20
|
+
option :forwarding_rule_id,
|
21
|
+
short: '-R FORWARDING_RULE_ID',
|
22
|
+
long: '--forwarding-rule FORWARDING_RULE_ID',
|
23
|
+
description: 'ID of the Network Loadbalancer Forwarding Rule'
|
24
|
+
|
25
|
+
option :name,
|
26
|
+
short: '-n NAME',
|
27
|
+
long: '--name NAME',
|
28
|
+
description: 'A name of that Network Load Balancer forwarding rule'
|
29
|
+
|
30
|
+
option :algorithm,
|
31
|
+
short: '-a ALGORITHM',
|
32
|
+
long: '--algorithm ALGORITHM',
|
33
|
+
description: 'Algorithm for the balancing'
|
34
|
+
|
35
|
+
option :protocol,
|
36
|
+
long: '--protocol PROTOCOL',
|
37
|
+
description: 'Protocol of the balancing'
|
38
|
+
|
39
|
+
option :listener_ip,
|
40
|
+
short: '-i LISTENER_IP',
|
41
|
+
long: '--ip LISTENER_IP',
|
42
|
+
description: 'Listening IP. (inbound)'
|
43
|
+
|
44
|
+
option :listener_port,
|
45
|
+
short: '-p LISTENER_PORT',
|
46
|
+
long: '--port LISTENER_PORT',
|
47
|
+
description: 'Listening port number. (inbound) (range: 1 to 65535)'
|
48
|
+
|
49
|
+
option :client_timeout,
|
50
|
+
long: '--client-timeout CLIENT_TIMEOUT',
|
51
|
+
description: 'ClientTimeout is expressed in milliseconds. This inactivity timeout applies when '\
|
52
|
+
'the client is expected to acknowledge or send data. If unset the default of 50 seconds will be used.'
|
53
|
+
|
54
|
+
option :connect_timeout,
|
55
|
+
long: '--connect-timeout CONNECT_TIMEOUT',
|
56
|
+
description: 'It specifies the maximum time (in milliseconds) to wait for a connection attempt to a '\
|
57
|
+
'target VM to succeed. If unset, the default of 5 seconds will be used.'
|
58
|
+
|
59
|
+
option :target_timeout,
|
60
|
+
long: '--terget-timeout TARGET_TIMEOUT',
|
61
|
+
description: 'TargetTimeout specifies the maximum inactivity time (in milliseconds) on the target VM side. '\
|
62
|
+
'If unset, the default of 50 seconds will be used.'
|
63
|
+
|
64
|
+
option :retries,
|
65
|
+
short: '-r RETRIES',
|
66
|
+
long: '--retries RETRIES',
|
67
|
+
description: 'Retries specifies the number of retries to perform on a target VM after a connection failure. '\
|
68
|
+
'If unset, the default value of 3 will be used. (valid range: [0, 65535])'
|
69
|
+
|
70
|
+
option :targets,
|
71
|
+
long: '--targets TARGETS',
|
72
|
+
description: 'Array of targets'
|
73
|
+
|
74
|
+
def initialize(args = [])
|
75
|
+
super(args)
|
76
|
+
@description =
|
77
|
+
'Updates information about a Ionoscloud Network Load Balancer.'
|
78
|
+
@directory = 'compute-engine'
|
79
|
+
@required_options = [:datacenter_id, :network_loadbalancer_id, :ionoscloud_username, :ionoscloud_password]
|
80
|
+
@updatable_fields = [
|
81
|
+
:name, :algorithm, :protocol, :listener_ip, :listener_port, :targets,
|
82
|
+
:client_timeout, :connect_timeout, :target_timeout, :retries,
|
83
|
+
]
|
84
|
+
end
|
85
|
+
|
86
|
+
def run
|
87
|
+
$stdout.sync = true
|
88
|
+
handle_extra_config
|
89
|
+
validate_required_params(@required_options, config)
|
90
|
+
|
91
|
+
network_load_balancer_api = Ionoscloud::NetworkLoadBalancersApi.new(api_client)
|
92
|
+
|
93
|
+
config[:gateway_ips] = config[:gateway_ips].split(',') if config[:gateway_ips] && config[:gateway_ips].instance_of?(String)
|
94
|
+
config[:targets] = JSON[config[:targets]] if config[:targets] && config[:targets].instance_of?(String)
|
95
|
+
|
96
|
+
config[:targets] = config[:targets].map do
|
97
|
+
|target|
|
98
|
+
Ionoscloud::NetworkLoadBalancerForwardingRuleTarget.new(
|
99
|
+
ip: target['ip'],
|
100
|
+
port: target['port'],
|
101
|
+
weight: target['weight'],
|
102
|
+
health_check: Ionoscloud::NetworkLoadBalancerForwardingRuleTargetHealthCheck.new(
|
103
|
+
check: target['health_check']['check'],
|
104
|
+
check_interval: target['health_check']['check_interval'],
|
105
|
+
maintenance: target['health_check']['maintenance'],
|
106
|
+
),
|
107
|
+
)
|
108
|
+
end if config[:targets]
|
109
|
+
|
110
|
+
if @updatable_fields.map { |el| config[el] }.any?
|
111
|
+
print "#{ui.color('Updating Network Load Balancer...', :magenta)}"
|
112
|
+
|
113
|
+
_, _, headers = network_load_balancer_api.datacenters_networkloadbalancers_forwardingrules_patch_with_http_info(
|
114
|
+
config[:datacenter_id],
|
115
|
+
config[:network_loadbalancer_id],
|
116
|
+
config[:forwarding_rule_id],
|
117
|
+
Ionoscloud::NetworkLoadBalancerForwardingRuleProperties.new(
|
118
|
+
name: config[:name],
|
119
|
+
algorithm: config[:algorithm],
|
120
|
+
protocol: config[:protocol],
|
121
|
+
listener_ip: config[:listener_ip],
|
122
|
+
listener_port: config[:listener_port],
|
123
|
+
targets: config[:targets],
|
124
|
+
health_check: Ionoscloud::NetworkLoadBalancerForwardingRuleHealthCheck.new(
|
125
|
+
client_timeout: config[:client_timeout],
|
126
|
+
connect_timeout: config[:connect_timeout],
|
127
|
+
target_timeout: config[:target_timeout],
|
128
|
+
retries: config[:retries],
|
129
|
+
),
|
130
|
+
),
|
131
|
+
)
|
132
|
+
|
133
|
+
dot = ui.color('.', :magenta)
|
134
|
+
api_client.wait_for { print dot; is_done? get_request_id headers }
|
135
|
+
else
|
136
|
+
ui.warn("Nothing to update, please set one of the attributes #{@updatable_fields}.")
|
137
|
+
end
|
138
|
+
|
139
|
+
print_network_load_balancer(
|
140
|
+
network_load_balancer_api.datacenters_networkloadbalancers_find_by_network_load_balancer_id(
|
141
|
+
config[:datacenter_id], config[:network_loadbalancer_id], depth: 2,
|
142
|
+
),
|
143
|
+
)
|
144
|
+
end
|
145
|
+
end
|
146
|
+
end
|
147
|
+
end
|
@@ -0,0 +1,97 @@
|
|
1
|
+
require_relative 'ionoscloud_base'
|
2
|
+
|
3
|
+
class Chef
|
4
|
+
class Knife
|
5
|
+
class IonoscloudNetworkloadbalancerUpdate < Knife
|
6
|
+
include Knife::IonoscloudBase
|
7
|
+
|
8
|
+
banner 'knife ionoscloud networkloadbalancer update (options)'
|
9
|
+
|
10
|
+
option :datacenter_id,
|
11
|
+
short: '-D DATACENTER_ID',
|
12
|
+
long: '--datacenter-id DATACENTER_ID',
|
13
|
+
description: 'ID of the data center'
|
14
|
+
|
15
|
+
option :network_loadbalancer_id,
|
16
|
+
short: '-L NETWORK_LOADBALANCER_ID',
|
17
|
+
long: '--network-loadbalancer NETWORK_LOADBALANCER_ID',
|
18
|
+
description: 'ID of the Network Loadbalancer'
|
19
|
+
|
20
|
+
option :name,
|
21
|
+
short: '-n NAME',
|
22
|
+
long: '--name NAME',
|
23
|
+
description: 'Name of the load balancer'
|
24
|
+
|
25
|
+
option :listener_lan,
|
26
|
+
short: '-l LISTENER_LAN_ID',
|
27
|
+
long: '--listener-lan LISTENER_LAN_ID',
|
28
|
+
description: 'Id of the listening LAN. (inbound)'
|
29
|
+
|
30
|
+
option :target_lan,
|
31
|
+
short: '-t TARGET_LAN_ID',
|
32
|
+
long: '--target-lan TARGET_LAN_ID',
|
33
|
+
description: 'Id of the balanced private target LAN. (outbound)'
|
34
|
+
|
35
|
+
option :ips,
|
36
|
+
short: '-i IP[,IP,...]',
|
37
|
+
long: '--ips IP[,IP,...]',
|
38
|
+
description: 'Collection of IP addresses of the Network Load Balancer. (inbound and outbound) '\
|
39
|
+
'IP of the listenerLan must be a customer reserved IP for the public load balancer '\
|
40
|
+
'and private IP for the private load balancer.'
|
41
|
+
|
42
|
+
option :lb_private_ips,
|
43
|
+
long: '--private-ips IP[,IP,...]',
|
44
|
+
description: 'Collection of private IP addresses with subnet mask of the Network Load Balancer. '\
|
45
|
+
'IPs must contain valid subnet mask. If user will not provide any IP then the system '\
|
46
|
+
'will generate one IP with /24 subnet.'
|
47
|
+
|
48
|
+
|
49
|
+
def initialize(args = [])
|
50
|
+
super(args)
|
51
|
+
@description =
|
52
|
+
'Updates information about a Ionoscloud Network Load Balancer.'
|
53
|
+
@directory = 'compute-engine'
|
54
|
+
@required_options = [:datacenter_id, :network_loadbalancer_id, :ionoscloud_username, :ionoscloud_password]
|
55
|
+
@updatable_fields = [:name, :listener_lan, :target_lan, :ips, :lb_private_ips]
|
56
|
+
end
|
57
|
+
|
58
|
+
def run
|
59
|
+
$stdout.sync = true
|
60
|
+
handle_extra_config
|
61
|
+
validate_required_params(@required_options, config)
|
62
|
+
|
63
|
+
config[:ips] = config[:ips].split(',') if config[:ips] && config[:ips].instance_of?(String)
|
64
|
+
config[:lb_private_ips] = config[:lb_private_ips].split(',') if config[:lb_private_ips] && config[:lb_private_ips].instance_of?(String)
|
65
|
+
|
66
|
+
network_load_balancer_api = Ionoscloud::NetworkLoadBalancersApi.new(api_client)
|
67
|
+
|
68
|
+
if @updatable_fields.map { |el| config[el] }.any?
|
69
|
+
print "#{ui.color('Updating Network Load Balancer...', :magenta)}"
|
70
|
+
|
71
|
+
_, _, headers = network_load_balancer_api.datacenters_networkloadbalancers_patch_with_http_info(
|
72
|
+
config[:datacenter_id],
|
73
|
+
config[:network_loadbalancer_id],
|
74
|
+
Ionoscloud::NetworkLoadBalancerProperties.new({
|
75
|
+
name: config[:name],
|
76
|
+
ips: config[:ips],
|
77
|
+
listener_lan: config[:listener_lan],
|
78
|
+
target_lan: config[:target_lan],
|
79
|
+
lb_private_ips: config[:lb_private_ips],
|
80
|
+
}.compact),
|
81
|
+
)
|
82
|
+
|
83
|
+
dot = ui.color('.', :magenta)
|
84
|
+
api_client.wait_for { print dot; is_done? get_request_id headers }
|
85
|
+
else
|
86
|
+
ui.warn("Nothing to update, please set one of the attributes #{@updatable_fields}.")
|
87
|
+
end
|
88
|
+
|
89
|
+
print_network_load_balancer(
|
90
|
+
network_load_balancer_api.datacenters_networkloadbalancers_find_by_network_load_balancer_id(
|
91
|
+
config[:datacenter_id], config[:network_loadbalancer_id], depth: 2,
|
92
|
+
),
|
93
|
+
)
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
@@ -31,7 +31,6 @@ class Chef
|
|
31
31
|
short: '-d',
|
32
32
|
long: '--dhcp',
|
33
33
|
boolean: true | false,
|
34
|
-
default: true,
|
35
34
|
description: 'Set to false if you wish to disable DHCP'
|
36
35
|
|
37
36
|
option :lan,
|
@@ -43,28 +42,25 @@ class Chef
|
|
43
42
|
short: '-t FIREWALL_TYPE',
|
44
43
|
long: '--firewall-type FIREWALL_TYPE',
|
45
44
|
description: 'The type of firewall rules that will be allowed on the NIC. If it is not specified it will take the '\
|
46
|
-
'default value INGRESS'
|
47
|
-
default: 'INGRESS'
|
48
|
-
|
49
|
-
attr_reader :description, :required_options
|
45
|
+
'default value INGRESS'
|
50
46
|
|
51
47
|
def initialize(args = [])
|
52
48
|
super(args)
|
53
49
|
@description =
|
54
50
|
"Creates a NIC on the specified server. The Ionoscloud platform supports adding multiple NICs to a server. These NICs "\
|
55
51
|
"can be used to create different, segmented networks on the platform."
|
52
|
+
@directory = 'compute-engine'
|
56
53
|
@required_options = [:datacenter_id, :server_id, :lan, :ionoscloud_username, :ionoscloud_password]
|
57
54
|
end
|
58
55
|
|
59
56
|
def run
|
60
57
|
$stdout.sync = true
|
58
|
+
handle_extra_config
|
61
59
|
validate_required_params(@required_options, config)
|
62
60
|
|
63
61
|
print "#{ui.color('Creating nic...', :magenta)}"
|
64
62
|
|
65
|
-
if config[:ips]
|
66
|
-
config[:ips] = config[:ips].split(',')
|
67
|
-
end
|
63
|
+
config[:ips] = config[:ips].split(',') if config[:ips] && config[:ips].instance_of?(String)
|
68
64
|
|
69
65
|
nic_properties = {
|
70
66
|
name: config[:name],
|
@@ -85,23 +81,13 @@ class Chef
|
|
85
81
|
dot = ui.color('.', :magenta)
|
86
82
|
api_client.wait_for { print dot; is_done? get_request_id headers }
|
87
83
|
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
84
|
+
print_nic(
|
85
|
+
nic_api.datacenters_servers_nics_find_by_id(
|
86
|
+
config[:datacenter_id],
|
87
|
+
config[:server_id],
|
88
|
+
nic.id,
|
89
|
+
),
|
92
90
|
)
|
93
|
-
|
94
|
-
puts "\n"
|
95
|
-
puts "#{ui.color('ID', :cyan)}: #{nic.id}"
|
96
|
-
puts "#{ui.color('Name', :cyan)}: #{nic.properties.name}"
|
97
|
-
puts "#{ui.color('IPs', :cyan)}: #{nic.properties.ips.to_s}"
|
98
|
-
puts "#{ui.color('DHCP', :cyan)}: #{nic.properties.dhcp}"
|
99
|
-
puts "#{ui.color('LAN', :cyan)}: #{nic.properties.lan}"
|
100
|
-
puts "#{ui.color('Firewall Type', :cyan)}: #{nic.properties.firewall_type}"
|
101
|
-
puts "#{ui.color('Device Number', :cyan)}: #{nic.properties.device_number}"
|
102
|
-
puts "#{ui.color('PCI Slot', :cyan)}: #{nic.properties.pci_slot}"
|
103
|
-
|
104
|
-
puts 'done'
|
105
91
|
end
|
106
92
|
end
|
107
93
|
end
|
@@ -17,17 +17,17 @@ class Chef
|
|
17
17
|
long: '--server-id SERVER_ID',
|
18
18
|
description: 'The ID of the server assigned the NIC'
|
19
19
|
|
20
|
-
attr_reader :description, :required_options
|
21
|
-
|
22
20
|
def initialize(args = [])
|
23
21
|
super(args)
|
24
22
|
@description =
|
25
23
|
'Deletes an existing NIC from a server.'
|
24
|
+
@directory = 'compute-engine'
|
26
25
|
@required_options = [:datacenter_id, :server_id, :ionoscloud_username, :ionoscloud_password]
|
27
26
|
end
|
28
27
|
|
29
28
|
def run
|
30
29
|
$stdout.sync = true
|
30
|
+
handle_extra_config
|
31
31
|
validate_required_params(@required_options, config)
|
32
32
|
|
33
33
|
nic_api = Ionoscloud::NetworkInterfacesApi.new(api_client)
|
@@ -40,14 +40,8 @@ class Chef
|
|
40
40
|
next
|
41
41
|
end
|
42
42
|
|
43
|
-
|
44
|
-
|
45
|
-
msg_pair('IPs', nic.properties.ips)
|
46
|
-
msg_pair('DHCP', nic.properties.dhcp)
|
47
|
-
msg_pair('LAN', nic.properties.lan)
|
48
|
-
msg_pair('Firewall Type', nic.properties.firewall_type)
|
49
|
-
msg_pair('Device Number', nic.properties.device_number)
|
50
|
-
msg_pair('PCI Slot', nic.properties.pci_slot)
|
43
|
+
print_nic(nic)
|
44
|
+
puts "\n"
|
51
45
|
|
52
46
|
begin
|
53
47
|
confirm('Do you really want to delete this Nic')
|
@@ -0,0 +1,48 @@
|
|
1
|
+
require_relative 'ionoscloud_base'
|
2
|
+
|
3
|
+
class Chef
|
4
|
+
class Knife
|
5
|
+
class IonoscloudNicGet < Knife
|
6
|
+
include Knife::IonoscloudBase
|
7
|
+
|
8
|
+
banner 'knife ionoscloud nic get (options)'
|
9
|
+
|
10
|
+
option :datacenter_id,
|
11
|
+
short: '-D DATACENTER_ID',
|
12
|
+
long: '--datacenter-id DATACENTER_ID',
|
13
|
+
description: 'ID of the data center'
|
14
|
+
|
15
|
+
option :server_id,
|
16
|
+
short: '-S SERVER_ID',
|
17
|
+
long: '--server-id SERVER_ID',
|
18
|
+
description: 'The ID of the server to which the NIC is assigned'
|
19
|
+
|
20
|
+
option :nic_id,
|
21
|
+
short: '-N NIC_ID',
|
22
|
+
long: '--nic-id NIC_ID',
|
23
|
+
description: 'ID of the load balancer'
|
24
|
+
|
25
|
+
def initialize(args = [])
|
26
|
+
super(args)
|
27
|
+
@description =
|
28
|
+
'Retrieves the attributes of a given NIC.'
|
29
|
+
@directory = 'compute-engine'
|
30
|
+
@required_options = [:datacenter_id, :server_id, :nic_id, :ionoscloud_username, :ionoscloud_password]
|
31
|
+
end
|
32
|
+
|
33
|
+
def run
|
34
|
+
$stdout.sync = true
|
35
|
+
handle_extra_config
|
36
|
+
validate_required_params(@required_options, config)
|
37
|
+
|
38
|
+
print_nic(
|
39
|
+
Ionoscloud::NetworkInterfacesApi.new(api_client).datacenters_servers_nics_find_by_id(
|
40
|
+
config[:datacenter_id],
|
41
|
+
config[:server_id],
|
42
|
+
config[:nic_id],
|
43
|
+
),
|
44
|
+
)
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -17,17 +17,17 @@ class Chef
|
|
17
17
|
long: '--server-id SERVER_ID',
|
18
18
|
description: 'The ID of the server assigned the NIC'
|
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 NICs connected to a server.'
|
24
|
+
@directory = 'compute-engine'
|
26
25
|
@required_options = [:datacenter_id, :server_id, :ionoscloud_username, :ionoscloud_password]
|
27
26
|
end
|
28
27
|
|
29
28
|
def run
|
30
29
|
$stdout.sync = true
|
30
|
+
handle_extra_config
|
31
31
|
validate_required_params(@required_options, config)
|
32
32
|
|
33
33
|
nic_list = [
|
@@ -0,0 +1,95 @@
|
|
1
|
+
require_relative 'ionoscloud_base'
|
2
|
+
|
3
|
+
class Chef
|
4
|
+
class Knife
|
5
|
+
class IonoscloudNicUpdate < Knife
|
6
|
+
include Knife::IonoscloudBase
|
7
|
+
|
8
|
+
banner 'knife ionoscloud nic update (options)'
|
9
|
+
|
10
|
+
option :datacenter_id,
|
11
|
+
short: '-D DATACENTER_ID',
|
12
|
+
long: '--datacenter-id DATACENTER_ID',
|
13
|
+
description: 'ID of the data center'
|
14
|
+
|
15
|
+
option :server_id,
|
16
|
+
short: '-S SERVER_ID',
|
17
|
+
long: '--server-id SERVER_ID',
|
18
|
+
description: 'The ID of the server to which the NIC is assigned'
|
19
|
+
|
20
|
+
option :nic_id,
|
21
|
+
short: '-N NIC_ID',
|
22
|
+
long: '--nic-id NIC_ID',
|
23
|
+
description: 'ID of the load balancer'
|
24
|
+
|
25
|
+
option :name,
|
26
|
+
short: '-n NAME',
|
27
|
+
long: '--name NAME',
|
28
|
+
description: 'Name of the NIC'
|
29
|
+
|
30
|
+
option :ips,
|
31
|
+
short: '-i IP[,IP,...]',
|
32
|
+
long: '--ips IP[,IP,...]',
|
33
|
+
description: 'IPs assigned to the NIC'
|
34
|
+
|
35
|
+
option :dhcp,
|
36
|
+
long: '--dhcp DHCP',
|
37
|
+
description: 'Set to false if you wish to disable DHCP'
|
38
|
+
|
39
|
+
option :lan,
|
40
|
+
short: '-l ID',
|
41
|
+
long: '--lan ID',
|
42
|
+
description: 'The LAN ID the NIC will reside on; if the LAN ID does not exist it will be created'
|
43
|
+
|
44
|
+
|
45
|
+
option :firewall_type,
|
46
|
+
short: '-t FIREWALL_TYPE',
|
47
|
+
long: '--firewall-type FIREWALL_TYPE',
|
48
|
+
description: 'The type of firewall rules that will be allowed on the NIC. If it is not specified it will take the '\
|
49
|
+
'default value INGRESS'
|
50
|
+
|
51
|
+
def initialize(args = [])
|
52
|
+
super(args)
|
53
|
+
@description =
|
54
|
+
'Updates information about a Ionoscloud NIC.'
|
55
|
+
@directory = 'compute-engine'
|
56
|
+
@required_options = [:datacenter_id, :server_id, :nic_id, :ionoscloud_username, :ionoscloud_password]
|
57
|
+
@updatable_fields = [:name, :ips, :dhcp, :lan, :nat]
|
58
|
+
end
|
59
|
+
|
60
|
+
def run
|
61
|
+
$stdout.sync = true
|
62
|
+
handle_extra_config
|
63
|
+
validate_required_params(@required_options, config)
|
64
|
+
|
65
|
+
config[:ips] = config[:ips].split(',') if config[:ips] && config[:ips].instance_of?(String)
|
66
|
+
|
67
|
+
nic_api = Ionoscloud::NetworkInterfacesApi.new(api_client)
|
68
|
+
|
69
|
+
if @updatable_fields.map { |el| config[el] }.any?
|
70
|
+
print "#{ui.color('Updating NIC...', :magenta)}"
|
71
|
+
|
72
|
+
_, _, headers = nic_api.datacenters_servers_nics_patch_with_http_info(
|
73
|
+
config[:datacenter_id],
|
74
|
+
config[:server_id],
|
75
|
+
config[:nic_id],
|
76
|
+
Ionoscloud::NicProperties.new(
|
77
|
+
name: config[:name],
|
78
|
+
ips: config[:ips],
|
79
|
+
dhcp: (config.key?(:dhcp) ? config[:dhcp].to_s.downcase == 'true' : nil),
|
80
|
+
lan: config[:lan],
|
81
|
+
firewall_type: config[:firewall_type],
|
82
|
+
),
|
83
|
+
)
|
84
|
+
|
85
|
+
dot = ui.color('.', :magenta)
|
86
|
+
api_client.wait_for { print dot; is_done? get_request_id headers }
|
87
|
+
else
|
88
|
+
ui.warn("Nothing to update, please set one of the attributes #{@updatable_fields}.")
|
89
|
+
end
|
90
|
+
|
91
|
+
print_nic(nic_api.datacenters_servers_nics_find_by_id(config[:datacenter_id], config[:server_id], config[:nic_id]))
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
@@ -18,17 +18,17 @@ class Chef
|
|
18
18
|
long: '--nodepool-id NODEPOOL_ID',
|
19
19
|
description: 'The ID of the K8s Nodepool'
|
20
20
|
|
21
|
-
attr_reader :description, :required_options
|
22
|
-
|
23
21
|
def initialize(args = [])
|
24
22
|
super(args)
|
25
23
|
@description =
|
26
24
|
'Delete a single Kubernetes Node.'
|
25
|
+
@directory = 'kubernetes'
|
27
26
|
@required_options = [:cluster_id, :nodepool_id, :ionoscloud_username, :ionoscloud_password]
|
28
27
|
end
|
29
28
|
|
30
29
|
def run
|
31
30
|
$stdout.sync = true
|
31
|
+
handle_extra_config
|
32
32
|
validate_required_params(@required_options, config)
|
33
33
|
|
34
34
|
kubernetes_api = Ionoscloud::KubernetesApi.new(api_client)
|
@@ -0,0 +1,48 @@
|
|
1
|
+
require_relative 'ionoscloud_base'
|
2
|
+
|
3
|
+
class Chef
|
4
|
+
class Knife
|
5
|
+
class IonoscloudNodeGet < Knife
|
6
|
+
include Knife::IonoscloudBase
|
7
|
+
|
8
|
+
banner 'knife ionoscloud node get (options)'
|
9
|
+
|
10
|
+
option :cluster_id,
|
11
|
+
short: '-C CLUSTER_ID',
|
12
|
+
long: '--cluster-id CLUSTER_ID',
|
13
|
+
description: 'The ID of the K8s Cluster'
|
14
|
+
|
15
|
+
option :nodepool_id,
|
16
|
+
short: '-P NODEPOOL_ID',
|
17
|
+
long: '--nodepool-id NODEPOOL_ID',
|
18
|
+
description: 'The ID of the K8s Nodepool'
|
19
|
+
|
20
|
+
option :node_id,
|
21
|
+
short: '-N NODE_ID',
|
22
|
+
long: '--node-id NODE_ID',
|
23
|
+
description: 'ID of the load balancer'
|
24
|
+
|
25
|
+
def initialize(args = [])
|
26
|
+
super(args)
|
27
|
+
@description =
|
28
|
+
'Retrieves the attributes of a given K8S Node.'
|
29
|
+
@directory = 'kubernetes'
|
30
|
+
@required_options = [:cluster_id, :nodepool_id, :node_id, :ionoscloud_username, :ionoscloud_password]
|
31
|
+
end
|
32
|
+
|
33
|
+
def run
|
34
|
+
$stdout.sync = true
|
35
|
+
handle_extra_config
|
36
|
+
validate_required_params(@required_options, config)
|
37
|
+
|
38
|
+
print_k8s_node(
|
39
|
+
Ionoscloud::KubernetesApi.new(api_client).k8s_nodepools_nodes_find_by_id(
|
40
|
+
config[:cluster_id],
|
41
|
+
config[:nodepool_id],
|
42
|
+
config[:node_id],
|
43
|
+
),
|
44
|
+
)
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -17,17 +17,17 @@ class Chef
|
|
17
17
|
long: '--nodepool-id NODEPOOL_ID',
|
18
18
|
description: 'The ID of the K8s Nodepool'
|
19
19
|
|
20
|
-
attr_reader :description, :required_options
|
21
|
-
|
22
20
|
def initialize(args = [])
|
23
21
|
super(args)
|
24
22
|
@description =
|
25
23
|
'Retrieve a list of Kubernetes Nodes in a Nodepool.'
|
24
|
+
@directory = 'kubernetes'
|
26
25
|
@required_options = [:cluster_id, :nodepool_id, :ionoscloud_username, :ionoscloud_password]
|
27
26
|
end
|
28
27
|
|
29
28
|
def run
|
30
29
|
$stdout.sync = true
|
30
|
+
handle_extra_config
|
31
31
|
validate_required_params(@required_options, config)
|
32
32
|
|
33
33
|
node_list = [
|
@@ -18,8 +18,6 @@ class Chef
|
|
18
18
|
long: '--nodepool-id NODEPOOL_ID',
|
19
19
|
description: 'The ID of the K8s Nodepool'
|
20
20
|
|
21
|
-
attr_reader :description, :required_options
|
22
|
-
|
23
21
|
def initialize(args = [])
|
24
22
|
super(args)
|
25
23
|
@description =
|
@@ -28,11 +26,13 @@ class Chef
|
|
28
26
|
"template creates & configures a new node, waits for status \"ACTIVE\", "\
|
29
27
|
"and migrates all the pods from the faulty node, deleting it once empty. "\
|
30
28
|
"While this operation occurs, the nodepool will have an extra billable \"ACTIVE\" node."
|
29
|
+
@directory = 'kubernetes'
|
31
30
|
@required_options = [:cluster_id, :nodepool_id, :ionoscloud_username, :ionoscloud_password]
|
32
31
|
end
|
33
32
|
|
34
33
|
def run
|
35
34
|
$stdout.sync = true
|
35
|
+
handle_extra_config
|
36
36
|
validate_required_params(@required_options, config)
|
37
37
|
|
38
38
|
kubernetes_api = Ionoscloud::KubernetesApi.new(api_client)
|