David Lutterkort
2008-Aug-14 23:36 UTC
[Ovirt-devel] [PATCH 0/6] OVirt API for hosts and hardware/storage pools
This is a revamp of the API I posted previously. The most important change is that the REST specific controllers have been folded into the existing controllers, so that the WUI and the API share the same business logic, and in particular perform the same permission checks. Once Steve's patches to allow HTTP authentication have been committed, the API can be accessed through the URL http://USER:PASSWORD at SERVER/ovirt. Until then, you either have to hack the config of your OVirt server to allow unauthenticated access and assume that's user 'ovirtadmin', or direct API requests directly at the Mongrel port at SERVER:3000 Patch 6/6 contains a little supporting client code and the example script examples/script.rb that shows what you can do with the API (and how) [1] https://www.redhat.com/archives/ovirt-devel/2008-August/msg00045.html
David Lutterkort
2008-Aug-14 23:36 UTC
[Ovirt-devel] [PATCH 1/6] Select a host in the grid using GET instead of POST
The url_for call must set 'id' to nil to keep the controller from appending the ID of the current hardware pool, since we want a URL of the form /hosts/show/ID where ID is dynamically determined in JavaScript. Signed-off-by: David Lutterkort <dlutter at redhat.com> wui/src/app/views/hardware/show_hosts.rhtml | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) -- 1.5.5.1
- List hosts and filter the list by state, arch, hostname, uuid and hardware_pool_id - Retrieve an individual host The routing maps this to /ovirt/hosts and /ovirt/hosts/#{id} Signed-off-by: David Lutterkort <dlutter at redhat.com> wui/src/app/controllers/host_controller.rb | 28 ++++++++++++++++++++++++---- wui/src/config/routes.rb | 7 +++++++ 2 files changed, 31 insertions(+), 4 deletions(-) -- 1.5.5.1
- List and filter storage pools by ipaddr, path, target and hardware_pool_id - Show an individual storage pool - Create a new storage pool - Destroy a storage pool Signed-off-by: David Lutterkort <dlutter at redhat.com> wui/src/app/controllers/storage_controller.rb | 64 ++++++++++++++++++++---- wui/src/config/routes.rb | 1 + 2 files changed, 54 insertions(+), 11 deletions(-) -- 1.5.5.1
David Lutterkort
2008-Aug-14 23:36 UTC
[Ovirt-devel] [PATCH 4/6] hardware_pool: search by path
Signed-off-by: David Lutterkort <dlutter at redhat.com> wui/src/app/models/hardware_pool.rb | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) -- 1.5.5.1
- List and filter HW pools by name - CRUD of individual HW pool - Hosts and storage pools for a HW pool are accessible as nested resources, e.g. /ovirt/hardware_pools/1/hosts?hostname=myhost.example.com Signed-off-by: David Lutterkort <dlutter at redhat.com> wui/src/app/controllers/hardware_controller.rb | 145 ++++++++++++++++++++---- wui/src/config/routes.rb | 4 + 2 files changed, 128 insertions(+), 21 deletions(-) -- 1.5.5.1
David Lutterkort
2008-Aug-14 23:36 UTC
[Ovirt-devel] [PATCH 6/6] Sample client code that shows how to use the API
Signed-off-by: David Lutterkort <dlutter at redhat.com> wui/client/README | 14 ++++++ wui/client/examples/script.rb | 99 +++++++++++++++++++++++++++++++++++++++++ wui/client/lib/ovirt.rb | 63 ++++++++++++++++++++++++++ 3 files changed, 176 insertions(+), 0 deletions(-) -- 1.5.5.1
David Lutterkort
2008-Aug-14 23:38 UTC
[Ovirt-devel] [PATCH 0/6] OVirt API for hosts and hardware/storage pools
On Thu, 2008-08-14 at 16:36 -0700, David Lutterkort wrote:> This is a revamp of the API I posted previously.Crud .. somehow git-format-patch didn't include the actual patches. Will resend in a minute. David