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.
Files changed (126) hide show
  1. checksums.yaml +4 -4
  2. data/.gitlab-ci.yml +7 -0
  3. data/.travis.yml +1 -0
  4. data/.vscode/launch.json +3 -21
  5. data/.vscode/settings.json +7 -7
  6. data/Gemfile.lock +39 -39
  7. data/README.md +9 -2
  8. data/examples/compute.rb +20 -23
  9. data/examples/identity.rb +16 -21
  10. data/fog-proxmox.gemspec +1 -2
  11. data/lib/fog/compute/proxmox.rb +2 -8
  12. data/lib/fog/compute/proxmox/models/disk.rb +13 -11
  13. data/lib/fog/compute/proxmox/models/disks.rb +3 -5
  14. data/lib/fog/compute/proxmox/models/interface.rb +6 -11
  15. data/lib/fog/compute/proxmox/models/interfaces.rb +3 -5
  16. data/lib/fog/compute/proxmox/models/node.rb +38 -43
  17. data/lib/fog/compute/proxmox/models/nodes.rb +5 -11
  18. data/lib/fog/compute/proxmox/models/server.rb +123 -80
  19. data/lib/fog/compute/proxmox/models/server_config.rb +56 -24
  20. data/lib/fog/compute/proxmox/models/servers.rb +34 -26
  21. data/lib/fog/compute/proxmox/models/snapshot.rb +28 -14
  22. data/lib/fog/compute/proxmox/models/snapshots.rb +9 -17
  23. data/lib/fog/compute/proxmox/models/storage.rb +15 -11
  24. data/lib/fog/compute/proxmox/models/storages.rb +13 -22
  25. data/lib/fog/compute/proxmox/models/task.rb +10 -14
  26. data/lib/fog/compute/proxmox/models/tasks.rb +9 -18
  27. data/lib/fog/compute/proxmox/models/volume.rb +12 -12
  28. data/lib/fog/compute/proxmox/models/volumes.rb +10 -19
  29. data/lib/fog/compute/proxmox/requests/action_server.rb +1 -4
  30. data/lib/fog/compute/proxmox/requests/clone_server.rb +1 -4
  31. data/lib/fog/compute/proxmox/requests/create_backup.rb +1 -4
  32. data/lib/fog/compute/proxmox/requests/create_server.rb +1 -4
  33. data/lib/fog/compute/proxmox/requests/create_snapshot.rb +1 -4
  34. data/lib/fog/compute/proxmox/requests/create_spice.rb +1 -4
  35. data/lib/fog/compute/proxmox/requests/create_term.rb +1 -4
  36. data/lib/fog/compute/proxmox/requests/create_vnc.rb +1 -4
  37. data/lib/fog/compute/proxmox/requests/delete_server.rb +1 -4
  38. data/lib/fog/compute/proxmox/requests/delete_snapshot.rb +1 -4
  39. data/lib/fog/compute/proxmox/requests/get_node_statistics.rb +1 -4
  40. data/lib/fog/compute/proxmox/requests/get_server_config.rb +1 -4
  41. data/lib/fog/compute/proxmox/requests/get_server_status.rb +1 -4
  42. data/lib/fog/compute/proxmox/requests/{get_snapshot.rb → get_snapshot_config.rb} +5 -8
  43. data/lib/fog/compute/proxmox/requests/get_task.rb +1 -4
  44. data/lib/fog/compute/proxmox/requests/get_vnc.rb +1 -4
  45. data/lib/fog/compute/proxmox/requests/list_nodes.rb +1 -2
  46. data/lib/fog/compute/proxmox/requests/list_storages.rb +3 -1
  47. data/lib/fog/compute/proxmox/requests/log_task.rb +1 -4
  48. data/lib/fog/compute/proxmox/requests/move_disk.rb +1 -4
  49. data/lib/fog/compute/proxmox/requests/move_volume.rb +1 -4
  50. data/lib/fog/compute/proxmox/requests/next_vmid.rb +5 -3
  51. data/lib/fog/compute/proxmox/requests/resize_container.rb +1 -4
  52. data/lib/fog/compute/proxmox/requests/status_task.rb +1 -4
  53. data/lib/fog/compute/proxmox/requests/update_server.rb +1 -4
  54. data/lib/fog/identity/proxmox.rb +2 -8
  55. data/lib/fog/identity/proxmox/models/domain.rb +25 -21
  56. data/lib/fog/identity/proxmox/models/{ldap.rb → domain_type.rb} +9 -18
  57. data/lib/fog/identity/proxmox/models/domains.rb +6 -76
  58. data/lib/fog/identity/proxmox/models/group.rb +6 -19
  59. data/lib/fog/identity/proxmox/models/groups.rb +6 -12
  60. data/lib/fog/identity/proxmox/models/permission.rb +27 -31
  61. data/lib/fog/identity/proxmox/models/permissions.rb +8 -25
  62. data/lib/fog/identity/proxmox/models/pool.rb +9 -22
  63. data/lib/fog/identity/proxmox/models/pools.rb +7 -13
  64. data/lib/fog/identity/proxmox/models/principal.rb +1 -6
  65. data/lib/fog/identity/proxmox/models/role.rb +7 -20
  66. data/lib/fog/identity/proxmox/models/roles.rb +6 -13
  67. data/lib/fog/identity/proxmox/models/user.rb +7 -21
  68. data/lib/fog/identity/proxmox/models/users.rb +6 -12
  69. data/lib/fog/identity/proxmox/requests/check_permissions.rb +1 -4
  70. data/lib/fog/identity/proxmox/requests/list_roles.rb +0 -1
  71. data/lib/fog/identity/proxmox/requests/read_version.rb +1 -5
  72. data/lib/fog/identity/proxmox/requests/update_group.rb +2 -3
  73. data/lib/fog/identity/proxmox/requests/{add_permission.rb → update_permissions.rb} +4 -4
  74. data/lib/fog/network/proxmox/models/network.rb +12 -18
  75. data/lib/fog/network/proxmox/models/networks.rb +11 -17
  76. data/lib/fog/network/proxmox/models/node.rb +14 -10
  77. data/lib/fog/network/proxmox/models/nodes.rb +5 -11
  78. data/lib/fog/network/proxmox/requests/create_network.rb +1 -4
  79. data/lib/fog/network/proxmox/requests/delete_network.rb +1 -4
  80. data/lib/fog/network/proxmox/requests/get_network.rb +1 -4
  81. data/lib/fog/network/proxmox/requests/get_node.rb +1 -4
  82. data/lib/fog/network/proxmox/requests/power_node.rb +1 -4
  83. data/lib/fog/network/proxmox/requests/update_network.rb +1 -4
  84. data/lib/fog/{compute/proxmox/requests/check_vmid.rb → proxmox/attributes.rb} +9 -17
  85. data/lib/fog/proxmox/core.rb +2 -1
  86. data/lib/fog/proxmox/helpers/cpu_helper.rb +6 -3
  87. data/lib/fog/proxmox/helpers/disk_helper.rb +1 -1
  88. data/lib/fog/proxmox/helpers/nic_helper.rb +37 -22
  89. data/lib/fog/proxmox/version.rb +1 -1
  90. data/lib/fog/storage/proxmox.rb +1 -1
  91. data/spec/compute_spec.rb +64 -45
  92. data/spec/fixtures/proxmox/compute/containers.yml +1684 -4137
  93. data/spec/fixtures/proxmox/compute/identity_ticket.yml +4 -4
  94. data/spec/fixtures/proxmox/compute/nodes.yml +21 -21
  95. data/spec/fixtures/proxmox/compute/servers.yml +3065 -7741
  96. data/spec/fixtures/proxmox/compute/snapshots.yml +279 -827
  97. data/spec/fixtures/proxmox/compute/storages.yml +60 -21
  98. data/spec/fixtures/proxmox/compute/tasks.yml +56 -98
  99. data/spec/fixtures/proxmox/identity/auth.yml +6 -6
  100. data/spec/fixtures/proxmox/identity/domains.yml +252 -84
  101. data/spec/fixtures/proxmox/identity/groups.yml +93 -54
  102. data/spec/fixtures/proxmox/identity/identity_ticket.yml +4 -4
  103. data/spec/fixtures/proxmox/identity/permissions.yml +317 -79
  104. data/spec/fixtures/proxmox/identity/pools.yml +266 -71
  105. data/spec/fixtures/proxmox/identity/read_version.yml +6 -6
  106. data/spec/fixtures/proxmox/identity/roles.yml +96 -57
  107. data/spec/fixtures/proxmox/identity/users.yml +224 -107
  108. data/spec/fixtures/proxmox/network/identity_ticket.yml +4 -4
  109. data/spec/fixtures/proxmox/network/networks.yml +54 -95
  110. data/spec/helpers/nic_helper_spec.rb +4 -4
  111. data/spec/identity_spec.rb +38 -46
  112. data/spec/network_spec.rb +1 -1
  113. metadata +9 -23
  114. data/lib/fog/compute/proxmox/models/container.rb +0 -86
  115. data/lib/fog/compute/proxmox/models/container_config.rb +0 -114
  116. data/lib/fog/compute/proxmox/models/containers.rb +0 -43
  117. data/lib/fog/compute/proxmox/requests/get_node.rb +0 -44
  118. data/lib/fog/compute/proxmox/requests/get_storage.rb +0 -44
  119. data/lib/fog/identity/proxmox/models/activedirectory.rb +0 -57
  120. data/lib/fog/identity/proxmox/models/oath.rb +0 -50
  121. data/lib/fog/identity/proxmox/models/pam.rb +0 -46
  122. data/lib/fog/identity/proxmox/models/pve.rb +0 -46
  123. data/lib/fog/identity/proxmox/models/yubico.rb +0 -51
  124. data/lib/fog/identity/proxmox/requests/remove_permission.rb +0 -42
  125. data/lib/fog/proxmox/models/collection.rb +0 -85
  126. 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
- - Fri, 15 Jun 2018 15:42:56 GMT
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
- - Fri, 15 Jun 2018 15:42:56 GMT
34
+ - Wed, 03 Apr 2019 13:32:46 GMT
35
35
  body:
36
36
  encoding: ASCII-8BIT
37
- string: '{"data":{"cap":{"access":{"Group.Allocate":1,"User.Modify":1,"Permissions.Modify":1},"storage":{"Datastore.AllocateSpace":1,"Datastore.Audit":1,"Datastore.AllocateTemplate":1,"Permissions.Modify":1,"Datastore.Allocate":1},"nodes":{"Permissions.Modify":1,"Sys.PowerMgmt":1,"Sys.Syslog":1,"Sys.Modify":1,"Sys.Console":1,"Sys.Audit":1},"dc":{"Sys.Audit":1},"vms":{"VM.Snapshot.Rollback":1,"VM.Config.Disk":1,"VM.Backup":1,"VM.Config.Network":1,"VM.Migrate":1,"VM.Allocate":1,"VM.Console":1,"VM.Config.Memory":1,"VM.Audit":1,"VM.Monitor":1,"VM.Config.CPU":1,"VM.Clone":1,"VM.Config.CDROM":1,"VM.PowerMgmt":1,"VM.Snapshot":1,"Permissions.Modify":1,"VM.Config.HWType":1,"VM.Config.Options":1}},"ticket":"PVE:root@pam:5B23DE80::ehO+FGO4nt1qmV2SjK0dW0tU995rNul/WGpms3sYWsQ8F5xGtqlH55qsiyBFM73SUECqdy8luEjzvRDj/tqL/mMn1YZ12MG5r0kdd/lkm5xoWojx2BIDb2zaoQcLhgtyHvww1qDRx5PRrKPnsM/4pIMJeslZ3uIZ8JoDoVf+DZ6WwMFxqnSHdFQM/oBpq+w6uuBZ2iIghPQgr/C/nx4tjLzKuP/CITEYN2UH4yemaqaExCuIUCPqLmpqhWcaKJ6VwtKV2YATIYzlxBYH5hwonKRBivuFhEMzyIg+g8V/uatl/q1xrfC6pw7E2DX9+T78YKAt9pEXPOeAp9Ok+1SVSQ==","username":"root@pam","CSRFPreventionToken":"5B23DE80:Odh+gD4Ldii3UblgO6ALIzAfQW0"}}'
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: Fri, 15 Jun 2018 15:42:57 GMT
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:5B23DE80::ehO+FGO4nt1qmV2SjK0dW0tU995rNul/WGpms3sYWsQ8F5xGtqlH55qsiyBFM73SUECqdy8luEjzvRDj/tqL/mMn1YZ12MG5r0kdd/lkm5xoWojx2BIDb2zaoQcLhgtyHvww1qDRx5PRrKPnsM/4pIMJeslZ3uIZ8JoDoVf+DZ6WwMFxqnSHdFQM/oBpq+w6uuBZ2iIghPQgr/C/nx4tjLzKuP/CITEYN2UH4yemaqaExCuIUCPqLmpqhWcaKJ6VwtKV2YATIYzlxBYH5hwonKRBivuFhEMzyIg+g8V/uatl/q1xrfC6pw7E2DX9+T78YKAt9pEXPOeAp9Ok+1SVSQ==
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
- - Fri, 15 Jun 2018 15:42:56 GMT
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
- - '208'
32
+ - '209'
74
33
  Content-Type:
75
34
  - application/json;charset=UTF-8
76
35
  Expires:
77
- - Fri, 15 Jun 2018 15:42:56 GMT
36
+ - Wed, 03 Apr 2019 13:32:46 GMT
78
37
  body:
79
38
  encoding: ASCII-8BIT
80
- string: '{"data":[{"disk":1468776448,"maxmem":4136079360,"maxcpu":4,"status":"online","node":"pve","mem":759963648,"type":"node","uptime":96,"cpu":0.00520740891197363,"level":"","id":"node/pve","maxdisk":2310864896}]}'
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: Fri, 15 Jun 2018 15:42:58 GMT
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
- - 5B23DE80:Odh+gD4Ldii3UblgO6ALIzAfQW0
54
+ - 5CA4B5FE:JzR3XSygTzEu985HIIdZNk8lsC8
96
55
  Cookie:
97
- - PVEAuthCookie=PVE:root@pam:5B23DE80::ehO+FGO4nt1qmV2SjK0dW0tU995rNul/WGpms3sYWsQ8F5xGtqlH55qsiyBFM73SUECqdy8luEjzvRDj/tqL/mMn1YZ12MG5r0kdd/lkm5xoWojx2BIDb2zaoQcLhgtyHvww1qDRx5PRrKPnsM/4pIMJeslZ3uIZ8JoDoVf+DZ6WwMFxqnSHdFQM/oBpq+w6uuBZ2iIghPQgr/C/nx4tjLzKuP/CITEYN2UH4yemaqaExCuIUCPqLmpqhWcaKJ6VwtKV2YATIYzlxBYH5hwonKRBivuFhEMzyIg+g8V/uatl/q1xrfC6pw7E2DX9+T78YKAt9pEXPOeAp9Ok+1SVSQ==
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
- - Fri, 15 Jun 2018 15:42:56 GMT
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
- - Fri, 15 Jun 2018 15:42:56 GMT
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: Fri, 15 Jun 2018 15:42:58 GMT
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:5B23DE80::ehO+FGO4nt1qmV2SjK0dW0tU995rNul/WGpms3sYWsQ8F5xGtqlH55qsiyBFM73SUECqdy8luEjzvRDj/tqL/mMn1YZ12MG5r0kdd/lkm5xoWojx2BIDb2zaoQcLhgtyHvww1qDRx5PRrKPnsM/4pIMJeslZ3uIZ8JoDoVf+DZ6WwMFxqnSHdFQM/oBpq+w6uuBZ2iIghPQgr/C/nx4tjLzKuP/CITEYN2UH4yemaqaExCuIUCPqLmpqhWcaKJ6VwtKV2YATIYzlxBYH5hwonKRBivuFhEMzyIg+g8V/uatl/q1xrfC6pw7E2DX9+T78YKAt9pEXPOeAp9Ok+1SVSQ==
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
- - Fri, 15 Jun 2018 15:42:56 GMT
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
- - '1044'
112
+ - '911'
154
113
  Content-Type:
155
114
  - application/json;charset=UTF-8
156
115
  Expires:
157
- - Fri, 15 Jun 2018 15:42:56 GMT
116
+ - Wed, 03 Apr 2019 13:32:46 GMT
158
117
  body:
159
118
  encoding: ASCII-8BIT
160
- string: '{"changes":"--- /etc/network/interfaces\t2018-06-15 17:40:57.456000000
161
- +0200\n+++ /etc/network/interfaces.new\t2018-06-15 17:42:56.744000000 +0200\n@@
162
- -18,6 +18,8 @@\n \n iface enp0s9 inet manual\n \n+iface enp0s10 inet manual\n+\n
163
- auto vmbr0\n iface vmbr0 inet static\n \taddress 192.168.56.101\n","data":[{"method6":"manual","iface":"enp0s9","exists":1,"type":"eth","priority":5,"method":"manual","families":["inet"]},{"exists":1,"type":"eth","priority":4,"method":"manual","families":["inet"],"method6":"manual","iface":"enp0s3"},{"priority":3,"families":["inet"],"method":"manual","active":1,"method6":"manual","exists":1,"type":"eth","iface":"enp0s8"},{"families":["inet"],"priority":6,"method":"manual","type":"eth","iface":"enp0s10","method6":"manual"},{"bridge_ports":"enp0s8","address":"192.168.56.101","active":1,"method6":"manual","netmask":"255.255.255.0","method":"static","families":["inet"],"priority":7,"gateway":"10.0.2.2","iface":"vmbr0","comments":"toto\n","bridge_stp":"off","bridge_fd":"0","autostart":1,"type":"bridge"}]}'
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: Fri, 15 Jun 2018 15:42:58 GMT
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
- - 5B23DE80:Odh+gD4Ldii3UblgO6ALIzAfQW0
137
+ - 5CA4B5FE:JzR3XSygTzEu985HIIdZNk8lsC8
179
138
  Cookie:
180
- - PVEAuthCookie=PVE:root@pam:5B23DE80::ehO+FGO4nt1qmV2SjK0dW0tU995rNul/WGpms3sYWsQ8F5xGtqlH55qsiyBFM73SUECqdy8luEjzvRDj/tqL/mMn1YZ12MG5r0kdd/lkm5xoWojx2BIDb2zaoQcLhgtyHvww1qDRx5PRrKPnsM/4pIMJeslZ3uIZ8JoDoVf+DZ6WwMFxqnSHdFQM/oBpq+w6uuBZ2iIghPQgr/C/nx4tjLzKuP/CITEYN2UH4yemaqaExCuIUCPqLmpqhWcaKJ6VwtKV2YATIYzlxBYH5hwonKRBivuFhEMzyIg+g8V/uatl/q1xrfC6pw7E2DX9+T78YKAt9pEXPOeAp9Ok+1SVSQ==
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
- - Fri, 15 Jun 2018 15:42:56 GMT
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
- - Fri, 15 Jun 2018 15:42:56 GMT
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: Fri, 15 Jun 2018 15:42:58 GMT
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:5B23DE80::ehO+FGO4nt1qmV2SjK0dW0tU995rNul/WGpms3sYWsQ8F5xGtqlH55qsiyBFM73SUECqdy8luEjzvRDj/tqL/mMn1YZ12MG5r0kdd/lkm5xoWojx2BIDb2zaoQcLhgtyHvww1qDRx5PRrKPnsM/4pIMJeslZ3uIZ8JoDoVf+DZ6WwMFxqnSHdFQM/oBpq+w6uuBZ2iIghPQgr/C/nx4tjLzKuP/CITEYN2UH4yemaqaExCuIUCPqLmpqhWcaKJ6VwtKV2YATIYzlxBYH5hwonKRBivuFhEMzyIg+g8V/uatl/q1xrfC6pw7E2DX9+T78YKAt9pEXPOeAp9Ok+1SVSQ==
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
- - Fri, 15 Jun 2018 15:42:56 GMT
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
- - '1044'
195
+ - '911'
237
196
  Content-Type:
238
197
  - application/json;charset=UTF-8
239
198
  Expires:
240
- - Fri, 15 Jun 2018 15:42:56 GMT
199
+ - Wed, 03 Apr 2019 13:32:46 GMT
241
200
  body:
242
201
  encoding: ASCII-8BIT
243
- string: '{"data":[{"method6":"manual","iface":"enp0s3","exists":1,"priority":4,"method":"manual","families":["inet"],"type":"eth"},{"iface":"enp0s9","method6":"manual","priority":5,"method":"manual","families":["inet"],"type":"eth","exists":1},{"method6":"manual","iface":"enp0s10","families":["inet"],"priority":6,"method":"manual","type":"eth"},{"priority":3,"method":"manual","families":["inet"],"method6":"manual","active":1,"type":"eth","exists":1,"iface":"enp0s8"},{"gateway":"10.0.2.2","iface":"vmbr0","type":"bridge","bridge_fd":"0","autostart":1,"bridge_stp":"off","comments":"toto\n","active":1,"method6":"manual","address":"192.168.56.101","bridge_ports":"enp0s8","families":["inet"],"method":"static","priority":7,"netmask":"255.255.255.0"}],"changes":"---
244
- /etc/network/interfaces\t2018-06-15 17:40:57.456000000 +0200\n+++ /etc/network/interfaces.new\t2018-06-15
245
- 17:42:56.744000000 +0200\n@@ -18,6 +18,8 @@\n \n iface enp0s9 inet manual\n
246
- \n+iface enp0s10 inet manual\n+\n auto vmbr0\n iface vmbr0 inet static\n \taddress 192.168.56.101\n"}'
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: Fri, 15 Jun 2018 15:42:58 GMT
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
- - 5B23DE80:Odh+gD4Ldii3UblgO6ALIzAfQW0
220
+ - 5CA4B5FE:JzR3XSygTzEu985HIIdZNk8lsC8
262
221
  Cookie:
263
- - PVEAuthCookie=PVE:root@pam:5B23DE80::ehO+FGO4nt1qmV2SjK0dW0tU995rNul/WGpms3sYWsQ8F5xGtqlH55qsiyBFM73SUECqdy8luEjzvRDj/tqL/mMn1YZ12MG5r0kdd/lkm5xoWojx2BIDb2zaoQcLhgtyHvww1qDRx5PRrKPnsM/4pIMJeslZ3uIZ8JoDoVf+DZ6WwMFxqnSHdFQM/oBpq+w6uuBZ2iIghPQgr/C/nx4tjLzKuP/CITEYN2UH4yemaqaExCuIUCPqLmpqhWcaKJ6VwtKV2YATIYzlxBYH5hwonKRBivuFhEMzyIg+g8V/uatl/q1xrfC6pw7E2DX9+T78YKAt9pEXPOeAp9Ok+1SVSQ==
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
- - Fri, 15 Jun 2018 15:42:56 GMT
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
- - Fri, 15 Jun 2018 15:42:56 GMT
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: Fri, 15 Jun 2018 15:42:58 GMT
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
- - 5B23DE80:Odh+gD4Ldii3UblgO6ALIzAfQW0
261
+ - 5CA4B5FE:JzR3XSygTzEu985HIIdZNk8lsC8
303
262
  Cookie:
304
- - PVEAuthCookie=PVE:root@pam:5B23DE80::ehO+FGO4nt1qmV2SjK0dW0tU995rNul/WGpms3sYWsQ8F5xGtqlH55qsiyBFM73SUECqdy8luEjzvRDj/tqL/mMn1YZ12MG5r0kdd/lkm5xoWojx2BIDb2zaoQcLhgtyHvww1qDRx5PRrKPnsM/4pIMJeslZ3uIZ8JoDoVf+DZ6WwMFxqnSHdFQM/oBpq+w6uuBZ2iIghPQgr/C/nx4tjLzKuP/CITEYN2UH4yemaqaExCuIUCPqLmpqhWcaKJ6VwtKV2YATIYzlxBYH5hwonKRBivuFhEMzyIg+g8V/uatl/q1xrfC6pw7E2DX9+T78YKAt9pEXPOeAp9Ok+1SVSQ==
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
- - Fri, 15 Jun 2018 15:42:56 GMT
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
- - Fri, 15 Jun 2018 15:42:56 GMT
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: Fri, 15 Jun 2018 15:42:58 GMT
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
- - 5B23DE80:Odh+gD4Ldii3UblgO6ALIzAfQW0
302
+ - 5CA4B5FE:JzR3XSygTzEu985HIIdZNk8lsC8
344
303
  Cookie:
345
- - PVEAuthCookie=PVE:root@pam:5B23DE80::ehO+FGO4nt1qmV2SjK0dW0tU995rNul/WGpms3sYWsQ8F5xGtqlH55qsiyBFM73SUECqdy8luEjzvRDj/tqL/mMn1YZ12MG5r0kdd/lkm5xoWojx2BIDb2zaoQcLhgtyHvww1qDRx5PRrKPnsM/4pIMJeslZ3uIZ8JoDoVf+DZ6WwMFxqnSHdFQM/oBpq+w6uuBZ2iIghPQgr/C/nx4tjLzKuP/CITEYN2UH4yemaqaExCuIUCPqLmpqhWcaKJ6VwtKV2YATIYzlxBYH5hwonKRBivuFhEMzyIg+g8V/uatl/q1xrfC6pw7E2DX9+T78YKAt9pEXPOeAp9Ok+1SVSQ==
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
- - Fri, 15 Jun 2018 15:43:56 GMT
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
- - Fri, 15 Jun 2018 15:43:56 GMT
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: Fri, 15 Jun 2018 15:43:58 GMT
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
- - 5B23DE80:Odh+gD4Ldii3UblgO6ALIzAfQW0
343
+ - 5CA4B5FE:JzR3XSygTzEu985HIIdZNk8lsC8
385
344
  Cookie:
386
- - PVEAuthCookie=PVE:root@pam:5B23DE80::ehO+FGO4nt1qmV2SjK0dW0tU995rNul/WGpms3sYWsQ8F5xGtqlH55qsiyBFM73SUECqdy8luEjzvRDj/tqL/mMn1YZ12MG5r0kdd/lkm5xoWojx2BIDb2zaoQcLhgtyHvww1qDRx5PRrKPnsM/4pIMJeslZ3uIZ8JoDoVf+DZ6WwMFxqnSHdFQM/oBpq+w6uuBZ2iIghPQgr/C/nx4tjLzKuP/CITEYN2UH4yemaqaExCuIUCPqLmpqhWcaKJ6VwtKV2YATIYzlxBYH5hwonKRBivuFhEMzyIg+g8V/uatl/q1xrfC6pw7E2DX9+T78YKAt9pEXPOeAp9Ok+1SVSQ==
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
- - Fri, 15 Jun 2018 15:43:56 GMT
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
- - Fri, 15 Jun 2018 15:43:56 GMT
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: Fri, 15 Jun 2018 15:43:58 GMT
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.extract_model(net_vm[:net0])
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.extract_model(net_vm_create[:net0])
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.extract_name(net_lxc[:net0])
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.extract_name(net_lxc_create[:net0])
58
+ model = Fog::Proxmox::NicHelper.extract_nic_id(net_lxc_create[:net0])
59
59
  assert_equal 'eth0', model
60
60
  end
61
61
  end
@@ -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.find_by_id bob_hash[:userid]
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.find_by_id 'group1'
107
+ group1 = @service.groups.get 'group1'
108
108
  group1.destroy
109
- group2 = @service.groups.find_by_id 'group2'
109
+ group2 = @service.groups.get 'group2'
110
110
  group2.destroy
111
- proc do
112
- @service.users.find_by_id bob_hash[:userid]
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.find_by_id group_hash[:groupid]
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
- proc do
140
- @service.groups.find_by_id group_hash[:groupid]
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.find_by_id role_hash[:roleid]
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
- proc do
168
- @service.roles.find_by_id role_hash[:roleid]
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.find_by_id ldap_hash[:realm]
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.find_by_id ad_hash[:realm]
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
- proc do
228
- @service.domains.find_by_id ldap_hash[:realm]
229
- end.must_raise Excon::Errors::InternalServerError
230
- proc do
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
- permission_hash = {
248
- path: '/access/users',
249
- roles: 'PVEUserAdmin',
250
- users: bob_hash[:userid]
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
- @service.permissions.remove(permission_hash)
260
- permissions = @service.permissions.all
261
- permissions.must_be_empty
262
- bob = @service.users.find_by_id bob_hash[:userid]
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
- permission_hash.delete(:users)
267
- permission_hash.store(:groups, 'group1')
268
- @service.permissions.add(permission_hash)
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
- @service.permissions.remove(permission_hash)
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.find_by_id pool_hash[:poolid]
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
- proc do
312
- @service.pools.find_by_id pool_hash[:poolid]
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