omf_rc 6.1.8 → 6.1.9.pre.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -96,7 +96,7 @@ module OmfRc::ResourceProxy::Application
96
96
  property :force_tarball_install, :default => false
97
97
  property :pkg_ubuntu, :default => nil
98
98
  property :pkg_fedora, :default => nil
99
- property :state, :default => :stopped
99
+ property :state, :default => :created
100
100
  property :installed, :default => false
101
101
  property :map_err_to_out, :default => false
102
102
  property :event_sequence, :default => 0
@@ -125,10 +125,10 @@ module OmfRc::ResourceProxy::Application
125
125
  # if state was set to running or installing from the create we need
126
126
  # to make sure that this happens!
127
127
  if res.property.state.to_s.downcase.to_sym == :running
128
- res.property.state = :stopped
128
+ res.property.state = :created
129
129
  res.switch_to_running
130
130
  elsif res.property.state.to_s.downcase.to_sym == :installing
131
- res.property.state = :stopped
131
+ res.property.state = :created
132
132
  res.switch_to_installing
133
133
  end
134
134
  end
@@ -251,7 +251,8 @@ module OmfRc::ResourceProxy::Application
251
251
  # Configure the state of this Application RP. The valid states are
252
252
  # stopped, running, paused, installing. The semantic of each states are:
253
253
  #
254
- # - stopped: the initial state for an Application RP
254
+ # - created: the initial state for an Application RP
255
+ # - stopped: when an Application RP was running, and requested to stop
255
256
  # - running: upon entering in this state, a new instance of the application is
256
257
  # started, the Application RP stays in this state until the
257
258
  # application instance is finished or paused. The Application RP can
@@ -265,8 +266,8 @@ module OmfRc::ResourceProxy::Application
265
266
  # - installing: upon entering in this state, a new installation of the
266
267
  # application will be performed by the Application RP, which will
267
268
  # stay in this state until the installation is done. The
268
- # Application RP can only enter this state from a previous stopped
269
- # state. Furthermore it can only exit this state to enter the stopped state
269
+ # Application RP can only enter this state from a previous created
270
+ # state. Furthermore it can only exit this state to enter the created state
270
271
  # only when the installatio is done. Supported install methods are: Tarball,
271
272
  # Ubuntu, and Fedora
272
273
  #
@@ -296,7 +297,7 @@ module OmfRc::ResourceProxy::Application
296
297
  # @!macro work
297
298
  # @!method switch_to_installing
298
299
  work('switch_to_installing') do |res|
299
- if res.property.state.to_sym == :stopped
300
+ if res.property.state.to_sym == :created
300
301
  if res.property.installed
301
302
  res.log_inform_warn "The application is already installed"
302
303
  else
@@ -312,11 +313,11 @@ module OmfRc::ResourceProxy::Application
312
313
  elsif res.property.platform == :fedora
313
314
  installing = res.install_fedora(res.property.pkg_fedora)
314
315
  end
315
- res.property.state = :stopped unless installing
316
+ res.property.state = :created unless installing
316
317
  end
317
318
  else
318
- # cannot install as we are not stopped
319
- res.log_inform_warn "Not in stopped state. Cannot switch to installing state!"
319
+ # cannot install as we have not just been created
320
+ res.log_inform_warn "Not in created state. Cannot switch to installing state!"
320
321
  end
321
322
  end
322
323
 
@@ -356,7 +357,7 @@ module OmfRc::ResourceProxy::Application
356
357
  # @!macro work
357
358
  # @!method switch_to_running
358
359
  work('switch_to_running') do |res|
359
- if res.property.state == :stopped
360
+ if res.property.state == :created || res.property.state == :stopped
360
361
  # start a new instance of this app
361
362
  res.property.app_id = res.hrn.nil? ? res.uid : res.hrn
362
363
  # we need at least a defined binary path to run an app...
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omf_rc
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.1.8
5
- prerelease:
4
+ version: 6.1.9.pre.2
5
+ prerelease: 6
6
6
  platform: ruby
7
7
  authors:
8
8
  - NICTA
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-09-10 00:00:00.000000000 Z
12
+ date: 2014-10-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: minitest
@@ -82,7 +82,7 @@ dependencies:
82
82
  requirements:
83
83
  - - '='
84
84
  - !ruby/object:Gem::Version
85
- version: 6.1.8
85
+ version: 6.1.9.pre.2
86
86
  type: :runtime
87
87
  prerelease: false
88
88
  version_requirements: !ruby/object:Gem::Requirement
@@ -90,7 +90,7 @@ dependencies:
90
90
  requirements:
91
91
  - - '='
92
92
  - !ruby/object:Gem::Version
93
- version: 6.1.8
93
+ version: 6.1.9.pre.2
94
94
  - !ruby/object:Gem::Dependency
95
95
  name: cocaine
96
96
  requirement: !ruby/object:Gem::Requirement
@@ -225,12 +225,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
225
225
  required_rubygems_version: !ruby/object:Gem::Requirement
226
226
  none: false
227
227
  requirements:
228
- - - ! '>='
228
+ - - ! '>'
229
229
  - !ruby/object:Gem::Version
230
- version: '0'
231
- segments:
232
- - 0
233
- hash: 4383836319419922406
230
+ version: 1.3.1
234
231
  requirements: []
235
232
  rubyforge_project: omf_rc
236
233
  rubygems_version: 1.8.23