Mailinglist Archive: yast-devel (34 mails)

< Previous Next >
[yast-devel] New yast2-devtools skeleton for Yast webservice plugins
  • From: Ladislav Slezak <lslezak@xxxxxxx>
  • Date: Mon, 25 May 2009 17:46:23 +0200
  • Message-id: <4A1ABD4F.7020503@xxxxxxx>
Hi all,

I just have committed a new yast2-devtools skeleton for yast webservice plugins
Yast SVN repository. This is the first version, there might be bugs or we can
something later, but it should be usable as a good starting point.

This skeleton uses the Yast DBus service as a backend, you need
(SVN trunk version is recommended, I just have noticed that there is a small
unsubmitted fix).

Note: The Yast Web interface has two parts - the REST service (backend) and
(uses the backend and renders HTML pages), this skeleton is for the backend
Later I'll create skeleton also for the webclient plugins.

Quick start

- install the latest yast2-devtools from SVN trunk (yast2-core is recommended)

- go to the webservice plugins directory in the checked out GIT repository

- call 'y2tool create-new-package rest-plugin <plugin_name> <author> <email>',
e.g. 'y2tool create-new-package rest-plugin printers "Ladislav Slezak"

- (re)start the webservice - the new plugin will be available after restart

- Test the new REST API:
http://localhost:8080/<plugin_name>.xml will download list of all items,
http://localhost:8080/<plugin_name>/first.xml will download details of the
with ID 'first' (there are some testing data in the generated code, so you can
immediately check whether the created skeleton works)

Adapting the skeleton to your Yast module

- Prerequisite1: Your Yast module must have high level stateless API (e.g.
modules), if it doesn't exist yet you have to add it.
(Well, you can start with stateful API first, but you should definitely add
and use
the stateless API later, see
for details.)

- Prerequisite2: define .policy kit files for the needed functions in
(see PolicyKit doc:,
how to get the action ID for a specific Yast DBus service call: )

- Go through all generated files (the most important are in app/controllers and
app/models subdirectory) and adapt/fix the code marked by FIXME string.
Replace also the testing data with appropriate Yast calls.

Any feedback is welcomed!


Best Regards

Ladislav Slez√°k
Yast Developer
SUSE LINUX, s.r.o. e-mail: lslezak@xxxxxxx
Lihovarsk√° 1060/12 tel: +420 284 028 960
190 00 Prague 9 fax: +420 284 028 951
Czech Republic
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-devel+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages