fog-ovirt 1.0.0 → 1.0.1

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: 6146d4fb921308e0f84cd983e1c0388cb81a8be5
4
- data.tar.gz: 3b59c220c23dadfb77f63aaee4a6106ef169d064
3
+ metadata.gz: db39545b28114f4585da4d3a292c3657df5091df
4
+ data.tar.gz: 89cb59e5f67129a8e78401b018086aac8c986b04
5
5
  SHA512:
6
- metadata.gz: 75bbc67488aac1503eae3ece69b447d8d09fdffa5af68bdb7ac9c5b5a4dba491e42ec1f8012c883b30964c5b50ac471adadcee280584786b7dcf44ebc2e72075
7
- data.tar.gz: 38f7d09671007b163e23fd6ccf5e0d7dead675723ed1e24ada44193eb8e56427e7a68a919400544a5a9ef2e40e9cd8466baa5d36ad9979061684e1cca869494b
6
+ metadata.gz: 43655aca8237ef76dd2d861bcc8ae400382e283012be06509bb0e13f6449aec980c57a8111da46319d7e67e455b08064b01b5fd64153556834bc4061dc5ae38e
7
+ data.tar.gz: 1aa88959254782218a7c1f9dafe5383d2d60f8772f653fdbaa6f7fc73111ce33117942108b0d81c8e54841362a30e8199bbf1668c6e88841bdece60bf183e494
data/.rubocop_todo.yml CHANGED
@@ -9,7 +9,7 @@
9
9
  # Offense count: 1
10
10
  # Configuration parameters: CountComments.
11
11
  Metrics/ClassLength:
12
- Max: 146
12
+ Max: 150
13
13
 
14
14
  # Offense count: 2
15
15
  # Configuration parameters: CountComments.
@@ -117,8 +117,7 @@ module Fog
117
117
 
118
118
  def start(options = {})
119
119
  wait_for { !locked? } if options[:blocking]
120
- service.vm_action(:id => id, :action => :start)
121
- reload
120
+ vm_power_action(:start)
122
121
  end
123
122
 
124
123
  # rubocop:disable Metrics/AbcSize
@@ -129,14 +128,14 @@ module Fog
129
128
  else
130
129
  Hash[YAML.safe_load(options[:user_data]).map { |a| [a.first.to_sym, a.last] }]
131
130
  end
132
- service.vm_start_with_cloudinit(:id => id, :user_data => user_data)
131
+ action_status = service.vm_start_with_cloudinit(:id => id, :user_data => user_data)
133
132
  reload
133
+ action_status
134
134
  end
135
135
  # rubocop:enable Metrics/AbcSize
136
136
 
137
137
  def stop(_options = {})
138
- service.vm_action(:id => id, :action => :stop)
139
- reload
138
+ vm_power_action(:stop)
140
139
  end
141
140
 
142
141
  def reboot(options = {})
@@ -148,8 +147,13 @@ module Fog
148
147
  end
149
148
 
150
149
  def suspend(_options = {})
151
- service.vm_action(:id => id, :action => :suspend)
150
+ vm_power_action(:suspend)
151
+ end
152
+
153
+ def vm_power_action(action)
154
+ action_status = service.vm_action(:id => id, :action => action)
152
155
  reload
156
+ action_status
153
157
  end
154
158
 
155
159
  def destroy(_options = {})
@@ -1,5 +1,5 @@
1
1
  module Fog
2
2
  module Ovirt
3
- VERSION = "1.0.0".freeze
3
+ VERSION = "1.0.1".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fog-ovirt
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ori Rabin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-20 00:00:00.000000000 Z
11
+ date: 2018-03-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fog-core