@staticmethod
def factory(opts, **kwargs):
    ttype = 'zeromq'
    if ('transport_type' in opts):
        ttype = opts['transport_type']
    elif ('transport_type' in opts.get('pillar', {}).get('master', {})):
        ttype = opts['pillar']['master']['transport_type']
    if (ttype == 'zeromq'):
        return ZeroMQChannel(opts, **kwargs)
    else:
        raise Exception('Channels are only defined for ZeroMQ')
@staticmethod
def factory(opts, **kwargs):
    ttype = 'zeromq'
    if ('transport_type' in opts):
        ttype = opts['transport_type']
    elif ('transport_type' in opts.get('pillar', {}).get('master', {})):
        ttype = opts['pillar']['master']['transport_type']
    if (ttype == 'zeromq'):
        return ZeroMQChannel(opts, **kwargs)
    else:
        raise Exception('Channels are only defined for ZeroMQ')