Roy Golan has uploaded a new change for review.

Change subject: packaging: add a function to get vdc_option with all versions
......................................................................

packaging: add a function to get vdc_option with all versions

Change-Id: I3b7e717a77eb98ddd67d765128125e824475164b
Signed-off-by: Roy Golan <[email protected]>
---
M packaging/setup/ovirt_engine_setup/database.py
1 file changed, 25 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/87/24887/1

diff --git a/packaging/setup/ovirt_engine_setup/database.py 
b/packaging/setup/ovirt_engine_setup/database.py
index 9be3c58..7811359 100644
--- a/packaging/setup/ovirt_engine_setup/database.py
+++ b/packaging/setup/ovirt_engine_setup/database.py
@@ -223,6 +223,31 @@
 
         return value
 
+    def getVdcOptionWithAllVersions(
+        self,
+        name,
+        ownConnection=False,
+    ):
+        result = self.execute(
+            statement="""
+                select option_value, version
+                from vdc_options
+                where option_name = %(name)s
+            """,
+            args=dict(
+                name=name,
+            ),
+            ownConnection=ownConnection,
+        )
+        if len(result) == 0:
+            raise RuntimeError(
+                _('Cannot locate application option {name}').format(
+                    name=name,
+                )
+            )
+
+        return result
+
     def updateVdcOptions(
         self,
         options,


-- 
To view, visit http://gerrit.ovirt.org/24887
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3b7e717a77eb98ddd67d765128125e824475164b
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Roy Golan <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to