[libgovirt] Add ovirt_cdrom_add_rest_params()
- From: Christophe Fergeau <teuf src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgovirt] Add ovirt_cdrom_add_rest_params()
- Date: Thu, 26 Jun 2014 23:22:30 +0000 (UTC)
commit a541d006b92b1f52f216d338ec88b5f9a4a8cf32
Author: Christophe Fergeau <cfergeau redhat com>
Date: Thu May 22 17:31:27 2014 +0200
Add ovirt_cdrom_add_rest_params()
At the moment this unconditionnally set ;current on the
OvirtResourceRestCalls made on an OvirtCdrom resource. Ideally
the library user would be able to choose whether to manage the current
or boot-time cdrom image. When this is possible, ovirt_cdrom_update()
will be obsolete and can be replaced by the generic
ovirt_resource_update().
govirt/ovirt-cdrom.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/govirt/ovirt-cdrom.c b/govirt/ovirt-cdrom.c
index ff46ff6..020159c 100644
--- a/govirt/ovirt-cdrom.c
+++ b/govirt/ovirt-cdrom.c
@@ -21,7 +21,9 @@
*/
#include <config.h>
+#define GOVIRT_UNSTABLE_API_ABI
#include "ovirt-cdrom.h"
+#undef GOVIRT_UNSTABLE_API_ABI
#include "ovirt-proxy.h"
#include "ovirt-proxy-private.h"
#include "ovirt-resource-private.h"
@@ -43,6 +45,9 @@ enum {
};
+static void ovirt_cdrom_add_rest_params(G_GNUC_UNUSED OvirtResource *resource,
+ RestProxyCall *call);
+
static void ovirt_cdrom_get_property(GObject *object,
guint prop_id,
GValue *value,
@@ -166,6 +171,7 @@ static void ovirt_cdrom_class_init(OvirtCdromClass *klass)
resource_class->init_from_xml = ovirt_cdrom_init_from_xml;
resource_class->to_xml = ovirt_cdrom_to_xml;
+ resource_class->add_rest_params = ovirt_cdrom_add_rest_params;
object_class->finalize = ovirt_cdrom_finalize;
object_class->get_property = ovirt_cdrom_get_property;
object_class->set_property = ovirt_cdrom_set_property;
@@ -258,3 +264,10 @@ gboolean ovirt_cdrom_update_finish(OvirtCdrom *cdrom,
return ovirt_rest_call_finish(result, err);
}
+
+
+static void ovirt_cdrom_add_rest_params(G_GNUC_UNUSED OvirtResource *resource,
+ RestProxyCall *call)
+{
+ rest_proxy_call_add_param(REST_PROXY_CALL(call), "current", NULL);
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]