opennebula-provider 1.1.2 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 49b1bfa4c57497eb862f4c254690c6786fd24e4b
4
- data.tar.gz: a63abfc6557857d31e7fb89f8c0c67073f6ffa24
2
+ SHA256:
3
+ metadata.gz: b5b88a415e6330b47432be7022d12d24f4bca59799d3bf4746b60208371be8a9
4
+ data.tar.gz: 1270ab6c8c001c34c8ce3b707d3463a3f3d3af8898b294a95c6ef3290e211920
5
5
  SHA512:
6
- metadata.gz: 5c6b8dcc034d9b7080799dd8971fc6133ed776786aeb4cea10aa54ccf509db6c8fc1210fa199f2954ed773e640838a97fad21ae2e8bd073323a89097b7809829
7
- data.tar.gz: 8cba4aff7c9a7559bb5440c7953084edf9a61efc3899cbefb492342ca30204bf91a679479faacc2645e1c003271f1498db98cb2aa05c7da60a46f1e41851edce
6
+ metadata.gz: de86780506fd534600d0fa456fa5e7d5f1149d4726328b400e26f690ea259400e04345962e7843e5beca91b5dd98f30cf3409274aa61a7c586f354335690189f
7
+ data.tar.gz: 5e49c690580ca776806c396bbee2856884e351dae4903107b1f7804e70a2f32b9947e70a29fa9eb372010c7d6da5755d60800459a461f2fd3a1598d5064641a9
data/README.md CHANGED
@@ -20,10 +20,6 @@ $ vagrant up --provider=opennebula
20
20
  ...
21
21
  ```
22
22
 
23
- ## Box Format
24
-
25
- TODO: Write box format creation instruction here.
26
-
27
23
  ## Usage
28
24
 
29
25
  ```
@@ -35,7 +31,7 @@ Vagrant.configure("2") do |config|
35
31
  one.username = 'YOUR NAME'
36
32
  one.password = 'YOUR PASSWORD'
37
33
  one.template_id = 123
38
- one.title = 'my vm'
34
+ one.title = 'my-vm'
39
35
  end
40
36
  end
41
37
  ```
@@ -51,6 +47,7 @@ end
51
47
  * `memory` - An instance memory in MB
52
48
  * `cpu` - An instance cpus
53
49
  * `vcpu` - An instance virtual cpus
50
+ * `disk_size` - Disk size, in MB, for templates with ONLY one disk
54
51
 
55
52
  You can use `template_name` parameters instead `template_id` to define template by name and if there are multiple templates with the same name will be used the most recent.
56
53
 
@@ -14,6 +14,7 @@ module VagrantPlugins
14
14
  attr_accessor :memory
15
15
  attr_accessor :cpu
16
16
  attr_accessor :vcpu
17
+ attr_accessor :disk_size
17
18
 
18
19
  def initialize
19
20
  @endpoint = ENV['ONE_XMLRPC'] || ENV['ONE_ENDPOINT'] || UNSET_VALUE
@@ -28,6 +29,7 @@ module VagrantPlugins
28
29
  @memory = UNSET_VALUE
29
30
  @cpu = UNSET_VALUE
30
31
  @vcpu = UNSET_VALUE
32
+ @disk_size = UNSET_VALUE
31
33
  end
32
34
 
33
35
  def finalize!
@@ -52,6 +54,7 @@ module VagrantPlugins
52
54
  if @cpu && ! @vcpu
53
55
  @vcpu = @cpu
54
56
  end
57
+ @disk_size = nil if @disk_size == UNSET_VALUE
55
58
  end
56
59
 
57
60
  def validate(machine)
@@ -58,6 +58,18 @@ module VagrantPlugins
58
58
  newvm.flavor.memory = @provider_config.memory unless @provider_config.memory.nil?
59
59
  newvm.flavor.cpu = @provider_config.cpu unless @provider_config.cpu.nil?
60
60
  newvm.flavor.vcpu = @provider_config.vcpu unless @provider_config.vcpu.nil?
61
+
62
+ if newvm.flavor.disk.instance_of? Array
63
+ fail Errors::AllocateError, error: I18n.t(
64
+ 'opennebula_provider.errors.allocate',
65
+ error: 'Template has more than one disk attached and `disk_size` ' +
66
+ 'feature is supported only for templates with only one')
67
+ end
68
+
69
+ if @provider_config.disk_size != nil
70
+ newvm.flavor.disk["size"] = @provider_config.disk_size
71
+ end
72
+ @logger.warn "Deploying VM with options #{newvm.flavor.inspect}"
61
73
  vm = newvm.save
62
74
  vm.id
63
75
  rescue RuntimeError => e
@@ -115,7 +127,7 @@ module VagrantPlugins
115
127
  case state
116
128
  when 'LCM_INIT'
117
129
  case status
118
- when 1
130
+ when 1, 3
119
131
  pretty = 'pending'
120
132
  when 4
121
133
  pretty = 'stopped'
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module OpenNebulaProvider
3
- VERSION = '1.1.2'
3
+ VERSION = '1.1.3'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opennebula-provider
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cherdancev Evgeni
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-02 00:00:00.000000000 Z
11
+ date: 2019-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opennebula
@@ -28,22 +28,22 @@ dependencies:
28
28
  name: fog
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '1.38'
34
31
  - - ">="
35
32
  - !ruby/object:Gem::Version
36
33
  version: 1.38.0
34
+ - - "~>"
35
+ - !ruby/object:Gem::Version
36
+ version: '1.38'
37
37
  type: :runtime
38
38
  prerelease: false
39
39
  version_requirements: !ruby/object:Gem::Requirement
40
40
  requirements:
41
- - - "~>"
42
- - !ruby/object:Gem::Version
43
- version: '1.38'
44
41
  - - ">="
45
42
  - !ruby/object:Gem::Version
46
43
  version: 1.38.0
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: '1.38'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: bundler
49
49
  requirement: !ruby/object:Gem::Requirement
@@ -142,8 +142,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
142
142
  - !ruby/object:Gem::Version
143
143
  version: '0'
144
144
  requirements: []
145
- rubyforge_project:
146
- rubygems_version: 2.5.1
145
+ rubygems_version: 3.0.2
147
146
  signing_key:
148
147
  specification_version: 4
149
148
  summary: OpenNebula provider for Vagrant