You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sentry.apache.org by co...@apache.org on 2017/11/22 15:56:27 UTC
[07/23] sentry git commit: Switching remove role (rm) to drop role
(dr) for consistency with the shell scripts
Switching remove role (rm) to drop role (dr) for consistency with the shell scripts
Project: http://git-wip-us.apache.org/repos/asf/sentry/repo
Commit: http://git-wip-us.apache.org/repos/asf/sentry/commit/922b3169
Tree: http://git-wip-us.apache.org/repos/asf/sentry/tree/922b3169
Diff: http://git-wip-us.apache.org/repos/asf/sentry/diff/922b3169
Branch: refs/heads/master
Commit: 922b3169615a0e42f6469135d6f95bcec17f01b7
Parents: c649777
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Thu Oct 19 12:15:44 2017 +0100
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Thu Oct 19 12:15:44 2017 +0100
----------------------------------------------------------------------
.../src/main/java/org/apache/sentry/shell/RolesShell.java | 6 +++---
.../src/main/java/org/apache/sentry/shell/ShellUtil.java | 4 ++--
.../src/main/java/org/apache/sentry/shell/TopLevelShell.java | 8 ++++----
3 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/sentry/blob/922b3169/sentry-tools/src/main/java/org/apache/sentry/shell/RolesShell.java
----------------------------------------------------------------------
diff --git a/sentry-tools/src/main/java/org/apache/sentry/shell/RolesShell.java b/sentry-tools/src/main/java/org/apache/sentry/shell/RolesShell.java
index 856f422..ab4589d 100644
--- a/sentry-tools/src/main/java/org/apache/sentry/shell/RolesShell.java
+++ b/sentry-tools/src/main/java/org/apache/sentry/shell/RolesShell.java
@@ -56,11 +56,11 @@ public class RolesShell implements ShellDependent {
tools.createRoles(roles);
}
- @Command(description = "remove Sentry role(s).")
- public void remove(
+ @Command(description = "drop Sentry role(s).")
+ public void drop(
@Param(name = "roleName ...", description = "role names to remove")
String ...roles) {
- tools.removeRoles(roles);
+ tools.dropRoles(roles);
}
@Override
http://git-wip-us.apache.org/repos/asf/sentry/blob/922b3169/sentry-tools/src/main/java/org/apache/sentry/shell/ShellUtil.java
----------------------------------------------------------------------
diff --git a/sentry-tools/src/main/java/org/apache/sentry/shell/ShellUtil.java b/sentry-tools/src/main/java/org/apache/sentry/shell/ShellUtil.java
index 5df21ae..4904fac 100644
--- a/sentry-tools/src/main/java/org/apache/sentry/shell/ShellUtil.java
+++ b/sentry-tools/src/main/java/org/apache/sentry/shell/ShellUtil.java
@@ -82,12 +82,12 @@ class ShellUtil {
}
}
- void removeRoles(String ...roles) {
+ void dropRoles(String ...roles) {
for (String role: roles) {
try {
sentryClient.dropRole(authUser, role);
} catch (SentryUserException e) {
- System.out.printf("failed to remove role %s: %s\n",
+ System.out.printf("failed to drop role %s: %s\n",
role, e.toString());
}
}
http://git-wip-us.apache.org/repos/asf/sentry/blob/922b3169/sentry-tools/src/main/java/org/apache/sentry/shell/TopLevelShell.java
----------------------------------------------------------------------
diff --git a/sentry-tools/src/main/java/org/apache/sentry/shell/TopLevelShell.java b/sentry-tools/src/main/java/org/apache/sentry/shell/TopLevelShell.java
index ef5313a..738a992 100644
--- a/sentry-tools/src/main/java/org/apache/sentry/shell/TopLevelShell.java
+++ b/sentry-tools/src/main/java/org/apache/sentry/shell/TopLevelShell.java
@@ -108,11 +108,11 @@ public class TopLevelShell implements ShellDependent, Runnable {
tools.createRoles(roles);
}
- @Command(abbrev = "rm", description = "remove Sentry role(s).")
- public void removeRole(
- @Param(name = "roleName ...", description = "role names to remove")
+ @Command(abbrev = "dr", description = "drop Sentry role(s).")
+ public void dropRole(
+ @Param(name = "roleName ...", description = "role names to drop")
String ...roles) {
- tools.removeRoles(roles);
+ tools.dropRoles(roles);
}
@Command(description = "list Sentry privileges")