fog-proxmox 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +13 -9
  3. data/docs/compute.md +17 -17
  4. data/docs/identity.md +6 -6
  5. data/examples/compute.rb +1 -1
  6. data/examples/identity.rb +1 -1
  7. data/fog-proxmox.gemspec +4 -4
  8. data/lib/fog/compute/proxmox.rb +2 -2
  9. data/lib/fog/compute/proxmox/models/disk.rb +2 -2
  10. data/lib/fog/compute/proxmox/models/disks.rb +3 -3
  11. data/lib/fog/compute/proxmox/models/interface.rb +2 -2
  12. data/lib/fog/compute/proxmox/models/interfaces.rb +4 -4
  13. data/lib/fog/compute/proxmox/models/node.rb +6 -6
  14. data/lib/fog/compute/proxmox/models/nodes.rb +3 -3
  15. data/lib/fog/compute/proxmox/models/server.rb +6 -6
  16. data/lib/fog/compute/proxmox/models/server_config.rb +8 -8
  17. data/lib/fog/compute/proxmox/models/servers.rb +3 -3
  18. data/lib/fog/compute/proxmox/models/snapshot.rb +3 -3
  19. data/lib/fog/compute/proxmox/models/snapshots.rb +3 -3
  20. data/lib/fog/compute/proxmox/models/storage.rb +3 -3
  21. data/lib/fog/compute/proxmox/models/storages.rb +3 -3
  22. data/lib/fog/compute/proxmox/models/task.rb +2 -2
  23. data/lib/fog/compute/proxmox/models/tasks.rb +3 -3
  24. data/lib/fog/compute/proxmox/models/volume.rb +2 -2
  25. data/lib/fog/compute/proxmox/models/volumes.rb +3 -3
  26. data/lib/fog/compute/proxmox/requests/action_server.rb +2 -2
  27. data/lib/fog/compute/proxmox/requests/clone_server.rb +2 -2
  28. data/lib/fog/compute/proxmox/requests/create_backup.rb +2 -2
  29. data/lib/fog/compute/proxmox/requests/create_server.rb +2 -2
  30. data/lib/fog/compute/proxmox/requests/create_snapshot.rb +2 -2
  31. data/lib/fog/compute/proxmox/requests/create_spice.rb +2 -2
  32. data/lib/fog/compute/proxmox/requests/create_term.rb +2 -2
  33. data/lib/fog/compute/proxmox/requests/create_vnc.rb +2 -2
  34. data/lib/fog/compute/proxmox/requests/delete_server.rb +2 -2
  35. data/lib/fog/compute/proxmox/requests/delete_snapshot.rb +2 -2
  36. data/lib/fog/compute/proxmox/requests/delete_volume.rb +2 -2
  37. data/lib/fog/compute/proxmox/requests/get_node_statistics.rb +2 -2
  38. data/lib/fog/compute/proxmox/requests/get_server_config.rb +2 -2
  39. data/lib/fog/compute/proxmox/requests/get_server_status.rb +2 -2
  40. data/lib/fog/compute/proxmox/requests/get_snapshot_config.rb +2 -2
  41. data/lib/fog/compute/proxmox/requests/get_task.rb +2 -2
  42. data/lib/fog/compute/proxmox/requests/get_vnc.rb +2 -2
  43. data/lib/fog/compute/proxmox/requests/get_volume.rb +2 -2
  44. data/lib/fog/compute/proxmox/requests/list_nodes.rb +2 -2
  45. data/lib/fog/compute/proxmox/requests/list_servers.rb +2 -2
  46. data/lib/fog/compute/proxmox/requests/list_snapshots.rb +2 -2
  47. data/lib/fog/compute/proxmox/requests/list_storages.rb +2 -2
  48. data/lib/fog/compute/proxmox/requests/list_tasks.rb +2 -2
  49. data/lib/fog/compute/proxmox/requests/list_volumes.rb +2 -2
  50. data/lib/fog/compute/proxmox/requests/log_task.rb +2 -2
  51. data/lib/fog/compute/proxmox/requests/migrate_server.rb +2 -2
  52. data/lib/fog/compute/proxmox/requests/move_disk.rb +2 -2
  53. data/lib/fog/compute/proxmox/requests/move_volume.rb +2 -2
  54. data/lib/fog/compute/proxmox/requests/next_vmid.rb +2 -2
  55. data/lib/fog/compute/proxmox/requests/resize_container.rb +2 -2
  56. data/lib/fog/compute/proxmox/requests/resize_server.rb +2 -2
  57. data/lib/fog/compute/proxmox/requests/rollback_snapshot.rb +2 -2
  58. data/lib/fog/compute/proxmox/requests/status_task.rb +2 -2
  59. data/lib/fog/compute/proxmox/requests/stop_task.rb +2 -2
  60. data/lib/fog/compute/proxmox/requests/template_server.rb +2 -2
  61. data/lib/fog/compute/proxmox/requests/update_server.rb +2 -2
  62. data/lib/fog/compute/proxmox/requests/update_snapshot.rb +2 -2
  63. data/lib/fog/identity/proxmox.rb +2 -2
  64. data/lib/fog/identity/proxmox/models/domain.rb +3 -3
  65. data/lib/fog/identity/proxmox/models/domain_type.rb +2 -2
  66. data/lib/fog/identity/proxmox/models/domains.rb +3 -3
  67. data/lib/fog/identity/proxmox/models/group.rb +2 -2
  68. data/lib/fog/identity/proxmox/models/groups.rb +3 -3
  69. data/lib/fog/identity/proxmox/models/permission.rb +2 -2
  70. data/lib/fog/identity/proxmox/models/permissions.rb +3 -3
  71. data/lib/fog/identity/proxmox/models/pool.rb +2 -2
  72. data/lib/fog/identity/proxmox/models/pools.rb +3 -3
  73. data/lib/fog/identity/proxmox/models/principal.rb +2 -2
  74. data/lib/fog/identity/proxmox/models/role.rb +2 -2
  75. data/lib/fog/identity/proxmox/models/roles.rb +3 -3
  76. data/lib/fog/identity/proxmox/models/user.rb +2 -2
  77. data/lib/fog/identity/proxmox/models/users.rb +3 -3
  78. data/lib/fog/identity/proxmox/requests/change_password.rb +2 -2
  79. data/lib/fog/identity/proxmox/requests/check_permissions.rb +2 -2
  80. data/lib/fog/identity/proxmox/requests/create_domain.rb +2 -2
  81. data/lib/fog/identity/proxmox/requests/create_group.rb +2 -2
  82. data/lib/fog/identity/proxmox/requests/create_pool.rb +2 -2
  83. data/lib/fog/identity/proxmox/requests/create_role.rb +2 -2
  84. data/lib/fog/identity/proxmox/requests/create_user.rb +2 -2
  85. data/lib/fog/identity/proxmox/requests/delete_domain.rb +2 -2
  86. data/lib/fog/identity/proxmox/requests/delete_group.rb +2 -2
  87. data/lib/fog/identity/proxmox/requests/delete_pool.rb +2 -2
  88. data/lib/fog/identity/proxmox/requests/delete_role.rb +2 -2
  89. data/lib/fog/identity/proxmox/requests/delete_user.rb +2 -2
  90. data/lib/fog/identity/proxmox/requests/get_domain.rb +2 -2
  91. data/lib/fog/identity/proxmox/requests/get_group.rb +2 -2
  92. data/lib/fog/identity/proxmox/requests/get_pool.rb +2 -2
  93. data/lib/fog/identity/proxmox/requests/get_role.rb +2 -2
  94. data/lib/fog/identity/proxmox/requests/get_user.rb +2 -2
  95. data/lib/fog/identity/proxmox/requests/list_domains.rb +2 -2
  96. data/lib/fog/identity/proxmox/requests/list_groups.rb +2 -2
  97. data/lib/fog/identity/proxmox/requests/list_permissions.rb +2 -2
  98. data/lib/fog/identity/proxmox/requests/list_pools.rb +2 -2
  99. data/lib/fog/identity/proxmox/requests/list_roles.rb +2 -2
  100. data/lib/fog/identity/proxmox/requests/list_users.rb +2 -2
  101. data/lib/fog/identity/proxmox/requests/read_version.rb +2 -2
  102. data/lib/fog/identity/proxmox/requests/update_domain.rb +2 -2
  103. data/lib/fog/identity/proxmox/requests/update_group.rb +2 -2
  104. data/lib/fog/identity/proxmox/requests/update_permissions.rb +2 -2
  105. data/lib/fog/identity/proxmox/requests/update_pool.rb +2 -2
  106. data/lib/fog/identity/proxmox/requests/update_role.rb +2 -2
  107. data/lib/fog/identity/proxmox/requests/update_user.rb +2 -2
  108. data/lib/fog/network/proxmox.rb +2 -2
  109. data/lib/fog/network/proxmox/models/network.rb +2 -2
  110. data/lib/fog/network/proxmox/models/networks.rb +3 -3
  111. data/lib/fog/network/proxmox/models/node.rb +3 -3
  112. data/lib/fog/network/proxmox/models/nodes.rb +3 -3
  113. data/lib/fog/network/proxmox/requests/create_network.rb +2 -2
  114. data/lib/fog/network/proxmox/requests/delete_network.rb +2 -2
  115. data/lib/fog/network/proxmox/requests/get_network.rb +2 -2
  116. data/lib/fog/network/proxmox/requests/get_node.rb +2 -2
  117. data/lib/fog/network/proxmox/requests/list_networks.rb +2 -2
  118. data/lib/fog/network/proxmox/requests/list_nodes.rb +2 -2
  119. data/lib/fog/network/proxmox/requests/power_node.rb +2 -2
  120. data/lib/fog/network/proxmox/requests/update_network.rb +2 -2
  121. data/lib/fog/proxmox.rb +4 -17
  122. data/lib/fog/proxmox/core.rb +1 -1
  123. data/lib/fog/proxmox/helpers/controller_helper.rb +5 -6
  124. data/lib/fog/proxmox/version.rb +1 -1
  125. data/lib/fog/storage/proxmox.rb +2 -2
  126. data/spec/compute_spec.rb +2 -2
  127. data/spec/helpers/controller_helper_spec.rb +17 -2
  128. data/spec/identity_spec.rb +3 -3
  129. data/spec/network_spec.rb +2 -2
  130. data/spec/spec_helper.rb +1 -0
  131. metadata +10 -10
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 89601175c17a32bfedcfbb2d2c95da5c04f5113b2059284beed81722fea4c02a
4
- data.tar.gz: 73b0527220941f9532dfb28bcac1b81bc1e0690e00dabecbf1709f3c9b5701cf
3
+ metadata.gz: 60f322bc1b1cd38bb76d5c25e932f68adcc8ec7a18d0060a7e4c6977a7d8db0d
4
+ data.tar.gz: bae297b90d4e4aeb2da54d76534a7cb725c7b721b6ee4b4ae1835d04c56c1778
5
5
  SHA512:
6
- metadata.gz: 87c0195ad8bc29a851250e4149360bb9b2f7078fcabda4c0bb5158306a792fbde335ba78ce531f77762a31fdc7e25b8a7f8723cd8732bd774e5e663a51d7525e
7
- data.tar.gz: 12ffb8db4943453a446fad5c58d61670e85fb6e10f3be74e361bad118c4a1d6b0e95b3a48ce8e31721da636c1a280e1f1b812e2bc5fc2dd773c72ecb4c7b4e42
6
+ metadata.gz: e78294eed3cebd7a5e3a840edd918b3cb239498701b963463aa3616832e697f34cf204ff0efedf064657ca4ad1c3fc7ba4c46f75a3d2e148e313ae03b14dcde9
7
+ data.tar.gz: b049b84b24d4bd399ee043f3e7c4896f4b5a055add4607bebcf9f5f546dd9da6898b024f9194e8c433bbe15cf2eb24a9576c78085b37c30335abc70941403328
data/Gemfile.lock CHANGED
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fog-proxmox (0.6.0)
5
- fog-core (~> 1.45)
6
- fog-json (~> 1.0)
4
+ fog-proxmox (0.7.0)
5
+ fog-core (~> 2.1)
6
+ fog-json (~> 1.2)
7
7
  ipaddress (~> 0.8)
8
8
 
9
9
  GEM
@@ -37,15 +37,16 @@ GEM
37
37
  diff-lcs (1.3)
38
38
  docile (1.3.1)
39
39
  equalizer (0.0.11)
40
- excon (0.62.0)
40
+ excon (0.64.0)
41
41
  fasterer (0.5.1)
42
42
  colorize (~> 0.7)
43
43
  ruby_parser (>= 3.13.0)
44
44
  fastri (0.3.1.1)
45
- fog-core (1.45.0)
45
+ fog-core (2.1.2)
46
46
  builder
47
47
  excon (~> 0.58)
48
48
  formatador (~> 0.2)
49
+ mime-types
49
50
  fog-json (1.2.0)
50
51
  fog-core
51
52
  multi_json (~> 1.10)
@@ -56,6 +57,9 @@ GEM
56
57
  jaro_winkler (1.5.2)
57
58
  json (2.2.0)
58
59
  method_source (0.9.2)
60
+ mime-types (3.2.2)
61
+ mime-types-data (~> 3.2015)
62
+ mime-types-data (3.2019.0331)
59
63
  minitest (5.11.3)
60
64
  multi_json (1.13.1)
61
65
  parallel (1.17.0)
@@ -87,7 +91,7 @@ GEM
87
91
  diff-lcs (>= 1.2.0, < 2.0)
88
92
  rspec-support (~> 3.8.0)
89
93
  rspec-support (3.8.0)
90
- rubocop (0.66.0)
94
+ rubocop (0.67.2)
91
95
  jaro_winkler (~> 1.5.1)
92
96
  parallel (~> 1.10)
93
97
  parser (>= 2.5, != 2.5.1.1)
@@ -109,7 +113,7 @@ GEM
109
113
  simplecov-html (0.10.2)
110
114
  thread_safe (0.3.6)
111
115
  unicode-display_width (1.5.0)
112
- vcr (3.0.3)
116
+ vcr (4.0.0)
113
117
  virtus (1.0.5)
114
118
  axiom-types (~> 0.1)
115
119
  coercible (~> 1.0)
@@ -139,8 +143,8 @@ DEPENDENCIES
139
143
  rubocop (~> 0.55)
140
144
  ruby-debug-ide (~> 0.6)
141
145
  simplecov
142
- vcr (~> 3.0)
143
- webmock (~> 3.4)
146
+ vcr (~> 4.0)
147
+ webmock (~> 3.5)
144
148
 
145
149
  BUNDLED WITH
146
150
  2.0.1
data/docs/compute.md CHANGED
@@ -19,7 +19,7 @@ require 'fog/proxmox'
19
19
  ## Create compute service
20
20
 
21
21
  ```ruby
22
- compute = Fog::Compute::Proxmox.new(
22
+ compute = Fog::Proxmox::Compute.new(
23
23
  pve_username: PVE_USERNAME, # your user name
24
24
  pve_password: PVE_PASSWORD, # your password
25
25
  pve_url: PVE_URL, # your server url
@@ -116,7 +116,7 @@ List all nodes:
116
116
  service.nodes.all
117
117
  ```
118
118
 
119
- This returns a collection of `Fog::Compute::Proxmox::Node` models:
119
+ This returns a collection of `Fog::Proxmox::Compute::Node` models:
120
120
 
121
121
  Get a node:
122
122
 
@@ -152,7 +152,7 @@ List all servers:
152
152
  node.servers.all
153
153
  ```
154
154
 
155
- This returns a collection of `Fog::Identity::Proxmox::Server` models.
155
+ This returns a collection of `Fog::Proxmox::Identity::Server` models.
156
156
 
157
157
  Before creating a server you can get the next available server id (integer >= 100) in the cluster:
158
158
 
@@ -210,10 +210,10 @@ Get all server configuration:
210
210
  server.config
211
211
  ```
212
212
 
213
- This returns a `Fog::Compute::Proxmox::ServerConfig` model:
213
+ This returns a `Fog::Proxmox::Compute::ServerConfig` model:
214
214
 
215
215
  ```ruby
216
- <Fog::Compute::Proxmox::ServerConfig
216
+ <Fog::Proxmox::Compute::ServerConfig
217
217
  smbios1: "uuid=ba2da6bd-0c92-4cfe-8f70-d22cc5b5bba2",
218
218
  numa: 0,
219
219
  digest: "348fdc21536f23a29dfb9b3120faa124aaeec742",
@@ -227,7 +227,7 @@ This returns a `Fog::Compute::Proxmox::ServerConfig` model:
227
227
  memory: 512,
228
228
  name: "test",
229
229
  ide2: "cdrom,media=cdrom",
230
- server: <Fog::Compute::Proxmox::Server vmid: 100, ...>
230
+ server: <Fog::Proxmox::Compute::Server vmid: 100, ...>
231
231
  >
232
232
  ```
233
233
 
@@ -362,7 +362,7 @@ Fetch server disk_images:
362
362
  disk_images = server.disk_images
363
363
  ```
364
364
 
365
- This returns an array of `Fog::Compute::Proxmox::Volume` instances.
365
+ This returns an array of `Fog::Proxmox::Compute::Volume` instances.
366
366
 
367
367
  Delete server:
368
368
 
@@ -403,7 +403,7 @@ You first fetch the backup volumes of this server:
403
403
  volumes = server.backups
404
404
  ```
405
405
 
406
- This returns an array of `Fog::Compute::Proxmox::Volume` instances.
406
+ This returns an array of `Fog::Proxmox::Compute::Volume` instances.
407
407
 
408
408
  Then you choose one:
409
409
 
@@ -411,10 +411,10 @@ Then you choose one:
411
411
  backup = volumes[0] # local:backup/vzdump-qemu-100-2018_05_15-15_18_31.vma.lzo
412
412
  ```
413
413
 
414
- This returns a `Fog::Compute::Proxmox::Volume` instance:
414
+ This returns a `Fog::Proxmox::Compute::Volume` instance:
415
415
 
416
416
  ```ruby
417
- <Fog::Compute::Proxmox::Volume
417
+ <Fog::Proxmox::Compute::Volume
418
418
  volid="local:backup/vzdump-qemu-100-2018_05_15-15_18_31.vma.lzo",
419
419
  content="backup",
420
420
  size=376,
@@ -522,7 +522,7 @@ List all containers:
522
522
  node.containers.all
523
523
  ```
524
524
 
525
- This returns a collection of `Fog::Identity::Proxmox::Container` models which are inherited from `Fog::Identity::Proxmox::Server` because they have many common features.
525
+ This returns a collection of `Fog::Proxmox::Identity::Container` models which are inherited from `Fog::Proxmox::Identity::Server` because they have many common features.
526
526
 
527
527
  Before creating a container you can get the next available container id (integer >= 100) in the cluster:
528
528
 
@@ -592,10 +592,10 @@ Get container configuration:
592
592
  container.config
593
593
  ```
594
594
 
595
- This returns a `Fog::Compute::Proxmox::ContainerConfig` model:
595
+ This returns a `Fog::Proxmox::Compute::ContainerConfig` model:
596
596
 
597
597
  ```ruby
598
- <Fog::Compute::Proxmox::ContainerConfig
598
+ <Fog::Proxmox::Compute::ContainerConfig
599
599
  memory: 512,
600
600
  net0: "name=eth0,bridge=vmbr0,hwaddr=BE:3C:A9:3F:4E:39,ip=dhcp,ip6=dhcp,type=veth",
601
601
  swap: 512,
@@ -605,7 +605,7 @@ This returns a `Fog::Compute::Proxmox::ContainerConfig` model:
605
605
  digest: "e5131befed2f6ff8e11d598c4d8bb6016d5c0901",
606
606
  ostype: "alpine",
607
607
  arch: "amd64"
608
- container: <Fog::Compute::Proxmox::Container vmid: 100, ...>
608
+ container: <Fog::Proxmox::Compute::Container vmid: 100, ...>
609
609
  >
610
610
  ```
611
611
 
@@ -720,7 +720,7 @@ You first fetch the backup volumes of this container:
720
720
  volumes = container.backups
721
721
  ```
722
722
 
723
- This returns an array of `Fog::Compute::Proxmox::Volume` instances.
723
+ This returns an array of `Fog::Proxmox::Compute::Volume` instances.
724
724
 
725
725
  Then you choose one:
726
726
 
@@ -728,10 +728,10 @@ Then you choose one:
728
728
  backup = volumes[0] # local:backup/vzdump-qemu-100-2018_05_15-15_18_31.vma.lzo
729
729
  ```
730
730
 
731
- This returns a `Fog::Compute::Proxmox::Volume` instance:
731
+ This returns a `Fog::Proxmox::Compute::Volume` instance:
732
732
 
733
733
  ```ruby
734
- <Fog::Compute::Proxmox::Volume
734
+ <Fog::Proxmox::Compute::Volume
735
735
  volid="local:backup/vzdump-qemu-100-2018_05_15-15_18_31.vma.lzo",
736
736
  content="backup",
737
737
  size=376,
data/docs/identity.md CHANGED
@@ -19,7 +19,7 @@ require 'fog/proxmox'
19
19
  ## Create identity service
20
20
 
21
21
  ```ruby
22
- identity = Fog::Identity::Proxmox.new(
22
+ identity = Fog::Proxmox::Identity.new(
23
23
  pve_username: PVE_USERNAME, # your user name
24
24
  pve_password: PVE_PASSWORD, # your password
25
25
  pve_url: PVE_URL, # your server url
@@ -98,7 +98,7 @@ List all users:
98
98
  identity.users.all
99
99
  ```
100
100
 
101
- This returns a collection of `Fog::Identity::Proxmox::User` models:
101
+ This returns a collection of `Fog::Proxmox::Identity::User` models:
102
102
 
103
103
  Create a user:
104
104
 
@@ -150,7 +150,7 @@ List all groups:
150
150
  identity.groups.all
151
151
  ```
152
152
 
153
- This returns a collection of `Fog::Identity::Proxmox::Group` models:
153
+ This returns a collection of `Fog::Proxmox::Identity::Group` models:
154
154
 
155
155
  Create a group:
156
156
 
@@ -191,7 +191,7 @@ List all domains:
191
191
  identity.domains.all
192
192
  ```
193
193
 
194
- This returns a collection of `Fog::Identity::Proxmox::Domain` models:
194
+ This returns a collection of `Fog::Proxmox::Identity::Domain` models:
195
195
 
196
196
  Create a LDAP domain:
197
197
 
@@ -240,7 +240,7 @@ List all roles:
240
240
  identity.roles.all
241
241
  ```
242
242
 
243
- This returns a collection of `Fog::Identity::Proxmox::Role` models:
243
+ This returns a collection of `Fog::Proxmox::Identity::Role` models:
244
244
 
245
245
  Create a new role:
246
246
 
@@ -281,7 +281,7 @@ List all permissions:
281
281
  identity.permissions.all
282
282
  ```
283
283
 
284
- This returns a collection of `Fog::Identity::Proxmox::Permission` models:
284
+ This returns a collection of `Fog::Proxmox::Identity::Permission` models:
285
285
 
286
286
  Add a new permission (manage users) to a user:
287
287
 
data/examples/compute.rb CHANGED
@@ -31,7 +31,7 @@ pve_username = 'root@pam'
31
31
  pve_password = 'proxmox01'
32
32
 
33
33
  # Create service compute
34
- compute = Fog::Compute::Proxmox.new(
34
+ compute = Fog::Proxmox::Compute.new(
35
35
  pve_url: pve_url,
36
36
  pve_username: pve_username,
37
37
  pve_password: pve_password
data/examples/identity.rb CHANGED
@@ -32,7 +32,7 @@ pve_username = 'root@pam'
32
32
  pve_password = 'proxmox01'
33
33
 
34
34
  # Create service identity
35
- identity = Fog::Identity::Proxmox.new(
35
+ identity = Fog::Proxmox::Identity.new(
36
36
  pve_url: pve_url,
37
37
  pve_username: pve_username,
38
38
  pve_password: pve_password
data/fog-proxmox.gemspec CHANGED
@@ -53,10 +53,10 @@ Gem::Specification.new do |spec|
53
53
  spec.add_development_dependency 'rubocop', '~> 0.55'
54
54
  spec.add_development_dependency 'ruby-debug-ide', '~> 0.6'
55
55
  spec.add_development_dependency 'simplecov'
56
- spec.add_development_dependency 'vcr', '~> 3.0'
57
- spec.add_development_dependency 'webmock', '~> 3.4'
56
+ spec.add_development_dependency 'vcr', '~> 4.0'
57
+ spec.add_development_dependency 'webmock', '~> 3.5'
58
58
 
59
- spec.add_dependency 'fog-core', '~> 1.45'
60
- spec.add_dependency 'fog-json', '~> 1.0'
59
+ spec.add_dependency 'fog-core', '~> 2.1'
60
+ spec.add_dependency 'fog-json', '~> 1.2'
61
61
  spec.add_dependency 'ipaddress', '~> 0.8'
62
62
  end
@@ -20,9 +20,9 @@
20
20
  require 'fog/proxmox/core'
21
21
 
22
22
  module Fog
23
- module Compute
23
+ module Proxmox
24
24
  # Proxmox compute service
25
- class Proxmox < Fog::Service
25
+ class Compute < Fog::Service
26
26
  requires :pve_url
27
27
  recognizes :pve_ticket, :pve_path, :pve_ticket_expires,
28
28
  :pve_csrftoken, :persistent, :current_user, :pve_username,
@@ -20,8 +20,8 @@
20
20
  require 'fog/proxmox/helpers/disk_helper'
21
21
 
22
22
  module Fog
23
- module Compute
24
- class Proxmox
23
+ module Proxmox
24
+ class Compute
25
25
  # class Disk model
26
26
  class Disk < Fog::Model
27
27
  identity :id
@@ -20,11 +20,11 @@
20
20
  require 'fog/compute/proxmox/models/disk'
21
21
 
22
22
  module Fog
23
- module Compute
24
- class Proxmox
23
+ module Proxmox
24
+ class Compute
25
25
  # class Disks Collection of disk
26
26
  class Disks < Fog::Collection
27
- model Fog::Compute::Proxmox::Disk
27
+ model Fog::Proxmox::Compute::Disk
28
28
 
29
29
  def all
30
30
  self
@@ -20,8 +20,8 @@
20
20
  require "fog/proxmox/helpers/nic_helper"
21
21
 
22
22
  module Fog
23
- module Compute
24
- class Proxmox
23
+ module Proxmox
24
+ class Compute
25
25
  # class Interface model
26
26
  class Interface < Fog::Model
27
27
  identity :id
@@ -21,11 +21,11 @@ require 'fog/compute/proxmox/models/interface'
21
21
  require 'fog/proxmox/helpers/controller_helper'
22
22
 
23
23
  module Fog
24
- module Compute
25
- class Proxmox
24
+ module Proxmox
25
+ class Compute
26
26
  # class Interfaces Collection of nodes of cluster
27
27
  class Interfaces < Fog::Collection
28
- model Fog::Compute::Proxmox::Interface
28
+ model Fog::Proxmox::Compute::Interface
29
29
 
30
30
  def all
31
31
  self
@@ -36,7 +36,7 @@ module Fog
36
36
  end
37
37
 
38
38
  def next_nicid
39
- Fog::Proxmox::ControllerHelper.last_index(Fog::Compute::Proxmox::Interface::NAME, self) + 1
39
+ Fog::Proxmox::ControllerHelper.last_index(Fog::Proxmox::Compute::Interface::NAME, self) + 1
40
40
  end
41
41
  end
42
42
  end
@@ -29,8 +29,8 @@
29
29
  require 'fog/proxmox/attributes'
30
30
 
31
31
  module Fog
32
- module Compute
33
- class Proxmox
32
+ module Proxmox
33
+ class Compute
34
34
  # class Node model of VMs
35
35
  class Node < Fog::Model
36
36
  identity :node
@@ -74,19 +74,19 @@ module Fog
74
74
  private
75
75
 
76
76
  def initialize_tasks
77
- attributes[:tasks] = Fog::Compute::Proxmox::Tasks.new(service: service, node_id: node)
77
+ attributes[:tasks] = Fog::Proxmox::Compute::Tasks.new(service: service, node_id: node)
78
78
  end
79
79
 
80
80
  def initialize_servers
81
- attributes[:servers] = Fog::Compute::Proxmox::Servers.new(service: service, node_id: node, type: 'qemu')
81
+ attributes[:servers] = Fog::Proxmox::Compute::Servers.new(service: service, node_id: node, type: 'qemu')
82
82
  end
83
83
 
84
84
  def initialize_containers
85
- attributes[:containers] = Fog::Compute::Proxmox::Servers.new(service: service, node_id: node, type: 'lxc')
85
+ attributes[:containers] = Fog::Proxmox::Compute::Servers.new(service: service, node_id: node, type: 'lxc')
86
86
  end
87
87
 
88
88
  def initialize_storages
89
- attributes[:storages] = Fog::Compute::Proxmox::Storages.new(service: service, node_id: node)
89
+ attributes[:storages] = Fog::Proxmox::Compute::Storages.new(service: service, node_id: node)
90
90
  end
91
91
 
92
92
  end
@@ -20,11 +20,11 @@
20
20
  require 'fog/compute/proxmox/models/node'
21
21
 
22
22
  module Fog
23
- module Compute
24
- class Proxmox
23
+ module Proxmox
24
+ class Compute
25
25
  # class Nodes Collection of nodes of cluster
26
26
  class Nodes < Fog::Collection
27
- model Fog::Compute::Proxmox::Node
27
+ model Fog::Proxmox::Compute::Node
28
28
 
29
29
  def all
30
30
  load service.list_nodes
@@ -23,8 +23,8 @@ require 'fog/proxmox/hash'
23
23
  require 'fog/proxmox/errors'
24
24
 
25
25
  module Fog
26
- module Compute
27
- class Proxmox
26
+ module Proxmox
27
+ class Compute
28
28
  # Server model
29
29
  class Server < Fog::Compute::Server
30
30
  identity :vmid
@@ -233,21 +233,21 @@ module Fog
233
233
 
234
234
  def initialize_config(new_attributes = {})
235
235
  options = { service: service, vmid: vmid }
236
- attributes[:config] = Fog::Compute::Proxmox::ServerConfig.new(options.merge(new_attributes))
236
+ attributes[:config] = Fog::Proxmox::Compute::ServerConfig.new(options.merge(new_attributes))
237
237
  end
238
238
 
239
239
  private
240
240
 
241
241
  def initialize_snapshots
242
- attributes[:snapshots] = Fog::Compute::Proxmox::Snapshots.new(service: service, server_id: vmid, server_type: type, node_id: node_id)
242
+ attributes[:snapshots] = Fog::Proxmox::Compute::Snapshots.new(service: service, server_id: vmid, server_type: type, node_id: node_id)
243
243
  end
244
244
 
245
245
  def initialize_tasks
246
- attributes[:tasks] = Fog::Compute::Proxmox::Tasks.new(service: service, node_id: node_id).select { |task| task.id == vmid }
246
+ attributes[:tasks] = Fog::Proxmox::Compute::Tasks.new(service: service, node_id: node_id).select { |task| task.id == vmid }
247
247
  end
248
248
 
249
249
  def node
250
- Fog::Compute::Proxmox::Node.new(service: service, node: node_id)
250
+ Fog::Proxmox::Compute::Node.new(service: service, node: node_id)
251
251
  end
252
252
  end
253
253
  end