opennebula-provider 0.1.4 → 0.1.5

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
2
  SHA1:
3
- metadata.gz: 779d5d81948ae21453f701452543fae1f62e5cfa
4
- data.tar.gz: 0e8536b41b05d86f5d97ec8c5ef34c69b1b02f09
3
+ metadata.gz: 5f21660590f1b8adb1f83e03e1d4ed528be27941
4
+ data.tar.gz: d8cb277e930638635a43fa6be7ebcb2b2745da85
5
5
  SHA512:
6
- metadata.gz: da9a502cf68a5df238e4ee9e4c33478d1f580ed8d3fc9dfe2b868710f3d8bab4745c4f430b49dd75427f0e7567b8d9193aa179fd0782bba15e8ce776fcbade81
7
- data.tar.gz: 7e396c173cb436084c6092f736e6a7b29b7f430a3af797eb17caaff9c4e253c4b4660d6645a5f72d5ede493006c6fdd2f7b70cc1c2e5a25870ded02e68835f0c
6
+ metadata.gz: 2e07c6b69e77508836b94d121a44416f73575eafc9f2e3813c9715821f5ec74aaa4fba3ced0a48aab1ba57f3e3550c272d489dbeae285226aa7f048f3bd3a168
7
+ data.tar.gz: 43d35fbb3f58c9e9e39668661ddb003793197cc8df68933e444276e990e3298be426375d1880d9651661e0b50fd988473668b21a77f294ce3d9ac95534f438fa
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2014 eucher
1
+ Copyright (c) 2014 Cherdancev Evgeni
2
2
 
3
3
  MIT License
4
4
 
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # OpenNebula::Provider
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/opennebula-provider.png)](https://rubygems.org/gems/opennebula-provider)
4
+
3
5
  This is a Vagrant 1.5 plugin that add an OpenNebula provider to Vagrant.
4
6
 
5
7
  **NOTE:** This plugin requires occi-api gem and works with rOCCI-server.
@@ -0,0 +1,21 @@
1
+ module VagrantPlugins
2
+ module OpenNebulaProvider
3
+ module Errors
4
+ class OpenNebulaProviderError < Vagrant::Errors::VagrantError
5
+ error_namespace('opennebula_provider.errors')
6
+ end
7
+
8
+ class QuotaError < OpenNebulaProviderError
9
+ error_key(:quota)
10
+ end
11
+
12
+ class AllocateError < OpenNebulaProviderError
13
+ error_key(:allocate)
14
+ end
15
+
16
+ class ComputeError < OpenNebulaProviderError
17
+ error_key(:compute)
18
+ end
19
+ end
20
+ end
21
+ end
@@ -40,6 +40,18 @@ module VagrantPlugins
40
40
  cmpt_loc = @rocci.create cmpt
41
41
  @logger.info "Location of new compute resource: #{cmpt_loc}"
42
42
  cmpt_loc
43
+ rescue RuntimeError => e
44
+ case e.message
45
+ when /(?<ms>\[VirtualMachineAllocate\])/
46
+ message_scope = $LAST_MATCH_INFO[:ms]
47
+ case e.message
48
+ when /quota/
49
+ raise Errors::QuotaError, error: e.message.split(message_scope)[1].to_s
50
+ else
51
+ raise Errors::AllocateError, error: e
52
+ end
53
+ end
54
+ raise Errors::ComputeError, error: e
43
55
  end
44
56
 
45
57
  def delete(id)
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module OpenNebulaProvider
3
- VERSION = '0.1.4'
3
+ VERSION = '0.1.5'
4
4
  end
5
5
  end
@@ -1,3 +1,4 @@
1
+ require 'opennebula-provider/errors'
1
2
  require 'opennebula-provider/plugin'
2
3
 
3
4
  module VagrantPlugins
data/locales/en.yml CHANGED
@@ -42,3 +42,11 @@ en:
42
42
  Password is not set
43
43
  resource_tpl: |-
44
44
  A resource template must defined via "resource_tpl"
45
+
46
+ errors:
47
+ compute: |-
48
+ Compute error! %{error}
49
+ quota: |-
50
+ Quota error! %{error}
51
+ allocate: |-
52
+ Allocation error! %{error}
@@ -5,7 +5,7 @@ require 'opennebula-provider/version'
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = 'opennebula-provider'
7
7
  spec.version = VagrantPlugins::OpenNebulaProvider::VERSION
8
- spec.authors = ['eucher']
8
+ spec.authors = ['Cherdancev Evgeni']
9
9
  spec.email = ['cyber@sibnet.ru']
10
10
  spec.description = %q{OpenNebula provider for Vagrant}
11
11
  spec.summary = spec.description
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: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
- - eucher
7
+ - Cherdancev Evgeni
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-21 00:00:00.000000000 Z
11
+ date: 2014-04-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: occi-api
@@ -76,15 +76,12 @@ files:
76
76
  - LICENSE.txt
77
77
  - locales/en.yml
78
78
  - README.md
79
- - to_github.sh
80
- - gist.sh
81
79
  - Gemfile
82
80
  - boxes/dummy/dummy.box
83
81
  - boxes/dummy/metadata.json
84
82
  - boxes/dummy/README.md
85
- - to_gitlab.sh
86
- - rubocop-todo.yml
87
83
  - lib/opennebula-provider/version.rb
84
+ - lib/opennebula-provider/errors.rb
88
85
  - lib/opennebula-provider/plugin.rb
89
86
  - lib/opennebula-provider/helpers/rocci.rb
90
87
  - lib/opennebula-provider/action/destroy.rb
@@ -98,18 +95,6 @@ files:
98
95
  - lib/opennebula-provider/provider.rb
99
96
  - lib/opennebula-provider.rb
100
97
  - opennebula-provider.gemspec
101
- - github.sh
102
- - rubocop.yml
103
- - test/rsyncme/10.file
104
- - test/rsyncme/1.file
105
- - test/rsyncme/6.file
106
- - test/rsyncme/4.file
107
- - test/rsyncme/5.file
108
- - test/rsyncme/8.file
109
- - test/rsyncme/9.file
110
- - test/rsyncme/7.file
111
- - test/rsyncme/3.file
112
- - test/rsyncme/2.file
113
98
  - test/test_rsa
114
99
  - Rakefile
115
100
  - .gitignore
@@ -138,14 +123,4 @@ signing_key:
138
123
  specification_version: 4
139
124
  summary: OpenNebula provider for Vagrant
140
125
  test_files:
141
- - test/rsyncme/10.file
142
- - test/rsyncme/1.file
143
- - test/rsyncme/6.file
144
- - test/rsyncme/4.file
145
- - test/rsyncme/5.file
146
- - test/rsyncme/8.file
147
- - test/rsyncme/9.file
148
- - test/rsyncme/7.file
149
- - test/rsyncme/3.file
150
- - test/rsyncme/2.file
151
126
  - test/test_rsa
data/gist.sh DELETED
@@ -1,25 +0,0 @@
1
- #!/bin/sh
2
-
3
- git filter-branch --env-filter '
4
-
5
- an="$GIT_AUTHOR_NAME"
6
- am="$GIT_AUTHOR_EMAIL"
7
- cn="$GIT_COMMITTER_NAME"
8
- cm="$GIT_COMMITTER_EMAIL"
9
-
10
- if [ "$GIT_COMMITTER_EMAIL" = "cyber@sibnet.ru" ]
11
- then
12
- cn="Cherdancev Evgeni"
13
- cm="joe@netpost.ru"
14
- fi
15
- if [ "$GIT_AUTHOR_EMAIL" = "cyber@sibnet.ru" ]
16
- then
17
- an="Cherdancev Evgeni"
18
- am="joe@netpost.ru"
19
- fi
20
-
21
- export GIT_AUTHOR_NAME="$an"
22
- export GIT_AUTHOR_EMAIL="$am"
23
- export GIT_COMMITTER_NAME="$cn"
24
- export GIT_COMMITTER_EMAIL="$cm"
25
- '
data/github.sh DELETED
@@ -1,25 +0,0 @@
1
- #!/bin/sh
2
-
3
- git filter-branch -f --env-filter '
4
-
5
- an="$GIT_AUTHOR_NAME"
6
- am="$GIT_AUTHOR_EMAIL"
7
- cn="$GIT_COMMITTER_NAME"
8
- cm="$GIT_COMMITTER_EMAIL"
9
-
10
- if [ "$GIT_COMMITTER_EMAIL" = "joe@netpost.ru" ]
11
- then
12
- cn="eucher"
13
- cm="cyber@sibnet.ru"
14
- fi
15
- if [ "$GIT_AUTHOR_EMAIL" = "joe@netpost.ru" ]
16
- then
17
- an="eucher"
18
- am="cyber@sibnet.ru"
19
- fi
20
-
21
- export GIT_AUTHOR_NAME="$an"
22
- export GIT_AUTHOR_EMAIL="$am"
23
- export GIT_COMMITTER_NAME="$cn"
24
- export GIT_COMMITTER_EMAIL="$cm"
25
- '
data/rubocop-todo.yml DELETED
@@ -1,119 +0,0 @@
1
- # This configuration was generated by `rubocop --auto-gen-config`
2
- # on 2014-04-21 12:09:58 +0700 using RuboCop version 0.20.1.
3
- # The point is for the user to remove these configuration records
4
- # one by one as the offenses are removed from the code base.
5
- # Note that changes in the inspected code, or installation of new
6
- # versions of RuboCop, may require this file to be generated again.
7
-
8
- # Offense count: 1
9
- # Cop supports --auto-correct.
10
- # Configuration parameters: EnforcedStyle, SupportedStyles.
11
- AlignParameters:
12
- Enabled: false
13
-
14
- # Offense count: 1
15
- # Cop supports --auto-correct.
16
- # Configuration parameters: EnforcedStyle, SupportedStyles.
17
- BracesAroundHashParameters:
18
- Enabled: false
19
-
20
- # Offense count: 2
21
- CyclomaticComplexity:
22
- Max: 8
23
-
24
- # Offense count: 1
25
- # Cop supports --auto-correct.
26
- DeprecatedHashMethods:
27
- Enabled: false
28
-
29
- # Offense count: 14
30
- Documentation:
31
- Enabled: false
32
-
33
- # Offense count: 5
34
- # Cop supports --auto-correct.
35
- EmptyLinesAroundBody:
36
- Enabled: false
37
-
38
- # Offense count: 1
39
- # Configuration parameters: Exclude.
40
- FileName:
41
- Enabled: false
42
-
43
- # Offense count: 14
44
- # Cop supports --auto-correct.
45
- # Configuration parameters: EnforcedStyle, SupportedStyles.
46
- HashSyntax:
47
- Enabled: false
48
-
49
- # Offense count: 7
50
- # Cop supports --auto-correct.
51
- LeadingCommentSpace:
52
- Enabled: false
53
-
54
- # Offense count: 17
55
- LineLength:
56
- Max: 122
57
-
58
- # Offense count: 4
59
- # Configuration parameters: CountComments.
60
- MethodLength:
61
- Max: 40
62
-
63
- # Offense count: 1
64
- MultilineBlockChain:
65
- Enabled: false
66
-
67
- # Offense count: 4
68
- # Cop supports --auto-correct.
69
- NegatedIf:
70
- Enabled: false
71
-
72
- # Offense count: 1
73
- # Cop supports --auto-correct.
74
- NilComparison:
75
- Enabled: false
76
-
77
- # Offense count: 1
78
- # Cop supports --auto-correct.
79
- PerlBackrefs:
80
- Enabled: false
81
-
82
- # Offense count: 6
83
- # Cop supports --auto-correct.
84
- # Configuration parameters: AllowMultipleReturnValues.
85
- RedundantReturn:
86
- Enabled: false
87
-
88
- # Offense count: 2
89
- # Cop supports --auto-correct.
90
- RedundantSelf:
91
- Enabled: false
92
-
93
- # Offense count: 2
94
- # Cop supports --auto-correct.
95
- # Configuration parameters: EnforcedStyle, SupportedStyles.
96
- SignalException:
97
- Enabled: false
98
-
99
- # Offense count: 1
100
- # Cop supports --auto-correct.
101
- # Configuration parameters: EnforcedStyle, SupportedStyles.
102
- SpaceBeforeBlockBraces:
103
- Enabled: false
104
-
105
- # Offense count: 3
106
- # Cop supports --auto-correct.
107
- # Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
108
- SpaceInsideBlockBraces:
109
- Enabled: false
110
-
111
- # Offense count: 15
112
- # Cop supports --auto-correct.
113
- # Configuration parameters: EnforcedStyle, SupportedStyles.
114
- StringLiterals:
115
- Enabled: false
116
-
117
- # Offense count: 1
118
- UselessAssignment:
119
- Enabled: false
data/rubocop.yml DELETED
@@ -1,27 +0,0 @@
1
- # This configuration was generated by `rubocop --auto-gen-config`
2
- # on 2014-04-21 12:09:58 +0700 using RuboCop version 0.20.1.
3
- # The point is for the user to remove these configuration records
4
- # one by one as the offenses are removed from the code base.
5
- # Note that changes in the inspected code, or installation of new
6
- # versions of RuboCop, may require this file to be generated again.
7
-
8
- # Offense count: 2
9
- CyclomaticComplexity:
10
- Max: 10
11
-
12
- # Offense count: 14
13
- Documentation:
14
- Enabled: false
15
-
16
- # Offense count: 17
17
- LineLength:
18
- Max: 122
19
-
20
- # Offense count: 4
21
- # Configuration parameters: CountComments.
22
- MethodLength:
23
- Max: 50
24
-
25
- # Offense count: 1
26
- MultilineBlockChain:
27
- Enabled: false
data/test/rsyncme/1.file DELETED
File without changes
data/test/rsyncme/10.file DELETED
File without changes
data/test/rsyncme/2.file DELETED
File without changes
data/test/rsyncme/3.file DELETED
File without changes
data/test/rsyncme/4.file DELETED
File without changes
data/test/rsyncme/5.file DELETED
File without changes
data/test/rsyncme/6.file DELETED
File without changes
data/test/rsyncme/7.file DELETED
File without changes
data/test/rsyncme/8.file DELETED
File without changes
data/test/rsyncme/9.file DELETED
File without changes
data/to_github.sh DELETED
@@ -1,4 +0,0 @@
1
- #!/bin/bash
2
-
3
- git config user.name 'eucher'
4
- git config user.email 'cyber@sibnet.ru'
data/to_gitlab.sh DELETED
@@ -1,4 +0,0 @@
1
- #!/bin/bash
2
-
3
- git config user.name 'Cherdancev Evgeni'
4
- git config user.email 'joe@netpost.ru'