Next / Previous / Contents / TCC Help System / NM Tech homepage

25.1. ClientSet.genClients(): Generate all client configurations

To generate the clients in alphabetical order by host name, we extract the keys from the self.__clientMap dictionary and sort them.

hwscan3.py
# - - -   C l i e n t S e t . g e n C l i e n t s

    def genClients(self):
        '''Generate are ClientConfig children in hostname order.
        '''
        hostNameList  =  self.__clientMap.keys()
        hostNameList.sort()
        for hostName in hostNameList:
            yield self.__clientMap[hostName]
        raise StopIteration