QA:Testcase freeipav2 automount

{{QA/Test_Case
 * description=Automount testing.
 * setup=
 * 1) Make sure you have a working FreeIPA server (see QA:Testcase_freeipav2_installation)
 * 2) Make sure the CLI works as expected (see QA:Testcase_freeipav2_cli)
 * 3) This requires a separate client machine from the IPA server machine (see QA:Testcase_freeipav2_client_enrollment)

FreeIPAv2 supports locations, the default location is called default, please keep that in mind.
 * actions=

Preparation
/home 192.168.1.0/16 (rw,fsid=0,insecure,no_subtree_check,sync,anonuid=65534,anongid=65534) Edit the /etc/sysconfig/autofs file as follows. This specifies the attributes that autofs searches for:
 * prepare NFS exports on one server in your IPA domain
 * 1) This is an example line of /etc/exports file
 * prepare autofs on your client machine:

# # MAP_OBJECT_CLASS="automountMap" ENTRY_OBJECT_CLASS="automount" MAP_ATTRIBUTE="automountMapName" ENTRY_ATTRIBUTE="automountKey" VALUE_ATTRIBUTE="automountInformation"
 * 1) Other common LDAP naming

You also need to specify which LDAP server to use, and the basedn for LDAP searches:

LDAP_URI="ldap://ipa.example.com" SEARCH_BASE="cn=automount,dc=example,dc=com"

Save the file and restart autofs:
 * 1) service autofs restart

Testing indirect maps
ipa automountmap-add default auto.share ipa automountkey-add default auto.master --key=/share --info=auto.share ipa automountkey-add default auto.share --key=man --info="-ro,soft,rsize=8192,wsize=8192 ipa.example.com:/shared/man" ls /share/man
 * create a new map in the default location
 * 1) this is an example how to create new map in the default location
 * add the map to auto.master
 * 1) this is an example how to add the new map to auto.master
 * create new key as a part of the map. The key has to correspond with existing mount you prepared earlier on NFS server
 * 1) this is an example how to create new key in the map
 * try to access the directory that should be automounted on the client machine
 * 1) for example:

Testing direct maps
ipa automountmap-show default auto.direct --all --raw
 * map auto.direct is created during installation by default

The result should be something like: dn: automountmapname=auto.direct,cn=default,cn=automount,dc=example,dc=com automountmapname: auto.direct objectclass: automountMap objectclass: top
 * create a directory used as mount target for one of autofs mounts on client machine
 * create new key as a part of auto.direct map. The key has to correspond with existing mount you prepared earlier on NFS server
 * try to access the directory that should be automounted on the client machine

All the test steps should end with the specified results. }}
 * results=