pynipap - Pylint; Line too long

Cut of a few lines that were too long. There's a bunch of lines that are
still too long, but they are typically exception lines with a message
and I don't see that the code is more elegant with them cut off.

Pylint score was originally 7.28 and is now up to 7.34

Part of #274
pynipap - Pylint: Unused import ...

Removed two useless import statements.

Score 7.34 -> 7.37

Part of #274
Improve pynipap exception handling

The pythonesque way to name exception is using "as" and not appending ",
<name>". Code is updated to reflect that.

If we don't need the exception object, we don't ask for it and exception
object for XML faults is now called 'xml_fault' instead of 'f' to comply
with Pylints minimum-3-character-variable-length.

Pylint score 7.37 -> 8.04

Part of #274
Merge branch 'master' of github.com:SpriteLink/NIPAP
Fix a bunch of stuff

... among other things, too long lines which pylint is whining about. We
refered to an exception that didn't exist. Rename/move stuff around.

Part of #274 and probably some other bug as well ;)
Bug fix in pynipap for prefix_remove

We rely on getting an exception if we try to fetch an element in the
array that doesn't exist. The exception raised however is not KeyError
but IndexError. IndexError is for lists while KeyErrors are for dicts.
This is a list, thus IndexError is correct!

Don't think we have a issues registered for this.
Update incorrect docstring
Modify xml-test for root_prefix testing
Add root_prefix option

This adds a root_prefix search_option to search_prefix. It can be used
to limit the prefixes returned to those within root_prefix without
modifying the 'match' variable, ie if a prefix matched the search query
or not.

Fixes #206
Rename root_prefix to parent_prefix

It's really not a root prefix but rather a parent. This option will
influence not just where we start but also the number of indent levels
we get.
Fix parent_prefix!

This is almost the final fix. Now parent_prefix is the id of a prefix
from which we will base the search. Only prefixes that are one indent
level below and inside the parent_prefix are included.

A new exception is thrown if the prefix id specified does not exist. We
need to set a good error number for that and handle it in pynipap (and
jnipap).

Part of #206
Improve wording
Uh, removed duplicate exception type

I don't understand how I could have missed this in my previous commit
where I added the new exception.

Part of #206
Fix value check for parent_prefix

We check if it's an integer.. not a prefix, because it shouldn't be a
prefix! ;)

Part of #206
Automatically set type of new prefix in CLI

The CLI is now able to set (if unset) or override the type of a new
prefix, should it be necessary to conform to our consistency model.

It is mainly for registering hosts, because that's the only real
scenario where we know that the child prefix must be of type 'host'.

Fixes #275
Confirmation dialog now closed

The prefix remove confirmation dialog is now closed when the "Yes"
button is clicked.

Fixes #289
Fix VRF for auto-type

Now honour VRF when doing auto-type for new prefix.

Fixes #275
Merge branch 'cli-auto-type-vrf'
User warned when adding invalid prefix to pool

A message is now displayed when a user tries to add a prefix to a pool
which is already in a pool.

Fixes #109
Improved error handling of missing family attr

Previously, an unhandled exception was thrown when trying to add a
prefix from a pool with the "family" attribute set to None. This was
something pynipap could help the user with, as neither it handled a
missing "family" attribute. This has now been improved :)