@@ -185,7 +185,7 @@ def deploy_api(self, args):
185
185
bootstrap .extend (hostname .configure (node ))
186
186
bootstrap .append (ntp .install ())
187
187
if options .jenkins :
188
- bootstrap .append (jenkins ._download_war (
188
+ bootstrap .extend (jenkins ._download_war (
189
189
options .jenkins , "api" ))
190
190
bootstrap .extend (tomcat .install_and_configure (node ,
191
191
tomcat_config , self ._install_local_wars ))
@@ -221,6 +221,8 @@ def deploy_rs(self, args):
221
221
parser .add_option ('-s' , '--hypervisor-sessions' , type = "int" , default = 2 ,
222
222
help = 'Number of concurrent hypervisor sessions (default 2)' ,
223
223
action = 'store' , dest = 'hypervisorsessions' )
224
+ parser .add_option ('-l' , '--list' , help = 'Upload only those wars (default all rs)' ,
225
+ default = 'rs' , action = 'store' , dest = 'wars' )
224
226
(options , args ) = parser .parse_args (args )
225
227
226
228
if not options .jenkins or not options .nfs or not options .rabbit :
@@ -275,7 +277,7 @@ def deploy_rs(self, args):
275
277
"hypervisor-sessions" : options .hypervisorsessions
276
278
}
277
279
install_tomcat = tomcat .install_and_configure (node ,
278
- tomcat_config , self ._install_jenkins_rs (options .jenkins ))
280
+ tomcat_config , self ._install_jenkins_wars (options .jenkins , options . wars ))
279
281
bootstrap = hostname .configure (node ) + \
280
282
[ntp .install ()] + redis .install ("2.6.4" ) + install_tomcat
281
283
responses .append (compute .submitScriptOnNode (node .getId (),
@@ -321,11 +323,12 @@ def _install_local_wars(self):
321
323
"do unzip -d ${f%.war} $f; done" ))
322
324
return script
323
325
324
- def _install_jenkins_rs (self , version ):
325
- """ Downloads teh Remote Services wars from Jenkins """
326
+ def _install_jenkins_wars (self , version , wars = "rs" ):
327
+ """ Downloads the Remote Services wars from Jenkins """
326
328
def jenkins_download ():
327
329
script = []
328
- script .extend (jenkins .download_rs (version ))
330
+ for war in wars .split ("," ):
331
+ script .extend (jenkins ._download_war (version , war ))
329
332
script .extend (self ._install_local_wars ())
330
333
return script
331
334
return jenkins_download
@@ -336,7 +339,6 @@ def _print_node_errors(self, ex):
336
339
for error in ex .getNodeErrors ().values ():
337
340
print "Error %s" % error .getMessage ()
338
341
339
-
340
342
class NodeHasIp (Predicate ):
341
343
""" Implements a NodeMetadata predicate to find nodes by Ip """
342
344
def __init__ (self , ip ):
0 commit comments