'Create a vlan and bridge unless they already exist.'

def ensure_vlan_bridge(self, network_id, phy_bridge_name, physical_interface, vlan_id):

    interface = self.ensure_vlan(physical_interface, vlan_id)
    if phy_bridge_name:
        return self.ensure_bridge(phy_bridge_name)
    else:
        bridge_name = self.get_bridge_name(network_id)
        if self.ensure_bridge(bridge_name, interface):
            return interface
