[opensuse-buildservice] How to extend osc locally (or: issuing arbitrary requests to the api)
Hi, I recently announced this little change:
The following change gives you the opportunity to implement new subcommands (or change existing commands) without touching the osc package (if there is interest in this, I can write a howto):
- load subcommands from /var/lib/osc-plugins/ or ~/.osc-plugins/
Since I just implemented a new command, which I figured could be handy, I am posting this as an example. You can use it after copying the attached file to ~/.osc-plugins. It allows to issue "raw" HTTP requests to the api by specifying the URL and possible data or file to send, like: osc req /source/home:poeml or osc req -m PUT -f /etc/fstab source/home:poeml/test5/myfstab Thus, it can be used in a curl-like fashion, with authentification handled by osc. Peter -- "WARNING: This bug is visible to non-employees. Please be respectful!" SUSE LINUX Products GmbH Research & Development
On Thu, Jul 19, 2007 at 12:32:47PM +0200, Dr. Peter Poeml wrote:
Since I just implemented a new command, which I figured could be handy, I am posting this as an example.
You can use it after copying the attached file to ~/.osc-plugins.
It allows to issue "raw" HTTP requests to the api by specifying the URL and possible data or file to send, like:
osc req /source/home:poeml or osc req -m PUT -f /etc/fstab source/home:poeml/test5/myfstab
Thus, it can be used in a curl-like fashion, with authentification handled by osc.
FYI, the newest osc package release incorporates this command. Peter -- "WARNING: This bug is visible to non-employees. Please be respectful!" SUSE LINUX Products GmbH Research & Development
participants (1)
-
Dr. Peter Poeml