Improve performance of ensure_namespace
The ensure_namespace method calls IpNetnsCommand.exists to
determine if the specified namespace exists or not. This is
accomplished by listing all namespaces with "ip netns list"
and then looping through the output to determine if the specified
namespace was included in the output.
Research of various Linux operating systems has indicated that
namespaces are represented as files in /var/run/netns and root
authority is "typically" not required in order to look at the
files in this subdirectory.
The existing configuration option "use_helper_for_ns_read"
will be used to determine if the root-helper should be used to
to retrieve the list of namespaces. If this configuraton option
is set to False, the native python os.listdir(/var/run/netns)
will be used.
Related-Bug: #
1311804
Closes-Bug: #
1497396
Change-Id: I9da627d07d6cbb6e5ef1a921a5f22963317a04e2