You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sm...@apache.org on 2015/05/31 18:07:20 UTC

ambari git commit: AMBARI-11553. Use lower case access types when updating ranger policies during plugin enablement (Gautam Borad via smohanty)

Repository: ambari
Updated Branches:
  refs/heads/trunk 74418fe9a -> c6e485c8e


AMBARI-11553. Use lower case access types when updating ranger policies during plugin enablement (Gautam Borad via smohanty)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c6e485c8
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c6e485c8
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c6e485c8

Branch: refs/heads/trunk
Commit: c6e485c8e113c9739fad08a6044fb839073a1051
Parents: 74418fe
Author: Sumit Mohanty <sm...@hortonworks.com>
Authored: Sun May 31 09:06:23 2015 -0700
Committer: Sumit Mohanty <sm...@hortonworks.com>
Committed: Sun May 31 09:06:23 2015 -0700

----------------------------------------------------------------------
 .../libraries/functions/ranger_functions.py       | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/c6e485c8/ambari-common/src/main/python/resource_management/libraries/functions/ranger_functions.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/ranger_functions.py b/ambari-common/src/main/python/resource_management/libraries/functions/ranger_functions.py
index 7ce33f5..54be2c4 100644
--- a/ambari-common/src/main/python/resource_management/libraries/functions/ranger_functions.py
+++ b/ambari-common/src/main/python/resource_management/libraries/functions/ranger_functions.py
@@ -238,21 +238,21 @@ class Rangeradmin:
 
     typeOfPolicy = typeOfPolicy.lower()
     if typeOfPolicy == "hdfs":
-      policyObj['permMapList'] = [{'userList': [policy_user], 'permList': ['Read', 'Write', 'Execute', 'Admin']}]
+      policyObj['permMapList'] = [{'userList': [policy_user], 'permList': ['read', 'write', 'execute', 'admin']}]
     elif typeOfPolicy == "hive":
       policyObj['permMapList'] = [{'userList': [policy_user],
-                                   'permList': ['Select', 'Update', 'Create', 'Drop', 'Alter', 'Index', 'Lock', 'All',
-                                                'Admin']}]
+                                   'permList': ['select', 'update', 'create', 'drop', 'alter', 'index', 'lock', 'all',
+                                                'admin']}]
     elif typeOfPolicy == "hbase":
-      policyObj['permMapList'] = [{'userList': [policy_user], 'permList': ['Read', 'Write', 'Create', 'Admin']}]
+      policyObj['permMapList'] = [{'userList': [policy_user], 'permList': ['read', 'write', 'create', 'admin']}]
     elif typeOfPolicy == "knox":
-      policyObj['permMapList'] = [{'userList': [policy_user], 'permList': ['Allow', 'Admin']}]
+      policyObj['permMapList'] = [{'userList': [policy_user], 'permList': ['allow', 'admin']}]
     elif typeOfPolicy == "storm":
       policyObj['permMapList'] = [{'userList': [policy_user],
-                                   'permList': ['SubmitTopology', 'FileUpload', 'GetNimbusConf', 'GetClusterInfo',
-                                                'FileDownload', 'KillTopology', 'Rebalance', 'Activate', 'Deactivate',
-                                                'GetTopologyConf', 'GetTopology', 'GetUserTopology',
-                                                'GetTopologyInfo', 'UploadNewCredential', 'Admin']}]
+                                   'permList': ['submitTopology', 'fileUpload', 'getNimbusConf', 'getClusterInfo',
+                                                'fileDownload', 'killTopology', 'rebalance', 'activate', 'deactivate',
+                                                'getTopologyConf', 'getTopology', 'getUserTopology',
+                                                'getTopologyInfo', 'uploadNewCredential', 'admin']}]
     return policyObj