fog-proxmox 0.9.0 → 0.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. checksums.yaml +4 -4
  2. data/.github/FUNDING.yml +12 -0
  3. data/.github/workflows/ci.yml +79 -0
  4. data/.gitignore +2 -0
  5. data/.rubocop.yml +1 -1
  6. data/README.md +10 -8
  7. data/fog-proxmox.gemspec +3 -3
  8. data/lib/fog/compute/proxmox/models/interface.rb +2 -0
  9. data/lib/fog/compute/proxmox/models/server.rb +0 -1
  10. data/lib/fog/compute/proxmox/models/server_config.rb +1 -1
  11. data/lib/fog/compute/proxmox/models/snapshot.rb +4 -5
  12. data/lib/fog/compute/proxmox/models/storage.rb +2 -3
  13. data/lib/fog/compute/proxmox/models/task.rb +2 -3
  14. data/lib/fog/compute/proxmox/models/volume.rb +3 -3
  15. data/lib/fog/compute/proxmox/requests/action_server.rb +1 -0
  16. data/lib/fog/compute/proxmox/requests/clone_server.rb +1 -0
  17. data/lib/fog/compute/proxmox/requests/create_backup.rb +1 -0
  18. data/lib/fog/compute/proxmox/requests/create_server.rb +1 -0
  19. data/lib/fog/compute/proxmox/requests/create_snapshot.rb +3 -1
  20. data/lib/fog/compute/proxmox/requests/create_spice.rb +1 -0
  21. data/lib/fog/compute/proxmox/requests/create_term.rb +1 -0
  22. data/lib/fog/compute/proxmox/requests/create_vnc.rb +1 -0
  23. data/lib/fog/compute/proxmox/requests/delete_server.rb +1 -0
  24. data/lib/fog/compute/proxmox/requests/delete_snapshot.rb +3 -1
  25. data/lib/fog/compute/proxmox/requests/delete_volume.rb +1 -1
  26. data/lib/fog/compute/proxmox/requests/get_node_statistics.rb +2 -2
  27. data/lib/fog/compute/proxmox/requests/get_server_config.rb +18 -0
  28. data/lib/fog/compute/proxmox/requests/get_server_status.rb +21 -0
  29. data/lib/fog/compute/proxmox/requests/get_snapshot_config.rb +1 -1
  30. data/lib/fog/compute/proxmox/requests/get_task.rb +1 -1
  31. data/lib/fog/compute/proxmox/requests/get_vnc.rb +1 -0
  32. data/lib/fog/compute/proxmox/requests/get_volume.rb +1 -1
  33. data/lib/fog/compute/proxmox/requests/list_nodes.rb +8 -1
  34. data/lib/fog/compute/proxmox/requests/list_servers.rb +72 -1
  35. data/lib/fog/compute/proxmox/requests/list_snapshots.rb +24 -1
  36. data/lib/fog/compute/proxmox/requests/list_storages.rb +3 -1
  37. data/lib/fog/compute/proxmox/requests/list_tasks.rb +3 -1
  38. data/lib/fog/compute/proxmox/requests/list_volumes.rb +3 -1
  39. data/lib/fog/compute/proxmox/requests/log_task.rb +3 -1
  40. data/lib/fog/compute/proxmox/requests/migrate_server.rb +1 -1
  41. data/lib/fog/compute/proxmox/requests/move_disk.rb +1 -1
  42. data/lib/fog/compute/proxmox/requests/move_volume.rb +1 -1
  43. data/lib/fog/compute/proxmox/requests/next_vmid.rb +1 -0
  44. data/lib/fog/compute/proxmox/requests/resize_container.rb +1 -1
  45. data/lib/fog/compute/proxmox/requests/resize_server.rb +1 -1
  46. data/lib/fog/compute/proxmox/requests/rollback_snapshot.rb +3 -1
  47. data/lib/fog/compute/proxmox/requests/status_task.rb +1 -1
  48. data/lib/fog/compute/proxmox/requests/stop_task.rb +1 -1
  49. data/lib/fog/compute/proxmox/requests/template_server.rb +1 -0
  50. data/lib/fog/compute/proxmox/requests/update_server.rb +1 -0
  51. data/lib/fog/compute/proxmox/requests/update_snapshot.rb +1 -1
  52. data/lib/fog/identity/proxmox/models/pool.rb +18 -0
  53. data/lib/fog/identity/proxmox/models/pools.rb +3 -1
  54. data/lib/fog/proxmox/core.rb +1 -1
  55. data/lib/fog/proxmox/helpers/controller_helper.rb +1 -1
  56. data/lib/fog/proxmox/helpers/cpu_helper.rb +1 -1
  57. data/lib/fog/proxmox/helpers/disk_helper.rb +16 -0
  58. data/lib/fog/proxmox/helpers/ip_helper.rb +100 -0
  59. data/lib/fog/proxmox/helpers/nic_helper.rb +16 -2
  60. data/lib/fog/proxmox/version.rb +1 -1
  61. data/spec/fixtures/proxmox/identity/auth.yml +8 -8
  62. data/spec/fixtures/proxmox/identity/domains.yml +119 -115
  63. data/spec/fixtures/proxmox/identity/groups.yml +51 -51
  64. data/spec/fixtures/proxmox/identity/identity_ticket.yml +6 -6
  65. data/spec/fixtures/proxmox/identity/permissions.yml +122 -122
  66. data/spec/fixtures/proxmox/identity/pools.yml +603 -95
  67. data/spec/fixtures/proxmox/identity/read_version.yml +6 -6
  68. data/spec/fixtures/proxmox/identity/renew.yml +6 -6
  69. data/spec/fixtures/proxmox/identity/roles.yml +59 -59
  70. data/spec/fixtures/proxmox/identity/users.yml +111 -111
  71. data/spec/helpers/controller_helper_spec.rb +13 -2
  72. data/spec/helpers/cpu_helper_spec.rb +2 -2
  73. data/spec/helpers/disk_helper_spec.rb +12 -0
  74. data/spec/helpers/ip_helper_spec.rb +160 -0
  75. data/spec/helpers/nic_helper_spec.rb +18 -4
  76. data/spec/identity_spec.rb +6 -0
  77. metadata +14 -12
  78. data/.gitlab-ci.yml +0 -50
  79. data/.travis.yml +0 -25
  80. data/Gemfile.lock +0 -153
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5b4f5950be0c69a150853bf4cf669e7cf1bf1f90b635e480d6ecececa7f47bdb
4
- data.tar.gz: 4067fb9b6fe1c70bbe731c540445f8f68ebe9ce8f47f3233ea4507e00675a415
3
+ metadata.gz: 6c14d0c2b9706b9ccf13d70fb4b3f06496d74ab2469c93eed134e9ec1beffb37
4
+ data.tar.gz: d7919eb9e2d9dff9a92f4377ef9bb0b101b5994b8e459b36443bb1881b6a3387
5
5
  SHA512:
6
- metadata.gz: 5777b8593ab99c89778143dfbd3a45e72a99860dab6eea17a147d3afc20bcf33a49768c9002e4361006ecca9b5f0e3f4ceb44cd7a4974bb94b2a6d64d6df8010
7
- data.tar.gz: 8383b66cbdf6c57ec2a005836926074a1cd6d272a9435ffd7e499097e6c683e97a285fc72d2b9aeae14252b7b8fe4d195a80a98cb9954569cd93d449d560e297
6
+ metadata.gz: d4fe53a4bd62f5a3664287d9b3a7683379537bddf315a907e8ee80ead4f2c00e76168e9da34c9fb4cdd2a1ad3b31aba4adc465622ca691d7f4db870a5c80755b
7
+ data.tar.gz: 77cc6f9f1da87e845ddc442372fe827c58684aab525acf5f4c97fc2793e6f1ae4050cbbbfb3465f7e1e5b615b89c9ad521c1fdc56d143b37fa1a02086d347ef9
@@ -0,0 +1,12 @@
1
+ # These are supported funding model platforms
2
+
3
+ github: [tristanrobert] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4
+ patreon: # Replace with a single Patreon username
5
+ open_collective: # Replace with a single Open Collective username
6
+ ko_fi: # Replace with a single Ko-fi username
7
+ tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8
+ community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9
+ liberapay: # Replace with a single Liberapay username
10
+ issuehunt: # Replace with a single IssueHunt username
11
+ otechie: # Replace with a single Otechie username
12
+ custom: ["https://paypal.me/TristanRobert"]# Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
@@ -0,0 +1,79 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [ master ]
6
+ pull_request:
7
+ branches: [ master ]
8
+ release:
9
+ types: [created]
10
+
11
+ jobs:
12
+ test:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: actions/checkout@v2
16
+ - name: Set up Ruby
17
+ uses: ruby/setup-ruby@v1
18
+ with:
19
+ ruby-version: 2.6
20
+ - name: Install dependencies
21
+ run: bundle install
22
+ - name: Run tests
23
+ run: bundle exec rake test spec audit
24
+ - name: Upload results for coverage
25
+ uses: actions/upload-artifact@v1
26
+ with:
27
+ name: coverage
28
+ path: coverage/
29
+
30
+ coverage:
31
+ needs: [ test ]
32
+ name: coverage
33
+ runs-on: ubuntu-latest
34
+ steps:
35
+ - uses: actions/checkout@v2
36
+ - name: Download tests result from test
37
+ uses: actions/download-artifact@v1
38
+ with:
39
+ name: coverage
40
+ - name: Install Code Climate test-reporter
41
+ run: |
42
+ curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
43
+ chmod +x ./cc-test-reporter
44
+ - name: Format code coverage
45
+ env:
46
+ GIT_BRANCH: ${{ github.ref }}
47
+ GIT_COMMIT_SHA: ${{ github.sha }}
48
+ run: |
49
+ export GIT_COMMITTED_AT="$(date +%s)"
50
+ ./cc-test-reporter format-coverage -d -t simplecov -o coverage/codeclimate.json coverage/.resultset.json
51
+ - name: Publish code coverage
52
+ env:
53
+ GIT_BRANCH: ${{ github.ref }}
54
+ GIT_COMMIT_SHA: ${{ github.sha }}
55
+ run: |
56
+ export GIT_COMMITTED_AT="$(date +%s)"
57
+ ./cc-test-reporter upload-coverage -d -r ${{secrets.CC_TEST_REPORTER_ID}}
58
+
59
+ publish:
60
+ needs: [ test ]
61
+ name: publish
62
+ runs-on: ubuntu-latest
63
+ if: contains(github.ref, '/tags/v')
64
+ steps:
65
+ - uses: actions/checkout@v2
66
+ - name: Set up Ruby 2.6
67
+ uses: actions/setup-ruby@v1
68
+ with:
69
+ version: 2.6.x
70
+ - name: Publish to RubyGems
71
+ env:
72
+ GEM_HOST_API_KEY: ${{secrets.RUBYGEMS_AUTH_TOKEN}}
73
+ run: |
74
+ mkdir -p $HOME/.gem
75
+ touch $HOME/.gem/credentials
76
+ chmod 0600 $HOME/.gem/credentials
77
+ printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
78
+ gem build *.gemspec
79
+ gem push *.gem
data/.gitignore CHANGED
@@ -4,3 +4,5 @@ pkg/
4
4
  spec/debug/
5
5
  coverage/
6
6
  TAGS
7
+ Gemfile.lock
8
+ *.gem
@@ -1,5 +1,5 @@
1
1
  AllCops:
2
- TargetRubyVersion: 2.3
2
+ TargetRubyVersion: 2.4
3
3
  Include:
4
4
  - '**/Rakefile'
5
5
  Exclude:
data/README.md CHANGED
@@ -2,11 +2,12 @@
2
2
 
3
3
  # Fog::Proxmox
4
4
 
5
- [![Build Status](https://travis-ci.org/fog/fog-proxmox.svg?branch=master)](https://travis-ci.org/fog/fog-proxmox)
5
+ ![CI](https://github.com/fog/fog-proxmox/workflows/CI/badge.svg)
6
6
  [![Maintainability](https://api.codeclimate.com/v1/badges/33e619f2167cc9864b61/maintainability)](https://codeclimate.com/github/fog/fog-proxmox/maintainability)
7
7
  [![Test Coverage](https://api.codeclimate.com/v1/badges/33e619f2167cc9864b61/test_coverage)](https://codeclimate.com/github/fog/fog-proxmox/test_coverage)
8
+ [![Gem Version](https://badge.fury.io/rb/fog-proxmox.svg)](https://badge.fury.io/rb/fog-proxmox)
8
9
 
9
- This is a [FOG](http://fog.io/) (>= 1.45.0) module gem to support [Proxmox VE](https://www.proxmox.com/en/proxmox-ve)
10
+ This is a [FOG](http://fog.io/) (>= 2.1) module gem to support [Proxmox VE](https://www.proxmox.com/en/proxmox-ve)
10
11
 
11
12
  It is intended to satisfy this [feature](https://github.com/fog/fog/issues/3644), but Proxmox provider only, and above all this [Foreman](http://www.theforeman.org) [feature](https://projects.theforeman.org/issues/2186).
12
13
 
@@ -14,12 +15,13 @@ It is inspired by the great [fog-openstack](https://github.com/fog/fog-openstack
14
15
 
15
16
  ## Compatibility versions
16
17
 
17
- |Fog-Proxmox|Proxmox VE|
18
- |--|--|
19
- |<0.6|<5.3|
20
- |>=0.6|>=5.3|
21
- |>=0.8|>=5.4|
22
- |>=0.9|>=6.0|
18
+ |Fog-Proxmox|Proxmox VE|Fog-core|ruby|
19
+ |--|--|--|--|
20
+ |<0.6|<5.3|>=1.45|>=2.3|
21
+ |>=0.6|>=5.3|>=1.45|>=2.3|
22
+ |>=0.8|>=5.4|>=1.45|>=2.3|
23
+ |>=0.9|>=6.0|>=2.1|>=2.3|
24
+ |>=0.10|>=6.0|>=2.1|>=2.5|
23
25
 
24
26
  ## Installation
25
27
 
@@ -36,10 +36,10 @@ Gem::Specification.new do |spec|
36
36
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
37
37
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
38
38
  spec.require_paths = ['lib']
39
- spec.required_ruby_version = '>= 2.3'
39
+ spec.required_ruby_version = '>= 2.5'
40
40
  spec.rubygems_version = '~> 2.6'
41
41
 
42
- spec.add_development_dependency 'bundler', '~> 2.0'
42
+ spec.add_development_dependency 'bundler', '~> 2.1'
43
43
  spec.add_development_dependency 'debase', '~> 0.2.2'
44
44
  spec.add_development_dependency 'debride', '~> 1.8'
45
45
  spec.add_development_dependency 'fasterer', '~> 0.3'
@@ -52,7 +52,7 @@ Gem::Specification.new do |spec|
52
52
  spec.add_development_dependency 'rspec', '~> 3.7'
53
53
  spec.add_development_dependency 'rubocop', '~> 0.55'
54
54
  spec.add_development_dependency 'ruby-debug-ide', '~> 0.6'
55
- spec.add_development_dependency 'simplecov'
55
+ spec.add_development_dependency 'simplecov', '0.17'
56
56
  spec.add_development_dependency 'vcr', '~> 4.0'
57
57
  spec.add_development_dependency 'webmock', '~> 3.5'
58
58
  spec.add_development_dependency 'bundler-audit', '~> 0.6'
@@ -30,6 +30,8 @@ module Fog
30
30
  attribute :name
31
31
  attribute :ip
32
32
  attribute :ip6
33
+ attribute :gw
34
+ attribute :gw6
33
35
  attribute :bridge
34
36
  attribute :firewall
35
37
  attribute :link_down
@@ -156,7 +156,6 @@ module Fog
156
156
 
157
157
  def migrate(target, options = {})
158
158
  request(:migrate_server, options.merge(target: target), vmid: vmid)
159
- reload
160
159
  end
161
160
 
162
161
  def extend(disk, size, options = {})
@@ -30,6 +30,7 @@ module Fog
30
30
  attribute :description
31
31
  attribute :ostype
32
32
  attribute :smbios1
33
+ attribute :bios
33
34
  attribute :numa
34
35
  attribute :kvm
35
36
  attribute :vcpus
@@ -41,7 +42,6 @@ module Fog
41
42
  attribute :scsihw
42
43
  attribute :sockets
43
44
  attribute :memory
44
- attribute :min_memory
45
45
  attribute :shares
46
46
  attribute :balloon
47
47
  attribute :name
@@ -41,11 +41,10 @@ module Fog
41
41
 
42
42
  def initialize(new_attributes = {})
43
43
  prepare_service_value(new_attributes)
44
- attributes[:node_id] = new_attributes[:node_id] unless new_attributes[:node_id].nil?
45
- attributes[:server_id] = new_attributes[:server_id] unless new_attributes[:server_id].nil?
46
- attributes[:server_type] = new_attributes[:server_type] unless new_attributes[:server_type].nil?
47
- attributes[:name] = new_attributes[:name] unless new_attributes[:name].nil?
48
- attributes[:name] = new_attributes['name'] unless new_attributes['name'].nil?
44
+ Fog::Proxmox::Attributes.set_attr_and_sym('node_id', attributes, new_attributes)
45
+ Fog::Proxmox::Attributes.set_attr_and_sym('server_id', attributes, new_attributes)
46
+ Fog::Proxmox::Attributes.set_attr_and_sym('server_type', attributes, new_attributes)
47
+ Fog::Proxmox::Attributes.set_attr_and_sym('name', attributes, new_attributes)
49
48
  requires :node_id, :server_id, :server_type, :name
50
49
  super(new_attributes)
51
50
  end
@@ -46,9 +46,8 @@ module Fog
46
46
 
47
47
  def initialize(new_attributes = {})
48
48
  prepare_service_value(new_attributes)
49
- attributes[:node_id] = new_attributes[:node_id] unless new_attributes[:node_id].nil?
50
- attributes[:storage] = new_attributes[:storage] unless new_attributes[:storage].nil?
51
- attributes[:storage] = new_attributes['storage'] unless new_attributes['storage'].nil?
49
+ Fog::Proxmox::Attributes.set_attr_and_sym('node_id', attributes, new_attributes)
50
+ Fog::Proxmox::Attributes.set_attr_and_sym('storage', attributes, new_attributes)
52
51
  requires :node_id, :storage
53
52
  initialize_volumes
54
53
  super(new_attributes)
@@ -47,9 +47,8 @@ module Fog
47
47
 
48
48
  def initialize(new_attributes = {})
49
49
  prepare_service_value(new_attributes)
50
- attributes[:node_id] = new_attributes[:node_id] unless new_attributes[:node_id].nil?
51
- attributes[:upid] = new_attributes[:upid] unless new_attributes[:upid].nil?
52
- attributes[:upid] = new_attributes['upid'] unless new_attributes['upid'].nil?
50
+ Fog::Proxmox::Attributes.set_attr_and_sym('node_id', attributes, new_attributes)
51
+ Fog::Proxmox::Attributes.set_attr_and_sym('upid', attributes, new_attributes)
53
52
  requires :node_id, :upid
54
53
  super(new_attributes)
55
54
  end
@@ -41,9 +41,9 @@ module Fog
41
41
 
42
42
  def initialize(new_attributes = {})
43
43
  prepare_service_value(new_attributes)
44
- attributes[:node_id] = new_attributes[:node_id] unless new_attributes[:node_id].nil?
45
- attributes[:storage_id] = new_attributes[:storage_id] unless new_attributes[:storage_id].nil?
46
- attributes[:volid] = new_attributes['volid'] unless new_attributes['volid'].nil?
44
+ Fog::Proxmox::Attributes.set_attr_and_sym('node_id', attributes, new_attributes)
45
+ Fog::Proxmox::Attributes.set_attr_and_sym('storage_id', attributes, new_attributes)
46
+ Fog::Proxmox::Attributes.set_attr_and_sym('volid', attributes, new_attributes)
47
47
  requires :node_id, :storage_id, :volid
48
48
  super(new_attributes)
49
49
  end
@@ -38,6 +38,7 @@ module Fog
38
38
 
39
39
  # class Mock action_server request
40
40
  class Mock
41
+ def action_server(_path_params, _body_params); end
41
42
  end
42
43
  end
43
44
  end
@@ -37,6 +37,7 @@ module Fog
37
37
 
38
38
  # class Mock clone_server request
39
39
  class Mock
40
+ def clone_server(_path_params, _body_params); end
40
41
  end
41
42
  end
42
43
  end
@@ -35,6 +35,7 @@ module Fog
35
35
 
36
36
  # class Mock create_backup request
37
37
  class Mock
38
+ def create_backup(_path_params, _body_params); end
38
39
  end
39
40
  end
40
41
  end
@@ -36,6 +36,7 @@ module Fog
36
36
 
37
37
  # class Mock create_server request
38
38
  class Mock
39
+ def create_server(_path_params, _body_params); end
39
40
  end
40
41
  end
41
42
  end
@@ -37,7 +37,9 @@ module Fog
37
37
 
38
38
  # class Mock create_snapshot request
39
39
  class Mock
40
- def create_snapshot; end
40
+ def create_snapshot(_path_params, _body_params)
41
+ 'UPID:proxmox:00003E13:6F21770F:5E37E2D0:qmsnapshot:100:root@pam:'
42
+ end
41
43
  end
42
44
  end
43
45
  end
@@ -37,6 +37,7 @@ module Fog
37
37
 
38
38
  # class Mock create_spice request
39
39
  class Mock
40
+ def create_spice(_path_params, _body_params); end
40
41
  end
41
42
  end
42
43
  end
@@ -37,6 +37,7 @@ module Fog
37
37
 
38
38
  # class Mock create_term request
39
39
  class Mock
40
+ def create_term(_path_params, _body_params); end
40
41
  end
41
42
  end
42
43
  end
@@ -37,6 +37,7 @@ module Fog
37
37
 
38
38
  # class Mock create_vnc request
39
39
  class Mock
40
+ def create_vnc(_path_params, _body_params); end
40
41
  end
41
42
  end
42
43
  end
@@ -38,6 +38,7 @@ module Fog
38
38
 
39
39
  # class Mock delete_server request
40
40
  class Mock
41
+ def delete_server(_path_params, _body_params); end
41
42
  end
42
43
  end
43
44
  end
@@ -38,7 +38,9 @@ module Fog
38
38
 
39
39
  # class Mock delete_snapshot request
40
40
  class Mock
41
- def delete_snapshot; end
41
+ def delete_snapshot(_path_params, _query_params)
42
+ 'UPID:proxmox:00002CC5:646E24B1:5E1C7E26:qmdelsnapshot:100:root@pam:'
43
+ end
42
44
  end
43
45
  end
44
46
  end
@@ -33,7 +33,7 @@ module Fog
33
33
 
34
34
  # class Mock delete_volume request
35
35
  class Mock
36
- def delete_volume; end
36
+ def delete_volume(_node, _storage, _volume); end
37
37
  end
38
38
  end
39
39
  end
@@ -23,7 +23,7 @@ module Fog
23
23
  class Compute
24
24
  # class Real get_node_statistics request
25
25
  class Real
26
- def get_node_statistics(path_params,query_params)
26
+ def get_node_statistics(path_params, query_params)
27
27
  node = path_params[:node]
28
28
  output = path_params[:output]
29
29
  request(
@@ -37,7 +37,7 @@ module Fog
37
37
 
38
38
  # class Mock get_statistics request
39
39
  class Mock
40
- def get_node_statistics; end
40
+ def get_node_statistics(_path_params, _query_params); end
41
41
  end
42
42
  end
43
43
  end
@@ -36,6 +36,24 @@ module Fog
36
36
 
37
37
  # class Mock get_server_config request
38
38
  class Mock
39
+ def get_server_config(_path_params)
40
+ {
41
+ :onboot => 0,
42
+ :memory => 512,
43
+ :ostype => 'l26',
44
+ :cores => 1,
45
+ :keyboard => 'en-us',
46
+ :digest => nil,
47
+ :smbios1 => nil,
48
+ :vmgenid => nil,
49
+ :balloon => 0,
50
+ :kvm => 0,
51
+ :cpu => 'cputype=kvm64',
52
+ :sockets => 1,
53
+ :bootdisk => 'scsi0',
54
+ :vga => 'std'
55
+ }
56
+ end
39
57
  end
40
58
  end
41
59
  end
@@ -36,6 +36,27 @@ module Fog
36
36
 
37
37
  # class Mock get_server_status request
38
38
  class Mock
39
+ def get_server_status(_path_params)
40
+ {
41
+ :netout => 0,
42
+ :ha => { 'managed' => 0 },
43
+ :mem => 0,
44
+ :vmid => '100',
45
+ :maxdisk => 8_589_934_592,
46
+ :diskread => 0,
47
+ :template => '',
48
+ :qmpstatus => 'stopped',
49
+ :diskwrite => 0,
50
+ :maxmem => 536_870_912,
51
+ :pid => nil,
52
+ :uptime => 0,
53
+ :status => 'stopped',
54
+ :cpu => 'cputype=kvm64',
55
+ :cpus => 1,
56
+ :disk => 0,
57
+ :netin => 0
58
+ }
59
+ end
39
60
  end
40
61
  end
41
62
  end