fog-proxmox 0.5.5 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitlab-ci.yml +7 -0
- data/.travis.yml +1 -0
- data/.vscode/launch.json +3 -21
- data/.vscode/settings.json +7 -7
- data/Gemfile.lock +39 -39
- data/README.md +9 -2
- data/examples/compute.rb +20 -23
- data/examples/identity.rb +16 -21
- data/fog-proxmox.gemspec +1 -2
- data/lib/fog/compute/proxmox.rb +2 -8
- data/lib/fog/compute/proxmox/models/disk.rb +13 -11
- data/lib/fog/compute/proxmox/models/disks.rb +3 -5
- data/lib/fog/compute/proxmox/models/interface.rb +6 -11
- data/lib/fog/compute/proxmox/models/interfaces.rb +3 -5
- data/lib/fog/compute/proxmox/models/node.rb +38 -43
- data/lib/fog/compute/proxmox/models/nodes.rb +5 -11
- data/lib/fog/compute/proxmox/models/server.rb +123 -80
- data/lib/fog/compute/proxmox/models/server_config.rb +56 -24
- data/lib/fog/compute/proxmox/models/servers.rb +34 -26
- data/lib/fog/compute/proxmox/models/snapshot.rb +28 -14
- data/lib/fog/compute/proxmox/models/snapshots.rb +9 -17
- data/lib/fog/compute/proxmox/models/storage.rb +15 -11
- data/lib/fog/compute/proxmox/models/storages.rb +13 -22
- data/lib/fog/compute/proxmox/models/task.rb +10 -14
- data/lib/fog/compute/proxmox/models/tasks.rb +9 -18
- data/lib/fog/compute/proxmox/models/volume.rb +12 -12
- data/lib/fog/compute/proxmox/models/volumes.rb +10 -19
- data/lib/fog/compute/proxmox/requests/action_server.rb +1 -4
- data/lib/fog/compute/proxmox/requests/clone_server.rb +1 -4
- data/lib/fog/compute/proxmox/requests/create_backup.rb +1 -4
- data/lib/fog/compute/proxmox/requests/create_server.rb +1 -4
- data/lib/fog/compute/proxmox/requests/create_snapshot.rb +1 -4
- data/lib/fog/compute/proxmox/requests/create_spice.rb +1 -4
- data/lib/fog/compute/proxmox/requests/create_term.rb +1 -4
- data/lib/fog/compute/proxmox/requests/create_vnc.rb +1 -4
- data/lib/fog/compute/proxmox/requests/delete_server.rb +1 -4
- data/lib/fog/compute/proxmox/requests/delete_snapshot.rb +1 -4
- data/lib/fog/compute/proxmox/requests/get_node_statistics.rb +1 -4
- data/lib/fog/compute/proxmox/requests/get_server_config.rb +1 -4
- data/lib/fog/compute/proxmox/requests/get_server_status.rb +1 -4
- data/lib/fog/compute/proxmox/requests/{get_snapshot.rb → get_snapshot_config.rb} +5 -8
- data/lib/fog/compute/proxmox/requests/get_task.rb +1 -4
- data/lib/fog/compute/proxmox/requests/get_vnc.rb +1 -4
- data/lib/fog/compute/proxmox/requests/list_nodes.rb +1 -2
- data/lib/fog/compute/proxmox/requests/list_storages.rb +3 -1
- data/lib/fog/compute/proxmox/requests/log_task.rb +1 -4
- data/lib/fog/compute/proxmox/requests/move_disk.rb +1 -4
- data/lib/fog/compute/proxmox/requests/move_volume.rb +1 -4
- data/lib/fog/compute/proxmox/requests/next_vmid.rb +5 -3
- data/lib/fog/compute/proxmox/requests/resize_container.rb +1 -4
- data/lib/fog/compute/proxmox/requests/status_task.rb +1 -4
- data/lib/fog/compute/proxmox/requests/update_server.rb +1 -4
- data/lib/fog/identity/proxmox.rb +2 -8
- data/lib/fog/identity/proxmox/models/domain.rb +25 -21
- data/lib/fog/identity/proxmox/models/{ldap.rb → domain_type.rb} +9 -18
- data/lib/fog/identity/proxmox/models/domains.rb +6 -76
- data/lib/fog/identity/proxmox/models/group.rb +6 -19
- data/lib/fog/identity/proxmox/models/groups.rb +6 -12
- data/lib/fog/identity/proxmox/models/permission.rb +27 -31
- data/lib/fog/identity/proxmox/models/permissions.rb +8 -25
- data/lib/fog/identity/proxmox/models/pool.rb +9 -22
- data/lib/fog/identity/proxmox/models/pools.rb +7 -13
- data/lib/fog/identity/proxmox/models/principal.rb +1 -6
- data/lib/fog/identity/proxmox/models/role.rb +7 -20
- data/lib/fog/identity/proxmox/models/roles.rb +6 -13
- data/lib/fog/identity/proxmox/models/user.rb +7 -21
- data/lib/fog/identity/proxmox/models/users.rb +6 -12
- data/lib/fog/identity/proxmox/requests/check_permissions.rb +1 -4
- data/lib/fog/identity/proxmox/requests/list_roles.rb +0 -1
- data/lib/fog/identity/proxmox/requests/read_version.rb +1 -5
- data/lib/fog/identity/proxmox/requests/update_group.rb +2 -3
- data/lib/fog/identity/proxmox/requests/{add_permission.rb → update_permissions.rb} +4 -4
- data/lib/fog/network/proxmox/models/network.rb +12 -18
- data/lib/fog/network/proxmox/models/networks.rb +11 -17
- data/lib/fog/network/proxmox/models/node.rb +14 -10
- data/lib/fog/network/proxmox/models/nodes.rb +5 -11
- data/lib/fog/network/proxmox/requests/create_network.rb +1 -4
- data/lib/fog/network/proxmox/requests/delete_network.rb +1 -4
- data/lib/fog/network/proxmox/requests/get_network.rb +1 -4
- data/lib/fog/network/proxmox/requests/get_node.rb +1 -4
- data/lib/fog/network/proxmox/requests/power_node.rb +1 -4
- data/lib/fog/network/proxmox/requests/update_network.rb +1 -4
- data/lib/fog/{compute/proxmox/requests/check_vmid.rb → proxmox/attributes.rb} +9 -17
- data/lib/fog/proxmox/core.rb +2 -1
- data/lib/fog/proxmox/helpers/cpu_helper.rb +6 -3
- data/lib/fog/proxmox/helpers/disk_helper.rb +1 -1
- data/lib/fog/proxmox/helpers/nic_helper.rb +37 -22
- data/lib/fog/proxmox/version.rb +1 -1
- data/lib/fog/storage/proxmox.rb +1 -1
- data/spec/compute_spec.rb +64 -45
- data/spec/fixtures/proxmox/compute/containers.yml +1684 -4137
- data/spec/fixtures/proxmox/compute/identity_ticket.yml +4 -4
- data/spec/fixtures/proxmox/compute/nodes.yml +21 -21
- data/spec/fixtures/proxmox/compute/servers.yml +3065 -7741
- data/spec/fixtures/proxmox/compute/snapshots.yml +279 -827
- data/spec/fixtures/proxmox/compute/storages.yml +60 -21
- data/spec/fixtures/proxmox/compute/tasks.yml +56 -98
- data/spec/fixtures/proxmox/identity/auth.yml +6 -6
- data/spec/fixtures/proxmox/identity/domains.yml +252 -84
- data/spec/fixtures/proxmox/identity/groups.yml +93 -54
- data/spec/fixtures/proxmox/identity/identity_ticket.yml +4 -4
- data/spec/fixtures/proxmox/identity/permissions.yml +317 -79
- data/spec/fixtures/proxmox/identity/pools.yml +266 -71
- data/spec/fixtures/proxmox/identity/read_version.yml +6 -6
- data/spec/fixtures/proxmox/identity/roles.yml +96 -57
- data/spec/fixtures/proxmox/identity/users.yml +224 -107
- data/spec/fixtures/proxmox/network/identity_ticket.yml +4 -4
- data/spec/fixtures/proxmox/network/networks.yml +54 -95
- data/spec/helpers/nic_helper_spec.rb +4 -4
- data/spec/identity_spec.rb +38 -46
- data/spec/network_spec.rb +1 -1
- metadata +9 -23
- data/lib/fog/compute/proxmox/models/container.rb +0 -86
- data/lib/fog/compute/proxmox/models/container_config.rb +0 -114
- data/lib/fog/compute/proxmox/models/containers.rb +0 -43
- data/lib/fog/compute/proxmox/requests/get_node.rb +0 -44
- data/lib/fog/compute/proxmox/requests/get_storage.rb +0 -44
- data/lib/fog/identity/proxmox/models/activedirectory.rb +0 -57
- data/lib/fog/identity/proxmox/models/oath.rb +0 -50
- data/lib/fog/identity/proxmox/models/pam.rb +0 -46
- data/lib/fog/identity/proxmox/models/pve.rb +0 -46
- data/lib/fog/identity/proxmox/models/yubico.rb +0 -51
- data/lib/fog/identity/proxmox/requests/remove_permission.rb +0 -42
- data/lib/fog/proxmox/models/collection.rb +0 -85
- data/lib/fog/proxmox/models/model.rb +0 -58
@@ -21,7 +21,7 @@ http_interactions:
|
|
21
21
|
Connection:
|
22
22
|
- close, Keep-Alive
|
23
23
|
Date:
|
24
|
-
-
|
24
|
+
- Wed, 03 Apr 2019 13:32:46 GMT
|
25
25
|
Pragma:
|
26
26
|
- no-cache
|
27
27
|
Server:
|
@@ -31,10 +31,10 @@ http_interactions:
|
|
31
31
|
Content-Type:
|
32
32
|
- application/json;charset=UTF-8
|
33
33
|
Expires:
|
34
|
-
-
|
34
|
+
- Wed, 03 Apr 2019 13:32:46 GMT
|
35
35
|
body:
|
36
36
|
encoding: ASCII-8BIT
|
37
|
-
string: '{"data":{"cap":{"
|
37
|
+
string: '{"data":{"cap":{"dc":{"Sys.Audit":1},"vms":{"VM.Monitor":1,"VM.Config.Options":1,"VM.Console":1,"VM.Config.Memory":1,"VM.Snapshot.Rollback":1,"VM.Snapshot":1,"Permissions.Modify":1,"VM.Config.CDROM":1,"VM.Audit":1,"VM.Backup":1,"VM.Allocate":1,"VM.Clone":1,"VM.Config.HWType":1,"VM.Config.Network":1,"VM.Migrate":1,"VM.Config.Disk":1,"VM.PowerMgmt":1,"VM.Config.CPU":1},"nodes":{"Sys.PowerMgmt":1,"Sys.Syslog":1,"Sys.Console":1,"Permissions.Modify":1,"Sys.Audit":1,"Sys.Modify":1},"storage":{"Permissions.Modify":1,"Datastore.Allocate":1,"Datastore.AllocateSpace":1,"Datastore.AllocateTemplate":1,"Datastore.Audit":1},"access":{"User.Modify":1,"Permissions.Modify":1,"Group.Allocate":1}},"CSRFPreventionToken":"5CA4B5FE:JzR3XSygTzEu985HIIdZNk8lsC8","username":"root@pam","ticket":"PVE:root@pam:5CA4B5FE::PV5429PyZgWF/XjTk9r/Zibfow4+R0QQRA/ft6DEe8LaBkrHzj68jdt8K530G0fXc2ewj53Q8F+rfZpQeOAitzWbKmMjSZo1jf79OOHiW9ns+qlbyrG+mFE1NFMn3awiUL5RD50wsrrrKVS4v17TRPbIwpLdbYHKN3liyS+EBKZEzG5RLXRw3oU4DZaVuBnWgAuMVog8WpIFxG5NxDjQOXgm7kmzPv9OJOn4ZocQrsE5P12XGazk82QmT58eWDooD45NzlnSxAUPSS8bPguoc86EdL3LB1PhDXBth/dlZE+ktHQHvUgOV1qUMBzbDSfWGLU3PmZ+FekdtXUhhyN4Hg=="}}'
|
38
38
|
http_version:
|
39
|
-
recorded_at:
|
39
|
+
recorded_at: Wed, 03 Apr 2019 13:32:47 GMT
|
40
40
|
recorded_with: VCR 3.0.3
|
@@ -1,46 +1,5 @@
|
|
1
1
|
---
|
2
2
|
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: https://192.168.56.101:8006/api2/json/nodes/pve/network?type=
|
6
|
-
body:
|
7
|
-
encoding: US-ASCII
|
8
|
-
string: ''
|
9
|
-
headers:
|
10
|
-
User-Agent:
|
11
|
-
- fog-core/1.45.0
|
12
|
-
Accept:
|
13
|
-
- application/json
|
14
|
-
Cookie:
|
15
|
-
- PVEAuthCookie=PVE:root@pam:5B23D6E0::CuRZNrOWGO66puwzL59Ga0yL2B2wntrDXTapItJ4+RQFjDUClKi7PesSHQ0+kLl8Rni7m7tSxSKIDSeu/VUuiF4FpkZjdony3j69vqRWwHZwjBceJfPg/9eIbExGg4ymcNF8CZejBVffRXqh9n36BVwTTEFyUOypCgoZzUONJ5JRXIAWHcmChf4MC+SW2XqOJsLD6M6Muh+vgEjutr1ZRK9gjJfua8DPpdRYU0eFIWgeX+5pVUw1ZbrdVysrueW5Q4MQSr8fqUxbf+K0/s853O8mYePqkRVLZsm8VLz9V+tqEmRpR3eQ/gq9c0nITy594XjEugIRdaOryo2tL0alsA==
|
16
|
-
response:
|
17
|
-
status:
|
18
|
-
code: 400
|
19
|
-
message: Parameter verification failed.
|
20
|
-
headers:
|
21
|
-
Cache-Control:
|
22
|
-
- max-age=0
|
23
|
-
Connection:
|
24
|
-
- close
|
25
|
-
Date:
|
26
|
-
- Fri, 15 Jun 2018 15:10:26 GMT
|
27
|
-
Pragma:
|
28
|
-
- no-cache
|
29
|
-
Server:
|
30
|
-
- pve-api-daemon/3.0
|
31
|
-
Content-Length:
|
32
|
-
- '169'
|
33
|
-
Content-Type:
|
34
|
-
- application/json;charset=UTF-8
|
35
|
-
Expires:
|
36
|
-
- Fri, 15 Jun 2018 15:10:26 GMT
|
37
|
-
body:
|
38
|
-
encoding: ASCII-8BIT
|
39
|
-
string: '{"data":null,"errors":{"type":"value '''' does not have a value in
|
40
|
-
the enumeration ''bridge, bond, eth, alias, vlan, OVSBridge, OVSBond, OVSPort,
|
41
|
-
OVSIntPort, any_bridge''"}}'
|
42
|
-
http_version:
|
43
|
-
recorded_at: Fri, 15 Jun 2018 15:10:28 GMT
|
44
3
|
- request:
|
45
4
|
method: get
|
46
5
|
uri: https://192.168.56.101:8006/api2/json/cluster/resources?type=node
|
@@ -53,7 +12,7 @@ http_interactions:
|
|
53
12
|
Accept:
|
54
13
|
- application/json
|
55
14
|
Cookie:
|
56
|
-
- PVEAuthCookie=PVE:root@pam:
|
15
|
+
- PVEAuthCookie=PVE:root@pam:5CA4B5FE::PV5429PyZgWF/XjTk9r/Zibfow4+R0QQRA/ft6DEe8LaBkrHzj68jdt8K530G0fXc2ewj53Q8F+rfZpQeOAitzWbKmMjSZo1jf79OOHiW9ns+qlbyrG+mFE1NFMn3awiUL5RD50wsrrrKVS4v17TRPbIwpLdbYHKN3liyS+EBKZEzG5RLXRw3oU4DZaVuBnWgAuMVog8WpIFxG5NxDjQOXgm7kmzPv9OJOn4ZocQrsE5P12XGazk82QmT58eWDooD45NzlnSxAUPSS8bPguoc86EdL3LB1PhDXBth/dlZE+ktHQHvUgOV1qUMBzbDSfWGLU3PmZ+FekdtXUhhyN4Hg==
|
57
16
|
response:
|
58
17
|
status:
|
59
18
|
code: 200
|
@@ -64,22 +23,22 @@ http_interactions:
|
|
64
23
|
Connection:
|
65
24
|
- Keep-Alive
|
66
25
|
Date:
|
67
|
-
-
|
26
|
+
- Wed, 03 Apr 2019 13:32:46 GMT
|
68
27
|
Pragma:
|
69
28
|
- no-cache
|
70
29
|
Server:
|
71
30
|
- pve-api-daemon/3.0
|
72
31
|
Content-Length:
|
73
|
-
- '
|
32
|
+
- '209'
|
74
33
|
Content-Type:
|
75
34
|
- application/json;charset=UTF-8
|
76
35
|
Expires:
|
77
|
-
-
|
36
|
+
- Wed, 03 Apr 2019 13:32:46 GMT
|
78
37
|
body:
|
79
38
|
encoding: ASCII-8BIT
|
80
|
-
string: '{"data":[{"
|
39
|
+
string: '{"data":[{"mem":841080832,"disk":1647345664,"node":"pve","maxmem":4136062976,"uptime":286,"type":"node","maxdisk":3896197120,"maxcpu":4,"status":"online","level":"","id":"node/pve","cpu":0.00323278800042299}]}'
|
81
40
|
http_version:
|
82
|
-
recorded_at:
|
41
|
+
recorded_at: Wed, 03 Apr 2019 13:32:47 GMT
|
83
42
|
- request:
|
84
43
|
method: post
|
85
44
|
uri: https://192.168.56.101:8006/api2/json/nodes/pve/network
|
@@ -92,9 +51,9 @@ http_interactions:
|
|
92
51
|
Accept:
|
93
52
|
- application/json
|
94
53
|
Csrfpreventiontoken:
|
95
|
-
-
|
54
|
+
- 5CA4B5FE:JzR3XSygTzEu985HIIdZNk8lsC8
|
96
55
|
Cookie:
|
97
|
-
- PVEAuthCookie=PVE:root@pam:
|
56
|
+
- PVEAuthCookie=PVE:root@pam:5CA4B5FE::PV5429PyZgWF/XjTk9r/Zibfow4+R0QQRA/ft6DEe8LaBkrHzj68jdt8K530G0fXc2ewj53Q8F+rfZpQeOAitzWbKmMjSZo1jf79OOHiW9ns+qlbyrG+mFE1NFMn3awiUL5RD50wsrrrKVS4v17TRPbIwpLdbYHKN3liyS+EBKZEzG5RLXRw3oU4DZaVuBnWgAuMVog8WpIFxG5NxDjQOXgm7kmzPv9OJOn4ZocQrsE5P12XGazk82QmT58eWDooD45NzlnSxAUPSS8bPguoc86EdL3LB1PhDXBth/dlZE+ktHQHvUgOV1qUMBzbDSfWGLU3PmZ+FekdtXUhhyN4Hg==
|
98
57
|
response:
|
99
58
|
status:
|
100
59
|
code: 200
|
@@ -105,7 +64,7 @@ http_interactions:
|
|
105
64
|
Connection:
|
106
65
|
- close, Keep-Alive
|
107
66
|
Date:
|
108
|
-
-
|
67
|
+
- Wed, 03 Apr 2019 13:32:46 GMT
|
109
68
|
Pragma:
|
110
69
|
- no-cache
|
111
70
|
Server:
|
@@ -115,12 +74,12 @@ http_interactions:
|
|
115
74
|
Content-Type:
|
116
75
|
- application/json;charset=UTF-8
|
117
76
|
Expires:
|
118
|
-
-
|
77
|
+
- Wed, 03 Apr 2019 13:32:46 GMT
|
119
78
|
body:
|
120
79
|
encoding: ASCII-8BIT
|
121
80
|
string: '{"data":null}'
|
122
81
|
http_version:
|
123
|
-
recorded_at:
|
82
|
+
recorded_at: Wed, 03 Apr 2019 13:32:47 GMT
|
124
83
|
- request:
|
125
84
|
method: get
|
126
85
|
uri: https://192.168.56.101:8006/api2/json/nodes/pve/network
|
@@ -133,7 +92,7 @@ http_interactions:
|
|
133
92
|
Accept:
|
134
93
|
- application/json
|
135
94
|
Cookie:
|
136
|
-
- PVEAuthCookie=PVE:root@pam:
|
95
|
+
- PVEAuthCookie=PVE:root@pam:5CA4B5FE::PV5429PyZgWF/XjTk9r/Zibfow4+R0QQRA/ft6DEe8LaBkrHzj68jdt8K530G0fXc2ewj53Q8F+rfZpQeOAitzWbKmMjSZo1jf79OOHiW9ns+qlbyrG+mFE1NFMn3awiUL5RD50wsrrrKVS4v17TRPbIwpLdbYHKN3liyS+EBKZEzG5RLXRw3oU4DZaVuBnWgAuMVog8WpIFxG5NxDjQOXgm7kmzPv9OJOn4ZocQrsE5P12XGazk82QmT58eWDooD45NzlnSxAUPSS8bPguoc86EdL3LB1PhDXBth/dlZE+ktHQHvUgOV1qUMBzbDSfWGLU3PmZ+FekdtXUhhyN4Hg==
|
137
96
|
response:
|
138
97
|
status:
|
139
98
|
code: 200
|
@@ -144,25 +103,25 @@ http_interactions:
|
|
144
103
|
Connection:
|
145
104
|
- Keep-Alive
|
146
105
|
Date:
|
147
|
-
-
|
106
|
+
- Wed, 03 Apr 2019 13:32:46 GMT
|
148
107
|
Pragma:
|
149
108
|
- no-cache
|
150
109
|
Server:
|
151
110
|
- pve-api-daemon/3.0
|
152
111
|
Content-Length:
|
153
|
-
- '
|
112
|
+
- '911'
|
154
113
|
Content-Type:
|
155
114
|
- application/json;charset=UTF-8
|
156
115
|
Expires:
|
157
|
-
-
|
116
|
+
- Wed, 03 Apr 2019 13:32:46 GMT
|
158
117
|
body:
|
159
118
|
encoding: ASCII-8BIT
|
160
|
-
string: '{"
|
161
|
-
|
162
|
-
-
|
163
|
-
auto vmbr0\n iface vmbr0 inet static\n \taddress 192.168.56.101\n"
|
119
|
+
string: '{"data":[{"priority":3,"iface":"enp0s3","method":"manual","families":["inet"],"active":1,"method6":"manual","type":"eth","exists":1},{"method":"manual","families":["inet"],"iface":"enp0s10","priority":5,"type":"eth","method6":"manual"},{"priority":6,"bridge_ports":"enp0s3","iface":"vmbr0","bridge_stp":"off","autostart":1,"families":["inet"],"method":"static","gateway":"10.0.3.2","active":1,"method6":"manual","type":"bridge","bridge_fd":"0","netmask":"255.255.255.0","address":"192.168.56.101"},{"type":"eth","priority":4,"method6":"manual","method":"manual","families":["inet"],"exists":1,"iface":"enp0s8"}],"changes":"---
|
120
|
+
/etc/network/interfaces\t2019-04-03 15:27:32.284000000 +0200\n+++ /etc/network/interfaces.new\t2019-04-03
|
121
|
+
15:32:46.304000000 +0200\n@@ -16,6 +16,8 @@\n \n iface enp0s8 inet manual\n
|
122
|
+
\n+iface enp0s10 inet manual\n+\n auto vmbr0\n iface vmbr0 inet static\n \taddress 192.168.56.101\n"}'
|
164
123
|
http_version:
|
165
|
-
recorded_at:
|
124
|
+
recorded_at: Wed, 03 Apr 2019 13:32:47 GMT
|
166
125
|
- request:
|
167
126
|
method: post
|
168
127
|
uri: https://192.168.56.101:8006/api2/json/nodes/pve/network
|
@@ -175,9 +134,9 @@ http_interactions:
|
|
175
134
|
Accept:
|
176
135
|
- application/json
|
177
136
|
Csrfpreventiontoken:
|
178
|
-
-
|
137
|
+
- 5CA4B5FE:JzR3XSygTzEu985HIIdZNk8lsC8
|
179
138
|
Cookie:
|
180
|
-
- PVEAuthCookie=PVE:root@pam:
|
139
|
+
- PVEAuthCookie=PVE:root@pam:5CA4B5FE::PV5429PyZgWF/XjTk9r/Zibfow4+R0QQRA/ft6DEe8LaBkrHzj68jdt8K530G0fXc2ewj53Q8F+rfZpQeOAitzWbKmMjSZo1jf79OOHiW9ns+qlbyrG+mFE1NFMn3awiUL5RD50wsrrrKVS4v17TRPbIwpLdbYHKN3liyS+EBKZEzG5RLXRw3oU4DZaVuBnWgAuMVog8WpIFxG5NxDjQOXgm7kmzPv9OJOn4ZocQrsE5P12XGazk82QmT58eWDooD45NzlnSxAUPSS8bPguoc86EdL3LB1PhDXBth/dlZE+ktHQHvUgOV1qUMBzbDSfWGLU3PmZ+FekdtXUhhyN4Hg==
|
181
140
|
response:
|
182
141
|
status:
|
183
142
|
code: 400
|
@@ -188,7 +147,7 @@ http_interactions:
|
|
188
147
|
Connection:
|
189
148
|
- close
|
190
149
|
Date:
|
191
|
-
-
|
150
|
+
- Wed, 03 Apr 2019 13:32:46 GMT
|
192
151
|
Pragma:
|
193
152
|
- no-cache
|
194
153
|
Server:
|
@@ -198,12 +157,12 @@ http_interactions:
|
|
198
157
|
Content-Type:
|
199
158
|
- application/json;charset=UTF-8
|
200
159
|
Expires:
|
201
|
-
-
|
160
|
+
- Wed, 03 Apr 2019 13:32:46 GMT
|
202
161
|
body:
|
203
162
|
encoding: ASCII-8BIT
|
204
163
|
string: '{"errors":{"iface":"interface already exists"},"data":null}'
|
205
164
|
http_version:
|
206
|
-
recorded_at:
|
165
|
+
recorded_at: Wed, 03 Apr 2019 13:32:47 GMT
|
207
166
|
- request:
|
208
167
|
method: get
|
209
168
|
uri: https://192.168.56.101:8006/api2/json/nodes/pve/network
|
@@ -216,7 +175,7 @@ http_interactions:
|
|
216
175
|
Accept:
|
217
176
|
- application/json
|
218
177
|
Cookie:
|
219
|
-
- PVEAuthCookie=PVE:root@pam:
|
178
|
+
- PVEAuthCookie=PVE:root@pam:5CA4B5FE::PV5429PyZgWF/XjTk9r/Zibfow4+R0QQRA/ft6DEe8LaBkrHzj68jdt8K530G0fXc2ewj53Q8F+rfZpQeOAitzWbKmMjSZo1jf79OOHiW9ns+qlbyrG+mFE1NFMn3awiUL5RD50wsrrrKVS4v17TRPbIwpLdbYHKN3liyS+EBKZEzG5RLXRw3oU4DZaVuBnWgAuMVog8WpIFxG5NxDjQOXgm7kmzPv9OJOn4ZocQrsE5P12XGazk82QmT58eWDooD45NzlnSxAUPSS8bPguoc86EdL3LB1PhDXBth/dlZE+ktHQHvUgOV1qUMBzbDSfWGLU3PmZ+FekdtXUhhyN4Hg==
|
220
179
|
response:
|
221
180
|
status:
|
222
181
|
code: 200
|
@@ -227,25 +186,25 @@ http_interactions:
|
|
227
186
|
Connection:
|
228
187
|
- Keep-Alive
|
229
188
|
Date:
|
230
|
-
-
|
189
|
+
- Wed, 03 Apr 2019 13:32:46 GMT
|
231
190
|
Pragma:
|
232
191
|
- no-cache
|
233
192
|
Server:
|
234
193
|
- pve-api-daemon/3.0
|
235
194
|
Content-Length:
|
236
|
-
- '
|
195
|
+
- '911'
|
237
196
|
Content-Type:
|
238
197
|
- application/json;charset=UTF-8
|
239
198
|
Expires:
|
240
|
-
-
|
199
|
+
- Wed, 03 Apr 2019 13:32:46 GMT
|
241
200
|
body:
|
242
201
|
encoding: ASCII-8BIT
|
243
|
-
string: '{"
|
244
|
-
/etc/network/interfaces\
|
245
|
-
|
246
|
-
|
202
|
+
string: '{"changes":"--- /etc/network/interfaces\t2019-04-03 15:27:32.284000000
|
203
|
+
+0200\n+++ /etc/network/interfaces.new\t2019-04-03 15:32:46.304000000 +0200\n@@
|
204
|
+
-16,6 +16,8 @@\n \n iface enp0s8 inet manual\n \n+iface enp0s10 inet manual\n+\n
|
205
|
+
auto vmbr0\n iface vmbr0 inet static\n \taddress 192.168.56.101\n","data":[{"address":"192.168.56.101","type":"bridge","netmask":"255.255.255.0","bridge_fd":"0","method6":"manual","families":["inet"],"method":"static","gateway":"10.0.3.2","active":1,"bridge_stp":"off","iface":"vmbr0","autostart":1,"priority":6,"bridge_ports":"enp0s3"},{"exists":1,"type":"eth","method6":"manual","active":1,"families":["inet"],"method":"manual","iface":"enp0s3","priority":3},{"iface":"enp0s10","method":"manual","families":["inet"],"method6":"manual","priority":5,"type":"eth"},{"priority":4,"type":"eth","method6":"manual","method":"manual","families":["inet"],"exists":1,"iface":"enp0s8"}]}'
|
247
206
|
http_version:
|
248
|
-
recorded_at:
|
207
|
+
recorded_at: Wed, 03 Apr 2019 13:32:47 GMT
|
249
208
|
- request:
|
250
209
|
method: put
|
251
210
|
uri: https://192.168.56.101:8006/api2/json/nodes/pve/network/enp0s10
|
@@ -258,9 +217,9 @@ http_interactions:
|
|
258
217
|
Accept:
|
259
218
|
- application/json
|
260
219
|
Csrfpreventiontoken:
|
261
|
-
-
|
220
|
+
- 5CA4B5FE:JzR3XSygTzEu985HIIdZNk8lsC8
|
262
221
|
Cookie:
|
263
|
-
- PVEAuthCookie=PVE:root@pam:
|
222
|
+
- PVEAuthCookie=PVE:root@pam:5CA4B5FE::PV5429PyZgWF/XjTk9r/Zibfow4+R0QQRA/ft6DEe8LaBkrHzj68jdt8K530G0fXc2ewj53Q8F+rfZpQeOAitzWbKmMjSZo1jf79OOHiW9ns+qlbyrG+mFE1NFMn3awiUL5RD50wsrrrKVS4v17TRPbIwpLdbYHKN3liyS+EBKZEzG5RLXRw3oU4DZaVuBnWgAuMVog8WpIFxG5NxDjQOXgm7kmzPv9OJOn4ZocQrsE5P12XGazk82QmT58eWDooD45NzlnSxAUPSS8bPguoc86EdL3LB1PhDXBth/dlZE+ktHQHvUgOV1qUMBzbDSfWGLU3PmZ+FekdtXUhhyN4Hg==
|
264
223
|
response:
|
265
224
|
status:
|
266
225
|
code: 200
|
@@ -271,7 +230,7 @@ http_interactions:
|
|
271
230
|
Connection:
|
272
231
|
- Keep-Alive, Keep-Alive
|
273
232
|
Date:
|
274
|
-
-
|
233
|
+
- Wed, 03 Apr 2019 13:32:46 GMT
|
275
234
|
Pragma:
|
276
235
|
- no-cache
|
277
236
|
Server:
|
@@ -281,12 +240,12 @@ http_interactions:
|
|
281
240
|
Content-Type:
|
282
241
|
- application/json;charset=UTF-8
|
283
242
|
Expires:
|
284
|
-
-
|
243
|
+
- Wed, 03 Apr 2019 13:32:46 GMT
|
285
244
|
body:
|
286
245
|
encoding: ASCII-8BIT
|
287
246
|
string: '{"data":null}'
|
288
247
|
http_version:
|
289
|
-
recorded_at:
|
248
|
+
recorded_at: Wed, 03 Apr 2019 13:32:47 GMT
|
290
249
|
- request:
|
291
250
|
method: post
|
292
251
|
uri: https://192.168.56.101:8006/api2/json/nodes/pve/status
|
@@ -299,9 +258,9 @@ http_interactions:
|
|
299
258
|
Accept:
|
300
259
|
- application/json
|
301
260
|
Csrfpreventiontoken:
|
302
|
-
-
|
261
|
+
- 5CA4B5FE:JzR3XSygTzEu985HIIdZNk8lsC8
|
303
262
|
Cookie:
|
304
|
-
- PVEAuthCookie=PVE:root@pam:
|
263
|
+
- PVEAuthCookie=PVE:root@pam:5CA4B5FE::PV5429PyZgWF/XjTk9r/Zibfow4+R0QQRA/ft6DEe8LaBkrHzj68jdt8K530G0fXc2ewj53Q8F+rfZpQeOAitzWbKmMjSZo1jf79OOHiW9ns+qlbyrG+mFE1NFMn3awiUL5RD50wsrrrKVS4v17TRPbIwpLdbYHKN3liyS+EBKZEzG5RLXRw3oU4DZaVuBnWgAuMVog8WpIFxG5NxDjQOXgm7kmzPv9OJOn4ZocQrsE5P12XGazk82QmT58eWDooD45NzlnSxAUPSS8bPguoc86EdL3LB1PhDXBth/dlZE+ktHQHvUgOV1qUMBzbDSfWGLU3PmZ+FekdtXUhhyN4Hg==
|
305
264
|
response:
|
306
265
|
status:
|
307
266
|
code: 200
|
@@ -312,7 +271,7 @@ http_interactions:
|
|
312
271
|
Connection:
|
313
272
|
- close, Keep-Alive
|
314
273
|
Date:
|
315
|
-
-
|
274
|
+
- Wed, 03 Apr 2019 13:32:46 GMT
|
316
275
|
Pragma:
|
317
276
|
- no-cache
|
318
277
|
Server:
|
@@ -322,12 +281,12 @@ http_interactions:
|
|
322
281
|
Content-Type:
|
323
282
|
- application/json;charset=UTF-8
|
324
283
|
Expires:
|
325
|
-
-
|
284
|
+
- Wed, 03 Apr 2019 13:32:46 GMT
|
326
285
|
body:
|
327
286
|
encoding: ASCII-8BIT
|
328
287
|
string: '{"data":null}'
|
329
288
|
http_version:
|
330
|
-
recorded_at:
|
289
|
+
recorded_at: Wed, 03 Apr 2019 13:32:47 GMT
|
331
290
|
- request:
|
332
291
|
method: delete
|
333
292
|
uri: https://192.168.56.101:8006/api2/json/nodes/pve/network/enp0s10
|
@@ -340,9 +299,9 @@ http_interactions:
|
|
340
299
|
Accept:
|
341
300
|
- application/json
|
342
301
|
Csrfpreventiontoken:
|
343
|
-
-
|
302
|
+
- 5CA4B5FE:JzR3XSygTzEu985HIIdZNk8lsC8
|
344
303
|
Cookie:
|
345
|
-
- PVEAuthCookie=PVE:root@pam:
|
304
|
+
- PVEAuthCookie=PVE:root@pam:5CA4B5FE::PV5429PyZgWF/XjTk9r/Zibfow4+R0QQRA/ft6DEe8LaBkrHzj68jdt8K530G0fXc2ewj53Q8F+rfZpQeOAitzWbKmMjSZo1jf79OOHiW9ns+qlbyrG+mFE1NFMn3awiUL5RD50wsrrrKVS4v17TRPbIwpLdbYHKN3liyS+EBKZEzG5RLXRw3oU4DZaVuBnWgAuMVog8WpIFxG5NxDjQOXgm7kmzPv9OJOn4ZocQrsE5P12XGazk82QmT58eWDooD45NzlnSxAUPSS8bPguoc86EdL3LB1PhDXBth/dlZE+ktHQHvUgOV1qUMBzbDSfWGLU3PmZ+FekdtXUhhyN4Hg==
|
346
305
|
response:
|
347
306
|
status:
|
348
307
|
code: 200
|
@@ -353,7 +312,7 @@ http_interactions:
|
|
353
312
|
Connection:
|
354
313
|
- Keep-Alive, Keep-Alive
|
355
314
|
Date:
|
356
|
-
-
|
315
|
+
- Wed, 03 Apr 2019 13:33:46 GMT
|
357
316
|
Pragma:
|
358
317
|
- no-cache
|
359
318
|
Server:
|
@@ -363,12 +322,12 @@ http_interactions:
|
|
363
322
|
Content-Type:
|
364
323
|
- application/json;charset=UTF-8
|
365
324
|
Expires:
|
366
|
-
-
|
325
|
+
- Wed, 03 Apr 2019 13:33:46 GMT
|
367
326
|
body:
|
368
327
|
encoding: ASCII-8BIT
|
369
328
|
string: '{"data":null}'
|
370
329
|
http_version:
|
371
|
-
recorded_at:
|
330
|
+
recorded_at: Wed, 03 Apr 2019 13:33:48 GMT
|
372
331
|
- request:
|
373
332
|
method: post
|
374
333
|
uri: https://192.168.56.101:8006/api2/json/nodes/pve/status
|
@@ -381,9 +340,9 @@ http_interactions:
|
|
381
340
|
Accept:
|
382
341
|
- application/json
|
383
342
|
Csrfpreventiontoken:
|
384
|
-
-
|
343
|
+
- 5CA4B5FE:JzR3XSygTzEu985HIIdZNk8lsC8
|
385
344
|
Cookie:
|
386
|
-
- PVEAuthCookie=PVE:root@pam:
|
345
|
+
- PVEAuthCookie=PVE:root@pam:5CA4B5FE::PV5429PyZgWF/XjTk9r/Zibfow4+R0QQRA/ft6DEe8LaBkrHzj68jdt8K530G0fXc2ewj53Q8F+rfZpQeOAitzWbKmMjSZo1jf79OOHiW9ns+qlbyrG+mFE1NFMn3awiUL5RD50wsrrrKVS4v17TRPbIwpLdbYHKN3liyS+EBKZEzG5RLXRw3oU4DZaVuBnWgAuMVog8WpIFxG5NxDjQOXgm7kmzPv9OJOn4ZocQrsE5P12XGazk82QmT58eWDooD45NzlnSxAUPSS8bPguoc86EdL3LB1PhDXBth/dlZE+ktHQHvUgOV1qUMBzbDSfWGLU3PmZ+FekdtXUhhyN4Hg==
|
387
346
|
response:
|
388
347
|
status:
|
389
348
|
code: 200
|
@@ -394,7 +353,7 @@ http_interactions:
|
|
394
353
|
Connection:
|
395
354
|
- close, Keep-Alive
|
396
355
|
Date:
|
397
|
-
-
|
356
|
+
- Wed, 03 Apr 2019 13:33:47 GMT
|
398
357
|
Pragma:
|
399
358
|
- no-cache
|
400
359
|
Server:
|
@@ -404,10 +363,10 @@ http_interactions:
|
|
404
363
|
Content-Type:
|
405
364
|
- application/json;charset=UTF-8
|
406
365
|
Expires:
|
407
|
-
-
|
366
|
+
- Wed, 03 Apr 2019 13:33:47 GMT
|
408
367
|
body:
|
409
368
|
encoding: ASCII-8BIT
|
410
369
|
string: '{"data":null}'
|
411
370
|
http_version:
|
412
|
-
recorded_at:
|
371
|
+
recorded_at: Wed, 03 Apr 2019 13:33:48 GMT
|
413
372
|
recorded_with: VCR 3.0.3
|
@@ -40,22 +40,22 @@ require 'fog/proxmox/helpers/nic_helper'
|
|
40
40
|
|
41
41
|
describe '#extract_model' do
|
42
42
|
it "returns model card" do
|
43
|
-
model = Fog::Proxmox::NicHelper.
|
43
|
+
model = Fog::Proxmox::NicHelper.extract_nic_id(net_vm[:net0])
|
44
44
|
assert_equal 'virtio', model
|
45
45
|
end
|
46
46
|
it "returns model card creation" do
|
47
|
-
model = Fog::Proxmox::NicHelper.
|
47
|
+
model = Fog::Proxmox::NicHelper.extract_nic_id(net_vm_create[:net0])
|
48
48
|
assert_equal 'virtio', model
|
49
49
|
end
|
50
50
|
end
|
51
51
|
|
52
52
|
describe '#extract_name' do
|
53
53
|
it "returns lxc name" do
|
54
|
-
model = Fog::Proxmox::NicHelper.
|
54
|
+
model = Fog::Proxmox::NicHelper.extract_nic_id(net_lxc[:net0])
|
55
55
|
assert_equal 'eth0', model
|
56
56
|
end
|
57
57
|
it "returns lxc name creation" do
|
58
|
-
model = Fog::Proxmox::NicHelper.
|
58
|
+
model = Fog::Proxmox::NicHelper.extract_nic_id(net_lxc_create[:net0])
|
59
59
|
assert_equal 'eth0', model
|
60
60
|
end
|
61
61
|
end
|
data/spec/identity_spec.rb
CHANGED
@@ -76,7 +76,7 @@ describe Fog::Identity::Proxmox do
|
|
76
76
|
# Create 1st time
|
77
77
|
@service.users.create(bob_hash)
|
78
78
|
# Find by id
|
79
|
-
bob = @service.users.
|
79
|
+
bob = @service.users.get bob_hash[:userid]
|
80
80
|
bob.wont_be_nil
|
81
81
|
# Create 2nd time must fails
|
82
82
|
proc do
|
@@ -104,13 +104,12 @@ describe Fog::Identity::Proxmox do
|
|
104
104
|
users_disabled.must_include bob
|
105
105
|
# Delete
|
106
106
|
bob.destroy
|
107
|
-
group1 = @service.groups.
|
107
|
+
group1 = @service.groups.get 'group1'
|
108
108
|
group1.destroy
|
109
|
-
group2 = @service.groups.
|
109
|
+
group2 = @service.groups.get 'group2'
|
110
110
|
group2.destroy
|
111
|
-
|
112
|
-
|
113
|
-
end.must_raise Excon::Errors::InternalServerError
|
111
|
+
bob = @service.users.get bob_hash[:userid]
|
112
|
+
bob.must_be_nil
|
114
113
|
end
|
115
114
|
end
|
116
115
|
|
@@ -120,7 +119,7 @@ describe Fog::Identity::Proxmox do
|
|
120
119
|
# Create 1st time
|
121
120
|
@service.groups.create(group_hash)
|
122
121
|
# Find by id
|
123
|
-
group = @service.groups.
|
122
|
+
group = @service.groups.get group_hash[:groupid]
|
124
123
|
group.wont_be_nil
|
125
124
|
# Create 2nd time must fails
|
126
125
|
proc do
|
@@ -136,9 +135,8 @@ describe Fog::Identity::Proxmox do
|
|
136
135
|
groups_all.must_include group
|
137
136
|
# Delete
|
138
137
|
group.destroy
|
139
|
-
|
140
|
-
|
141
|
-
end.must_raise Excon::Errors::InternalServerError
|
138
|
+
group1 = @service.groups.get group_hash[:groupid]
|
139
|
+
group1.must_be_nil
|
142
140
|
end
|
143
141
|
end
|
144
142
|
|
@@ -148,7 +146,7 @@ describe Fog::Identity::Proxmox do
|
|
148
146
|
# Create 1st time
|
149
147
|
@service.roles.create(role_hash)
|
150
148
|
# Find by id
|
151
|
-
role = @service.roles.
|
149
|
+
role = @service.roles.get role_hash[:roleid]
|
152
150
|
role.wont_be_nil
|
153
151
|
# Create 2nd time must fails
|
154
152
|
proc do
|
@@ -164,9 +162,8 @@ describe Fog::Identity::Proxmox do
|
|
164
162
|
roles_all.must_include role
|
165
163
|
# Delete
|
166
164
|
role.destroy
|
167
|
-
|
168
|
-
|
169
|
-
end.must_raise Excon::Errors::InternalServerError
|
165
|
+
role = @service.roles.get role_hash[:roleid]
|
166
|
+
role.must_be_nil
|
170
167
|
end
|
171
168
|
end
|
172
169
|
|
@@ -194,7 +191,7 @@ describe Fog::Identity::Proxmox do
|
|
194
191
|
# Create 1st time
|
195
192
|
@service.domains.create(ldap_hash)
|
196
193
|
# Find by id
|
197
|
-
ldap = @service.domains.
|
194
|
+
ldap = @service.domains.get ldap_hash[:realm]
|
198
195
|
ldap.wont_be_nil
|
199
196
|
# Create 1st time
|
200
197
|
@service.domains.create(ad_hash)
|
@@ -211,8 +208,8 @@ describe Fog::Identity::Proxmox do
|
|
211
208
|
ldap.type.tfa = 'type=oath,step=30,digits=8'
|
212
209
|
ldap.update
|
213
210
|
# Find by id
|
214
|
-
ad = @service.domains.
|
215
|
-
ad.wont_be_nil
|
211
|
+
ad = @service.domains.get ad_hash[:realm]
|
212
|
+
# ad.wont_be_nil
|
216
213
|
ad.type.tfa = 'type=yubico,id=1,key=2,url=http://localhost'
|
217
214
|
ad.update
|
218
215
|
# # all groups
|
@@ -224,12 +221,10 @@ describe Fog::Identity::Proxmox do
|
|
224
221
|
# Delete
|
225
222
|
ldap.destroy
|
226
223
|
ad.destroy
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
@service.domains.find_by_id ad_hash[:realm]
|
232
|
-
end.must_raise Excon::Errors::InternalServerError
|
224
|
+
ldap = @service.domains.get ldap_hash[:realm]
|
225
|
+
ldap.must_be_nil
|
226
|
+
ad = @service.domains.get ad_hash[:realm]
|
227
|
+
ad.must_be_nil
|
233
228
|
end
|
234
229
|
end
|
235
230
|
|
@@ -243,40 +238,38 @@ describe Fog::Identity::Proxmox do
|
|
243
238
|
lastname: 'Sinclar',
|
244
239
|
email: 'bobsinclar@proxmox.com'
|
245
240
|
}
|
241
|
+
@service.roles.create(roleid: 'PVETestAdmin', privs: 'User.Modify,Group.Allocate')
|
242
|
+
role = @service.roles.get('PVETestAdmin')
|
243
|
+
role.wont_be_nil
|
246
244
|
@service.users.create(bob_hash)
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
}
|
252
|
-
@service.add_permission(permission_hash)
|
245
|
+
bob = @service.users.get bob_hash[:userid]
|
246
|
+
bob.wont_be_nil
|
247
|
+
permission = @service.permissions.create(type: 'user', roleid: role.roleid, path: '/access', ugid: bob.userid)
|
248
|
+
permission.wont_be_nil
|
253
249
|
# Read all permissions
|
254
250
|
permissions = @service.permissions.all
|
255
251
|
permissions.wont_be_empty
|
256
|
-
permission = @service.permissions.create(permission_hash)
|
257
252
|
permissions.must_include permission
|
258
253
|
# Remove ACL to users
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
bob = @service.users.
|
254
|
+
permissions.destroy(type: 'user', roleid: role.roleid, path: '/access', ugid: bob.userid)
|
255
|
+
permission = @service.permissions.get('user', role.roleid, '/access', bob.userid)
|
256
|
+
permission.must_be_nil
|
257
|
+
bob = @service.users.get bob_hash[:userid]
|
263
258
|
bob.destroy
|
264
259
|
# Add ACL to groups
|
265
|
-
@service.groups.create(groupid: 'group1', comment: 'Group 1')
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
# Read all permissions
|
260
|
+
group1 = @service.groups.create(groupid: 'group1', comment: 'Group 1')
|
261
|
+
permission = @service.permissions.create(type: 'group', roleid: role.roleid, path: '/access', ugid: group1.groupid)
|
262
|
+
permission.wont_be_nil
|
263
|
+
# Read new permission
|
270
264
|
permissions = @service.permissions.all
|
271
265
|
permissions.wont_be_empty
|
272
|
-
permission = @service.permissions.create(permission_hash)
|
273
266
|
permissions.must_include permission
|
274
267
|
# Remove ACL to groups
|
275
|
-
|
268
|
+
permissions.destroy(type: 'group', roleid: role.roleid, path: '/access', ugid: group1.groupid)
|
276
269
|
permissions = @service.permissions.all
|
277
270
|
permissions.must_be_empty
|
278
|
-
group1 = @service.groups.find_by_id 'group1'
|
279
271
|
group1.destroy
|
272
|
+
role.destroy
|
280
273
|
end
|
281
274
|
end
|
282
275
|
|
@@ -286,7 +279,7 @@ describe Fog::Identity::Proxmox do
|
|
286
279
|
# Create 1st time
|
287
280
|
@service.pools.create(pool_hash)
|
288
281
|
# Find by id
|
289
|
-
pool = @service.pools.
|
282
|
+
pool = @service.pools.get pool_hash[:poolid]
|
290
283
|
pool.wont_be_nil
|
291
284
|
# Create 2nd time must fails
|
292
285
|
proc do
|
@@ -308,9 +301,8 @@ describe Fog::Identity::Proxmox do
|
|
308
301
|
pool.remove_server 100
|
309
302
|
pool.remove_storage 'local-lvm'
|
310
303
|
pool.destroy
|
311
|
-
|
312
|
-
|
313
|
-
end.must_raise Excon::Errors::InternalServerError
|
304
|
+
pool = @service.pools.get pool_hash[:poolid]
|
305
|
+
pool.must_be_nil
|
314
306
|
end
|
315
307
|
end
|
316
308
|
end
|