[prev in list] [next in list] [prev in thread] [next in thread] 

List:       spacewalk-devel
Subject:    [Spacewalk-devel] (no subject)
From:       msuchy () redhat ! com (=?UTF-8?B?TWlyb3NsYXYgU3VjaMO9?=)
Date:       2009-12-08 14:58:55
Message-ID: 4B1E69AF.3080600 () redhat ! com
[Download RAW message or body]

sadas sadas wrote:
>    Hi,

First of all, it is better if you write subject next time.

>      I want to write a php script that start/stop centos servers 
> connected to Spacewalk server. Where in oracle database php script can 
> edit  so when I use my php to start/stop centos server and spacewalk to 
> execute my command and to stop/start the server?

You do not want to use db directly. You really do not want it.
It is much better to use API instead.
Documentation of API is on:
https://url.of.your.spacewalk/rhn/apidoc/
You may want to use API call
  system.scheduleScriptRun
and call it with script
#!/bin/sh
/usr/bin/halt

Dunno how do you want to start it. WakeOnLan?

But if you are talking about guest. There is already API for that:
  system.scheduleGuestAction
it can: 'start', 'suspend', 'resume', 'restart', 'shutdown' virtual systems.

If this API call does not suite your needs, it is much better instead 
custom PHP scripting, create new API call in java and contribute it back 
to Spacewalk project so others can benefit from your work too. PHP 
script will use only few people (if any).

-- 
Miroslav Suchy
Red Hat Satellite Engineering



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic