diff options
author | Christophe Fergeau <cfergeau@redhat.com> | 2014-05-22 17:31:27 +0200 |
---|---|---|
committer | Christophe Fergeau <cfergeau@redhat.com> | 2014-06-02 17:54:55 +0200 |
commit | a541d006b92b1f52f216d338ec88b5f9a4a8cf32 (patch) | |
tree | a0d36b1e775c946fe2664cd9044e9f9f3e16f57b | |
parent | b0e2691136d357dfa45aa359f35dc90edca985c7 (diff) |
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().
-rw-r--r-- | 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); +} |