This commit is contained in:
Marc Aymerich 2015-04-04 18:10:39 +00:00
parent 7133bd31ea
commit 1ff4e05819
62 changed files with 24 additions and 145 deletions

View File

@ -5,7 +5,6 @@ from django.utils.translation import ungettext, ugettext_lazy as _
from .. import settings from .. import settings
from .utils import change_url
from .forms import SendEmailForm from .forms import SendEmailForm

View File

@ -1,6 +1,5 @@
from django.core.urlresolvers import NoReverseMatch from django.core.urlresolvers import NoReverseMatch
from rest_framework.reverse import reverse from rest_framework.reverse import reverse
from rest_framework.routers import replace_methodname
def link_wrap(view, view_names): def link_wrap(view, view_names):

View File

@ -1,7 +1,6 @@
from django.conf import settings as django_settings from django.conf import settings as django_settings
from django.core.exceptions import ImproperlyConfigured
from django.utils.module_loading import autodiscover_modules from django.utils.module_loading import autodiscover_modules
from rest_framework.routers import DefaultRouter, Route, replace_methodname from rest_framework.routers import DefaultRouter
from orchestra import settings from orchestra import settings
from orchestra.utils.python import import_class from orchestra.utils.python import import_class

View File

@ -6,7 +6,6 @@ from django.conf.urls import patterns, url
from django.contrib import admin, messages from django.contrib import admin, messages
from django.contrib.admin.util import unquote from django.contrib.admin.util import unquote
from django.contrib.auth import admin as auth from django.contrib.auth import admin as auth
from django.db.models.loading import get_model
from django.http import HttpResponseRedirect from django.http import HttpResponseRedirect
from django.utils.safestring import mark_safe from django.utils.safestring import mark_safe
from django.utils.six.moves.urllib.parse import parse_qsl from django.utils.six.moves.urllib.parse import parse_qsl
@ -18,7 +17,6 @@ from orchestra.admin.utils import wrap_admin_view, admin_link, set_url_query, ch
from orchestra.core import services, accounts from orchestra.core import services, accounts
from orchestra.forms import UserChangeForm from orchestra.forms import UserChangeForm
from . import settings
from .actions import disable, list_contacts, service_report, delete_related_services from .actions import disable, list_contacts, service_report, delete_related_services
from .filters import HasMainUserListFilter from .filters import HasMainUserListFilter
from .forms import AccountCreationForm from .forms import AccountCreationForm

View File

@ -1,10 +1,10 @@
from django import forms from django import forms
from django.contrib import admin from django.contrib import admin
from django.utils.translation import ugettext, ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from orchestra.admin import AtLeastOneRequiredInlineFormSet, ExtendedModelAdmin from orchestra.admin import AtLeastOneRequiredInlineFormSet, ExtendedModelAdmin
from orchestra.admin.actions import SendEmail from orchestra.admin.actions import SendEmail
from orchestra.admin.utils import insertattr, admin_link, change_url from orchestra.admin.utils import insertattr, change_url
from orchestra.apps.accounts.admin import AccountAdmin, AccountAdminMixin from orchestra.apps.accounts.admin import AccountAdmin, AccountAdminMixin
from orchestra.forms.widgets import paddingCheckboxSelectMultiple from orchestra.forms.widgets import paddingCheckboxSelectMultiple

View File

@ -1,12 +1,11 @@
from django.conf.urls import patterns from django.conf.urls import patterns
from django.contrib import admin from django.contrib import admin
from django.contrib.auth.admin import UserAdmin from django.contrib.auth.admin import UserAdmin
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from orchestra.admin import ExtendedModelAdmin, ChangePasswordAdminMixin from orchestra.admin import ExtendedModelAdmin, ChangePasswordAdminMixin
from orchestra.admin.utils import admin_link, change_url from orchestra.admin.utils import change_url
from orchestra.apps.accounts.admin import AccountAdminMixin, SelectAccountAdminMixin from orchestra.apps.accounts.admin import SelectAccountAdminMixin
from .forms import DatabaseCreationForm, DatabaseUserChangeForm, DatabaseUserCreationForm from .forms import DatabaseCreationForm, DatabaseUserChangeForm, DatabaseUserCreationForm
from .models import Database, DatabaseUser from .models import Database, DatabaseUser

View File

@ -128,12 +128,6 @@ class MysqlDisk(ServiceMonitor):
# " | tail -n 1 # " | tail -n 1
# }""")) # }"""))
def monitor(self, db):
if db.type != db.MYSQL:
return
context = self.get_context(db)
self.append("echo %(db_id)s $(monitor %(db_name)s)" % context)
def monitor(self, db): def monitor(self, db):
if db.type != db.MYSQL: if db.type != db.MYSQL:
return return

View File

@ -1,6 +1,6 @@
from django.forms import widgets from django.forms import widgets
from django.utils.translation import ugettext, ugettext_lazy as _
from django.shortcuts import get_object_or_404 from django.shortcuts import get_object_or_404
from django.utils.translation import ugettext_lazy as _
from rest_framework import serializers from rest_framework import serializers
from orchestra.api.serializers import HyperlinkedModelSerializer from orchestra.api.serializers import HyperlinkedModelSerializer

View File

@ -2,17 +2,13 @@ import MySQLdb
import os import os
import socket import socket
import time import time
from functools import partial
from django.conf import settings as djsettings from django.conf import settings as djsettings
from django.core.management.base import CommandError from django.core.management.base import CommandError
from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.select import Select from selenium.webdriver.support.select import Select
from orchestra.admin.utils import change_url from orchestra.admin.utils import change_url
from orchestra.apps.accounts.models import Account
from orchestra.apps.orchestration.models import Server, Route from orchestra.apps.orchestration.models import Server, Route
from orchestra.utils.system import sshrun from orchestra.utils.system import sshrun
from orchestra.utils.tests import (BaseLiveServerTestCase, random_ascii, save_response_on_error, from orchestra.utils.tests import (BaseLiveServerTestCase, random_ascii, save_response_on_error,

View File

@ -5,7 +5,6 @@ from django.utils.translation import ugettext_lazy as _
from orchestra.apps.orchestration import ServiceController from orchestra.apps.orchestration import ServiceController
from orchestra.apps.orchestration.models import BackendOperation as Operation from orchestra.apps.orchestration.models import BackendOperation as Operation
from orchestra.utils.python import AttrDict
from . import settings from . import settings

View File

@ -1,5 +1,4 @@
import copy import copy
from functools import partial
from .models import Domain, Record from .models import Domain, Record

View File

@ -1,7 +1,7 @@
from django.contrib import admin from django.contrib import admin
from django.conf.urls import patterns from django.conf.urls import patterns
from django.contrib.auth.admin import UserAdmin from django.contrib.auth.admin import UserAdmin
from django.utils.translation import ugettext, ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from orchestra.admin import ExtendedModelAdmin, ChangePasswordAdminMixin from orchestra.admin import ExtendedModelAdmin, ChangePasswordAdminMixin
from orchestra.admin.utils import admin_link from orchestra.admin.utils import admin_link

View File

@ -1,7 +1,5 @@
import re
import textwrap import textwrap
from django.utils import timezone
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from orchestra.apps.orchestration import ServiceController from orchestra.apps.orchestration import ServiceController

View File

@ -1,5 +1,5 @@
from django.forms import widgets from django.forms import widgets
from django.utils.translation import ugettext, ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from django.shortcuts import get_object_or_404 from django.shortcuts import get_object_or_404
from rest_framework import serializers from rest_framework import serializers

View File

@ -1,23 +1,18 @@
import email.utils
import os import os
import smtplib import smtplib
import time import time
import textwrap
import requests import requests
from email.mime.text import MIMEText from email.mime.text import MIMEText
from django.conf import settings as djsettings from django.conf import settings as djsettings
from django.contrib.contenttypes.models import ContentType
from django.core.management.base import CommandError from django.core.management.base import CommandError
from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse
from selenium.webdriver.support.select import Select from selenium.webdriver.support.select import Select
from orchestra.admin.utils import change_url from orchestra.admin.utils import change_url
from orchestra.apps.accounts.models import Account
from orchestra.apps.domains.models import Domain from orchestra.apps.domains.models import Domain
from orchestra.apps.orchestration.models import Server, Route from orchestra.apps.orchestration.models import Server, Route
from orchestra.apps.resources.models import Resource from orchestra.utils.system import sshrun
from orchestra.utils.system import run, sshrun
from orchestra.utils.tests import (BaseLiveServerTestCase, random_ascii, snapshot_on_error, from orchestra.utils.tests import (BaseLiveServerTestCase, random_ascii, snapshot_on_error,
save_response_on_error) save_response_on_error)

View File

@ -3,13 +3,11 @@ from urllib.parse import parse_qs
from django import forms from django import forms
from django.contrib import admin from django.contrib import admin
from django.core.urlresolvers import reverse
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from orchestra.admin import ExtendedModelAdmin, ChangePasswordAdminMixin from orchestra.admin import ExtendedModelAdmin, ChangePasswordAdminMixin
from orchestra.admin.utils import admin_link, change_url from orchestra.admin.utils import admin_link, change_url
from orchestra.apps.accounts.admin import SelectAccountAdminMixin, AccountAdminMixin from orchestra.apps.accounts.admin import SelectAccountAdminMixin
from orchestra.apps.accounts.filters import IsActiveListFilter from orchestra.apps.accounts.filters import IsActiveListFilter
from . import settings from . import settings

View File

@ -1,13 +1,10 @@
import logging import logging
import textwrap import textwrap
import os
from django.core.exceptions import ObjectDoesNotExist from django.core.exceptions import ObjectDoesNotExist
from django.utils import timezone
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from orchestra.apps.orchestration import ServiceController from orchestra.apps.orchestration import ServiceController
from orchestra.apps.systemusers.backends import SystemUserBackend
from orchestra.apps.resources import ServiceMonitor from orchestra.apps.resources import ServiceMonitor
#from orchestra.utils.humanize import unit_to_bytes #from orchestra.utils.humanize import unit_to_bytes

View File

@ -6,7 +6,7 @@ from django.utils.translation import ugettext_lazy as _
from orchestra.forms import UserCreationForm, UserChangeForm from orchestra.forms import UserCreationForm, UserChangeForm
from orchestra.utils.python import AttrDict from orchestra.utils.python import AttrDict
from .models import Address, Mailbox from .models import Address
class MailboxForm(forms.ModelForm): class MailboxForm(forms.ModelForm):

View File

@ -1,6 +1,6 @@
from django.forms import widgets from django.forms import widgets
from django.shortcuts import get_object_or_404 from django.shortcuts import get_object_or_404
from django.utils.translation import ugettext, ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from rest_framework import serializers from rest_framework import serializers
from orchestra.api.serializers import HyperlinkedModelSerializer from orchestra.api.serializers import HyperlinkedModelSerializer

View File

@ -1,4 +1,3 @@
import email.utils
import imaplib import imaplib
import os import os
import poplib import poplib
@ -16,7 +15,7 @@ from selenium.webdriver.support.select import Select
from orchestra.apps.orchestration.models import Server, Route from orchestra.apps.orchestration.models import Server, Route
from orchestra.apps.resources.models import Resource from orchestra.apps.resources.models import Resource
from orchestra.utils.system import run, sshrun from orchestra.utils.system import sshrun
from orchestra.utils.tests import BaseLiveServerTestCase, random_ascii, snapshot_on_error, save_response_on_error from orchestra.utils.tests import BaseLiveServerTestCase, random_ascii, snapshot_on_error, save_response_on_error
from ... import backends, settings from ... import backends, settings

View File

@ -1,4 +1,3 @@
from django import forms
from django.contrib import admin from django.contrib import admin
from django.utils.html import escape from django.utils.html import escape
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _

View File

@ -2,7 +2,6 @@ from functools import partial
from django.apps import apps from django.apps import apps
from django.utils import timezone from django.utils import timezone
from django.utils.functional import cached_property
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from orchestra import plugins from orchestra import plugins

View File

@ -5,7 +5,6 @@ from django.db.models.loading import get_model
from django.utils.six.moves import input from django.utils.six.moves import input
from orchestra.apps.orchestration import manager from orchestra.apps.orchestration import manager
from orchestra.apps.orchestration.models import BackendOperation as Operation
class Command(BaseCommand): class Command(BaseCommand):

View File

@ -1,7 +1,7 @@
from threading import local from threading import local
from django.core.urlresolvers import resolve from django.core.urlresolvers import resolve
from django.db import connection, transaction from django.db import transaction
from django.db.models.signals import pre_delete, post_save, m2m_changed from django.db.models.signals import pre_delete, post_save, m2m_changed
from django.dispatch import receiver from django.dispatch import receiver
from django.http.response import HttpResponseServerError from django.http.response import HttpResponseServerError

View File

@ -1,6 +1,5 @@
from django.core.exceptions import ObjectDoesNotExist from django.core.exceptions import ObjectDoesNotExist
from orchestra.apps.accounts.models import Account
from orchestra.core import services from orchestra.core import services

View File

@ -3,12 +3,10 @@ import decimal
import logging import logging
from django.db import models from django.db import models
from django.db.migrations.recorder import MigrationRecorder
from django.db.models import F, Q from django.db.models import F, Q
from django.db.models.loading import get_model from django.db.models.loading import get_model
from django.db.models.signals import post_delete, post_save, pre_delete from django.db.models.signals import post_delete, post_save, pre_delete
from django.dispatch import receiver from django.dispatch import receiver
from django.contrib.admin.models import LogEntry
from django.contrib.contenttypes import generic from django.contrib.contenttypes import generic
from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes.models import ContentType
from django.utils import timezone from django.utils import timezone

View File

@ -1,6 +1,4 @@
from dateutil import relativedelta from dateutil import relativedelta
from django import forms
from django.core.exceptions import ValidationError
from orchestra import plugins from orchestra import plugins
from orchestra.utils.functional import cached from orchestra.utils.functional import cached

View File

@ -8,7 +8,6 @@ from io import StringIO
from django import forms from django import forms
from django.utils import timezone from django.utils import timezone
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from django_iban.forms import IBANFormField
from django_iban.validators import IBANValidator, IBAN_COUNTRY_CODE_LENGTH from django_iban.validators import IBANValidator, IBAN_COUNTRY_CODE_LENGTH
from rest_framework import serializers from rest_framework import serializers

View File

@ -1,8 +1,6 @@
from django.contrib import admin from django.contrib import admin
from django.utils.translation import ugettext_lazy as _
from orchestra.admin import ExtendedModelAdmin from orchestra.admin import ExtendedModelAdmin
from orchestra.admin.filters import UsedContentTypeFilter
from orchestra.admin.utils import insertattr from orchestra.admin.utils import insertattr
from orchestra.apps.accounts.admin import AccountAdminMixin from orchestra.apps.accounts.admin import AccountAdminMixin
from orchestra.apps.services.models import Service from orchestra.apps.services.models import Service

View File

@ -1,5 +1,3 @@
import decimal
from django.core.validators import ValidationError from django.core.validators import ValidationError
from django.db import models from django.db import models
from django.db.models import Q from django.db.models import Q

View File

@ -1,6 +1,6 @@
import sys import sys
from django.utils.translation import string_concat, ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from orchestra.utils.python import AttrDict from orchestra.utils.python import AttrDict

View File

@ -1,6 +1,4 @@
from django.contrib import messages
from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse
from django.db import transaction
from django.shortcuts import redirect from django.shortcuts import redirect
from django.utils.safestring import mark_safe from django.utils.safestring import mark_safe
from django.utils.translation import ungettext, ugettext_lazy as _ from django.utils.translation import ungettext, ugettext_lazy as _

View File

@ -5,7 +5,6 @@ from django.contrib.contenttypes import generic
from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse
from django.shortcuts import redirect from django.shortcuts import redirect
from django.utils.functional import cached_property from django.utils.functional import cached_property
from django.utils.safestring import mark_safe
from django.utils.translation import ungettext, ugettext, ugettext_lazy as _ from django.utils.translation import ungettext, ugettext, ugettext_lazy as _
from orchestra.admin import ExtendedModelAdmin from orchestra.admin import ExtendedModelAdmin

View File

@ -1,8 +1,6 @@
from django.contrib.contenttypes.fields import GenericRelation from django.contrib.contenttypes.fields import GenericRelation
from django.db import DEFAULT_DB_ALIAS from django.db import DEFAULT_DB_ALIAS
from orchestra.apps.databases.models import Database
class VirtualDatabaseRelation(GenericRelation): class VirtualDatabaseRelation(GenericRelation):
""" Delete related databases if any """ """ Delete related databases if any """

View File

@ -6,7 +6,6 @@ from django.utils.translation import ugettext_lazy as _
from jsonfield import JSONField from jsonfield import JSONField
from orchestra.core import services, validators from orchestra.core import services, validators
from orchestra.models.fields import NullableCharField
from .fields import VirtualDatabaseRelation from .fields import VirtualDatabaseRelation
from .services import SoftwareService from .services import SoftwareService

View File

@ -1,5 +1,4 @@
from django import forms from django import forms
from django.core.exceptions import ValidationError
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from rest_framework import serializers from rest_framework import serializers

View File

@ -1,8 +1,6 @@
from django import forms from django import forms
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from orchestra.plugins.forms import PluginDataForm
from .options import SoftwareService, SoftwareServiceForm from .options import SoftwareService, SoftwareServiceForm

View File

@ -1,6 +1,5 @@
from django import forms from django import forms
from django.core.exceptions import ValidationError from django.core.exceptions import ValidationError
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from orchestra import plugins from orchestra import plugins

View File

@ -1,5 +1,4 @@
from django import forms from django import forms
from django.core.exceptions import ValidationError
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from rest_framework import serializers from rest_framework import serializers

View File

@ -1,5 +1,4 @@
from django import forms from django import forms
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from rest_framework import serializers from rest_framework import serializers

View File

@ -4,9 +4,8 @@ import decimal
from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes.models import ContentType
from django.utils import timezone from django.utils import timezone
from orchestra.apps.accounts.models import Account
from orchestra.apps.systemusers.models import SystemUser from orchestra.apps.systemusers.models import SystemUser
from orchestra.utils.tests import BaseTestCase, random_ascii from orchestra.utils.tests import BaseTestCase
from .. import helpers from .. import helpers
from ..models import Service, Plan from ..models import Service, Plan

View File

@ -1,16 +1,9 @@
from functools import partial
from django import forms from django import forms
from django.contrib import messages, admin from django.contrib import messages, admin
from django.core.exceptions import PermissionDenied from django.core.exceptions import PermissionDenied
from django.db import transaction
from django.shortcuts import render
from django.utils.safestring import mark_safe
from django.utils.text import capfirst
from django.utils.translation import ungettext, ugettext_lazy as _ from django.utils.translation import ungettext, ugettext_lazy as _
from orchestra.admin.decorators import action_with_confirmation from orchestra.admin.decorators import action_with_confirmation
from orchestra.admin.utils import change_url
from orchestra.apps.orchestration.models import BackendOperation as Operation from orchestra.apps.orchestration.models import BackendOperation as Operation

View File

@ -1,21 +1,10 @@
import textwrap
from django import forms
from django.conf.urls import patterns, url
from django.core.urlresolvers import reverse
from django.contrib import admin from django.contrib import admin
from django.contrib.admin.util import unquote from django.utils.translation import ugettext_lazy as _
from django.contrib.auth.admin import UserAdmin
from django.utils.translation import ugettext, ugettext_lazy as _
from django.utils.safestring import mark_safe
from orchestra.admin import ExtendedModelAdmin, ChangePasswordAdminMixin from orchestra.admin import ExtendedModelAdmin, ChangePasswordAdminMixin
from orchestra.admin.utils import wrap_admin_view
from orchestra.apps.accounts.admin import SelectAccountAdminMixin from orchestra.apps.accounts.admin import SelectAccountAdminMixin
from orchestra.apps.accounts.filters import IsActiveListFilter from orchestra.apps.accounts.filters import IsActiveListFilter
from orchestra.forms import UserCreationForm, UserChangeForm
from . import settings
from .actions import grant_permission, delete_selected from .actions import grant_permission, delete_selected
from .filters import IsMainListFilter from .filters import IsMainListFilter
from .forms import SystemUserCreationForm, SystemUserChangeForm from .forms import SystemUserCreationForm, SystemUserChangeForm

View File

@ -1,6 +1,5 @@
from django.contrib.admin import SimpleListFilter from django.contrib.admin import SimpleListFilter
from django.db.models import F from django.db.models import F
from django.utils.encoding import force_text
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _

View File

@ -2,7 +2,6 @@ import os
from django.contrib.auth.hashers import make_password from django.contrib.auth.hashers import make_password
from django.core.exceptions import ValidationError from django.core.exceptions import ValidationError
from django.core.mail import send_mail
from django.db import models from django.db import models
from django.utils.functional import cached_property from django.utils.functional import cached_property
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _

View File

@ -1,8 +1,6 @@
from django.contrib.auth import get_user_model
from django.core.exceptions import ValidationError
from django.forms import widgets from django.forms import widgets
from django.shortcuts import get_object_or_404 from django.shortcuts import get_object_or_404
from django.utils.translation import ugettext, ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from rest_framework import serializers from rest_framework import serializers
from orchestra.api.serializers import HyperlinkedModelSerializer from orchestra.api.serializers import HyperlinkedModelSerializer

View File

@ -1,6 +1,6 @@
from django.conf import settings from django.conf import settings
from django.utils.translation import ugettext, ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
SYSTEMUSERS_SHELLS = getattr(settings, 'SYSTEMUSERS_SHELLS', ( SYSTEMUSERS_SHELLS = getattr(settings, 'SYSTEMUSERS_SHELLS', (

View File

@ -17,7 +17,7 @@ from orchestra.utils.system import run, sshrun
from orchestra.utils.tests import (BaseLiveServerTestCase, random_ascii, snapshot_on_error, from orchestra.utils.tests import (BaseLiveServerTestCase, random_ascii, snapshot_on_error,
save_response_on_error) save_response_on_error)
from ... import backends, settings from ... import backends
from ...models import SystemUser from ...models import SystemUser

View File

@ -10,7 +10,6 @@ from orchestra.apps.accounts.admin import AccountAdminMixin
from orchestra.forms.widgets import DynamicHelpTextSelect from orchestra.forms.widgets import DynamicHelpTextSelect
from orchestra.plugins.admin import SelectPluginAdminMixin from orchestra.plugins.admin import SelectPluginAdminMixin
from . import settings
from .options import AppOption from .options import AppOption
from .types import AppType from .types import AppType
from .models import WebApp, WebAppOption from .models import WebApp, WebAppOption

View File

@ -1,8 +1,6 @@
from django.contrib.contenttypes.fields import GenericRelation from django.contrib.contenttypes.fields import GenericRelation
from django.db import DEFAULT_DB_ALIAS from django.db import DEFAULT_DB_ALIAS
from orchestra.apps.databases.models import Database, DatabaseUser
class VirtualDatabaseRelation(GenericRelation): class VirtualDatabaseRelation(GenericRelation):
""" Delete related databases if any """ """ Delete related databases if any """

View File

@ -1,8 +1,5 @@
import os import os
import re
from django.core.exceptions import ValidationError
from django.db import models from django.db import models
from django.db.models.signals import pre_save, pre_delete from django.db.models.signals import pre_save, pre_delete
from django.dispatch import receiver from django.dispatch import receiver

View File

@ -1,5 +1,3 @@
from rest_framework import serializers
from orchestra.api.fields import OptionField from orchestra.api.fields import OptionField
from orchestra.api.serializers import HyperlinkedModelSerializer from orchestra.api.serializers import HyperlinkedModelSerializer
from orchestra.apps.accounts.serializers import AccountSerializerMixin from orchestra.apps.accounts.serializers import AccountSerializerMixin

View File

@ -1,5 +1,4 @@
from django.conf import settings from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from orchestra.settings import BASE_DOMAIN from orchestra.settings import BASE_DOMAIN

View File

@ -1,25 +1,14 @@
import ftplib import ftplib
import os import os
import time
import textwrap
from io import StringIO from io import StringIO
from django.conf import settings as djsettings from django.conf import settings as djsettings
from django.contrib.contenttypes.models import ContentType
from django.core.management.base import CommandError
from django.core.urlresolvers import reverse
from selenium.webdriver.support.select import Select
from orchestra.apps.accounts.models import Account
from orchestra.apps.domains.models import Domain
from orchestra.apps.orchestration.models import Server, Route from orchestra.apps.orchestration.models import Server, Route
from orchestra.apps.resources.models import Resource
from orchestra.apps.systemusers.backends import SystemUserBackend from orchestra.apps.systemusers.backends import SystemUserBackend
from orchestra.utils.system import run, sshrun
from orchestra.utils.tests import BaseLiveServerTestCase, random_ascii, snapshot_on_error, save_response_on_error from orchestra.utils.tests import BaseLiveServerTestCase, random_ascii, snapshot_on_error, save_response_on_error
from ... import backends, settings from ... import backends
from ...models import WebApp
class WebAppMixin(object): class WebAppMixin(object):

View File

@ -7,11 +7,8 @@ from rest_framework import serializers
from orchestra.apps.databases.models import Database, DatabaseUser from orchestra.apps.databases.models import Database, DatabaseUser
from orchestra.forms import widgets from orchestra.forms import widgets
from orchestra.plugins.forms import PluginDataForm
from orchestra.utils.python import random_ascii from orchestra.utils.python import random_ascii
from .. import settings
from .php import PHPApp, PHPAppForm, PHPAppSerializer from .php import PHPApp, PHPAppForm, PHPAppSerializer

View File

@ -4,8 +4,6 @@ from django import forms
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from rest_framework import serializers from rest_framework import serializers
from orchestra.plugins.forms import PluginDataForm
from ..options import AppOption from ..options import AppOption
from . import AppType from . import AppType

View File

@ -5,7 +5,6 @@ from django import forms
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from rest_framework import serializers from rest_framework import serializers
from orchestra.forms import widgets
from orchestra.plugins.forms import PluginDataForm from orchestra.plugins.forms import PluginDataForm
from orchestra.utils.functional import cached from orchestra.utils.functional import cached

View File

@ -11,7 +11,6 @@ from orchestra.admin.utils import admin_link, change_url
from orchestra.apps.accounts.admin import AccountAdminMixin, SelectAccountAdminMixin from orchestra.apps.accounts.admin import AccountAdminMixin, SelectAccountAdminMixin
from orchestra.forms.widgets import DynamicHelpTextSelect from orchestra.forms.widgets import DynamicHelpTextSelect
from . import settings
from .directives import SiteDirective from .directives import SiteDirective
from .forms import WebsiteAdminForm, WebsiteDirectiveInlineFormSet from .forms import WebsiteAdminForm, WebsiteDirectiveInlineFormSet
from .models import Content, Website, WebsiteDirective from .models import Content, Website, WebsiteDirective

View File

@ -1,7 +1,5 @@
import os import os
import re
from django.core.exceptions import ValidationError
from django.db import models from django.db import models
from django.utils.functional import cached_property from django.utils.functional import cached_property
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _

View File

@ -1,26 +1,15 @@
import os import os
import socket import socket
import time
import textwrap
from django.conf import settings as djsettings
from django.contrib.contenttypes.models import ContentType
from django.core.management.base import CommandError
from django.core.urlresolvers import reverse
import requests import requests
from selenium.webdriver.support.select import Select
from orchestra.apps.accounts.models import Account
from orchestra.apps.domains.models import Domain, Record from orchestra.apps.domains.models import Domain, Record
from orchestra.apps.domains.backends import Bind9MasterDomainBackend from orchestra.apps.domains.backends import Bind9MasterDomainBackend
from orchestra.apps.orchestration.models import Server, Route from orchestra.apps.orchestration.models import Server, Route
from orchestra.apps.resources.models import Resource
from orchestra.apps.webapps.tests.functional_tests.tests import StaticWebAppMixin, RESTWebAppMixin, WebAppMixin, PHPFcidWebAppMixin, PHPFPMWebAppMixin from orchestra.apps.webapps.tests.functional_tests.tests import StaticWebAppMixin, RESTWebAppMixin, WebAppMixin, PHPFcidWebAppMixin, PHPFPMWebAppMixin
from orchestra.utils.system import run, sshrun from orchestra.utils.tests import BaseLiveServerTestCase, random_ascii, save_response_on_error
from orchestra.utils.tests import BaseLiveServerTestCase, random_ascii, snapshot_on_error, save_response_on_error
from ... import backends, settings from ... import backends
from ...models import Website
class WebsiteMixin(WebAppMixin): class WebsiteMixin(WebAppMixin):

View File

@ -1,7 +1,5 @@
from django.core.exceptions import ValidationError from django.core.exceptions import ValidationError
from orchestra.utils.functional import cached
class Plugin(object): class Plugin(object):
verbose_name = None verbose_name = None

View File

@ -3,7 +3,7 @@ import os
from functools import wraps from functools import wraps
from django.conf import settings from django.conf import settings
from django.contrib.auth import BACKEND_SESSION_KEY, SESSION_KEY, get_user_model from django.contrib.auth import BACKEND_SESSION_KEY, SESSION_KEY
from django.contrib.sessions.backends.db import SessionStore from django.contrib.sessions.backends.db import SessionStore
from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse
from django.test import LiveServerTestCase, TestCase from django.test import LiveServerTestCase, TestCase