ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alejan...@apache.org
Subject ambari git commit: AMBARI-10380. Enabling ranger plugin does not create the required policies (Velmurugan Periasamy via alejandro)
Date Wed, 08 Apr 2015 03:11:02 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 95c9ed0d3 -> ced666f35


AMBARI-10380. Enabling ranger plugin does not create the required policies (Velmurugan Periasamy
via alejandro)


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

Branch: refs/heads/trunk
Commit: ced666f35b247e7183d25b1ca2d32210ef6dae16
Parents: 95c9ed0
Author: Alejandro Fernandez <afernandez@hortonworks.com>
Authored: Tue Apr 7 20:09:26 2015 -0700
Committer: Alejandro Fernandez <afernandez@hortonworks.com>
Committed: Tue Apr 7 20:09:26 2015 -0700

----------------------------------------------------------------------
 .../resource_management/libraries/functions/ranger_functions.py    | 2 +-
 .../HBASE/0.96.0.2.0/package/scripts/setup_ranger_hbase.py         | 2 +-
 .../HDFS/2.1.0.2.0/package/scripts/setup_ranger_hdfs.py            | 2 +-
 .../HIVE/0.12.0.2.0/package/scripts/setup_ranger_hive.py           | 2 +-
 .../KNOX/0.5.0.2.2/package/scripts/setup_ranger_knox.py            | 2 +-
 .../STORM/0.9.1.2.1/package/scripts/setup_ranger_storm.py          | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/ced666f3/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 78d9a97..00d88be 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
@@ -96,7 +96,7 @@ class Rangeradmin:
         ##Get Policies by repo name
         policyList = self.get_policy_by_repo_name(name=repoName, component=typeOfPolicy,
status="true",
                                                   usernamepassword=usernamepassword)
-        if (len(policyList)) > 0:
+        if policyList is not None and (len(policyList)) > 0:
           policiesUpdateCount = 0
           for policy in policyList:
             updatedPolicyObj = self.get_policy_params(typeOfPolicy, policy, policy_user)

http://git-wip-us.apache.org/repos/asf/ambari/blob/ced666f3/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/setup_ranger_hbase.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/setup_ranger_hbase.py
b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/setup_ranger_hbase.py
index 0df679b..7626de8 100644
--- a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/setup_ranger_hbase.py
+++ b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/setup_ranger_hbase.py
@@ -194,7 +194,7 @@ def hbase_repo_properties():
   repo['config'] = json.dumps(config_dict)
   repo['description'] = "hbase repo"
   repo['name'] = params.repo_name
-  repo['repositoryType'] = "Hbase"
+  repo['repositoryType'] = "hbase"
   repo['assetType'] = '2'
 
   data = json.dumps(repo)

http://git-wip-us.apache.org/repos/asf/ambari/blob/ced666f3/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/setup_ranger_hdfs.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/setup_ranger_hdfs.py
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/setup_ranger_hdfs.py
index 89c537c..9413d8e 100644
--- a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/setup_ranger_hdfs.py
+++ b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/setup_ranger_hdfs.py
@@ -204,7 +204,7 @@ def hdfs_repo_properties():
   repo['config'] = json.dumps(config_dict)
   repo['description'] = "hdfs repo"
   repo['name'] = params.repo_name
-  repo['repositoryType'] = "Hdfs"
+  repo['repositoryType'] = "hdfs"
   repo['assetType'] = '1'
 
   data = json.dumps(repo)

http://git-wip-us.apache.org/repos/asf/ambari/blob/ced666f3/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/setup_ranger_hive.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/setup_ranger_hive.py
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/setup_ranger_hive.py
index 985570a..54de4a6 100644
--- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/setup_ranger_hive.py
+++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/setup_ranger_hive.py
@@ -192,7 +192,7 @@ def hive_repo_properties():
   repo['config'] = json.dumps(config_dict)
   repo['description'] = "hive repo"
   repo['name'] = params.repo_name
-  repo['repositoryType'] = "Hive"
+  repo['repositoryType'] = "hive"
   repo['assetType'] = '3'
 
   data = json.dumps(repo)

http://git-wip-us.apache.org/repos/asf/ambari/blob/ced666f3/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/setup_ranger_knox.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/setup_ranger_knox.py
b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/setup_ranger_knox.py
index cd83876..c069fc5 100644
--- a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/setup_ranger_knox.py
+++ b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/setup_ranger_knox.py
@@ -186,7 +186,7 @@ def knox_repo_properties():
   repo['config'] = json.dumps(config_dict)
   repo['description'] = "knox repo"
   repo['name'] = params.repo_name
-  repo['repositoryType'] = "Knox"
+  repo['repositoryType'] = "knox"
   repo['assetType'] = '5'
 
   data = json.dumps(repo)

http://git-wip-us.apache.org/repos/asf/ambari/blob/ced666f3/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/setup_ranger_storm.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/setup_ranger_storm.py
b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/setup_ranger_storm.py
index d45f0ed..a3cc587 100644
--- a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/setup_ranger_storm.py
+++ b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/setup_ranger_storm.py
@@ -187,7 +187,7 @@ def storm_repo_properties():
   repo['config'] = json.dumps(config_dict)
   repo['description'] = "storm repo"
   repo['name'] = params.repo_name
-  repo['repositoryType'] = "Storm"
+  repo['repositoryType'] = "storm"
   repo['assetType'] = '6'
 
   data = json.dumps(repo)


Mime
View raw message