knife-ionoscloud 6.0.0.beta.2 → 6.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/docs/README.md +11 -0
- data/docs/subcommands/backupunit_create.md +7 -4
- data/docs/subcommands/backupunit_delete.md +6 -3
- data/docs/subcommands/backupunit_get.md +38 -0
- data/docs/subcommands/backupunit_list.md +6 -3
- data/docs/subcommands/backupunit_ssourl.md +6 -3
- data/docs/subcommands/backupunit_update.md +44 -0
- data/docs/subcommands/composite_server_create.md +8 -11
- data/docs/subcommands/contract_list.md +6 -3
- data/docs/subcommands/cube_server_create.md +6 -3
- data/docs/subcommands/datacenter_create.md +6 -3
- data/docs/subcommands/datacenter_delete.md +6 -3
- data/docs/subcommands/datacenter_get.md +38 -0
- data/docs/subcommands/datacenter_list.md +6 -3
- data/docs/subcommands/datacenter_update.md +47 -0
- data/docs/subcommands/firewall_create.md +8 -8
- data/docs/subcommands/firewall_delete.md +5 -2
- data/docs/subcommands/firewall_get.md +50 -0
- data/docs/subcommands/firewall_list.md +6 -3
- data/docs/subcommands/firewall_update.md +74 -0
- data/docs/subcommands/flowlog_create.md +6 -3
- data/docs/subcommands/flowlog_delete.md +6 -3
- data/docs/subcommands/flowlog_get.md +58 -0
- data/docs/subcommands/flowlog_list.md +6 -3
- data/docs/subcommands/flowlog_update.md +70 -0
- data/docs/subcommands/group_create.md +6 -12
- data/docs/subcommands/group_delete.md +6 -3
- data/docs/subcommands/group_get.md +6 -3
- data/docs/subcommands/group_list.md +6 -3
- data/docs/subcommands/group_update.md +68 -0
- data/docs/subcommands/group_user_add.md +5 -2
- data/docs/subcommands/group_user_remove.md +5 -2
- data/docs/subcommands/image_list.md +6 -3
- data/docs/subcommands/ipblock_create.md +6 -3
- data/docs/subcommands/ipblock_delete.md +6 -3
- data/docs/subcommands/ipblock_get.md +38 -0
- data/docs/subcommands/ipblock_list.md +6 -3
- data/docs/subcommands/ipblock_update.md +41 -0
- data/docs/subcommands/ipfailover_add.md +6 -3
- data/docs/subcommands/ipfailover_remove.md +6 -3
- data/docs/subcommands/k8s_create.md +13 -10
- data/docs/subcommands/k8s_delete.md +6 -3
- data/docs/subcommands/k8s_get.md +38 -0
- data/docs/subcommands/k8s_list.md +6 -3
- data/docs/subcommands/k8s_update.md +56 -0
- data/docs/subcommands/kubeconfig_get.md +6 -3
- data/docs/subcommands/label_add.md +6 -3
- data/docs/subcommands/label_list.md +6 -3
- data/docs/subcommands/label_remove.md +5 -2
- data/docs/subcommands/lan_create.md +6 -3
- data/docs/subcommands/lan_delete.md +5 -2
- data/docs/subcommands/lan_get.md +42 -0
- data/docs/subcommands/lan_list.md +6 -3
- data/docs/subcommands/lan_update.md +54 -0
- data/docs/subcommands/loadbalancer_create.md +7 -4
- data/docs/subcommands/loadbalancer_delete.md +5 -2
- data/docs/subcommands/loadbalancer_get.md +6 -3
- data/docs/subcommands/loadbalancer_list.md +6 -3
- data/docs/subcommands/loadbalancer_nic_add.md +5 -2
- data/docs/subcommands/loadbalancer_nic_remove.md +5 -2
- data/docs/subcommands/loadbalancer_update.md +51 -0
- data/docs/subcommands/location_list.md +6 -3
- data/docs/subcommands/natgateway_create.md +8 -5
- data/docs/subcommands/natgateway_delete.md +5 -2
- data/docs/subcommands/natgateway_get.md +42 -0
- data/docs/subcommands/natgateway_lan_add.md +6 -3
- data/docs/subcommands/natgateway_lan_remove.md +5 -2
- data/docs/subcommands/natgateway_list.md +6 -3
- data/docs/subcommands/natgateway_rule_add.md +7 -4
- data/docs/subcommands/natgateway_rule_list.md +6 -3
- data/docs/subcommands/natgateway_rule_remove.md +5 -2
- data/docs/subcommands/natgateway_rule_update.md +69 -0
- data/docs/subcommands/natgateway_update.md +51 -0
- data/docs/subcommands/networkloadbalancer_create.md +6 -3
- data/docs/subcommands/networkloadbalancer_delete.md +5 -2
- data/docs/subcommands/networkloadbalancer_get.md +42 -0
- data/docs/subcommands/networkloadbalancer_list.md +6 -3
- data/docs/subcommands/networkloadbalancer_rule_add.md +9 -6
- data/docs/subcommands/networkloadbalancer_rule_list.md +6 -3
- data/docs/subcommands/networkloadbalancer_rule_remove.md +5 -2
- data/docs/subcommands/networkloadbalancer_rule_target_add.md +6 -3
- data/docs/subcommands/networkloadbalancer_rule_target_list.md +6 -3
- data/docs/subcommands/networkloadbalancer_rule_target_remove.md +6 -3
- data/docs/subcommands/networkloadbalancer_rule_update.md +75 -0
- data/docs/subcommands/networkloadbalancer_update.md +57 -0
- data/docs/subcommands/nic_create.md +9 -6
- data/docs/subcommands/nic_delete.md +6 -3
- data/docs/subcommands/nic_get.md +46 -0
- data/docs/subcommands/nic_list.md +6 -3
- data/docs/subcommands/nic_update.md +61 -0
- data/docs/subcommands/node_delete.md +5 -2
- data/docs/subcommands/node_get.md +46 -0
- data/docs/subcommands/node_list.md +6 -3
- data/docs/subcommands/node_replace.md +5 -2
- data/docs/subcommands/nodepool_create.md +16 -7
- data/docs/subcommands/nodepool_delete.md +5 -2
- data/docs/subcommands/nodepool_get.md +42 -0
- data/docs/subcommands/nodepool_lan_add.md +6 -3
- data/docs/subcommands/nodepool_lan_remove.md +5 -2
- data/docs/subcommands/nodepool_list.md +6 -3
- data/docs/subcommands/nodepool_update.md +72 -0
- data/docs/subcommands/pcc_create.md +6 -3
- data/docs/subcommands/pcc_delete.md +6 -3
- data/docs/subcommands/pcc_get.md +38 -0
- data/docs/subcommands/pcc_list.md +6 -3
- data/docs/subcommands/pcc_update.md +44 -0
- data/docs/subcommands/request_get.md +38 -0
- data/docs/subcommands/request_list.md +6 -3
- data/docs/subcommands/request_status.md +6 -3
- data/docs/subcommands/request_wait.md +6 -3
- data/docs/subcommands/resource_list.md +6 -3
- data/docs/subcommands/s3key_create.md +6 -3
- data/docs/subcommands/s3key_delete.md +5 -2
- data/docs/subcommands/s3key_get.md +42 -0
- data/docs/subcommands/s3key_list.md +6 -3
- data/docs/subcommands/server_console.md +6 -3
- data/docs/subcommands/server_create.md +6 -3
- data/docs/subcommands/server_delete.md +5 -2
- data/docs/subcommands/server_get.md +42 -0
- data/docs/subcommands/server_list.md +6 -6
- data/docs/subcommands/server_reboot.md +5 -2
- data/docs/subcommands/server_resume.md +5 -2
- data/docs/subcommands/server_start.md +5 -2
- data/docs/subcommands/server_stop.md +5 -2
- data/docs/subcommands/server_suspend.md +5 -2
- data/docs/subcommands/server_token.md +6 -3
- data/docs/subcommands/server_update.md +63 -0
- data/docs/subcommands/server_upgrade.md +6 -3
- data/docs/subcommands/share_create.md +7 -4
- data/docs/subcommands/share_delete.md +7 -4
- data/docs/subcommands/share_get.md +42 -0
- data/docs/subcommands/share_list.md +6 -3
- data/docs/subcommands/share_update.md +48 -0
- data/docs/subcommands/snapshot_create.md +6 -3
- data/docs/subcommands/snapshot_delete.md +6 -3
- data/docs/subcommands/snapshot_get.md +38 -0
- data/docs/subcommands/snapshot_list.md +6 -3
- data/docs/subcommands/snapshot_restore.md +6 -3
- data/docs/subcommands/snapshot_update.md +80 -0
- data/docs/subcommands/template_list.md +6 -3
- data/docs/subcommands/user_create.md +14 -5
- data/docs/subcommands/user_delete.md +6 -3
- data/docs/subcommands/user_get.md +38 -0
- data/docs/subcommands/user_list.md +6 -3
- data/docs/subcommands/user_ssourl.md +6 -3
- data/docs/subcommands/user_update.md +59 -0
- data/docs/subcommands/volume_attach.md +5 -2
- data/docs/subcommands/volume_create.md +28 -4
- data/docs/subcommands/volume_delete.md +5 -2
- data/docs/subcommands/volume_detach.md +5 -2
- data/docs/subcommands/volume_get.md +42 -0
- data/docs/subcommands/volume_list.md +6 -3
- data/docs/subcommands/volume_update.md +69 -0
- data/docs/summary.md +41 -0
- data/knife-ionoscloud.gemspec +1 -1
- data/lib/chef/knife/ionoscloud_base.rb +29 -1
- data/lib/chef/knife/ionoscloud_composite_server_create.rb +3 -7
- data/lib/chef/knife/ionoscloud_firewall_create.rb +1 -3
- data/lib/chef/knife/ionoscloud_firewall_update.rb +0 -1
- data/lib/chef/knife/ionoscloud_flowlog_create.rb +0 -2
- data/lib/chef/knife/ionoscloud_flowlog_update.rb +0 -2
- data/lib/chef/knife/ionoscloud_ipfailover_add.rb +1 -1
- data/lib/chef/knife/ionoscloud_ipfailover_remove.rb +1 -1
- data/lib/chef/knife/ionoscloud_lan_create.rb +1 -2
- data/lib/chef/knife/ionoscloud_lan_delete.rb +1 -1
- data/lib/chef/knife/ionoscloud_lan_get.rb +1 -1
- data/lib/chef/knife/ionoscloud_lan_list.rb +1 -1
- data/lib/chef/knife/ionoscloud_lan_update.rb +1 -1
- data/lib/chef/knife/ionoscloud_natgateway_rule_add.rb +2 -4
- data/lib/chef/knife/ionoscloud_networkloadbalancer_rule_add.rb +6 -12
- data/lib/chef/knife/ionoscloud_networkloadbalancer_rule_target_add.rb +1 -2
- data/lib/chef/knife/ionoscloud_nic_create.rb +1 -3
- data/lib/chef/knife/ionoscloud_nodepool_create.rb +3 -6
- data/lib/chef/knife/ionoscloud_nodepool_lan_add.rb +0 -1
- data/lib/chef/knife/ionoscloud_pcc_create.rb +1 -1
- data/lib/chef/knife/ionoscloud_server_create.rb +2 -4
- data/lib/knife-ionoscloud/version.rb +1 -1
- data/spec/chef/knife/ionoscloud_ipfailover_add_spec.rb +3 -3
- data/spec/chef/knife/ionoscloud_ipfailover_remove_spec.rb +4 -4
- data/spec/chef/knife/ionoscloud_lan_create_spec.rb +3 -3
- data/spec/chef/knife/ionoscloud_lan_delete_spec.rb +5 -5
- data/spec/chef/knife/ionoscloud_lan_get_spec.rb +2 -2
- data/spec/chef/knife/ionoscloud_lan_list_spec.rb +2 -2
- data/spec/chef/knife/ionoscloud_lan_update_spec.rb +3 -3
- data/spec/chef/knife/ionoscloud_pcc_create_spec.rb +2 -2
- metadata +47 -6
@@ -0,0 +1,69 @@
|
|
1
|
+
# VolumeUpdate
|
2
|
+
|
3
|
+
Updates information about a Ionoscloud Volume.
|
4
|
+
|
5
|
+
```text
|
6
|
+
knife ionoscloud volume update (options)
|
7
|
+
```
|
8
|
+
|
9
|
+
## Available options:
|
10
|
+
|
11
|
+
### Required options:
|
12
|
+
|
13
|
+
* datacenter\_id
|
14
|
+
* volume\_id
|
15
|
+
* ionoscloud\_username
|
16
|
+
* ionoscloud\_password
|
17
|
+
|
18
|
+
```text
|
19
|
+
extra_config_file: --extra-config EXTRA_CONFIG_FILE_PATH, -e EXTRA_CONFIG_FILE_PATH
|
20
|
+
path to the additional config file
|
21
|
+
|
22
|
+
datacenter_id: --datacenter-id DATACENTER_ID, -D DATACENTER_ID
|
23
|
+
name of the data center (required)
|
24
|
+
|
25
|
+
volume_id: --volume VOLUME_ID
|
26
|
+
iD of the Volume. (required)
|
27
|
+
|
28
|
+
name: --name NAME, -n NAME
|
29
|
+
name of the volume
|
30
|
+
|
31
|
+
size: --size SIZE, -S SIZE
|
32
|
+
the size of the volume in GB
|
33
|
+
|
34
|
+
bus: --bus BUS, -b BUS
|
35
|
+
the bus type of the volume (VIRTIO or IDE)
|
36
|
+
|
37
|
+
cpu_hot_plug: --cpu-hot-plug CPU_HOT_PLUG
|
38
|
+
the licence type of the volume (LINUX, WINDOWS, UNKNOWN, OTHER)
|
39
|
+
|
40
|
+
ram_hot_plug: --ram-hot-plug RAM_HOT_PLUG
|
41
|
+
the licence type of the volume (LINUX, WINDOWS, UNKNOWN, OTHER)
|
42
|
+
|
43
|
+
nic_hot_plug: --nic-hot-plug NIC_HOT_PLUG
|
44
|
+
the licence type of the volume (LINUX, WINDOWS, UNKNOWN, OTHER)
|
45
|
+
|
46
|
+
nic_hot_unplug: --nic-hot-unplug NIC_HOT_UNPLUG
|
47
|
+
the licence type of the volume (LINUX, WINDOWS, UNKNOWN, OTHER)
|
48
|
+
|
49
|
+
disc_virtio_hot_plug: --disc-virtio-hot_plug DISC_VIRTIO_HOT_PLUG
|
50
|
+
the licence type of the volume (LINUX, WINDOWS, UNKNOWN, OTHER)
|
51
|
+
|
52
|
+
disc_virtio_hot_unplug: --disc-virtio-hot_unplug DISC_VIRTIO_HOT_UNPLUG
|
53
|
+
the licence type of the volume (LINUX, WINDOWS, UNKNOWN, OTHER)
|
54
|
+
|
55
|
+
ionoscloud_username: --username USERNAME, -u USERNAME
|
56
|
+
your Ionoscloud username (required)
|
57
|
+
|
58
|
+
ionoscloud_password: --password PASSWORD, -p PASSWORD
|
59
|
+
your Ionoscloud password (required)
|
60
|
+
|
61
|
+
ionoscloud_url: --url URL
|
62
|
+
the Ionoscloud API URL
|
63
|
+
|
64
|
+
```
|
65
|
+
## Example
|
66
|
+
|
67
|
+
```text
|
68
|
+
knife ionoscloud volume update --extra-config EXTRA_CONFIG_FILE_PATH --datacenter-id DATACENTER_ID --volume VOLUME_ID --name NAME --size SIZE --bus BUS --cpu-hot-plug CPU_HOT_PLUG --ram-hot-plug RAM_HOT_PLUG --nic-hot-plug NIC_HOT_PLUG --nic-hot-unplug NIC_HOT_UNPLUG --disc-virtio-hot_plug DISC_VIRTIO_HOT_PLUG --disc-virtio-hot_unplug DISC_VIRTIO_HOT_UNPLUG --username USERNAME --password PASSWORD --url URL
|
69
|
+
```
|
data/docs/summary.md
CHANGED
@@ -7,59 +7,79 @@
|
|
7
7
|
|
8
8
|
* [BackupunitCreate](subcommands/backupunit_create.md)
|
9
9
|
* [BackupunitDelete](subcommands/backupunit_delete.md)
|
10
|
+
* [BackupunitGet](subcommands/backupunit_get.md)
|
10
11
|
* [BackupunitList](subcommands/backupunit_list.md)
|
11
12
|
* [BackupunitSsourl](subcommands/backupunit_ssourl.md)
|
13
|
+
* [BackupunitUpdate](subcommands/backupunit_update.md)
|
12
14
|
* [CompositeServerCreate](subcommands/composite_server_create.md)
|
13
15
|
* [ContractList](subcommands/contract_list.md)
|
14
16
|
* [CubeServerCreate](subcommands/cube_server_create.md)
|
15
17
|
* [DatacenterCreate](subcommands/datacenter_create.md)
|
16
18
|
* [DatacenterDelete](subcommands/datacenter_delete.md)
|
19
|
+
* [DatacenterGet](subcommands/datacenter_get.md)
|
17
20
|
* [DatacenterList](subcommands/datacenter_list.md)
|
21
|
+
* [DatacenterUpdate](subcommands/datacenter_update.md)
|
18
22
|
* [FirewallCreate](subcommands/firewall_create.md)
|
19
23
|
* [FirewallDelete](subcommands/firewall_delete.md)
|
24
|
+
* [FirewallGet](subcommands/firewall_get.md)
|
20
25
|
* [FirewallList](subcommands/firewall_list.md)
|
26
|
+
* [FirewallUpdate](subcommands/firewall_update.md)
|
21
27
|
* [FlowlogCreate](subcommands/flowlog_create.md)
|
22
28
|
* [FlowlogDelete](subcommands/flowlog_delete.md)
|
29
|
+
* [FlowlogGet](subcommands/flowlog_get.md)
|
23
30
|
* [FlowlogList](subcommands/flowlog_list.md)
|
31
|
+
* [FlowlogUpdate](subcommands/flowlog_update.md)
|
24
32
|
* [GroupCreate](subcommands/group_create.md)
|
25
33
|
* [GroupDelete](subcommands/group_delete.md)
|
26
34
|
* [GroupGet](subcommands/group_get.md)
|
27
35
|
* [GroupList](subcommands/group_list.md)
|
36
|
+
* [GroupUpdate](subcommands/group_update.md)
|
28
37
|
* [GroupUserAdd](subcommands/group_user_add.md)
|
29
38
|
* [GroupUserRemove](subcommands/group_user_remove.md)
|
30
39
|
* [ImageList](subcommands/image_list.md)
|
31
40
|
* [IpblockCreate](subcommands/ipblock_create.md)
|
32
41
|
* [IpblockDelete](subcommands/ipblock_delete.md)
|
42
|
+
* [IpblockGet](subcommands/ipblock_get.md)
|
33
43
|
* [IpblockList](subcommands/ipblock_list.md)
|
44
|
+
* [IpblockUpdate](subcommands/ipblock_update.md)
|
34
45
|
* [IpfailoverAdd](subcommands/ipfailover_add.md)
|
35
46
|
* [IpfailoverRemove](subcommands/ipfailover_remove.md)
|
36
47
|
* [K8sCreate](subcommands/k8s_create.md)
|
37
48
|
* [K8sDelete](subcommands/k8s_delete.md)
|
49
|
+
* [K8sGet](subcommands/k8s_get.md)
|
38
50
|
* [K8sList](subcommands/k8s_list.md)
|
51
|
+
* [K8sUpdate](subcommands/k8s_update.md)
|
39
52
|
* [KubeconfigGet](subcommands/kubeconfig_get.md)
|
40
53
|
* [LabelAdd](subcommands/label_add.md)
|
41
54
|
* [LabelList](subcommands/label_list.md)
|
42
55
|
* [LabelRemove](subcommands/label_remove.md)
|
43
56
|
* [LanCreate](subcommands/lan_create.md)
|
44
57
|
* [LanDelete](subcommands/lan_delete.md)
|
58
|
+
* [LanGet](subcommands/lan_get.md)
|
45
59
|
* [LanList](subcommands/lan_list.md)
|
60
|
+
* [LanUpdate](subcommands/lan_update.md)
|
46
61
|
* [LoadbalancerCreate](subcommands/loadbalancer_create.md)
|
47
62
|
* [LoadbalancerDelete](subcommands/loadbalancer_delete.md)
|
48
63
|
* [LoadbalancerGet](subcommands/loadbalancer_get.md)
|
49
64
|
* [LoadbalancerList](subcommands/loadbalancer_list.md)
|
50
65
|
* [LoadbalancerNicAdd](subcommands/loadbalancer_nic_add.md)
|
51
66
|
* [LoadbalancerNicRemove](subcommands/loadbalancer_nic_remove.md)
|
67
|
+
* [LoadbalancerUpdate](subcommands/loadbalancer_update.md)
|
52
68
|
* [LocationList](subcommands/location_list.md)
|
53
69
|
* [NatgatewayCreate](subcommands/natgateway_create.md)
|
54
70
|
* [NatgatewayDelete](subcommands/natgateway_delete.md)
|
71
|
+
* [NatgatewayGet](subcommands/natgateway_get.md)
|
55
72
|
* [NatgatewayLanAdd](subcommands/natgateway_lan_add.md)
|
56
73
|
* [NatgatewayLanRemove](subcommands/natgateway_lan_remove.md)
|
57
74
|
* [NatgatewayList](subcommands/natgateway_list.md)
|
58
75
|
* [NatgatewayRuleAdd](subcommands/natgateway_rule_add.md)
|
59
76
|
* [NatgatewayRuleList](subcommands/natgateway_rule_list.md)
|
60
77
|
* [NatgatewayRuleRemove](subcommands/natgateway_rule_remove.md)
|
78
|
+
* [NatgatewayRuleUpdate](subcommands/natgateway_rule_update.md)
|
79
|
+
* [NatgatewayUpdate](subcommands/natgateway_update.md)
|
61
80
|
* [NetworkloadbalancerCreate](subcommands/networkloadbalancer_create.md)
|
62
81
|
* [NetworkloadbalancerDelete](subcommands/networkloadbalancer_delete.md)
|
82
|
+
* [NetworkloadbalancerGet](subcommands/networkloadbalancer_get.md)
|
63
83
|
* [NetworkloadbalancerList](subcommands/networkloadbalancer_list.md)
|
64
84
|
* [NetworkloadbalancerRuleAdd](subcommands/networkloadbalancer_rule_add.md)
|
65
85
|
* [NetworkloadbalancerRuleList](subcommands/networkloadbalancer_rule_list.md)
|
@@ -67,30 +87,42 @@
|
|
67
87
|
* [NetworkloadbalancerRuleTargetAdd](subcommands/networkloadbalancer_rule_target_add.md)
|
68
88
|
* [NetworkloadbalancerRuleTargetList](subcommands/networkloadbalancer_rule_target_list.md)
|
69
89
|
* [NetworkloadbalancerRuleTargetRemove](subcommands/networkloadbalancer_rule_target_remove.md)
|
90
|
+
* [NetworkloadbalancerRuleUpdate](subcommands/networkloadbalancer_rule_update.md)
|
91
|
+
* [NetworkloadbalancerUpdate](subcommands/networkloadbalancer_update.md)
|
70
92
|
* [NicCreate](subcommands/nic_create.md)
|
71
93
|
* [NicDelete](subcommands/nic_delete.md)
|
94
|
+
* [NicGet](subcommands/nic_get.md)
|
72
95
|
* [NicList](subcommands/nic_list.md)
|
96
|
+
* [NicUpdate](subcommands/nic_update.md)
|
73
97
|
* [NodeDelete](subcommands/node_delete.md)
|
98
|
+
* [NodeGet](subcommands/node_get.md)
|
74
99
|
* [NodeList](subcommands/node_list.md)
|
75
100
|
* [NodeReplace](subcommands/node_replace.md)
|
76
101
|
* [NodepoolCreate](subcommands/nodepool_create.md)
|
77
102
|
* [NodepoolDelete](subcommands/nodepool_delete.md)
|
103
|
+
* [NodepoolGet](subcommands/nodepool_get.md)
|
78
104
|
* [NodepoolLanAdd](subcommands/nodepool_lan_add.md)
|
79
105
|
* [NodepoolLanRemove](subcommands/nodepool_lan_remove.md)
|
80
106
|
* [NodepoolList](subcommands/nodepool_list.md)
|
107
|
+
* [NodepoolUpdate](subcommands/nodepool_update.md)
|
81
108
|
* [PccCreate](subcommands/pcc_create.md)
|
82
109
|
* [PccDelete](subcommands/pcc_delete.md)
|
110
|
+
* [PccGet](subcommands/pcc_get.md)
|
83
111
|
* [PccList](subcommands/pcc_list.md)
|
112
|
+
* [PccUpdate](subcommands/pcc_update.md)
|
113
|
+
* [RequestGet](subcommands/request_get.md)
|
84
114
|
* [RequestList](subcommands/request_list.md)
|
85
115
|
* [RequestStatus](subcommands/request_status.md)
|
86
116
|
* [RequestWait](subcommands/request_wait.md)
|
87
117
|
* [ResourceList](subcommands/resource_list.md)
|
88
118
|
* [S3keyCreate](subcommands/s3key_create.md)
|
89
119
|
* [S3keyDelete](subcommands/s3key_delete.md)
|
120
|
+
* [S3keyGet](subcommands/s3key_get.md)
|
90
121
|
* [S3keyList](subcommands/s3key_list.md)
|
91
122
|
* [ServerConsole](subcommands/server_console.md)
|
92
123
|
* [ServerCreate](subcommands/server_create.md)
|
93
124
|
* [ServerDelete](subcommands/server_delete.md)
|
125
|
+
* [ServerGet](subcommands/server_get.md)
|
94
126
|
* [ServerList](subcommands/server_list.md)
|
95
127
|
* [ServerReboot](subcommands/server_reboot.md)
|
96
128
|
* [ServerResume](subcommands/server_resume.md)
|
@@ -98,21 +130,30 @@
|
|
98
130
|
* [ServerStop](subcommands/server_stop.md)
|
99
131
|
* [ServerSuspend](subcommands/server_suspend.md)
|
100
132
|
* [ServerToken](subcommands/server_token.md)
|
133
|
+
* [ServerUpdate](subcommands/server_update.md)
|
101
134
|
* [ServerUpgrade](subcommands/server_upgrade.md)
|
102
135
|
* [ShareCreate](subcommands/share_create.md)
|
103
136
|
* [ShareDelete](subcommands/share_delete.md)
|
137
|
+
* [ShareGet](subcommands/share_get.md)
|
104
138
|
* [ShareList](subcommands/share_list.md)
|
139
|
+
* [ShareUpdate](subcommands/share_update.md)
|
105
140
|
* [SnapshotCreate](subcommands/snapshot_create.md)
|
106
141
|
* [SnapshotDelete](subcommands/snapshot_delete.md)
|
142
|
+
* [SnapshotGet](subcommands/snapshot_get.md)
|
107
143
|
* [SnapshotList](subcommands/snapshot_list.md)
|
108
144
|
* [SnapshotRestore](subcommands/snapshot_restore.md)
|
145
|
+
* [SnapshotUpdate](subcommands/snapshot_update.md)
|
109
146
|
* [TemplateList](subcommands/template_list.md)
|
110
147
|
* [UserCreate](subcommands/user_create.md)
|
111
148
|
* [UserDelete](subcommands/user_delete.md)
|
149
|
+
* [UserGet](subcommands/user_get.md)
|
112
150
|
* [UserList](subcommands/user_list.md)
|
113
151
|
* [UserSsourl](subcommands/user_ssourl.md)
|
152
|
+
* [UserUpdate](subcommands/user_update.md)
|
114
153
|
* [VolumeAttach](subcommands/volume_attach.md)
|
115
154
|
* [VolumeCreate](subcommands/volume_create.md)
|
116
155
|
* [VolumeDelete](subcommands/volume_delete.md)
|
117
156
|
* [VolumeDetach](subcommands/volume_detach.md)
|
157
|
+
* [VolumeGet](subcommands/volume_get.md)
|
118
158
|
* [VolumeList](subcommands/volume_list.md)
|
159
|
+
* [VolumeUpdate](subcommands/volume_update.md)
|
data/knife-ionoscloud.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.require_paths = ['lib']
|
21
21
|
|
22
22
|
spec.add_runtime_dependency 'chef', '~> 16.10', '>= 16.10.17'
|
23
|
-
spec.add_runtime_dependency 'ionoscloud', '~> 6.0.0
|
23
|
+
spec.add_runtime_dependency 'ionoscloud', '~> 6.0.0'
|
24
24
|
|
25
25
|
spec.add_development_dependency 'rspec', '~> 3.10'
|
26
26
|
spec.add_development_dependency 'simplecov', '~> 0.21.2'
|
@@ -1,5 +1,10 @@
|
|
1
1
|
require 'chef/knife'
|
2
2
|
|
3
|
+
require 'knife-ionoscloud/version'
|
4
|
+
|
5
|
+
|
6
|
+
MODULE_VERSION = Knife::Ionoscloud::VERSION unless defined? MODULE_VERSION
|
7
|
+
|
3
8
|
class Chef
|
4
9
|
class Knife
|
5
10
|
module IonoscloudBase
|
@@ -25,6 +30,10 @@ class Chef
|
|
25
30
|
long: '--password PASSWORD',
|
26
31
|
description: 'Your Ionoscloud password'
|
27
32
|
|
33
|
+
option :ionoscloud_url,
|
34
|
+
long: '--url URL',
|
35
|
+
description: 'The Ionoscloud API URL'
|
36
|
+
|
28
37
|
option :extra_config_file,
|
29
38
|
short: '-e EXTRA_CONFIG_FILE_PATH',
|
30
39
|
long: '--extra-config EXTRA_CONFIG_FILE_PATH',
|
@@ -67,14 +76,33 @@ class Chef
|
|
67
76
|
end
|
68
77
|
|
69
78
|
def api_client
|
79
|
+
return @api_client if @api_client
|
80
|
+
|
70
81
|
api_config = Ionoscloud::Configuration.new()
|
71
82
|
|
72
83
|
api_config.username = config[:ionoscloud_username]
|
73
84
|
api_config.password = config[:ionoscloud_password]
|
74
85
|
|
86
|
+
if config[:ionoscloud_url]
|
87
|
+
uri = URI.parse(config[:ionoscloud_url])
|
88
|
+
|
89
|
+
api_config.scheme = uri.scheme
|
90
|
+
api_config.host = uri.host
|
91
|
+
api_config.base_path = uri.path
|
92
|
+
api_config.server_index = nil
|
93
|
+
end
|
94
|
+
|
75
95
|
api_config.debugging = config[:ionoscloud_debug] || false
|
76
96
|
|
77
|
-
@api_client
|
97
|
+
@api_client = Ionoscloud::ApiClient.new(api_config)
|
98
|
+
|
99
|
+
@api_client.user_agent = [
|
100
|
+
'knife/v' + MODULE_VERSION,
|
101
|
+
@api_client.default_headers['User-Agent'],
|
102
|
+
'chef/' + Chef::VERSION,
|
103
|
+
].join('_')
|
104
|
+
|
105
|
+
@api_client
|
78
106
|
end
|
79
107
|
|
80
108
|
def get_request_id(headers)
|
@@ -25,8 +25,7 @@ class Chef
|
|
25
25
|
option :cpu_family,
|
26
26
|
short: '-f CPU_FAMILY',
|
27
27
|
long: '--cpu-family CPU_FAMILY',
|
28
|
-
description: 'The family of processor cores (INTEL_XEON or AMD_OPTERON)'
|
29
|
-
default: 'INTEL_SKYLAKE'
|
28
|
+
description: 'The family of processor cores (INTEL_XEON or AMD_OPTERON)'
|
30
29
|
|
31
30
|
option :ram,
|
32
31
|
short: '-r RAM',
|
@@ -36,8 +35,7 @@ class Chef
|
|
36
35
|
option :availability_zone,
|
37
36
|
short: '-a AVAILABILITY_ZONE',
|
38
37
|
long: '--availability-zone AVAILABILITY_ZONE',
|
39
|
-
description: 'The availability zone of the server'
|
40
|
-
default: 'AUTO'
|
38
|
+
description: 'The availability zone of the server'
|
41
39
|
|
42
40
|
option :volume_name,
|
43
41
|
long: '--volume-name NAME',
|
@@ -114,7 +112,6 @@ class Chef
|
|
114
112
|
short: '-h',
|
115
113
|
long: '--dhcp',
|
116
114
|
boolean: true | false,
|
117
|
-
default: true,
|
118
115
|
description: 'Set to false if you wish to disable DHCP'
|
119
116
|
|
120
117
|
option :lan,
|
@@ -125,8 +122,7 @@ class Chef
|
|
125
122
|
option :firewall_type,
|
126
123
|
long: '--firewall-type FIREWALL_TYPE',
|
127
124
|
description: 'The type of firewall rules that will be allowed on the NIC. If it is not specified it will take the '\
|
128
|
-
'default value INGRESS'
|
129
|
-
default: 'INGRESS'
|
125
|
+
'default value INGRESS'
|
130
126
|
|
131
127
|
attr_reader :description, :required_options
|
132
128
|
|
@@ -30,7 +30,6 @@ class Chef
|
|
30
30
|
option :protocol,
|
31
31
|
short: '-P PROTOCOL',
|
32
32
|
long: '--protocol PROTOCOL',
|
33
|
-
default: 'TCP',
|
34
33
|
description: 'The protocol of the firewall rule (TCP, UDP, ICMP, ANY)'
|
35
34
|
|
36
35
|
option :source_mac,
|
@@ -73,8 +72,7 @@ class Chef
|
|
73
72
|
option :type,
|
74
73
|
short: '--t TYPE',
|
75
74
|
long: '--type TYPE',
|
76
|
-
description: 'The type of firewall rule. If is not specified, it will take the default value INGRESS'
|
77
|
-
default: 'INGRESS'
|
75
|
+
description: 'The type of firewall rule. If is not specified, it will take the default value INGRESS'
|
78
76
|
|
79
77
|
attr_reader :description, :required_options
|
80
78
|
|
@@ -45,12 +45,10 @@ class Chef
|
|
45
45
|
option :action,
|
46
46
|
short: '-a ACTION',
|
47
47
|
long: '--action ACTION',
|
48
|
-
default: 'ALL',
|
49
48
|
description: 'Specifies the traffic action pattern. Must be one of ["ALL", "ACCEPTED", "REJECTED"].'
|
50
49
|
|
51
50
|
option :direction,
|
52
51
|
long: '--direction DIRECTION',
|
53
|
-
default: 'BIDIRECTIONAL',
|
54
52
|
description: 'Specifies the traffic direction pattern. Must be one of ["INGRESS", "EGRESS", "BIDIRECTIONAL"].'
|
55
53
|
|
56
54
|
option :bucket,
|
@@ -50,12 +50,10 @@ class Chef
|
|
50
50
|
option :action,
|
51
51
|
short: '-a ACTION',
|
52
52
|
long: '--action ACTION',
|
53
|
-
default: 'ALL',
|
54
53
|
description: 'Specifies the traffic action pattern. Must be one of ["ALL", "ACCEPTED", "REJECTED"].'
|
55
54
|
|
56
55
|
option :direction,
|
57
56
|
long: '--direction DIRECTION',
|
58
|
-
default: 'BIDIRECTIONAL',
|
59
57
|
description: 'Specifies the traffic direction pattern. Must be one of ["INGRESS", "EGRESS", "BIDIRECTIONAL"].'
|
60
58
|
|
61
59
|
option :bucket,
|
@@ -44,7 +44,7 @@ class Chef
|
|
44
44
|
handle_extra_config
|
45
45
|
validate_required_params(@required_options, config)
|
46
46
|
|
47
|
-
lan_api = Ionoscloud::
|
47
|
+
lan_api = Ionoscloud::LANsApi.new(api_client)
|
48
48
|
|
49
49
|
lan = lan_api.datacenters_lans_find_by_id(config[:datacenter_id], config[:lan_id])
|
50
50
|
|
@@ -41,7 +41,7 @@ class Chef
|
|
41
41
|
handle_extra_config
|
42
42
|
validate_required_params(@required_options, config)
|
43
43
|
|
44
|
-
lan_api = Ionoscloud::
|
44
|
+
lan_api = Ionoscloud::LANsApi.new(api_client)
|
45
45
|
|
46
46
|
lan = lan_api.datacenters_lans_find_by_id(config[:datacenter_id], config[:lan_id])
|
47
47
|
|
@@ -21,7 +21,6 @@ class Chef
|
|
21
21
|
short: '-p',
|
22
22
|
long: '--public',
|
23
23
|
boolean: true,
|
24
|
-
default: false,
|
25
24
|
description: 'Boolean indicating if the LAN faces the public ' \
|
26
25
|
'Internet or not; defaults to false'
|
27
26
|
|
@@ -45,7 +44,7 @@ class Chef
|
|
45
44
|
|
46
45
|
print "#{ui.color('Creating LAN...', :magenta)}"
|
47
46
|
|
48
|
-
lan_api = Ionoscloud::
|
47
|
+
lan_api = Ionoscloud::LANsApi.new(api_client)
|
49
48
|
|
50
49
|
lan, _, headers = lan_api.datacenters_lans_post_with_http_info(
|
51
50
|
config[:datacenter_id],
|
@@ -26,7 +26,7 @@ class Chef
|
|
26
26
|
handle_extra_config
|
27
27
|
validate_required_params(@required_options, config)
|
28
28
|
|
29
|
-
lan_api = Ionoscloud::
|
29
|
+
lan_api = Ionoscloud::LANsApi.new(api_client)
|
30
30
|
@name_args.each do |lan_id|
|
31
31
|
begin
|
32
32
|
lan = lan_api.datacenters_lans_find_by_id(config[:datacenter_id], lan_id)
|
@@ -31,7 +31,7 @@ class Chef
|
|
31
31
|
handle_extra_config
|
32
32
|
validate_required_params(@required_options, config)
|
33
33
|
|
34
|
-
print_lan(Ionoscloud::
|
34
|
+
print_lan(Ionoscloud::LANsApi.new(api_client).datacenters_lans_find_by_id(config[:datacenter_id], config[:lan_id]))
|
35
35
|
end
|
36
36
|
end
|
37
37
|
end
|
@@ -34,7 +34,7 @@ class Chef
|
|
34
34
|
ui.color('Public', :bold),
|
35
35
|
ui.color('PCC', :bold),
|
36
36
|
]
|
37
|
-
lan_api = Ionoscloud::
|
37
|
+
lan_api = Ionoscloud::LANsApi.new(api_client)
|
38
38
|
|
39
39
|
lan_api.datacenters_lans_get(config[:datacenter_id], { depth: 1 }).items.each do |lan|
|
40
40
|
lan_list << lan.id
|
@@ -48,7 +48,7 @@ class Chef
|
|
48
48
|
handle_extra_config
|
49
49
|
validate_required_params(@required_options, config)
|
50
50
|
|
51
|
-
lan_api = Ionoscloud::
|
51
|
+
lan_api = Ionoscloud::LANsApi.new(api_client)
|
52
52
|
|
53
53
|
if @updatable_fields.map { |el| config[el] }.any?
|
54
54
|
print "#{ui.color('Updating LAN...', :magenta)}"
|
@@ -25,15 +25,13 @@ class Chef
|
|
25
25
|
option :type,
|
26
26
|
short: '-t TYPE',
|
27
27
|
long: '--type TYPE',
|
28
|
-
description: 'Type of the NAT gateway rule'
|
29
|
-
default: 'SNAT'
|
28
|
+
description: 'Type of the NAT gateway rule'
|
30
29
|
|
31
30
|
option :protocol,
|
32
31
|
short: '-p PROTOCOL',
|
33
32
|
long: '--protocol PROTOCOL',
|
34
33
|
description: "Protocol of the NAT gateway rule. Defaults to ALL. If protocol is "\
|
35
|
-
"'ICMP' then target_port_range start and end cannot be set."
|
36
|
-
default: 'ALL'
|
34
|
+
"'ICMP' then target_port_range start and end cannot be set."
|
37
35
|
|
38
36
|
option :source_subnet,
|
39
37
|
long: '--source SOURCE_SUBNET',
|
@@ -25,13 +25,11 @@ class Chef
|
|
25
25
|
option :algorithm,
|
26
26
|
short: '-a ALGORITHM',
|
27
27
|
long: '--algorithm ALGORITHM',
|
28
|
-
description: 'Algorithm for the balancing'
|
29
|
-
default: 'ROUND_ROBIN'
|
28
|
+
description: 'Algorithm for the balancing'
|
30
29
|
|
31
30
|
option :protocol,
|
32
31
|
long: '--protocol PROTOCOL',
|
33
|
-
description: 'Protocol of the balancing'
|
34
|
-
default: 'TCP'
|
32
|
+
description: 'Protocol of the balancing'
|
35
33
|
|
36
34
|
option :listener_ip,
|
37
35
|
short: '-i LISTENER_IP',
|
@@ -46,27 +44,23 @@ class Chef
|
|
46
44
|
option :client_timeout,
|
47
45
|
long: '--client-timeout CLIENT_TIMEOUT',
|
48
46
|
description: 'ClientTimeout is expressed in milliseconds. This inactivity timeout applies when '\
|
49
|
-
'the client is expected to acknowledge or send data. If unset the default of 50 seconds will be used.'
|
50
|
-
default: 50
|
47
|
+
'the client is expected to acknowledge or send data. If unset the default of 50 seconds will be used.'
|
51
48
|
|
52
49
|
option :connect_timeout,
|
53
50
|
long: '--connect-timeout CONNECT_TIMEOUT',
|
54
51
|
description: 'It specifies the maximum time (in milliseconds) to wait for a connection attempt to a '\
|
55
|
-
'target VM to succeed. If unset, the default of 5 seconds will be used.'
|
56
|
-
default: 5000
|
52
|
+
'target VM to succeed. If unset, the default of 5 seconds will be used.'
|
57
53
|
|
58
54
|
option :target_timeout,
|
59
55
|
long: '--terget-timeout TARGET_TIMEOUT',
|
60
56
|
description: 'TargetTimeout specifies the maximum inactivity time (in milliseconds) on the target VM side. '\
|
61
|
-
'If unset, the default of 50 seconds will be used.'
|
62
|
-
default: 50000
|
57
|
+
'If unset, the default of 50 seconds will be used.'
|
63
58
|
|
64
59
|
option :retries,
|
65
60
|
short: '-r RETRIES',
|
66
61
|
long: '--retries RETRIES',
|
67
62
|
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
|
-
default: 3
|
63
|
+
'If unset, the default value of 3 will be used. (valid range: [0, 65535])'
|
70
64
|
|
71
65
|
option :targets,
|
72
66
|
long: '--targets TARGETS',
|
@@ -55,8 +55,7 @@ class Chef
|
|
55
55
|
option :check_interval,
|
56
56
|
long: '--check-interval CHECK_INTERVAL',
|
57
57
|
description: 'CheckInterval determines the duration (in milliseconds) between consecutive health checks. '\
|
58
|
-
'If unspecified a default of 2000 ms is used.'
|
59
|
-
default: 2000
|
58
|
+
'If unspecified a default of 2000 ms is used.'
|
60
59
|
|
61
60
|
option :maintenance,
|
62
61
|
short: '-m',
|
@@ -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,8 +42,7 @@ 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'
|
45
|
+
'default value INGRESS'
|
48
46
|
|
49
47
|
attr_reader :description, :required_options
|
50
48
|
|
@@ -45,8 +45,7 @@ class Chef
|
|
45
45
|
option :cpu_family,
|
46
46
|
short: '-f CPU_FAMILY',
|
47
47
|
long: '--cpu-family CPU_FAMILY',
|
48
|
-
description: 'Sets the CPU type. [AMD_OPTERON, INTEL_XEON, INTEL_SKYLAKE]'
|
49
|
-
default: 'INTEL_SKYLAKE'
|
48
|
+
description: 'Sets the CPU type. [AMD_OPTERON, INTEL_XEON, INTEL_SKYLAKE]'
|
50
49
|
|
51
50
|
option :cores,
|
52
51
|
long: '--cores CORES',
|
@@ -60,13 +59,11 @@ class Chef
|
|
60
59
|
option :availability_zone,
|
61
60
|
short: '-a AVAILABILITY_ZONE',
|
62
61
|
long: '--availability-zone AVAILABILITY_ZONE',
|
63
|
-
description: 'The availability zone of the node pool'
|
64
|
-
default: 'AUTO'
|
62
|
+
description: 'The availability zone of the node pool'
|
65
63
|
|
66
64
|
option :storage_type,
|
67
65
|
long: '--storage-type STORAGE_TYPE',
|
68
|
-
description: 'Sets the storage type. [HDD, SSD]'
|
69
|
-
default: 'HDD'
|
66
|
+
description: 'Sets the storage type. [HDD, SSD]'
|
70
67
|
|
71
68
|
option :storage_size,
|
72
69
|
long: '--storage-size STORAGE_SIZE',
|
@@ -60,7 +60,7 @@ class Chef
|
|
60
60
|
pcc = pcc_api.pccs_find_by_id(pcc.id)
|
61
61
|
|
62
62
|
if config[:peers]
|
63
|
-
lan_api = Ionoscloud::
|
63
|
+
lan_api = Ionoscloud::LANsApi.new(api_client)
|
64
64
|
|
65
65
|
header_list = []
|
66
66
|
allowed_datacenters_ids = pcc.properties.connectable_datacenters.map { |datacenter| datacenter.id }
|
@@ -25,8 +25,7 @@ class Chef
|
|
25
25
|
option :cpu_family,
|
26
26
|
short: '-f CPU_FAMILY',
|
27
27
|
long: '--cpu-family CPU_FAMILY',
|
28
|
-
description: 'The family of the CPU (INTEL_XEON or AMD_OPTERON)'
|
29
|
-
default: 'INTEL_SKYLAKE'
|
28
|
+
description: 'The family of the CPU (INTEL_XEON or AMD_OPTERON)'
|
30
29
|
|
31
30
|
option :ram,
|
32
31
|
short: '-r RAM',
|
@@ -36,8 +35,7 @@ class Chef
|
|
36
35
|
option :availability_zone,
|
37
36
|
short: '-a AVAILABILITY_ZONE',
|
38
37
|
long: '--availability-zone AVAILABILITY_ZONE',
|
39
|
-
description: 'The availability zone of the server'
|
40
|
-
default: 'AUTO'
|
38
|
+
description: 'The availability zone of the server'
|
41
39
|
|
42
40
|
option :boot_volume,
|
43
41
|
long: '--boot-volume VOLUME_ID',
|