Commit f7b17f67 authored by Alex Pyrgiotis's avatar Alex Pyrgiotis
Browse files

cyclades: Change the imports for transactions

Do not import the transaction module from django.db. Import it instead
from synnefo.db, where the Cyclades transaction entry points are
located.
parent 220d9962
......@@ -14,7 +14,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from django.conf.urls.defaults import patterns
from django.db import transaction
from synnefo.db import transaction
from django.http import HttpResponse
from django.utils import simplejson as json
......
......@@ -17,7 +17,7 @@ from django.conf import settings
from django.conf.urls import patterns
from django.http import HttpResponse
from django.utils import simplejson as json
from django.db import transaction
from synnefo.db import transaction
from django.db.models import Q
from django.template.loader import render_to_string
......
......@@ -18,7 +18,7 @@ import ipaddr
from django.conf.urls import patterns
from django.http import HttpResponse
from django.utils import simplejson as json
from django.db import transaction
from synnefo.db import transaction
from django.template.loader import render_to_string
from snf_django.lib import api
......
......@@ -16,7 +16,7 @@
from django.conf import settings
from django.conf.urls import patterns
from django.db import transaction
from synnefo.db import transaction
from django.http import HttpResponse
from django.template.loader import render_to_string
from django.utils import simplejson as json
......
......@@ -13,7 +13,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from django.conf import settings
from django.db import transaction
from synnefo.db import transaction
from django.utils import simplejson as json
from datetime import datetime, timedelta
......
......@@ -20,7 +20,7 @@ import logging
import json
from functools import wraps
from django.db import transaction
from synnefo.db import transaction
from synnefo.db.models import (Backend, VirtualMachine, Network,
BackendNetwork, pooled_rapi_client)
from synnefo.logic import utils, backend as backend_mod, rapi
......
......@@ -16,7 +16,7 @@
import logging
from functools import wraps
from django.db import transaction
from synnefo.db import transaction
from django.conf import settings
from snf_django.lib.api import faults
......
......@@ -17,7 +17,7 @@ import logging
import functools
from snf_django.lib.api import faults
from django.db import transaction
from synnefo.db import transaction
from synnefo import quotas
from synnefo.db import pools
from synnefo.db.models import (IPPoolTable, IPAddress, Network)
......
......@@ -20,7 +20,8 @@ from snf_django.management.commands import SynnefoCommand
from synnefo.management import common
from synnefo.logic import backend as backend_mod
from synnefo.db.models import Backend
from django.db import transaction, models
from django.db import models
from synnefo.db import transaction
HELP_MSG = """\
......
......@@ -20,7 +20,7 @@ import functools
from optparse import make_option
from django.core.management.base import NoArgsCommand, CommandError, BaseCommand
from django.db import transaction
from synnefo.db import transaction
from django.conf import settings
from synnefo.api.util import get_existing_users
......
......@@ -15,7 +15,7 @@
#from optparse import make_option
from django.db import transaction
from synnefo.db import transaction
from django.core.management.base import CommandError
from snf_django.management.commands import RemoveCommand
from synnefo.management import common
......
......@@ -22,7 +22,7 @@ from synnefo.management.common import get_resource
from snf_django.management.commands import SynnefoCommand
from snf_django.management.utils import parse_bool
from synnefo.logic import networks, backend as backend_mod
from django.db import transaction
from synnefo.db import transaction
class Command(SynnefoCommand):
......
......@@ -15,7 +15,7 @@
from optparse import make_option
from django.db import transaction
from synnefo.db import transaction
from django.core.management.base import CommandError
from synnefo.management.common import (get_resource, convert_api_faults,
......
......@@ -14,7 +14,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from functools import wraps
from django.db import transaction
from synnefo.db import transaction
from django.conf import settings
from snf_django.lib.api import faults
......
......@@ -45,7 +45,7 @@ import itertools
import bitarray
from datetime import datetime, timedelta
from django.db import transaction
from synnefo.db import transaction
from synnefo.db.models import (Backend, VirtualMachine, Flavor,
pooled_rapi_client, Network,
BackendNetwork, BridgePoolTable,
......
......@@ -18,7 +18,7 @@ import logging
from datetime import datetime
from socket import getfqdn
from django import dispatch
from django.db import transaction
from synnefo.db import transaction
from django.utils import simplejson as json
from snf_django.lib.api import faults
......
......@@ -18,7 +18,7 @@ from logging import getLogger
from functools import wraps
from django.conf import settings
from django.db import transaction
from synnefo.db import transaction
from django.db.models import Q
from snf_django.lib import api
......
......@@ -14,7 +14,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from django.utils import simplejson as json
from django.db import transaction
from synnefo.db import transaction
from snf_django.lib.api import faults
from synnefo.db.models import (QuotaHolderSerial, VirtualMachine, Network,
......
......@@ -15,7 +15,7 @@
import string
from optparse import make_option
from django.db import transaction
from synnefo.db import transaction
from synnefo.lib.ordereddict import OrderedDict
from synnefo.quotas import util
......
......@@ -15,7 +15,7 @@ setup_environ(settings)
from synnefo.management.common import get_network
from synnefo.db.models import IPAddress
from django.db import transaction
from synnefo.db import transaction
logger = logging.getLogger("update_floating_ips")
handler = logging.StreamHandler()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment