def getNodeOtps(self, to_eject=[], to_failover=[], to_readd=[]):
        listservers = ListServers()
        known_nodes_list = listservers.getNodes(
                                listservers.getData(self.server,
                                                    self.port,
                                                    self.user,
                                                    self.password))
        known_otps = []
        eject_otps = []
        failover_otps = []
        readd_otps = []

        for node in known_nodes_list:
            if node.get('otpNode') is None:
                raise Exception("could not access node;" +
                                " please check your username (-u) and password (-p)")

            known_otps.append(node['otpNode'])
            if node['hostname'] in to_eject:
                eject_otps.append(node['otpNode'])
            if node['hostname'] in to_failover:
                if node['clusterMembership'] != 'active':
                    raise Exception('node %s is not active' % node['hostname'])
                else:
                    failover_otps.append(node['otpNode'])
            if node['hostname'] in to_readd:
                readd_otps.append(node['otpNode'])

        return (known_otps, eject_otps, failover_otps, readd_otps)
Shortcut for fopen with extra uid, gid and mode options.
dataset/ETHPy150Open membase/membase-cli/node.py/Node.getNodeOtps--crossover with--dataset/ETHPy150Open saltstack/salt/salt/utils/__init__.py/fpopen