knife-ionoscloud 6.1.2 → 6.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/docs/changelog.md +8 -0
- data/docs/docs_generator.rb +2 -1
- data/docs/subcommands/application-loadbalancer/applicationloadbalancer_create.md +60 -0
- data/docs/subcommands/application-loadbalancer/applicationloadbalancer_delete.md +41 -0
- data/docs/subcommands/application-loadbalancer/applicationloadbalancer_get.md +45 -0
- data/docs/subcommands/application-loadbalancer/applicationloadbalancer_list.md +41 -0
- data/docs/subcommands/application-loadbalancer/applicationloadbalancer_rule_add.md +69 -0
- data/docs/subcommands/application-loadbalancer/applicationloadbalancer_rule_httprule_add.md +78 -0
- data/docs/subcommands/application-loadbalancer/applicationloadbalancer_rule_httprule_remove.md +49 -0
- data/docs/subcommands/application-loadbalancer/applicationloadbalancer_rule_remove.md +45 -0
- data/docs/subcommands/application-loadbalancer/applicationloadbalancer_rule_update.md +70 -0
- data/docs/subcommands/application-loadbalancer/applicationloadbalancer_update.md +60 -0
- data/docs/subcommands/application-loadbalancer/targetgroup_create.md +79 -0
- data/docs/subcommands/application-loadbalancer/targetgroup_delete.md +37 -0
- data/docs/subcommands/application-loadbalancer/targetgroup_get.md +41 -0
- data/docs/subcommands/application-loadbalancer/targetgroup_list.md +37 -0
- data/docs/subcommands/application-loadbalancer/targetgroup_target_add.md +59 -0
- data/docs/subcommands/application-loadbalancer/targetgroup_target_remove.md +49 -0
- data/docs/subcommands/application-loadbalancer/targetgroup_update.md +80 -0
- data/docs/summary.md +61 -43
- data/knife-ionoscloud.gemspec +3 -2
- data/lib/chef/knife/ionoscloud_applicationloadbalancer_create.rb +85 -0
- data/lib/chef/knife/ionoscloud_applicationloadbalancer_delete.rb +64 -0
- data/lib/chef/knife/ionoscloud_applicationloadbalancer_get.rb +45 -0
- data/lib/chef/knife/ionoscloud_applicationloadbalancer_list.rb +56 -0
- data/lib/chef/knife/ionoscloud_applicationloadbalancer_rule_add.rb +129 -0
- data/lib/chef/knife/ionoscloud_applicationloadbalancer_rule_httprule_add.rb +159 -0
- data/lib/chef/knife/ionoscloud_applicationloadbalancer_rule_httprule_remove.rb +89 -0
- data/lib/chef/knife/ionoscloud_applicationloadbalancer_rule_remove.rb +70 -0
- data/lib/chef/knife/ionoscloud_applicationloadbalancer_rule_update.rb +137 -0
- data/lib/chef/knife/ionoscloud_applicationloadbalancer_update.rb +96 -0
- data/lib/chef/knife/ionoscloud_base.rb +139 -7
- data/lib/chef/knife/ionoscloud_targetgroup_create.rb +140 -0
- data/lib/chef/knife/ionoscloud_targetgroup_delete.rb +50 -0
- data/lib/chef/knife/ionoscloud_targetgroup_get.rb +34 -0
- data/lib/chef/knife/ionoscloud_targetgroup_list.rb +45 -0
- data/lib/chef/knife/ionoscloud_targetgroup_target_add.rb +93 -0
- data/lib/chef/knife/ionoscloud_targetgroup_target_remove.rb +66 -0
- data/lib/chef/knife/ionoscloud_targetgroup_update.rb +151 -0
- data/lib/knife-ionoscloud/version.rb +1 -1
- data/spec/chef/knife/ionoscloud_applicationloadbalancer_create_spec.rb +82 -0
- data/spec/chef/knife/ionoscloud_applicationloadbalancer_delete_spec.rb +110 -0
- data/spec/chef/knife/ionoscloud_applicationloadbalancer_get_spec.rb +70 -0
- data/spec/chef/knife/ionoscloud_applicationloadbalancer_list_spec.rb +87 -0
- data/spec/chef/knife/ionoscloud_applicationloadbalancer_rule_add_spec.rb +140 -0
- data/spec/chef/knife/ionoscloud_applicationloadbalancer_rule_httprule_add_spec.rb +238 -0
- data/spec/chef/knife/ionoscloud_applicationloadbalancer_rule_httprule_remove_spec.rb +204 -0
- data/spec/chef/knife/ionoscloud_applicationloadbalancer_rule_remove_spec.rb +127 -0
- data/spec/chef/knife/ionoscloud_applicationloadbalancer_rule_update_spec.rb +219 -0
- data/spec/chef/knife/ionoscloud_applicationloadbalancer_update_spec.rb +97 -0
- data/spec/chef/knife/ionoscloud_targetgroup_create_spec.rb +109 -0
- data/spec/chef/knife/ionoscloud_targetgroup_delete_spec.rb +111 -0
- data/spec/chef/knife/ionoscloud_targetgroup_get_spec.rb +71 -0
- data/spec/chef/knife/ionoscloud_targetgroup_list_spec.rb +78 -0
- data/spec/chef/knife/ionoscloud_targetgroup_target_add_spec.rb +164 -0
- data/spec/chef/knife/ionoscloud_targetgroup_target_remove_spec.rb +139 -0
- data/spec/chef/knife/ionoscloud_targetgroup_update_spec.rb +144 -0
- data/spec/spec_helper.rb +135 -27
- metadata +77 -9
@@ -0,0 +1,37 @@
|
|
1
|
+
# TargetgroupDelete
|
2
|
+
|
3
|
+
Deletes a Target Group
|
4
|
+
|
5
|
+
```text
|
6
|
+
knife ionoscloud targetgroup delete TARGET_GROUP_ID [TARGET_GROUP_ID]
|
7
|
+
```
|
8
|
+
|
9
|
+
## Available options:
|
10
|
+
|
11
|
+
### Required options:
|
12
|
+
|
13
|
+
* ionoscloud\_username
|
14
|
+
* ionoscloud\_password
|
15
|
+
|
16
|
+
```text
|
17
|
+
ionoscloud_url: --url URL
|
18
|
+
the Ionoscloud API URL
|
19
|
+
|
20
|
+
extra_config_file: --extra-config EXTRA_CONFIG_FILE_PATH, -e EXTRA_CONFIG_FILE_PATH
|
21
|
+
path to the additional config file
|
22
|
+
|
23
|
+
ionoscloud_username: --username USERNAME, -u USERNAME
|
24
|
+
your Ionoscloud username (required)
|
25
|
+
|
26
|
+
ionoscloud_password: --password PASSWORD, -p PASSWORD
|
27
|
+
your Ionoscloud password (required)
|
28
|
+
|
29
|
+
ionoscloud_token: --token PASSWORD
|
30
|
+
your Ionoscloud access token
|
31
|
+
|
32
|
+
```
|
33
|
+
## Example
|
34
|
+
|
35
|
+
```text
|
36
|
+
knife ionoscloud targetgroup delete TARGET_GROUP_ID [TARGET_GROUP_ID]--url URL --extra-config EXTRA_CONFIG_FILE_PATH --username USERNAME --password PASSWORD --token PASSWORD
|
37
|
+
```
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# TargetgroupGet
|
2
|
+
|
3
|
+
Gets information about a Target Group.
|
4
|
+
|
5
|
+
```text
|
6
|
+
knife ionoscloud targetgroup get (options)
|
7
|
+
```
|
8
|
+
|
9
|
+
## Available options:
|
10
|
+
|
11
|
+
### Required options:
|
12
|
+
|
13
|
+
* target\_group\_id
|
14
|
+
* ionoscloud\_username
|
15
|
+
* ionoscloud\_password
|
16
|
+
|
17
|
+
```text
|
18
|
+
ionoscloud_url: --url URL
|
19
|
+
the Ionoscloud API URL
|
20
|
+
|
21
|
+
extra_config_file: --extra-config EXTRA_CONFIG_FILE_PATH, -e EXTRA_CONFIG_FILE_PATH
|
22
|
+
path to the additional config file
|
23
|
+
|
24
|
+
target_group_id: --target-group-id TARGET_GROUP_ID, -T TARGET_GROUP_ID
|
25
|
+
iD of the Target Group (required)
|
26
|
+
|
27
|
+
ionoscloud_username: --username USERNAME, -u USERNAME
|
28
|
+
your Ionoscloud username (required)
|
29
|
+
|
30
|
+
ionoscloud_password: --password PASSWORD, -p PASSWORD
|
31
|
+
your Ionoscloud password (required)
|
32
|
+
|
33
|
+
ionoscloud_token: --token PASSWORD
|
34
|
+
your Ionoscloud access token
|
35
|
+
|
36
|
+
```
|
37
|
+
## Example
|
38
|
+
|
39
|
+
```text
|
40
|
+
knife ionoscloud targetgroup get --url URL --extra-config EXTRA_CONFIG_FILE_PATH --target-group-id TARGET_GROUP_ID --username USERNAME --password PASSWORD --token PASSWORD
|
41
|
+
```
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# TargetgroupList
|
2
|
+
|
3
|
+
Lists all available Target Groups.
|
4
|
+
|
5
|
+
```text
|
6
|
+
knife ionoscloud targetgroup list
|
7
|
+
```
|
8
|
+
|
9
|
+
## Available options:
|
10
|
+
|
11
|
+
### Required options:
|
12
|
+
|
13
|
+
* ionoscloud\_username
|
14
|
+
* ionoscloud\_password
|
15
|
+
|
16
|
+
```text
|
17
|
+
ionoscloud_url: --url URL
|
18
|
+
the Ionoscloud API URL
|
19
|
+
|
20
|
+
extra_config_file: --extra-config EXTRA_CONFIG_FILE_PATH, -e EXTRA_CONFIG_FILE_PATH
|
21
|
+
path to the additional config file
|
22
|
+
|
23
|
+
ionoscloud_username: --username USERNAME, -u USERNAME
|
24
|
+
your Ionoscloud username (required)
|
25
|
+
|
26
|
+
ionoscloud_password: --password PASSWORD, -p PASSWORD
|
27
|
+
your Ionoscloud password (required)
|
28
|
+
|
29
|
+
ionoscloud_token: --token PASSWORD
|
30
|
+
your Ionoscloud access token
|
31
|
+
|
32
|
+
```
|
33
|
+
## Example
|
34
|
+
|
35
|
+
```text
|
36
|
+
knife ionoscloud targetgroup list--url URL --extra-config EXTRA_CONFIG_FILE_PATH --username USERNAME --password PASSWORD --token PASSWORD
|
37
|
+
```
|
@@ -0,0 +1,59 @@
|
|
1
|
+
# TargetgroupTargetAdd
|
2
|
+
|
3
|
+
Adds a Target to a Target Group.
|
4
|
+
|
5
|
+
```text
|
6
|
+
knife ionoscloud targetgroup target add (options)
|
7
|
+
```
|
8
|
+
|
9
|
+
## Available options:
|
10
|
+
|
11
|
+
### Required options:
|
12
|
+
|
13
|
+
* target\_group\_id
|
14
|
+
* ip
|
15
|
+
* port
|
16
|
+
* weight
|
17
|
+
* ionoscloud\_username
|
18
|
+
* ionoscloud\_password
|
19
|
+
|
20
|
+
```text
|
21
|
+
ionoscloud_url: --url URL
|
22
|
+
the Ionoscloud API URL
|
23
|
+
|
24
|
+
extra_config_file: --extra-config EXTRA_CONFIG_FILE_PATH, -e EXTRA_CONFIG_FILE_PATH
|
25
|
+
path to the additional config file
|
26
|
+
|
27
|
+
target_group_id: --target-group-id TARGET_GROUP_ID, -T TARGET_GROUP_ID
|
28
|
+
iD of the Target Group (required)
|
29
|
+
|
30
|
+
ip: --ip IP
|
31
|
+
iP of a balanced target VM (required)
|
32
|
+
|
33
|
+
port: --port PORT, -p PORT
|
34
|
+
port of the balanced target service. (range: 1 to 65535) (required)
|
35
|
+
|
36
|
+
weight: --weight WEIGHT, -w WEIGHT
|
37
|
+
weight parameter is used to adjust the target VM's weight relative to other target VMs. All target VMs will receive a load proportional to their weight relative to the sum of all weights, so the higher the weight, the higher the load. The default weight is 1, and the maximal value is 256. A value of 0 means the target VM will not participate in load-balancing but will still accept persistent connections. If this parameter is used to distribute the load according to target VM's capacity, it is recommended to start with values which can both grow and shrink, for instance between 10 and 100 to leave enough room above and below for later adjustments. (required)
|
38
|
+
|
39
|
+
health_check_disable: --health-check-disable
|
40
|
+
enabling the health check makes the target available only if it accepts periodic health check TCP connection attempts; when turned off, the target is considered always available. The health check only consists of a connection attempt to the address and port of the target. Default is having the health check enabled.
|
41
|
+
|
42
|
+
maintenance_enabled: --maintenance
|
43
|
+
maintenance mode prevents the target from receiving balanced traffic.
|
44
|
+
|
45
|
+
ionoscloud_username: --username USERNAME, -u USERNAME
|
46
|
+
your Ionoscloud username (required)
|
47
|
+
|
48
|
+
ionoscloud_password: --password PASSWORD, -p PASSWORD
|
49
|
+
your Ionoscloud password (required)
|
50
|
+
|
51
|
+
ionoscloud_token: --token PASSWORD
|
52
|
+
your Ionoscloud access token
|
53
|
+
|
54
|
+
```
|
55
|
+
## Example
|
56
|
+
|
57
|
+
```text
|
58
|
+
knife ionoscloud targetgroup target add --url URL --extra-config EXTRA_CONFIG_FILE_PATH --target-group-id TARGET_GROUP_ID --ip IP --port PORT --weight WEIGHT --health-check-disable --maintenance --username USERNAME --password PASSWORD --token PASSWORD
|
59
|
+
```
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# TargetgroupTargetRemove
|
2
|
+
|
3
|
+
Removes a Target from a Target Group if it exists.
|
4
|
+
|
5
|
+
```text
|
6
|
+
knife ionoscloud targetgroup target remove (options)
|
7
|
+
```
|
8
|
+
|
9
|
+
## Available options:
|
10
|
+
|
11
|
+
### Required options:
|
12
|
+
|
13
|
+
* target\_group\_id
|
14
|
+
* ip
|
15
|
+
* port
|
16
|
+
* ionoscloud\_username
|
17
|
+
* ionoscloud\_password
|
18
|
+
|
19
|
+
```text
|
20
|
+
ionoscloud_url: --url URL
|
21
|
+
the Ionoscloud API URL
|
22
|
+
|
23
|
+
extra_config_file: --extra-config EXTRA_CONFIG_FILE_PATH, -e EXTRA_CONFIG_FILE_PATH
|
24
|
+
path to the additional config file
|
25
|
+
|
26
|
+
target_group_id: --target-group-id TARGET_GROUP_ID, -T TARGET_GROUP_ID
|
27
|
+
iD of the Target Group (required)
|
28
|
+
|
29
|
+
ip: --ip IP
|
30
|
+
iP of a balanced target VM (required)
|
31
|
+
|
32
|
+
port: --port PORT, -p PORT
|
33
|
+
port of the balanced target service. (range: 1 to 65535) (required)
|
34
|
+
|
35
|
+
ionoscloud_username: --username USERNAME, -u USERNAME
|
36
|
+
your Ionoscloud username (required)
|
37
|
+
|
38
|
+
ionoscloud_password: --password PASSWORD, -p PASSWORD
|
39
|
+
your Ionoscloud password (required)
|
40
|
+
|
41
|
+
ionoscloud_token: --token PASSWORD
|
42
|
+
your Ionoscloud access token
|
43
|
+
|
44
|
+
```
|
45
|
+
## Example
|
46
|
+
|
47
|
+
```text
|
48
|
+
knife ionoscloud targetgroup target remove --url URL --extra-config EXTRA_CONFIG_FILE_PATH --target-group-id TARGET_GROUP_ID --ip IP --port PORT --username USERNAME --password PASSWORD --token PASSWORD
|
49
|
+
```
|
@@ -0,0 +1,80 @@
|
|
1
|
+
# TargetgroupUpdate
|
2
|
+
|
3
|
+
Updates information about a Ionoscloud Application LoadBalancer.
|
4
|
+
|
5
|
+
```text
|
6
|
+
knife ionoscloud targetgroup update (options)
|
7
|
+
```
|
8
|
+
|
9
|
+
## Available options:
|
10
|
+
|
11
|
+
### Required options:
|
12
|
+
|
13
|
+
* target\_group\_id
|
14
|
+
* ionoscloud\_username
|
15
|
+
* ionoscloud\_password
|
16
|
+
|
17
|
+
```text
|
18
|
+
ionoscloud_url: --url URL
|
19
|
+
the Ionoscloud API URL
|
20
|
+
|
21
|
+
extra_config_file: --extra-config EXTRA_CONFIG_FILE_PATH, -e EXTRA_CONFIG_FILE_PATH
|
22
|
+
path to the additional config file
|
23
|
+
|
24
|
+
target_group_id: --target-group-id TARGET_GROUP_ID, -T TARGET_GROUP_ID
|
25
|
+
iD of the Target Group (required)
|
26
|
+
|
27
|
+
name: --name NAME, -n NAME
|
28
|
+
name of the server
|
29
|
+
|
30
|
+
algorithm: --algorithm ALGORITHM, -a ALGORITHM
|
31
|
+
algorithm for the balancing. One of ["ROUND_ROBIN", "LEAST_CONNECTION", "RANDOM", "SOURCE_IP"]
|
32
|
+
|
33
|
+
protocol: --protocol PROTOCOL, -p PROTOCOL
|
34
|
+
protocol of the balancing. One of ["HTTP"]
|
35
|
+
|
36
|
+
check_timeout: --check-timeout CHECK_TIMEOUT
|
37
|
+
it specifies the time (in milliseconds) for a target VM in this pool to answer the check. If a target VM has CheckInterval set and CheckTimeout is set too, then the smaller value of the two is used after the TCP connection is established.
|
38
|
+
|
39
|
+
check_interval: --check-interval check_interval
|
40
|
+
it specifies the maximum time (in milliseconds) to wait for a connection attempt to a target VM to succeed. If unset, the default of 5 seconds will be used.
|
41
|
+
|
42
|
+
retries: --retries RETRIES, -r RETRIES
|
43
|
+
retries specifies the number of retries to perform on a target VM after a connection failure. If unset, the default value of 3 will be used. (valid range: [0, 65535])
|
44
|
+
|
45
|
+
path: --path PATH
|
46
|
+
the path for the HTTP health check; default: /.
|
47
|
+
|
48
|
+
method: --method METHOD, -m METHOD
|
49
|
+
the method for the HTTP health check.
|
50
|
+
|
51
|
+
match_type: --match-type MATCH_TYPE
|
52
|
+
the method for the HTTP health check. One of ["STATUS_CODE", "RESPONSE_BODY"].
|
53
|
+
|
54
|
+
response: --response RESPONSE
|
55
|
+
the response returned by the request.
|
56
|
+
|
57
|
+
regex: --regex REGEX
|
58
|
+
the regex used.
|
59
|
+
|
60
|
+
negate: --negate
|
61
|
+
whether to negate or not.
|
62
|
+
|
63
|
+
targets: --targets
|
64
|
+
array of TargetGroup targets.
|
65
|
+
|
66
|
+
ionoscloud_username: --username USERNAME, -u USERNAME
|
67
|
+
your Ionoscloud username (required)
|
68
|
+
|
69
|
+
ionoscloud_password: --password PASSWORD, -p PASSWORD
|
70
|
+
your Ionoscloud password (required)
|
71
|
+
|
72
|
+
ionoscloud_token: --token PASSWORD
|
73
|
+
your Ionoscloud access token
|
74
|
+
|
75
|
+
```
|
76
|
+
## Example
|
77
|
+
|
78
|
+
```text
|
79
|
+
knife ionoscloud targetgroup update --url URL --extra-config EXTRA_CONFIG_FILE_PATH --target-group-id TARGET_GROUP_ID --name NAME --algorithm ALGORITHM --protocol PROTOCOL --check-timeout CHECK_TIMEOUT --check-interval check_interval --retries RETRIES --path PATH --method METHOD --match-type MATCH_TYPE --response RESPONSE --regex REGEX --negate --targets --username USERNAME --password PASSWORD --token PASSWORD
|
80
|
+
```
|
data/docs/summary.md
CHANGED
@@ -5,31 +5,24 @@
|
|
5
5
|
|
6
6
|
## Subcommands
|
7
7
|
|
8
|
-
*
|
9
|
-
* [
|
10
|
-
* [
|
11
|
-
* [
|
12
|
-
* [
|
13
|
-
* [
|
14
|
-
* [
|
15
|
-
* [
|
16
|
-
* [
|
17
|
-
* [
|
18
|
-
* [
|
19
|
-
* [
|
20
|
-
* [
|
21
|
-
* [
|
22
|
-
* [
|
23
|
-
* [
|
24
|
-
* [
|
25
|
-
* [
|
26
|
-
* [ShareUpdate](subcommands/user/share_update.md)
|
27
|
-
* [UserCreate](subcommands/user/user_create.md)
|
28
|
-
* [UserDelete](subcommands/user/user_delete.md)
|
29
|
-
* [UserGet](subcommands/user/user_get.md)
|
30
|
-
* [UserList](subcommands/user/user_list.md)
|
31
|
-
* [UserSsourl](subcommands/user/user_ssourl.md)
|
32
|
-
* [UserUpdate](subcommands/user/user_update.md)
|
8
|
+
* Application Load Balancer
|
9
|
+
* [ApplicationloadbalancerCreate](subcommands/application-loadbalancer/applicationloadbalancer_create.md)
|
10
|
+
* [ApplicationloadbalancerDelete](subcommands/application-loadbalancer/applicationloadbalancer_delete.md)
|
11
|
+
* [ApplicationloadbalancerGet](subcommands/application-loadbalancer/applicationloadbalancer_get.md)
|
12
|
+
* [ApplicationloadbalancerList](subcommands/application-loadbalancer/applicationloadbalancer_list.md)
|
13
|
+
* [ApplicationloadbalancerRuleAdd](subcommands/application-loadbalancer/applicationloadbalancer_rule_add.md)
|
14
|
+
* [ApplicationloadbalancerRuleHttpruleAdd](subcommands/application-loadbalancer/applicationloadbalancer_rule_httprule_add.md)
|
15
|
+
* [ApplicationloadbalancerRuleHttpruleRemove](subcommands/application-loadbalancer/applicationloadbalancer_rule_httprule_remove.md)
|
16
|
+
* [ApplicationloadbalancerRuleRemove](subcommands/application-loadbalancer/applicationloadbalancer_rule_remove.md)
|
17
|
+
* [ApplicationloadbalancerRuleUpdate](subcommands/application-loadbalancer/applicationloadbalancer_rule_update.md)
|
18
|
+
* [ApplicationloadbalancerUpdate](subcommands/application-loadbalancer/applicationloadbalancer_update.md)
|
19
|
+
* [TargetgroupCreate](subcommands/application-loadbalancer/targetgroup_create.md)
|
20
|
+
* [TargetgroupDelete](subcommands/application-loadbalancer/targetgroup_delete.md)
|
21
|
+
* [TargetgroupGet](subcommands/application-loadbalancer/targetgroup_get.md)
|
22
|
+
* [TargetgroupList](subcommands/application-loadbalancer/targetgroup_list.md)
|
23
|
+
* [TargetgroupTargetAdd](subcommands/application-loadbalancer/targetgroup_target_add.md)
|
24
|
+
* [TargetgroupTargetRemove](subcommands/application-loadbalancer/targetgroup_target_remove.md)
|
25
|
+
* [TargetgroupUpdate](subcommands/application-loadbalancer/targetgroup_update.md)
|
33
26
|
* Compute Engine
|
34
27
|
* [CompositeServerCreate](subcommands/compute-engine/composite_server_create.md)
|
35
28
|
* [CubeServerCreate](subcommands/compute-engine/cube_server_create.md)
|
@@ -136,6 +129,24 @@
|
|
136
129
|
* [VolumeGet](subcommands/compute-engine/volume_get.md)
|
137
130
|
* [VolumeList](subcommands/compute-engine/volume_list.md)
|
138
131
|
* [VolumeUpdate](subcommands/compute-engine/volume_update.md)
|
132
|
+
* DBaaS Postgres
|
133
|
+
* [DbaasPostgresBackupGet](subcommands/dbaas-postgres/dbaas_postgres_backup_get.md)
|
134
|
+
* [DbaasPostgresBackupList](subcommands/dbaas-postgres/dbaas_postgres_backup_list.md)
|
135
|
+
* [DbaasPostgresClusterCreate](subcommands/dbaas-postgres/dbaas_postgres_cluster_create.md)
|
136
|
+
* [DbaasPostgresClusterDelete](subcommands/dbaas-postgres/dbaas_postgres_cluster_delete.md)
|
137
|
+
* [DbaasPostgresClusterGet](subcommands/dbaas-postgres/dbaas_postgres_cluster_get.md)
|
138
|
+
* [DbaasPostgresClusterList](subcommands/dbaas-postgres/dbaas_postgres_cluster_list.md)
|
139
|
+
* [DbaasPostgresClusterRestore](subcommands/dbaas-postgres/dbaas_postgres_cluster_restore.md)
|
140
|
+
* [DbaasPostgresClusterUpdate](subcommands/dbaas-postgres/dbaas_postgres_cluster_update.md)
|
141
|
+
* [DbaasPostgresLogsGet](subcommands/dbaas-postgres/dbaas_postgres_logs_get.md)
|
142
|
+
* [DbaasPostgresVersionList](subcommands/dbaas-postgres/dbaas_postgres_version_list.md)
|
143
|
+
* Managed Backup
|
144
|
+
* [BackupunitCreate](subcommands/backup/backupunit_create.md)
|
145
|
+
* [BackupunitDelete](subcommands/backup/backupunit_delete.md)
|
146
|
+
* [BackupunitGet](subcommands/backup/backupunit_get.md)
|
147
|
+
* [BackupunitList](subcommands/backup/backupunit_list.md)
|
148
|
+
* [BackupunitSsourl](subcommands/backup/backupunit_ssourl.md)
|
149
|
+
* [BackupunitUpdate](subcommands/backup/backupunit_update.md)
|
139
150
|
* Managed Kubernetes
|
140
151
|
* [K8sCreate](subcommands/kubernetes/k8s_create.md)
|
141
152
|
* [K8sDelete](subcommands/kubernetes/k8s_delete.md)
|
@@ -154,21 +165,28 @@
|
|
154
165
|
* [NodepoolLanRemove](subcommands/kubernetes/nodepool_lan_remove.md)
|
155
166
|
* [NodepoolList](subcommands/kubernetes/nodepool_list.md)
|
156
167
|
* [NodepoolUpdate](subcommands/kubernetes/nodepool_update.md)
|
157
|
-
*
|
158
|
-
* [
|
159
|
-
* [
|
160
|
-
* [
|
161
|
-
* [
|
162
|
-
* [
|
163
|
-
* [
|
164
|
-
*
|
165
|
-
* [
|
166
|
-
* [
|
167
|
-
* [
|
168
|
-
* [
|
169
|
-
* [
|
170
|
-
* [
|
171
|
-
* [
|
172
|
-
* [
|
173
|
-
* [
|
174
|
-
* [
|
168
|
+
* User Management
|
169
|
+
* [ContractList](subcommands/user/contract_list.md)
|
170
|
+
* [GroupCreate](subcommands/user/group_create.md)
|
171
|
+
* [GroupDelete](subcommands/user/group_delete.md)
|
172
|
+
* [GroupGet](subcommands/user/group_get.md)
|
173
|
+
* [GroupList](subcommands/user/group_list.md)
|
174
|
+
* [GroupUpdate](subcommands/user/group_update.md)
|
175
|
+
* [GroupUserAdd](subcommands/user/group_user_add.md)
|
176
|
+
* [GroupUserRemove](subcommands/user/group_user_remove.md)
|
177
|
+
* [ResourceList](subcommands/user/resource_list.md)
|
178
|
+
* [S3keyCreate](subcommands/user/s3key_create.md)
|
179
|
+
* [S3keyDelete](subcommands/user/s3key_delete.md)
|
180
|
+
* [S3keyGet](subcommands/user/s3key_get.md)
|
181
|
+
* [S3keyList](subcommands/user/s3key_list.md)
|
182
|
+
* [ShareCreate](subcommands/user/share_create.md)
|
183
|
+
* [ShareDelete](subcommands/user/share_delete.md)
|
184
|
+
* [ShareGet](subcommands/user/share_get.md)
|
185
|
+
* [ShareList](subcommands/user/share_list.md)
|
186
|
+
* [ShareUpdate](subcommands/user/share_update.md)
|
187
|
+
* [UserCreate](subcommands/user/user_create.md)
|
188
|
+
* [UserDelete](subcommands/user/user_delete.md)
|
189
|
+
* [UserGet](subcommands/user/user_get.md)
|
190
|
+
* [UserList](subcommands/user/user_list.md)
|
191
|
+
* [UserSsourl](subcommands/user/user_ssourl.md)
|
192
|
+
* [UserUpdate](subcommands/user/user_update.md)
|
data/knife-ionoscloud.gemspec
CHANGED
@@ -13,6 +13,7 @@ Gem::Specification.new do |spec|
|
|
13
13
|
spec.description = 'Official Chef Knife plugin for Ionoscloud platform using REST API'
|
14
14
|
spec.homepage = 'https://github.com/ionos-cloud/knife-ionos-cloud'
|
15
15
|
spec.license = 'Apache-2.0'
|
16
|
+
spec.required_ruby_version = '>= 2.6'
|
16
17
|
|
17
18
|
spec.files = `git ls-files -z`.split("\x0")
|
18
19
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
@@ -20,8 +21,8 @@ Gem::Specification.new do |spec|
|
|
20
21
|
spec.require_paths = ['lib']
|
21
22
|
|
22
23
|
spec.add_runtime_dependency 'chef', '~> 16.10', '>= 16.10.17'
|
23
|
-
spec.add_runtime_dependency 'ionoscloud', '
|
24
|
-
spec.add_runtime_dependency 'ionoscloud-dbaas-postgres', '
|
24
|
+
spec.add_runtime_dependency 'ionoscloud', '6.1.0'
|
25
|
+
spec.add_runtime_dependency 'ionoscloud-dbaas-postgres', '1.0.2'
|
25
26
|
|
26
27
|
spec.add_development_dependency 'rspec', '~> 3.10'
|
27
28
|
spec.add_development_dependency 'simplecov', '~> 0.21.2'
|
@@ -0,0 +1,85 @@
|
|
1
|
+
require_relative 'ionoscloud_base'
|
2
|
+
|
3
|
+
class Chef
|
4
|
+
class Knife
|
5
|
+
class IonoscloudApplicationloadbalancerCreate < Knife
|
6
|
+
include Knife::IonoscloudBase
|
7
|
+
|
8
|
+
banner 'knife ionoscloud applicationloadbalancer create (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 :name,
|
16
|
+
short: '-n NAME',
|
17
|
+
long: '--name NAME',
|
18
|
+
description: 'Name of the Application Load Balancer'
|
19
|
+
|
20
|
+
option :listener_lan,
|
21
|
+
short: '-l LISTENER_LAN_ID',
|
22
|
+
long: '--listener-lan LISTENER_LAN_ID',
|
23
|
+
description: 'Id of the listening LAN. (inbound)'
|
24
|
+
|
25
|
+
option :target_lan,
|
26
|
+
short: '-t TARGET_LAN_ID',
|
27
|
+
long: '--target-lan TARGET_LAN_ID',
|
28
|
+
description: 'Id of the balanced private target LAN. (outbound)'
|
29
|
+
|
30
|
+
option :ips,
|
31
|
+
short: '-i IP[,IP,...]',
|
32
|
+
long: '--ips IP[,IP,...]',
|
33
|
+
description: 'Collection of IP addresses of the Application Load Balancer. (inbound and outbound) IP of the '\
|
34
|
+
'listenerLan must be a customer reserved IP for the public load balancer and private IP for the private load balancer.'
|
35
|
+
|
36
|
+
option :lb_private_ips,
|
37
|
+
long: '--private-ips IP[,IP,...]',
|
38
|
+
description: 'Collection of private IP addresses with subnet mask of the Application Load Balancer. '\
|
39
|
+
'IPs must contain valid subnet mask. If user will not provide any IP then the system will generate one IP with /24 subnet.'
|
40
|
+
|
41
|
+
attr_reader :description, :required_options
|
42
|
+
|
43
|
+
def initialize(args = [])
|
44
|
+
super(args)
|
45
|
+
@description =
|
46
|
+
'Creates an Application Load Balancer within the datacenter.'
|
47
|
+
@directory = 'application-loadbalancer'
|
48
|
+
@required_options = [:datacenter_id, :name, :listener_lan, :target_lan, :ips]
|
49
|
+
end
|
50
|
+
|
51
|
+
def run
|
52
|
+
$stdout.sync = true
|
53
|
+
handle_extra_config
|
54
|
+
validate_required_params(@required_options, config)
|
55
|
+
|
56
|
+
print "#{ui.color('Creating Application Load Balancer...', :magenta)}"
|
57
|
+
|
58
|
+
config[:ips] = config[:ips].split(',') if config[:ips] && config[:ips].instance_of?(String)
|
59
|
+
config[:lb_private_ips] = config[:lb_private_ips].split(',') if config[:lb_private_ips] && config[:lb_private_ips].instance_of?(String)
|
60
|
+
|
61
|
+
application_load_balancers_api = Ionoscloud::ApplicationLoadBalancersApi.new(api_client)
|
62
|
+
|
63
|
+
application_load_balancer, _, headers = application_load_balancers_api.datacenters_applicationloadbalancers_post_with_http_info(
|
64
|
+
config[:datacenter_id],
|
65
|
+
Ionoscloud::ApplicationLoadBalancer.new(
|
66
|
+
properties: Ionoscloud::ApplicationLoadBalancerProperties.new({
|
67
|
+
name: config[:name],
|
68
|
+
ips: config[:ips],
|
69
|
+
listener_lan: config[:listener_lan],
|
70
|
+
target_lan: config[:target_lan],
|
71
|
+
lb_private_ips: config[:lb_private_ips],
|
72
|
+
}.compact),
|
73
|
+
),
|
74
|
+
)
|
75
|
+
|
76
|
+
dot = ui.color('.', :magenta)
|
77
|
+
api_client.wait_for { print dot; is_done? get_request_id headers }
|
78
|
+
|
79
|
+
print_application_loadbalancer(application_load_balancers_api.datacenters_applicationloadbalancers_find_by_application_load_balancer_id(
|
80
|
+
config[:datacenter_id], application_load_balancer.id, depth: 2,
|
81
|
+
))
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
require_relative 'ionoscloud_base'
|
2
|
+
|
3
|
+
class Chef
|
4
|
+
class Knife
|
5
|
+
class IonoscloudApplicationloadbalancerDelete < Knife
|
6
|
+
include Knife::IonoscloudBase
|
7
|
+
|
8
|
+
banner 'knife ionoscloud applicationloadbalancer delete LOAD_BALANCER_ID [LOAD_BALANCER_ID] (options)'
|
9
|
+
|
10
|
+
option :datacenter_id,
|
11
|
+
short: '-D DATACENTER_ID',
|
12
|
+
long: '--datacenter-id DATACENTER_ID',
|
13
|
+
description: 'Name of the data center'
|
14
|
+
|
15
|
+
attr_reader :description, :required_options
|
16
|
+
|
17
|
+
def initialize(args = [])
|
18
|
+
super(args)
|
19
|
+
@description =
|
20
|
+
'Removes the specified Application Load Balancer.'
|
21
|
+
@directory = 'application-loadbalancer'
|
22
|
+
@required_options = [:datacenter_id]
|
23
|
+
end
|
24
|
+
|
25
|
+
def run
|
26
|
+
$stdout.sync = true
|
27
|
+
handle_extra_config
|
28
|
+
validate_required_params(@required_options, config)
|
29
|
+
|
30
|
+
application_load_balancers_api = Ionoscloud::ApplicationLoadBalancersApi.new(api_client)
|
31
|
+
|
32
|
+
@name_args.each do |application_load_balancer_id|
|
33
|
+
begin
|
34
|
+
application_load_balancer = application_load_balancers_api.datacenters_applicationloadbalancers_find_by_application_load_balancer_id(
|
35
|
+
config[:datacenter_id],
|
36
|
+
application_load_balancer_id,
|
37
|
+
{ depth: 2 },
|
38
|
+
)
|
39
|
+
rescue Ionoscloud::ApiError => err
|
40
|
+
raise err unless err.code == 404
|
41
|
+
ui.error("Application Load balancer ID #{application_load_balancer_id} not found. Skipping.")
|
42
|
+
next
|
43
|
+
end
|
44
|
+
|
45
|
+
print_application_loadbalancer(application_load_balancer)
|
46
|
+
|
47
|
+
puts "\n"
|
48
|
+
|
49
|
+
begin
|
50
|
+
confirm('Do you really want to delete this Application Load balancer')
|
51
|
+
rescue SystemExit
|
52
|
+
next
|
53
|
+
end
|
54
|
+
|
55
|
+
_, _, headers = application_load_balancers_api.datacenters_applicationloadbalancers_delete_with_http_info(
|
56
|
+
config[:datacenter_id],
|
57
|
+
application_load_balancer_id,
|
58
|
+
)
|
59
|
+
ui.warn("Deleted Application Load balancer #{application_load_balancer.id}. Request ID: #{get_request_id headers}")
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
require_relative 'ionoscloud_base'
|
2
|
+
|
3
|
+
class Chef
|
4
|
+
class Knife
|
5
|
+
class IonoscloudApplicationloadbalancerGet < Knife
|
6
|
+
include Knife::IonoscloudBase
|
7
|
+
|
8
|
+
banner 'knife ionoscloud applicationloadbalancer 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 :application_loadbalancer_id,
|
16
|
+
short: '-L NETWORK_LOADBALANCER_ID',
|
17
|
+
long: '--application-loadbalancer NETWORK_LOADBALANCER_ID',
|
18
|
+
description: 'ID of the Application Loadbalancer'
|
19
|
+
|
20
|
+
attr_reader :description, :required_options
|
21
|
+
|
22
|
+
def initialize(args = [])
|
23
|
+
super(args)
|
24
|
+
@description =
|
25
|
+
'Retrieves the attributes of a given Application Load Balancer.'
|
26
|
+
@directory = 'application-loadbalancer'
|
27
|
+
@required_options = [:datacenter_id, :application_loadbalancer_id]
|
28
|
+
end
|
29
|
+
|
30
|
+
def run
|
31
|
+
$stdout.sync = true
|
32
|
+
handle_extra_config
|
33
|
+
validate_required_params(@required_options, config)
|
34
|
+
|
35
|
+
application_load_balancers_api = Ionoscloud::ApplicationLoadBalancersApi.new(api_client)
|
36
|
+
|
37
|
+
print_application_loadbalancer(
|
38
|
+
application_load_balancers_api.datacenters_applicationloadbalancers_find_by_application_load_balancer_id(
|
39
|
+
config[:datacenter_id], config[:application_loadbalancer_id], depth: 2,
|
40
|
+
),
|
41
|
+
)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|