'Start up a new OVS OpenFlow switch using ovs-vsctl'

def start(self, controllers):

    if self.inNamespace:
        raise Exception('OVS    kernel    switch    does    not    work    in    a    namespace')
    int(self.dpid, 16)
    intfs = ''.join(((('    --    add-port    %s    %s' % (self, intf)) + self.intfOpts(intf)) for intf in self.intfList() if (self.ports[intf] and (not intf.IP()))))
    clist = [((self.name + c.name), ('%s:%s:%d' % (c.protocol, c.IP(), c.port))) for c in controllers]
    if self.listenPort:
        clist.append(((self.name + '-listen'), ('ptcp:%s' % self.listenPort)))
    ccmd = '--    --id=@%s    create    Controller    target=\\"%s\\"'
    if self.reconnectms:
        ccmd += ('    max_backoff=%d' % self.reconnectms)
    cargs = '    '.join(((ccmd % (name, target)) for (name, target) in clist))
    cids = ','.join((('@%s' % name) for (name, _target) in clist))
    if (not self.isOldOVS()):
        cargs += ('    --    --if-exists    del-br    %s' % self)
    self.vsctl(((((cargs + ('    --    add-br    %s' % self)) + ('    --    set    bridge    %s    controller=[%s]' % (self, cids))) + self.bridgeOpts()) + intfs))
    if (not self.batch):
        for intf in self.intfList():
            self.TCReapply(intf)
