From e1490f60dcb43030b4b43627835ef4c1bc12212a Mon Sep 17 00:00:00 2001 From: Amos Benari Date: Sun, 24 Feb 2013 14:25:12 +0200 Subject: [PATCH] [ovirt] Add support for reading the oVirt api version. --- lib/fog/ovirt/compute.rb | 1 + .../ovirt/requests/compute/get_api_version.rb | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 lib/fog/ovirt/requests/compute/get_api_version.rb diff --git a/lib/fog/ovirt/compute.rb b/lib/fog/ovirt/compute.rb index 10a5322ab..8defc0207 100644 --- a/lib/fog/ovirt/compute.rb +++ b/lib/fog/ovirt/compute.rb @@ -42,6 +42,7 @@ module Fog request :list_template_volumes request :add_volume request :destroy_volume + request :get_api_version module Shared # converts an OVIRT object into an hash for fog to consume. diff --git a/lib/fog/ovirt/requests/compute/get_api_version.rb b/lib/fog/ovirt/requests/compute/get_api_version.rb new file mode 100644 index 000000000..3a4799bd1 --- /dev/null +++ b/lib/fog/ovirt/requests/compute/get_api_version.rb @@ -0,0 +1,16 @@ +module Fog + module Compute + class Ovirt + class Real + def api_version + client.api_version + end + end + class Mock + def api_version + "3.1" + end + end + end + end +end \ No newline at end of file