fog-proxmox 0.6.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +13 -9
- data/docs/compute.md +17 -17
- data/docs/identity.md +6 -6
- data/examples/compute.rb +1 -1
- data/examples/identity.rb +1 -1
- data/fog-proxmox.gemspec +4 -4
- data/lib/fog/compute/proxmox.rb +2 -2
- data/lib/fog/compute/proxmox/models/disk.rb +2 -2
- data/lib/fog/compute/proxmox/models/disks.rb +3 -3
- data/lib/fog/compute/proxmox/models/interface.rb +2 -2
- data/lib/fog/compute/proxmox/models/interfaces.rb +4 -4
- data/lib/fog/compute/proxmox/models/node.rb +6 -6
- data/lib/fog/compute/proxmox/models/nodes.rb +3 -3
- data/lib/fog/compute/proxmox/models/server.rb +6 -6
- data/lib/fog/compute/proxmox/models/server_config.rb +8 -8
- data/lib/fog/compute/proxmox/models/servers.rb +3 -3
- data/lib/fog/compute/proxmox/models/snapshot.rb +3 -3
- data/lib/fog/compute/proxmox/models/snapshots.rb +3 -3
- data/lib/fog/compute/proxmox/models/storage.rb +3 -3
- data/lib/fog/compute/proxmox/models/storages.rb +3 -3
- data/lib/fog/compute/proxmox/models/task.rb +2 -2
- data/lib/fog/compute/proxmox/models/tasks.rb +3 -3
- data/lib/fog/compute/proxmox/models/volume.rb +2 -2
- data/lib/fog/compute/proxmox/models/volumes.rb +3 -3
- data/lib/fog/compute/proxmox/requests/action_server.rb +2 -2
- data/lib/fog/compute/proxmox/requests/clone_server.rb +2 -2
- data/lib/fog/compute/proxmox/requests/create_backup.rb +2 -2
- data/lib/fog/compute/proxmox/requests/create_server.rb +2 -2
- data/lib/fog/compute/proxmox/requests/create_snapshot.rb +2 -2
- data/lib/fog/compute/proxmox/requests/create_spice.rb +2 -2
- data/lib/fog/compute/proxmox/requests/create_term.rb +2 -2
- data/lib/fog/compute/proxmox/requests/create_vnc.rb +2 -2
- data/lib/fog/compute/proxmox/requests/delete_server.rb +2 -2
- data/lib/fog/compute/proxmox/requests/delete_snapshot.rb +2 -2
- data/lib/fog/compute/proxmox/requests/delete_volume.rb +2 -2
- data/lib/fog/compute/proxmox/requests/get_node_statistics.rb +2 -2
- data/lib/fog/compute/proxmox/requests/get_server_config.rb +2 -2
- data/lib/fog/compute/proxmox/requests/get_server_status.rb +2 -2
- data/lib/fog/compute/proxmox/requests/get_snapshot_config.rb +2 -2
- data/lib/fog/compute/proxmox/requests/get_task.rb +2 -2
- data/lib/fog/compute/proxmox/requests/get_vnc.rb +2 -2
- data/lib/fog/compute/proxmox/requests/get_volume.rb +2 -2
- data/lib/fog/compute/proxmox/requests/list_nodes.rb +2 -2
- data/lib/fog/compute/proxmox/requests/list_servers.rb +2 -2
- data/lib/fog/compute/proxmox/requests/list_snapshots.rb +2 -2
- data/lib/fog/compute/proxmox/requests/list_storages.rb +2 -2
- data/lib/fog/compute/proxmox/requests/list_tasks.rb +2 -2
- data/lib/fog/compute/proxmox/requests/list_volumes.rb +2 -2
- data/lib/fog/compute/proxmox/requests/log_task.rb +2 -2
- data/lib/fog/compute/proxmox/requests/migrate_server.rb +2 -2
- data/lib/fog/compute/proxmox/requests/move_disk.rb +2 -2
- data/lib/fog/compute/proxmox/requests/move_volume.rb +2 -2
- data/lib/fog/compute/proxmox/requests/next_vmid.rb +2 -2
- data/lib/fog/compute/proxmox/requests/resize_container.rb +2 -2
- data/lib/fog/compute/proxmox/requests/resize_server.rb +2 -2
- data/lib/fog/compute/proxmox/requests/rollback_snapshot.rb +2 -2
- data/lib/fog/compute/proxmox/requests/status_task.rb +2 -2
- data/lib/fog/compute/proxmox/requests/stop_task.rb +2 -2
- data/lib/fog/compute/proxmox/requests/template_server.rb +2 -2
- data/lib/fog/compute/proxmox/requests/update_server.rb +2 -2
- data/lib/fog/compute/proxmox/requests/update_snapshot.rb +2 -2
- data/lib/fog/identity/proxmox.rb +2 -2
- data/lib/fog/identity/proxmox/models/domain.rb +3 -3
- data/lib/fog/identity/proxmox/models/domain_type.rb +2 -2
- data/lib/fog/identity/proxmox/models/domains.rb +3 -3
- data/lib/fog/identity/proxmox/models/group.rb +2 -2
- data/lib/fog/identity/proxmox/models/groups.rb +3 -3
- data/lib/fog/identity/proxmox/models/permission.rb +2 -2
- data/lib/fog/identity/proxmox/models/permissions.rb +3 -3
- data/lib/fog/identity/proxmox/models/pool.rb +2 -2
- data/lib/fog/identity/proxmox/models/pools.rb +3 -3
- data/lib/fog/identity/proxmox/models/principal.rb +2 -2
- data/lib/fog/identity/proxmox/models/role.rb +2 -2
- data/lib/fog/identity/proxmox/models/roles.rb +3 -3
- data/lib/fog/identity/proxmox/models/user.rb +2 -2
- data/lib/fog/identity/proxmox/models/users.rb +3 -3
- data/lib/fog/identity/proxmox/requests/change_password.rb +2 -2
- data/lib/fog/identity/proxmox/requests/check_permissions.rb +2 -2
- data/lib/fog/identity/proxmox/requests/create_domain.rb +2 -2
- data/lib/fog/identity/proxmox/requests/create_group.rb +2 -2
- data/lib/fog/identity/proxmox/requests/create_pool.rb +2 -2
- data/lib/fog/identity/proxmox/requests/create_role.rb +2 -2
- data/lib/fog/identity/proxmox/requests/create_user.rb +2 -2
- data/lib/fog/identity/proxmox/requests/delete_domain.rb +2 -2
- data/lib/fog/identity/proxmox/requests/delete_group.rb +2 -2
- data/lib/fog/identity/proxmox/requests/delete_pool.rb +2 -2
- data/lib/fog/identity/proxmox/requests/delete_role.rb +2 -2
- data/lib/fog/identity/proxmox/requests/delete_user.rb +2 -2
- data/lib/fog/identity/proxmox/requests/get_domain.rb +2 -2
- data/lib/fog/identity/proxmox/requests/get_group.rb +2 -2
- data/lib/fog/identity/proxmox/requests/get_pool.rb +2 -2
- data/lib/fog/identity/proxmox/requests/get_role.rb +2 -2
- data/lib/fog/identity/proxmox/requests/get_user.rb +2 -2
- data/lib/fog/identity/proxmox/requests/list_domains.rb +2 -2
- data/lib/fog/identity/proxmox/requests/list_groups.rb +2 -2
- data/lib/fog/identity/proxmox/requests/list_permissions.rb +2 -2
- data/lib/fog/identity/proxmox/requests/list_pools.rb +2 -2
- data/lib/fog/identity/proxmox/requests/list_roles.rb +2 -2
- data/lib/fog/identity/proxmox/requests/list_users.rb +2 -2
- data/lib/fog/identity/proxmox/requests/read_version.rb +2 -2
- data/lib/fog/identity/proxmox/requests/update_domain.rb +2 -2
- data/lib/fog/identity/proxmox/requests/update_group.rb +2 -2
- data/lib/fog/identity/proxmox/requests/update_permissions.rb +2 -2
- data/lib/fog/identity/proxmox/requests/update_pool.rb +2 -2
- data/lib/fog/identity/proxmox/requests/update_role.rb +2 -2
- data/lib/fog/identity/proxmox/requests/update_user.rb +2 -2
- data/lib/fog/network/proxmox.rb +2 -2
- data/lib/fog/network/proxmox/models/network.rb +2 -2
- data/lib/fog/network/proxmox/models/networks.rb +3 -3
- data/lib/fog/network/proxmox/models/node.rb +3 -3
- data/lib/fog/network/proxmox/models/nodes.rb +3 -3
- data/lib/fog/network/proxmox/requests/create_network.rb +2 -2
- data/lib/fog/network/proxmox/requests/delete_network.rb +2 -2
- data/lib/fog/network/proxmox/requests/get_network.rb +2 -2
- data/lib/fog/network/proxmox/requests/get_node.rb +2 -2
- data/lib/fog/network/proxmox/requests/list_networks.rb +2 -2
- data/lib/fog/network/proxmox/requests/list_nodes.rb +2 -2
- data/lib/fog/network/proxmox/requests/power_node.rb +2 -2
- data/lib/fog/network/proxmox/requests/update_network.rb +2 -2
- data/lib/fog/proxmox.rb +4 -17
- data/lib/fog/proxmox/core.rb +1 -1
- data/lib/fog/proxmox/helpers/controller_helper.rb +5 -6
- data/lib/fog/proxmox/version.rb +1 -1
- data/lib/fog/storage/proxmox.rb +2 -2
- data/spec/compute_spec.rb +2 -2
- data/spec/helpers/controller_helper_spec.rb +17 -2
- data/spec/identity_spec.rb +3 -3
- data/spec/network_spec.rb +2 -2
- data/spec/spec_helper.rb +1 -0
- metadata +10 -10
@@ -18,8 +18,8 @@
|
|
18
18
|
# along with Fog::Proxmox. If not, see <http://www.gnu.org/licenses/>.
|
19
19
|
|
20
20
|
module Fog
|
21
|
-
module
|
22
|
-
class
|
21
|
+
module Proxmox
|
22
|
+
class Compute
|
23
23
|
# class Real migrate_server request
|
24
24
|
class Real
|
25
25
|
def migrate_server(path_params, body_params)
|
@@ -18,8 +18,8 @@
|
|
18
18
|
# along with Fog::Proxmox. If not, see <http://www.gnu.org/licenses/>.
|
19
19
|
|
20
20
|
module Fog
|
21
|
-
module
|
22
|
-
class
|
21
|
+
module Proxmox
|
22
|
+
class Compute
|
23
23
|
# class Real resize_container request
|
24
24
|
class Real
|
25
25
|
def resize_container(path_params, body_params)
|
@@ -18,8 +18,8 @@
|
|
18
18
|
# along with Fog::Proxmox. If not, see <http://www.gnu.org/licenses/>.
|
19
19
|
|
20
20
|
module Fog
|
21
|
-
module
|
22
|
-
class
|
21
|
+
module Proxmox
|
22
|
+
class Compute
|
23
23
|
# class Real resize_server request
|
24
24
|
class Real
|
25
25
|
def resize_server(path_params, body_params)
|
@@ -18,8 +18,8 @@
|
|
18
18
|
# along with Fog::Proxmox. If not, see <http://www.gnu.org/licenses/>.
|
19
19
|
|
20
20
|
module Fog
|
21
|
-
module
|
22
|
-
class
|
21
|
+
module Proxmox
|
22
|
+
class Compute
|
23
23
|
# class Real template_server request
|
24
24
|
class Real
|
25
25
|
def template_server(path_params, body_params)
|
@@ -18,8 +18,8 @@
|
|
18
18
|
# along with Fog::Proxmox. If not, see <http://www.gnu.org/licenses/>.
|
19
19
|
|
20
20
|
module Fog
|
21
|
-
module
|
22
|
-
class
|
21
|
+
module Proxmox
|
22
|
+
class Compute
|
23
23
|
# class Real update_server request
|
24
24
|
class Real
|
25
25
|
def update_server(path_params, body_params)
|
@@ -18,8 +18,8 @@
|
|
18
18
|
# along with Fog::Proxmox. If not, see <http://www.gnu.org/licenses/>.
|
19
19
|
|
20
20
|
module Fog
|
21
|
-
module
|
22
|
-
class
|
21
|
+
module Proxmox
|
22
|
+
class Compute
|
23
23
|
# class Real update_snapshot request
|
24
24
|
class Real
|
25
25
|
def update_snapshot(path_params, body_params)
|
data/lib/fog/identity/proxmox.rb
CHANGED
@@ -21,9 +21,9 @@
|
|
21
21
|
require 'fog/core'
|
22
22
|
|
23
23
|
module Fog
|
24
|
-
module
|
24
|
+
module Proxmox
|
25
25
|
# Identity and authentication proxmox class
|
26
|
-
class
|
26
|
+
class Identity < Fog::Service
|
27
27
|
requires :pve_url
|
28
28
|
recognizes :pve_ticket, :pve_path, :pve_ticket_expires, :pve_csrftoken, :persistent, :current_user, :pve_username, :pve_password, :pve_deadline
|
29
29
|
|
@@ -16,8 +16,8 @@
|
|
16
16
|
# along with Fog::Proxmox. If not, see <http://www.gnu.org/licenses/>.
|
17
17
|
|
18
18
|
module Fog
|
19
|
-
module
|
20
|
-
class
|
19
|
+
module Proxmox
|
20
|
+
class Identity
|
21
21
|
# class Domain model authentication
|
22
22
|
class Domain < Fog::Model
|
23
23
|
identity :realm
|
@@ -55,7 +55,7 @@ module Fog
|
|
55
55
|
elsif new_attributes.has_key? 'realm'
|
56
56
|
realm = new_attributes.delete('realm')
|
57
57
|
end
|
58
|
-
attributes[:type] = Fog::Identity::
|
58
|
+
attributes[:type] = Fog::Proxmox::Identity::DomainType.new(new_attributes)
|
59
59
|
new_attributes.delete_if { |new_attribute| attributes[:type].attributes.has_key? new_attribute.to_sym }
|
60
60
|
new_attributes.store(:realm, realm)
|
61
61
|
end
|
@@ -16,8 +16,8 @@
|
|
16
16
|
# along with Fog::Proxmox. If not, see <http://www.gnu.org/licenses/>.
|
17
17
|
|
18
18
|
module Fog
|
19
|
-
module
|
20
|
-
class
|
19
|
+
module Proxmox
|
20
|
+
class Identity
|
21
21
|
# class Domain type model authentication
|
22
22
|
class DomainType < Fog::Model
|
23
23
|
identity :type
|
@@ -20,11 +20,11 @@
|
|
20
20
|
require 'fog/identity/proxmox/models/domain'
|
21
21
|
|
22
22
|
module Fog
|
23
|
-
module
|
24
|
-
class
|
23
|
+
module Proxmox
|
24
|
+
class Identity
|
25
25
|
# class Domains collection authentication
|
26
26
|
class Domains < Fog::Collection
|
27
|
-
model Fog::Identity::
|
27
|
+
model Fog::Proxmox::Identity::Domain
|
28
28
|
|
29
29
|
def all
|
30
30
|
load service.list_domains
|
@@ -20,11 +20,11 @@
|
|
20
20
|
require 'fog/identity/proxmox/models/group'
|
21
21
|
|
22
22
|
module Fog
|
23
|
-
module
|
24
|
-
class
|
23
|
+
module Proxmox
|
24
|
+
class Identity
|
25
25
|
# class Groups authentication
|
26
26
|
class Groups < Fog::Collection
|
27
|
-
model Fog::Identity::
|
27
|
+
model Fog::Proxmox::Identity::Group
|
28
28
|
|
29
29
|
def all
|
30
30
|
load service.list_groups
|
@@ -20,11 +20,11 @@
|
|
20
20
|
require 'fog/identity/proxmox/models/permission'
|
21
21
|
|
22
22
|
module Fog
|
23
|
-
module
|
24
|
-
class
|
23
|
+
module Proxmox
|
24
|
+
class Identity
|
25
25
|
# class Permissions authentication
|
26
26
|
class Permissions < Fog::Collection
|
27
|
-
model Fog::Identity::
|
27
|
+
model Fog::Proxmox::Identity::Permission
|
28
28
|
|
29
29
|
def all
|
30
30
|
load service.list_permissions
|
@@ -20,11 +20,11 @@
|
|
20
20
|
require 'fog/identity/proxmox/models/pool'
|
21
21
|
|
22
22
|
module Fog
|
23
|
-
module
|
24
|
-
class
|
23
|
+
module Proxmox
|
24
|
+
class Identity
|
25
25
|
# class Pools Collection of pools of VMs
|
26
26
|
class Pools < Fog::Collection
|
27
|
-
model Fog::Identity::
|
27
|
+
model Fog::Proxmox::Identity::Pool
|
28
28
|
|
29
29
|
def all
|
30
30
|
load service.list_pools
|
@@ -26,8 +26,8 @@
|
|
26
26
|
# along with Fog::Proxmox. If not, see <http://www.gnu.org/licenses/>.
|
27
27
|
|
28
28
|
module Fog
|
29
|
-
module
|
30
|
-
class
|
29
|
+
module Proxmox
|
30
|
+
class Identity
|
31
31
|
# class Principal current user authenticated
|
32
32
|
class Principal < Fog::Model
|
33
33
|
identity :username
|
@@ -20,11 +20,11 @@
|
|
20
20
|
require 'fog/identity/proxmox/models/role'
|
21
21
|
|
22
22
|
module Fog
|
23
|
-
module
|
24
|
-
class
|
23
|
+
module Proxmox
|
24
|
+
class Identity
|
25
25
|
# class Roles model collection authentication
|
26
26
|
class Roles < Fog::Collection
|
27
|
-
model Fog::Identity::
|
27
|
+
model Fog::Proxmox::Identity::Role
|
28
28
|
|
29
29
|
def all
|
30
30
|
load service.list_roles
|
@@ -20,11 +20,11 @@
|
|
20
20
|
require 'fog/identity/proxmox/models/user'
|
21
21
|
|
22
22
|
module Fog
|
23
|
-
module
|
24
|
-
class
|
23
|
+
module Proxmox
|
24
|
+
class Identity
|
25
25
|
# class Users model collection
|
26
26
|
class Users < Fog::Collection
|
27
|
-
model Fog::Identity::
|
27
|
+
model Fog::Proxmox::Identity::User
|
28
28
|
|
29
29
|
def all(filters = {})
|
30
30
|
load service.list_users(filters)
|