def get_illegal_ports(self, host_ip): illegal_ports = [] zkOper = Common_ZkOpers() port_list = zkOper.get_ports_from_portPool(host_ip) #logging.info('port in host: %s, in ports pool:%s ' % (host_ip, str(port_list) )) for port in port_list: ret = self.__port_legal(host_ip, port) if not ret: illegal_ports.append(port) return illegal_ports
def get_port_num(self, host_ip): zkOper = Common_ZkOpers() port_list = zkOper.get_ports_from_portPool(host_ip) return len(port_list)