def list_group_and_guests_g(guestdir): """ :param guestdir: Guests' config dir, e.g. /etc/miniascape/default/guests.d :return: (group :: str, guest_name :: str) (generator) """ for group in U.list_dirnames(guestdir): for guest in U.list_dirnames(os.path.join(guestdir, group)): yield (group, guest)
def list_net_names(netdir): """ :param netdir: Networks' conf dir, e.g. /etc/miniascape/default/networks.d """ return U.list_dirnames(netdir)