~ubuntu-branches/ubuntu/quantal/ceph/quantal

« back to all changes in this revision

Viewing changes to src/test/cli/ceph-authtool/manpage.t

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2012-07-16 09:56:24 UTC
  • mfrom: (0.3.11)
  • mto: This revision was merged to the branch mainline in revision 17.
  • Revision ID: package-import@ubuntu.com-20120716095624-azr2w4hbhei1rxmx
Tags: upstream-0.48
ImportĀ upstreamĀ versionĀ 0.48

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
    --cap subsystem capability    will set the capability for given subsystem
16
16
    --caps capsfile               will set all of capabilities associated with a
17
17
                                  given key, for all subsystems
18
 
    -b, --bin                     will create a binary formatted keyring
19
18
  [1]
20
19
 
21
20
# demonstrate that manpage examples fail without config
28
27
 
29
28
To create a new keyring containing a key for client.foo:
30
29
 
31
 
  $ ceph-authtool --create-keyring --id foo --gen-key keyring.bin
32
 
  creating keyring.bin
 
30
  $ ceph-authtool --create-keyring --id foo --gen-key keyring
 
31
  creating keyring
33
32
 
34
 
  $ ceph-authtool --create-keyring --name client.foo --gen-key keyring.bin
35
 
  creating keyring.bin
 
33
  $ ceph-authtool --create-keyring --name client.foo --gen-key keyring
 
34
  creating keyring
36
35
 
37
36
To associate some capabilities with the key (namely, the ability to mount a Ceph filesystem):
38
37
 
39
 
  $ ceph-authtool -n client.foo --cap mds 'allow' --cap osd 'allow rw pool=data' --cap mon 'allow r' keyring.bin
 
38
  $ ceph-authtool -n client.foo --cap mds 'allow' --cap osd 'allow rw pool=data' --cap mon 'allow r' keyring
40
39
 
41
40
To display the contents of the keyring:
42
41
 
43
 
  $ ceph-authtool -l keyring.bin
 
42
  $ ceph-authtool -l keyring
44
43
  [client.foo]
45
44
  \\tkey = [a-zA-Z0-9+/]+=* \(esc\) (re)
46
45
  \tcaps mds = "allow" (esc)