Merge lp:~terceiro/lava-scheduler-tool/absorbed-by-lava-tool into lp:lava-scheduler-tool

Proposed by Antonio Terceiro
Status: Merged
Approved by: Senthil Kumaran S
Approved revision: 23
Merged at revision: 22
Proposed branch: lp:~terceiro/lava-scheduler-tool/absorbed-by-lava-tool
Merge into: lp:lava-scheduler-tool
Diff against target: 206 lines (+3/-169)
3 files modified
lava_scheduler_tool/__init__.py (+0/-19)
lava_scheduler_tool/commands.py (+0/-134)
setup.py (+3/-16)
To merge this branch: bzr merge lp:~terceiro/lava-scheduler-tool/absorbed-by-lava-tool
Reviewer Review Type Date Requested Status
Senthil Kumaran S Approve
Review via email: mp+160192@code.launchpad.net

Description of the change

To post a comment you must log in.
Revision history for this message
Senthil Kumaran S (stylesen) wrote :

It looks good. But I would like to understand, just for this deprecated notice (in setup.py) will this project exist forever in future? IMHO, I like to see all the deprecated notice as part of lava-tool project, that way we can get rid of these projects totally and avoid confusion in future.

review: Needs Information
Revision history for this message
Antonio Terceiro (terceiro) wrote :

On Tue, Apr 23, 2013 at 04:07:28AM -0000, Senthil Kumaran S wrote:
> Review: Needs Information
>
> It looks good. But I would like to understand, just for this
> deprecated notice (in setup.py) will this project exist forever in
> future?

My idea is that we should remove the projects.

> IMHO, I like to see all the deprecated notice as part of lava-tool
> project, that way we can get rid of these projects totally and avoid
> confusion in future.

I'm not sure what you mean here. lava-{dashboard,scheduler}-tool as
standalone packages are being deprecated, and we just have to make a
last release with they empty and depending on lava-tool >= 0.7 to
provide a clean upgrade path for users who want to upgrade.

--
Antonio Terceiro
Software Engineer - Linaro
http://www.linaro.org

Revision history for this message
Senthil Kumaran S (stylesen) wrote :

Hi Antonio,

On Friday 26 April 2013 04:28 AM, Antonio Terceiro wrote:
> I'm not sure what you mean here. lava-{dashboard,scheduler}-tool as
> standalone packages are being deprecated, and we just have to make a
> last release with they empty and depending on lava-tool >= 0.7 to
> provide a clean upgrade path for users who want to upgrade.

Now understand the plan better. I like this idea.

Thank You.
--
Senthil Kumaran
http://www.stylesen.org/
http://www.sasenthilkumaran.com/

Revision history for this message
Senthil Kumaran S (stylesen) wrote :

+1 for this change.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== removed directory 'lava_scheduler_tool'
2=== removed file 'lava_scheduler_tool/__init__.py'
3--- lava_scheduler_tool/__init__.py 2012-05-25 04:06:21 +0000
4+++ lava_scheduler_tool/__init__.py 1970-01-01 00:00:00 +0000
5@@ -1,19 +0,0 @@
6-# Copyright (C) 2010, 2011 Linaro Limited
7-#
8-# Author: Michael Hudson-Doyle <michael.hudson@linaro.org>
9-#
10-# This file is part of lava-scheduler-tool.
11-#
12-# lava-scheduler-tool is free software: you can redistribute it and/or modify
13-# it under the terms of the GNU Lesser General Public License version 3
14-# as published by the Free Software Foundation
15-#
16-# lava-scheduler-tool is distributed in the hope that it will be useful,
17-# but WITHOUT ANY WARRANTY; without even the implied warranty of
18-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19-# GNU General Public License for more details.
20-#
21-# You should have received a copy of the GNU Lesser General Public License
22-# along with lava-scheduler-tool. If not, see <http://www.gnu.org/licenses/>.
23-
24-__version__ = (0, 6, 0, "dev", 0)
25
26=== removed file 'lava_scheduler_tool/commands.py'
27--- lava_scheduler_tool/commands.py 2013-04-17 02:27:24 +0000
28+++ lava_scheduler_tool/commands.py 1970-01-01 00:00:00 +0000
29@@ -1,134 +0,0 @@
30-# Copyright (C) 2010, 2011 Linaro Limited
31-#
32-# Author: Michael Hudson-Doyle <michael.hudson@linaro.org>
33-#
34-# This file is part of lava-scheduler-tool.
35-#
36-# lava-scheduler-tool is free software: you can redistribute it and/or modify
37-# it under the terms of the GNU Lesser General Public License version 3
38-# as published by the Free Software Foundation
39-#
40-# lava-scheduler-tool is distributed in the hope that it will be useful,
41-# but WITHOUT ANY WARRANTY; without even the implied warranty of
42-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
43-# GNU General Public License for more details.
44-#
45-# You should have received a copy of the GNU Lesser General Public License
46-# along with lava-scheduler-tool. If not, see <http://www.gnu.org/licenses/>.
47-
48-import os
49-import sys
50-import argparse
51-import xmlrpclib
52-
53-from lava_tool.authtoken import AuthenticatingServerProxy, KeyringAuthBackend
54-from lava.tool.command import Command, CommandGroup
55-from lava.tool.errors import CommandError
56-from lava.tool.commands import ExperimentalCommandMixIn
57-
58-
59-class scheduler(CommandGroup):
60- """
61- Interact with LAVA Scheduler
62- """
63-
64- namespace = "lava.scheduler.commands"
65-
66-
67-class submit_job(ExperimentalCommandMixIn, Command):
68- """
69- Submit a job to lava-scheduler
70- """
71-
72- @classmethod
73- def register_arguments(cls, parser):
74- super(submit_job, cls).register_arguments(parser)
75- parser.add_argument("SERVER")
76- parser.add_argument("JSON_FILE")
77-
78- def invoke(self):
79- self.print_experimental_notice()
80- server = AuthenticatingServerProxy(
81- self.args.SERVER, auth_backend=KeyringAuthBackend())
82- with open(self.args.JSON_FILE, 'rb') as stream:
83- command_text = stream.read()
84- try:
85- job_id = server.scheduler.submit_job(command_text)
86- except xmlrpclib.Fault, e:
87- raise CommandError(str(e))
88- else:
89- print "submitted as job id:", job_id
90-
91-
92-class resubmit_job(ExperimentalCommandMixIn, Command):
93-
94- @classmethod
95- def register_arguments(self, parser):
96- parser.add_argument("SERVER")
97- parser.add_argument("JOB_ID", type=int)
98-
99- def invoke(self):
100- self.print_experimental_notice()
101- server = AuthenticatingServerProxy(
102- self.args.SERVER, auth_backend=KeyringAuthBackend())
103- try:
104- job_id = server.scheduler.resubmit_job(self.args.JOB_ID)
105- except xmlrpclib.Fault, e:
106- raise CommandError(str(e))
107- else:
108- print "resubmitted as job id:", job_id
109-
110-
111-class cancel_job(ExperimentalCommandMixIn, Command):
112-
113- @classmethod
114- def register_arguments(self, parser):
115- parser.add_argument("SERVER")
116- parser.add_argument("JOB_ID", type=int)
117-
118- def invoke(self):
119- self.print_experimental_notice()
120- server = AuthenticatingServerProxy(
121- self.args.SERVER, auth_backend=KeyringAuthBackend())
122- server.scheduler.cancel_job(self.args.JOB_ID)
123-
124-
125-class job_output(Command):
126- """
127- Get job output from the scheduler.
128- """
129-
130- @classmethod
131- def register_arguments(cls, parser):
132- super(job_output, cls).register_arguments(parser)
133- parser.add_argument("SERVER")
134- parser.add_argument("JOB_ID",
135- type=int,
136- help="Job ID to download output file")
137- parser.add_argument("--overwrite",
138- action="store_true",
139- help="Overwrite files on the local disk")
140- parser.add_argument("--output", "-o",
141- type=argparse.FileType("wb"),
142- default=None,
143- help="Alternate name of the output file")
144-
145- def invoke(self):
146- if self.args.output is None:
147- filename = str(self.args.JOB_ID) + '_output.txt'
148- if os.path.exists(filename) and not self.args.overwrite:
149- print >> sys.stderr, "File {filename!r} already exists".format(
150- filename=filename)
151- print >> sys.stderr, "You may pass --overwrite to write over it"
152- return -1
153- stream = open(filename, "wb")
154- else:
155- stream = self.args.output
156- filename = self.args.output.name
157-
158- server = AuthenticatingServerProxy(
159- self.args.SERVER, auth_backend=KeyringAuthBackend())
160- stream.write(server.scheduler.job_output(self.args.JOB_ID).data)
161-
162- print "Downloaded job output of {0} to file {1!r}".format(
163- self.args.JOB_ID, filename)
164
165=== modified file 'setup.py'
166--- setup.py 2013-04-17 02:27:24 +0000
167+++ setup.py 2013-04-22 19:30:36 +0000
168@@ -23,27 +23,14 @@
169
170 setup(
171 name = 'lava-scheduler-tool',
172- version = ":versiontools:lava_scheduler_tool:__version__",
173+ version = '0.6',
174 author = "Linaro Validation Team",
175 author_email = "linaro-dev@lists.linaro.org",
176 packages = find_packages(),
177- description = "Command line utility for the LAVA scheduler",
178+ description = "Command line utility for the LAVA scheduler (deprecated)",
179 url='https://launchpad.net/lava-scheduler-tool',
180 # test_suite='lava_scheduler_tool.tests.test_suite',
181 license="LGPLv3",
182- entry_points = """
183- [lava.commands]
184- scheduler = lava_scheduler_tool.commands:scheduler
185- [lava.scheduler.commands]
186- submit-job = lava_scheduler_tool.commands:submit_job
187- resubmit-job = lava_scheduler_tool.commands:resubmit_job
188- cancel-job = lava_scheduler_tool.commands:cancel_job
189- job-output = lava_scheduler_tool.commands:job_output
190- [lava_tool.commands]
191- submit-job = lava_scheduler_tool.commands:submit_job
192- resubmit-job = lava_scheduler_tool.commands:resubmit_job
193- cancel-job = lava_scheduler_tool.commands:cancel_job
194- """,
195 classifiers=[
196 "Development Status :: 3 - Alpha",
197 "Intended Audience :: Developers",
198@@ -53,7 +40,7 @@
199 "Programming Language :: Python :: 2.7",
200 "Topic :: Software Development :: Testing",
201 ],
202- install_requires=['lava-tool [auth] >= 0.4'],
203+ install_requires=['lava-tool >= 0.7.dev'],
204 setup_requires = ['versiontools >= 1.3.1'],
205 zip_safe = True,
206 )

Subscribers

People subscribed via source and target branches