You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by ma...@apache.org on 2015/12/01 15:23:58 UTC

[3/3] syncope git commit: cli docs: policy, SYNCOPE-722

cli docs: policy, SYNCOPE-722


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

Branch: refs/heads/master
Commit: 08531e6e604815c9b1a134a83b5e118f938f460c
Parents: 394aa2e
Author: massi <ma...@tirasa.net>
Authored: Tue Dec 1 15:08:23 2015 +0100
Committer: massi <ma...@tirasa.net>
Committed: Tue Dec 1 15:08:23 2015 +0100

----------------------------------------------------------------------
 src/main/asciidoc/cli-policy.adoc | 168 +++++++++++++++++++++++++++++++++
 src/main/asciidoc/cli.adoc        |   4 +-
 2 files changed, 171 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/08531e6e/src/main/asciidoc/cli-policy.adoc
----------------------------------------------------------------------
diff --git a/src/main/asciidoc/cli-policy.adoc b/src/main/asciidoc/cli-policy.adoc
new file mode 100644
index 0000000..c3f0a5d
--- /dev/null
+++ b/src/main/asciidoc/cli-policy.adoc
@@ -0,0 +1,168 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
+==== Policy command
+The policy command serves to retrieve the information about the policies for each type.
+
+===== Help message
+[source,bash]
+----
+Usage: policy [options]
+  Options:
+    --help 
+    --details 
+    --list 
+       Syntax: --list-policy {POLICY-TYPE} 
+          Policy type: ACCOUNT / PASSWORD / SYNC / PUSH
+    --read 
+       Syntax: --read {POLICY-ID} {POLICY-ID} [...]
+    --delete 
+       Syntax: --delete {POLICY-ID} {POLICY-ID} [...]
+----
+
+===== Details option
+This option shows a table with policies amount for each type.
+
+[source]
+--
+$ ./syncopeadm.sh policy --details
+--
+
+[source]
+--
+
+You are runnig: policy --details 
+
+#################################
+#                               #
+#       POLICIES DETAILS        #
+#                               #
+#################################
+#                     #         #
+#       DETAIL        #  VALUE  #
+#                     #         #
+#################################
+#                     #         #
+#    total number     #    9    #
+#  account policies   #    2    #
+#  password policies  #    3    #
+#    sync policies    #    4    #
+#    push policies    #    0    #
+#                     #         #
+#################################
+
+--
+
+===== List option
+Running the command with this option you will see the list of the policies.
+
+[source]
+--
+$ ./syncopeadm.sh Usage: policy --list {POLICY-TYPE}
+   Policy type: ACCOUNT / PASSWORD / SYNC / PUSH
+--
+
+[source]
+--
+
+./syncopeadm.sh policy --list SYNC
+
+You are runnig: policy --list SYNC 
+
+ > KEY: 1
+    type: SYNC
+    description: a sync policy
+    resources : []
+    realms : []
+
+ > KEY: 3
+    type: SYNC
+    description: sync policy 2
+    resources : [resource-csv]
+    realms : []
+    conflict resolution action: ALL
+    correlation rule : {USER=["username","firstname"]}
+
+ > KEY: 7
+    type: SYNC
+    description: sync policy 1
+    resources : []
+    realms : []
+    conflict resolution action: IGNORE
+    correlation rule : {}
+
+ > KEY: 9
+    type: SYNC
+    description: sync policy for java rule
+    resources : [ws-target-resource-2]
+    realms : []
+    conflict resolution action: IGNORE
+    correlation rule : {}
+
+--
+
+===== Read option
+The option to read all the information of specified policy.
+
+[source]
+--
+$ ./syncopeadm.sh policy --read {POLICY-ID} {POLICY-ID} [...]
+--
+
+Unlike the list option, the read one shows only the policy passed as input.
+[source]
+--
+You are runnig: policy --read 6 
+
+ > KEY: 6
+    type: ACCOUNT
+    description: sample account policy
+    resources : []
+    realms : [/odd]
+    max authentication attempts : 3
+    propagation suspension : false
+    RULES : 
+       > class : [org.apache.syncope.common.lib.policy.DefaultAccountRuleConf@708a538f[
+  maxLength=0
+  minLength=4
+  pattern=<null>
+  allUpperCase=false
+  allLowerCase=false
+  wordsNotPermitted=[]
+  schemasNotPermitted=[]
+  prefixesNotPermitted=[notpermitted1, notpermitted2]
+  suffixesNotPermitted=[]
+  name=org.apache.syncope.common.lib.policy.DefaultAccountRuleConf
+]]
+--
+
+===== Delete option
+The option to delete a specified policy.
+
+[source]
+--
+$ ./syncopeadm.sh policy --delete {POLICY-ID} {POLICY-ID} [...]
+--
+
+The delete option, as can be imagined, tries to remove a specified policy. 
+The output will be something like:
+[source]
+--
+ - Policy {POLICY-ID} successfully deleted
+--
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/syncope/blob/08531e6e/src/main/asciidoc/cli.adoc
----------------------------------------------------------------------
diff --git a/src/main/asciidoc/cli.adoc b/src/main/asciidoc/cli.adoc
index 3596cd1..7f284e7 100644
--- a/src/main/asciidoc/cli.adoc
+++ b/src/main/asciidoc/cli.adoc
@@ -42,4 +42,6 @@ include::cli-user.adoc[]
 
 include::cli-report.adoc[]
 
-include::cli-resource.adoc[]
\ No newline at end of file
+include::cli-resource.adoc[]
+
+include::cli-policy.adoc[]
\ No newline at end of file