e3ffab
From 83e12a6e7266ab1324f259eaed809f8db1118d7a Mon Sep 17 00:00:00 2001
e3ffab
From: Petr Vobornik <pvoborni@redhat.com>
e3ffab
Date: Wed, 15 Oct 2014 13:42:30 +0200
e3ffab
Subject: [PATCH] idrange: include raw range type in output
e3ffab
e3ffab
iparangetype output is a localized human-readable value which is not suitable for machine-based API consumers
e3ffab
e3ffab
Solved by new iparangetyperaw output attribute which contains iparangetype's raw value
e3ffab
e3ffab
Reviewed-By: Tomas Babej <tbabej@redhat.com>
e3ffab
---
e3ffab
 ipalib/plugins/idrange.py | 1 +
e3ffab
 1 file changed, 1 insertion(+)
e3ffab
e3ffab
diff --git a/ipalib/plugins/idrange.py b/ipalib/plugins/idrange.py
e3ffab
index 6c3be6e69595127e346969e41703dc98e783282e..fb198d79d4c14ffd5f7dc633c9f01a1465ff01d7 100644
e3ffab
--- a/ipalib/plugins/idrange.py
e3ffab
+++ b/ipalib/plugins/idrange.py
e3ffab
@@ -241,6 +241,7 @@ class idrange(LDAPObject):
e3ffab
         if not any((options.get('pkey_only', False),
e3ffab
                     options.get('raw', False))):
e3ffab
             range_type = entry_attrs['iparangetype'][0]
e3ffab
+            entry_attrs['iparangetyperaw'] = [range_type]
e3ffab
             entry_attrs['iparangetype'] = [self.range_types.get(range_type, None)]
e3ffab
 
e3ffab
         # Remove the objectclass
e3ffab
-- 
e3ffab
2.1.0
e3ffab