>From 6666cca40efcf54711ed76ac1b1eb176ec62b271 Mon Sep 17 00:00:00 2001
From: Jan Lieskovsky <jlieskov@redhat.com>
Date: Thu, 3 Jul 2014 11:21:39 +0200
Subject: [PATCH 1/2] [*/transforms/idtranslate.py] Allow shorthand format to
 contain <ind:variable_object> definition

Signed-off-by: Jan Lieskovsky <jlieskov@redhat.com>
---
 Fedora/transforms/idtranslate.py    | 3 +++
 OpenStack/transforms/idtranslate.py | 3 +++
 RHEL/6/transforms/idtranslate.py    | 3 +++
 RHEL/7/transforms/idtranslate.py    | 3 +++
 RHEVM3/transforms/idtranslate.py    | 3 +++
 5 files changed, 15 insertions(+)

diff --git a/Fedora/transforms/idtranslate.py b/Fedora/transforms/idtranslate.py
index 77f078a..67c1cf4 100755
--- a/Fedora/transforms/idtranslate.py
+++ b/Fedora/transforms/idtranslate.py
@@ -123,6 +123,9 @@ class idtranslator:
 			if element.tag == "{" + oval_ns + "}filter":
 				element.text = self.assign_id("{" + oval_ns + "}state", element.text)
 				continue
+			if element.tag == "{" + oval_ns + "#independent}var_ref":
+				element.text = self.assign_id("{" + oval_ns + "}variable", element.text)
+				continue
 			for attr in element.keys():
 				if attr in ovalrefattr_to_tag.keys():
 					element.set(attr,self.assign_id( "{" + oval_ns + "}" + ovalrefattr_to_tag[attr], element.get(attr)))
diff --git a/OpenStack/transforms/idtranslate.py b/OpenStack/transforms/idtranslate.py
index 77f078a..67c1cf4 100755
--- a/OpenStack/transforms/idtranslate.py
+++ b/OpenStack/transforms/idtranslate.py
@@ -123,6 +123,9 @@ class idtranslator:
 			if element.tag == "{" + oval_ns + "}filter":
 				element.text = self.assign_id("{" + oval_ns + "}state", element.text)
 				continue
+			if element.tag == "{" + oval_ns + "#independent}var_ref":
+				element.text = self.assign_id("{" + oval_ns + "}variable", element.text)
+				continue
 			for attr in element.keys():
 				if attr in ovalrefattr_to_tag.keys():
 					element.set(attr,self.assign_id( "{" + oval_ns + "}" + ovalrefattr_to_tag[attr], element.get(attr)))
diff --git a/RHEL/6/transforms/idtranslate.py b/RHEL/6/transforms/idtranslate.py
index 77f078a..67c1cf4 100755
--- a/RHEL/6/transforms/idtranslate.py
+++ b/RHEL/6/transforms/idtranslate.py
@@ -123,6 +123,9 @@ class idtranslator:
 			if element.tag == "{" + oval_ns + "}filter":
 				element.text = self.assign_id("{" + oval_ns + "}state", element.text)
 				continue
+			if element.tag == "{" + oval_ns + "#independent}var_ref":
+				element.text = self.assign_id("{" + oval_ns + "}variable", element.text)
+				continue
 			for attr in element.keys():
 				if attr in ovalrefattr_to_tag.keys():
 					element.set(attr,self.assign_id( "{" + oval_ns + "}" + ovalrefattr_to_tag[attr], element.get(attr)))
diff --git a/RHEL/7/transforms/idtranslate.py b/RHEL/7/transforms/idtranslate.py
index 77f078a..67c1cf4 100755
--- a/RHEL/7/transforms/idtranslate.py
+++ b/RHEL/7/transforms/idtranslate.py
@@ -123,6 +123,9 @@ class idtranslator:
 			if element.tag == "{" + oval_ns + "}filter":
 				element.text = self.assign_id("{" + oval_ns + "}state", element.text)
 				continue
+			if element.tag == "{" + oval_ns + "#independent}var_ref":
+				element.text = self.assign_id("{" + oval_ns + "}variable", element.text)
+				continue
 			for attr in element.keys():
 				if attr in ovalrefattr_to_tag.keys():
 					element.set(attr,self.assign_id( "{" + oval_ns + "}" + ovalrefattr_to_tag[attr], element.get(attr)))
diff --git a/RHEVM3/transforms/idtranslate.py b/RHEVM3/transforms/idtranslate.py
index 77f078a..67c1cf4 100755
--- a/RHEVM3/transforms/idtranslate.py
+++ b/RHEVM3/transforms/idtranslate.py
@@ -123,6 +123,9 @@ class idtranslator:
 			if element.tag == "{" + oval_ns + "}filter":
 				element.text = self.assign_id("{" + oval_ns + "}state", element.text)
 				continue
+			if element.tag == "{" + oval_ns + "#independent}var_ref":
+				element.text = self.assign_id("{" + oval_ns + "}variable", element.text)
+				continue
 			for attr in element.keys():
 				if attr in ovalrefattr_to_tag.keys():
 					element.set(attr,self.assign_id( "{" + oval_ns + "}" + ovalrefattr_to_tag[attr], element.get(attr)))
-- 
1.8.3.1

