Prepare UI for split
fixed paths to support new repo layout modified tox file Change-Id: Ibbe087cc4e0ae02b890824b4a559a9dd0c0a0a49
This commit is contained in:
parent
e6ee1e5b57
commit
f75bd1c7c7
|
@ -10,6 +10,5 @@ sys.path.append('/opt/stack/freezer')
|
||||||
|
|
||||||
# A list of applications to be added to INSTALLED_APPS.
|
# A list of applications to be added to INSTALLED_APPS.
|
||||||
ADD_INSTALLED_APPS = [
|
ADD_INSTALLED_APPS = [
|
||||||
'horizon_web_ui.freezer_ui',
|
'freezer_ui',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -10,9 +10,9 @@
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
"""Some helper functions to use the freezer_ui client functionality
|
# Some helper functions to use the freezer_ui client functionality
|
||||||
from horizon.
|
# from horizon.
|
||||||
"""
|
|
||||||
|
|
||||||
import warnings
|
import warnings
|
||||||
|
|
||||||
|
@ -23,20 +23,20 @@ from horizon.utils.memoized import memoized # noqa
|
||||||
|
|
||||||
|
|
||||||
import freezer.apiclient.client
|
import freezer.apiclient.client
|
||||||
from horizon_web_ui.freezer_ui.utils import Action
|
from freezer_ui.utils import Action
|
||||||
from horizon_web_ui.freezer_ui.utils import ActionJob
|
from freezer_ui.utils import ActionJob
|
||||||
from horizon_web_ui.freezer_ui.utils import Backup
|
from freezer_ui.utils import Backup
|
||||||
from horizon_web_ui.freezer_ui.utils import Client
|
from freezer_ui.utils import Client
|
||||||
from horizon_web_ui.freezer_ui.utils import Job
|
from freezer_ui.utils import Job
|
||||||
from horizon_web_ui.freezer_ui.utils import JobList
|
from freezer_ui.utils import JobList
|
||||||
from horizon_web_ui.freezer_ui.utils import Session
|
from freezer_ui.utils import Session
|
||||||
from horizon_web_ui.freezer_ui.utils import create_dict_action
|
from freezer_ui.utils import create_dict_action
|
||||||
from horizon_web_ui.freezer_ui.utils import create_dummy_id
|
from freezer_ui.utils import create_dummy_id
|
||||||
|
|
||||||
|
|
||||||
@memoized
|
@memoized
|
||||||
def get_service_url(request):
|
def get_service_url(request):
|
||||||
""" Get Freezer API url from keystone catalog.
|
"""Get Freezer API url from keystone catalog.
|
||||||
if Freezer is not set in keystone, the fallback will be
|
if Freezer is not set in keystone, the fallback will be
|
||||||
'FREEZER_API_URL' in local_settings.py
|
'FREEZER_API_URL' in local_settings.py
|
||||||
"""
|
"""
|
||||||
|
@ -288,7 +288,8 @@ def client_get(request, client_id):
|
||||||
|
|
||||||
def add_job_to_session(request, session_id, job_id):
|
def add_job_to_session(request, session_id, job_id):
|
||||||
"""This function will add a job to a session and the API will handle the
|
"""This function will add a job to a session and the API will handle the
|
||||||
copy of job information to the session """
|
copy of job information to the session
|
||||||
|
"""
|
||||||
try:
|
try:
|
||||||
return _freezerclient(request).sessions.add_job(session_id, job_id)
|
return _freezerclient(request).sessions.add_job(session_id, job_id)
|
||||||
except Exception:
|
except Exception:
|
||||||
|
@ -297,7 +298,8 @@ def add_job_to_session(request, session_id, job_id):
|
||||||
|
|
||||||
def remove_job_from_session(request, session_id, job_id):
|
def remove_job_from_session(request, session_id, job_id):
|
||||||
"""Remove a job from a session will delete the job information but not the
|
"""Remove a job from a session will delete the job information but not the
|
||||||
job itself """
|
job itself
|
||||||
|
"""
|
||||||
try:
|
try:
|
||||||
return _freezerclient(request).sessions.remove_job(session_id, job_id)
|
return _freezerclient(request).sessions.remove_job(session_id, job_id)
|
||||||
except Exception:
|
except Exception:
|
||||||
|
@ -366,7 +368,8 @@ def session_get(request, session_id):
|
||||||
def backups_list(request, offset=0, time_after=None, time_before=None,
|
def backups_list(request, offset=0, time_after=None, time_before=None,
|
||||||
text_match=None):
|
text_match=None):
|
||||||
"""List all backups and optionally you can provide filters and pagination
|
"""List all backups and optionally you can provide filters and pagination
|
||||||
values """
|
values
|
||||||
|
"""
|
||||||
page_size = utils.get_page_size(request)
|
page_size = utils.get_page_size(request)
|
||||||
|
|
||||||
search = {}
|
search = {}
|
||||||
|
|
|
@ -19,7 +19,7 @@ from django.views import generic
|
||||||
from openstack_dashboard.api.rest import utils as rest_utils
|
from openstack_dashboard.api.rest import utils as rest_utils
|
||||||
from openstack_dashboard.api.rest.utils import JSONResponse
|
from openstack_dashboard.api.rest.utils import JSONResponse
|
||||||
|
|
||||||
import horizon_web_ui.freezer_ui.api.api as freezer_api
|
import freezer_ui.api.api as freezer_api
|
||||||
|
|
||||||
|
|
||||||
# https://github.com/tornadoweb/tornado/issues/1009
|
# https://github.com/tornadoweb/tornado/issues/1009
|
||||||
|
|
|
@ -14,7 +14,7 @@ from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
import horizon
|
import horizon
|
||||||
|
|
||||||
import horizon_web_ui.freezer_ui.dashboard as dashboard
|
import freezer_ui.dashboard as dashboard
|
||||||
|
|
||||||
|
|
||||||
class BackupsPanel(horizon.Panel):
|
class BackupsPanel(horizon.Panel):
|
||||||
|
|
|
@ -16,7 +16,7 @@ from django.utils import safestring
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
from horizon.utils import functions as utils
|
from horizon.utils import functions as utils
|
||||||
from horizon import tables
|
from horizon import tables
|
||||||
from horizon_web_ui.freezer_ui.utils import timestamp_to_string
|
from freezer_ui.utils import timestamp_to_string
|
||||||
|
|
||||||
|
|
||||||
class Restore(tables.LinkAction):
|
class Restore(tables.LinkAction):
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
from django.conf.urls import patterns
|
from django.conf.urls import patterns
|
||||||
from django.conf.urls import url
|
from django.conf.urls import url
|
||||||
|
|
||||||
from horizon_web_ui.freezer_ui.backups import views
|
from freezer_ui.backups import views
|
||||||
|
|
||||||
|
|
||||||
urlpatterns = patterns(
|
urlpatterns = patterns(
|
||||||
|
|
|
@ -22,10 +22,9 @@ from horizon import exceptions
|
||||||
from horizon import tables
|
from horizon import tables
|
||||||
from horizon import workflows
|
from horizon import workflows
|
||||||
|
|
||||||
|
from freezer_ui.backups import tables as freezer_tables
|
||||||
from horizon_web_ui.freezer_ui.backups import tables as freezer_tables
|
from freezer_ui.backups.workflows import restore as restore_workflow
|
||||||
from horizon_web_ui.freezer_ui.backups.workflows import restore as restore_workflow
|
import freezer_ui.api.api as freezer_api
|
||||||
import horizon_web_ui.freezer_ui.api.api as freezer_api
|
|
||||||
|
|
||||||
|
|
||||||
class IndexView(tables.DataTableView):
|
class IndexView(tables.DataTableView):
|
||||||
|
@ -69,7 +68,8 @@ class RestoreView(workflows.WorkflowView):
|
||||||
int(backup.data_dict[0]['backup_metadata']['time_stamp']))
|
int(backup.data_dict[0]['backup_metadata']['time_stamp']))
|
||||||
backup_date_str = django_date(backup_date, 'SHORT_DATETIME_FORMAT')
|
backup_date_str = django_date(backup_date, 'SHORT_DATETIME_FORMAT')
|
||||||
return "Restore '{}' from {}".format(
|
return "Restore '{}' from {}".format(
|
||||||
backup.data_dict[0]['backup_metadata']['backup_name'], backup_date_str)
|
backup.data_dict[0]['backup_metadata']['backup_name'],
|
||||||
|
backup_date_str)
|
||||||
|
|
||||||
def get_initial(self):
|
def get_initial(self):
|
||||||
return {"backup_id": self.kwargs['backup_id']}
|
return {"backup_id": self.kwargs['backup_id']}
|
||||||
|
@ -79,4 +79,3 @@ class RestoreView(workflows.WorkflowView):
|
||||||
workflow.name = self.get_workflow_name()
|
workflow.name = self.get_workflow_name()
|
||||||
|
|
||||||
return workflow
|
return workflow
|
||||||
|
|
||||||
|
|
|
@ -18,13 +18,13 @@ from horizon import forms
|
||||||
from horizon import exceptions
|
from horizon import exceptions
|
||||||
from horizon import workflows
|
from horizon import workflows
|
||||||
|
|
||||||
import horizon_web_ui.freezer_ui.api.api as freezer_api
|
import freezer_ui.api.api as freezer_api
|
||||||
|
|
||||||
|
|
||||||
class DestinationAction(workflows.MembershipAction):
|
class DestinationAction(workflows.MembershipAction):
|
||||||
path = forms.CharField(label=_("Destination Path"),
|
path = forms.CharField(label=_("Destination Path"),
|
||||||
help_text=_("The path in which the backup should be "
|
help_text=_("The path in which the backup should be"
|
||||||
"restored"),
|
" restored"),
|
||||||
required=True)
|
required=True)
|
||||||
backup_id = forms.CharField(widget=forms.HiddenInput())
|
backup_id = forms.CharField(widget=forms.HiddenInput())
|
||||||
|
|
||||||
|
|
|
@ -11,8 +11,10 @@
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
|
from freezer_ui.jobs import tables
|
||||||
|
|
||||||
from horizon import browsers
|
from horizon import browsers
|
||||||
from horizon_web_ui.freezer_ui.jobs import tables
|
|
||||||
|
|
||||||
|
|
||||||
class ContainerBrowser(browsers.ResourceBrowser):
|
class ContainerBrowser(browsers.ResourceBrowser):
|
||||||
|
|
|
@ -12,8 +12,9 @@
|
||||||
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
|
from freezer_ui import dashboard
|
||||||
|
|
||||||
import horizon
|
import horizon
|
||||||
from horizon_web_ui.freezer_ui import dashboard
|
|
||||||
|
|
||||||
|
|
||||||
class JobsPanel(horizon.Panel):
|
class JobsPanel(horizon.Panel):
|
||||||
|
|
|
@ -20,8 +20,8 @@ from horizon import messages
|
||||||
from horizon import tables
|
from horizon import tables
|
||||||
from horizon.utils.urlresolvers import reverse
|
from horizon.utils.urlresolvers import reverse
|
||||||
|
|
||||||
import horizon_web_ui.freezer_ui.api.api as freezer_api
|
import freezer_ui.api.api as freezer_api
|
||||||
from horizon_web_ui.freezer_ui.utils import timestamp_to_string
|
from freezer_ui.utils import timestamp_to_string
|
||||||
|
|
||||||
|
|
||||||
def format_last_backup(last_backup):
|
def format_last_backup(last_backup):
|
||||||
|
@ -212,7 +212,7 @@ class EditAction(tables.LinkAction):
|
||||||
|
|
||||||
def get_link_url(self, datum=None):
|
def get_link_url(self, datum=None):
|
||||||
# this is used to pass to values as an url
|
# this is used to pass to values as an url
|
||||||
# TODO: look for a way to improve this
|
# TODO(m3m0): look for a way to improve this
|
||||||
ids = '{0}==={1}'.format(datum.action_id, datum.job_id)
|
ids = '{0}==={1}'.format(datum.action_id, datum.job_id)
|
||||||
return reverse("horizon:freezer_ui:jobs:create_action",
|
return reverse("horizon:freezer_ui:jobs:create_action",
|
||||||
kwargs={'job_id': ids})
|
kwargs={'job_id': ids})
|
||||||
|
@ -232,7 +232,7 @@ class ActionsTable(tables.DataTable):
|
||||||
|
|
||||||
def get_object_id(self, container):
|
def get_object_id(self, container):
|
||||||
# this is used to pass to values as an url
|
# this is used to pass to values as an url
|
||||||
# TODO: look for a way to improve this
|
# TODO(m3m0): look for a way to improve this
|
||||||
ids = '{0}==={1}'.format(container.action_id, container.job_id)
|
ids = '{0}==={1}'.format(container.action_id, container.job_id)
|
||||||
return ids
|
return ids
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
from django.conf.urls import patterns
|
from django.conf.urls import patterns
|
||||||
from django.conf.urls import url
|
from django.conf.urls import url
|
||||||
|
|
||||||
from horizon_web_ui.freezer_ui.jobs import views
|
from freezer_ui.jobs import views
|
||||||
|
|
||||||
|
|
||||||
urlpatterns = patterns(
|
urlpatterns = patterns(
|
||||||
|
|
|
@ -19,14 +19,13 @@ from horizon import exceptions
|
||||||
from horizon import messages
|
from horizon import messages
|
||||||
from horizon import workflows
|
from horizon import workflows
|
||||||
|
|
||||||
import horizon_web_ui.freezer_ui.api.api as freezer_api
|
import freezer_ui.api.api as freezer_api
|
||||||
import horizon_web_ui.freezer_ui.jobs.browsers as project_browsers
|
import freezer_ui.jobs.browsers as project_browsers
|
||||||
from horizon_web_ui.freezer_ui.utils import create_dict_action
|
from freezer_ui.utils import create_dict_action
|
||||||
import workflows.configure as configure_workflow
|
import workflows.configure as configure_workflow
|
||||||
import workflows.action as action_workflow
|
import workflows.action as action_workflow
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class JobWorkflowView(workflows.WorkflowView):
|
class JobWorkflowView(workflows.WorkflowView):
|
||||||
workflow_class = configure_workflow.ConfigureJob
|
workflow_class = configure_workflow.ConfigureJob
|
||||||
|
|
||||||
|
@ -98,7 +97,7 @@ class ActionWorkflowView(workflows.WorkflowView):
|
||||||
try:
|
try:
|
||||||
action_id, job_id = ids.split('===')
|
action_id, job_id = ids.split('===')
|
||||||
except ValueError:
|
except ValueError:
|
||||||
action_id = None
|
# action_id = None
|
||||||
job_id = self.kwargs['job_id']
|
job_id = self.kwargs['job_id']
|
||||||
try:
|
try:
|
||||||
return freezer_api.job_get(self.request, job_id)
|
return freezer_api.job_get(self.request, job_id)
|
||||||
|
@ -116,7 +115,7 @@ class ActionWorkflowView(workflows.WorkflowView):
|
||||||
try:
|
try:
|
||||||
action_id, job_id = self.kwargs['job_id'].split('===')
|
action_id, job_id = self.kwargs['job_id'].split('===')
|
||||||
except ValueError:
|
except ValueError:
|
||||||
job_id = self.kwargs['job_id']
|
# job_id = self.kwargs['job_id']
|
||||||
action_id = None
|
action_id = None
|
||||||
|
|
||||||
if self.is_update():
|
if self.is_update():
|
||||||
|
@ -133,9 +132,9 @@ class ActionWorkflowView(workflows.WorkflowView):
|
||||||
initial.update(**rules)
|
initial.update(**rules)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
messages.warning(self.request, _("Cannot edit an action "
|
messages.warning(self.request, _("Cannot edit an action "
|
||||||
"created by the scheduler"))
|
"created by the"
|
||||||
|
" scheduler"))
|
||||||
exceptions.handle(self.request, "")
|
exceptions.handle(self.request, "")
|
||||||
|
|
||||||
initial.update({'original_name': job.id})
|
initial.update({'original_name': job.id})
|
||||||
return initial
|
return initial
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ from django.utils.translation import ugettext_lazy as _
|
||||||
from horizon import workflows
|
from horizon import workflows
|
||||||
from horizon import exceptions
|
from horizon import exceptions
|
||||||
from horizon import forms
|
from horizon import forms
|
||||||
import horizon_web_ui.freezer_ui.api.api as freezer_api
|
import freezer_ui.api.api as freezer_api
|
||||||
|
|
||||||
|
|
||||||
class ActionConfigurationAction(workflows.Action):
|
class ActionConfigurationAction(workflows.Action):
|
||||||
|
|
|
@ -18,8 +18,8 @@ from horizon import exceptions
|
||||||
from horizon import forms
|
from horizon import forms
|
||||||
from horizon import workflows
|
from horizon import workflows
|
||||||
|
|
||||||
import horizon_web_ui.freezer_ui.api.api as freezer_api
|
import freezer_ui.api.api as freezer_api
|
||||||
from horizon_web_ui.freezer_ui.utils import actions_in_job
|
from freezer_ui.utils import actions_in_job
|
||||||
|
|
||||||
|
|
||||||
class ActionsConfigurationAction(workflows.Action):
|
class ActionsConfigurationAction(workflows.Action):
|
||||||
|
@ -31,6 +31,7 @@ class ActionsConfigurationAction(workflows.Action):
|
||||||
help_text_template = "freezer_ui/jobs" \
|
help_text_template = "freezer_ui/jobs" \
|
||||||
"/_actions.html"
|
"/_actions.html"
|
||||||
|
|
||||||
|
|
||||||
class ActionsConfiguration(workflows.Step):
|
class ActionsConfiguration(workflows.Step):
|
||||||
action_class = ActionsConfigurationAction
|
action_class = ActionsConfigurationAction
|
||||||
contributes = ('actions',)
|
contributes = ('actions',)
|
||||||
|
|
|
@ -14,8 +14,10 @@
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
|
from freezer_ui.sessions import tables
|
||||||
|
|
||||||
from horizon import browsers
|
from horizon import browsers
|
||||||
from horizon_web_ui.freezer_ui.sessions import tables
|
|
||||||
|
|
||||||
|
|
||||||
class SessionBrowser(browsers.ResourceBrowser):
|
class SessionBrowser(browsers.ResourceBrowser):
|
||||||
|
|
|
@ -11,9 +11,8 @@
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
from freezer_ui import dashboard
|
||||||
import horizon
|
import horizon
|
||||||
from horizon_web_ui.freezer_ui import dashboard
|
|
||||||
|
|
||||||
|
|
||||||
class SessionsPanel(horizon.Panel):
|
class SessionsPanel(horizon.Panel):
|
||||||
|
|
|
@ -17,7 +17,7 @@ from django.utils.translation import ungettext_lazy
|
||||||
from horizon import tables
|
from horizon import tables
|
||||||
from horizon.utils.urlresolvers import reverse
|
from horizon.utils.urlresolvers import reverse
|
||||||
|
|
||||||
import horizon_web_ui.freezer_ui.api.api as freezer_api
|
import freezer_ui.api.api as freezer_api
|
||||||
|
|
||||||
|
|
||||||
def get_link(session):
|
def get_link(session):
|
||||||
|
@ -115,7 +115,7 @@ class JobsTable(tables.DataTable):
|
||||||
|
|
||||||
def get_object_id(self, job):
|
def get_object_id(self, job):
|
||||||
# this is used to pass to values as an url
|
# this is used to pass to values as an url
|
||||||
# TODO: look for a way to improve this
|
# TODO(m3m0): look for a way to improve this
|
||||||
ids = '{0}==={1}'.format(job.job_id, job.session_id)
|
ids = '{0}==={1}'.format(job.job_id, job.session_id)
|
||||||
return ids
|
return ids
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
from django.conf.urls import patterns
|
from django.conf.urls import patterns
|
||||||
from django.conf.urls import url
|
from django.conf.urls import url
|
||||||
|
|
||||||
from horizon_web_ui.freezer_ui.sessions import views
|
from freezer_ui.sessions import views
|
||||||
|
|
||||||
|
|
||||||
urlpatterns = patterns(
|
urlpatterns = patterns(
|
||||||
|
|
|
@ -18,11 +18,11 @@ from horizon import browsers
|
||||||
from horizon import exceptions
|
from horizon import exceptions
|
||||||
from horizon import workflows
|
from horizon import workflows
|
||||||
|
|
||||||
import horizon_web_ui.freezer_ui.sessions.browsers as project_browsers
|
import freezer_ui.sessions.browsers as project_browsers
|
||||||
from horizon_web_ui.freezer_ui.sessions.workflows import attach
|
from freezer_ui.sessions.workflows import attach
|
||||||
from horizon_web_ui.freezer_ui.sessions.workflows import create_session
|
from freezer_ui.sessions.workflows import create_session
|
||||||
import horizon_web_ui.freezer_ui.api.api as freezer_api
|
import freezer_ui.api.api as freezer_api
|
||||||
from horizon_web_ui.freezer_ui.utils import SessionJob
|
from freezer_ui.utils import SessionJob
|
||||||
|
|
||||||
|
|
||||||
class AttachToSessionWorkflow(workflows.WorkflowView):
|
class AttachToSessionWorkflow(workflows.WorkflowView):
|
||||||
|
|
|
@ -16,7 +16,7 @@ from horizon import exceptions
|
||||||
from horizon import forms
|
from horizon import forms
|
||||||
from horizon import workflows
|
from horizon import workflows
|
||||||
|
|
||||||
import horizon_web_ui.freezer_ui.api.api as freezer_api
|
import freezer_ui.api.api as freezer_api
|
||||||
|
|
||||||
|
|
||||||
class SessionConfigurationAction(workflows.Action):
|
class SessionConfigurationAction(workflows.Action):
|
||||||
|
|
|
@ -18,7 +18,7 @@ from horizon import exceptions
|
||||||
from horizon import forms
|
from horizon import forms
|
||||||
from horizon import workflows
|
from horizon import workflows
|
||||||
|
|
||||||
import horizon_web_ui.freezer_ui.api.api as freezer_api
|
import freezer_ui.api.api as freezer_api
|
||||||
|
|
||||||
|
|
||||||
class SessionConfigurationAction(workflows.Action):
|
class SessionConfigurationAction(workflows.Action):
|
||||||
|
|
|
@ -24,7 +24,7 @@ from django.conf.urls import include
|
||||||
from django.conf.urls import patterns
|
from django.conf.urls import patterns
|
||||||
from django.conf.urls import url
|
from django.conf.urls import url
|
||||||
|
|
||||||
import horizon_web_ui.freezer_ui.api.rest.urls as rest_urls
|
import freezer_ui.api.rest.urls as rest_urls
|
||||||
|
|
||||||
urlpatterns = patterns(
|
urlpatterns = patterns(
|
||||||
'',
|
'',
|
||||||
|
|
|
@ -1,2 +1 @@
|
||||||
parsedatetime>=1.4
|
parsedatetime>=1.4
|
||||||
freezer
|
|
|
@ -1,10 +1,21 @@
|
||||||
-e git+https://github.com/openstack/horizon.git#egg=horizon
|
# The order of packages is significant, because pip processes them in the order
|
||||||
django-nose>=1.2
|
# of appearance. Changing the order has an impact on the overall integration
|
||||||
nose-exclude
|
# process, which may cause wedges in the gate later.
|
||||||
mock>=1.1,!=1.1.4;python_version!='2.6'
|
hacking<0.11,>=0.10.0
|
||||||
mock==1.0.1;python_version=='2.6'
|
|
||||||
python-openstackclient>=1.5.0
|
|
||||||
mox>=0.5.3
|
|
||||||
# Not in global-requirements
|
|
||||||
parsedatetime
|
|
||||||
coverage>=3.6
|
coverage>=3.6
|
||||||
|
discover
|
||||||
|
python-subunit>=0.0.18
|
||||||
|
sphinx!=1.2.0,!=1.3b1,<1.3,>=1.1.2
|
||||||
|
oslosphinx<2.6.0,>=2.5.0 # Apache-2.0
|
||||||
|
oslotest<1.6.0,>=1.5.1 # Apache-2.0
|
||||||
|
testrepository>=0.0.18
|
||||||
|
testscenarios>=0.4
|
||||||
|
testtools!=1.2.0,>=0.9.36
|
||||||
|
pbr>=1.6
|
||||||
|
flake8
|
||||||
|
pytest
|
||||||
|
pytest-cov
|
||||||
|
pytest-xdist
|
||||||
|
pylint>=1.3.1
|
||||||
|
testresources
|
42
tox.ini
42
tox.ini
|
@ -4,37 +4,27 @@ skipsdist = True
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
usedevelop = True
|
usedevelop = True
|
||||||
deps =
|
|
||||||
pytest
|
|
||||||
flake8
|
|
||||||
pytest-cov
|
|
||||||
pytest-xdist
|
|
||||||
pymysql
|
|
||||||
python-openstackclient
|
|
||||||
mock
|
|
||||||
pylint>=1.3.1
|
|
||||||
django-nose
|
|
||||||
nose-exclude
|
|
||||||
mox
|
|
||||||
parsedatetime
|
|
||||||
coverage>=3.6
|
|
||||||
git+https://github.com/openstack/horizon.git#egg=horizon
|
|
||||||
|
|
||||||
install_command = pip install -U {opts} {packages}
|
install_command = pip install -U {opts} {packages}
|
||||||
setenv = VIRTUAL_ENV={envdir}
|
setenv =
|
||||||
commands = coverage run --source='.' --omit='.tox/*' manage.py test . --settings=freezer_ui.tests.settings
|
VIRTUAL_ENV={envdir}
|
||||||
|
deps = -r{toxinidir}/requirements.txt
|
||||||
[pytest]
|
-r{toxinidir}/test-requirements.txt
|
||||||
python_files = test_*.py
|
commands = py.test -v --cov-report term-missing --cov freezer_ui
|
||||||
norecursedirs = .tox .venv freezer_api freezer/binaries
|
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
commands = flake8 freezer_ui
|
commands = flake8
|
||||||
|
|
||||||
[testenv:pylint]
|
[testenv:venv]
|
||||||
commands = pylint --rcfile .pylintrc freezer_ui
|
commands = {posargs}
|
||||||
|
|
||||||
|
[testenv:cover]
|
||||||
|
commands = python setup.py testr --coverage --testr-args='{posargs}'
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
show-source = True
|
show-source = True
|
||||||
exclude = .venv,.tox,dist,doc,test,*egg,tests
|
ignore = E123,E125,H405,H238,H306,H701
|
||||||
|
builtins = _
|
||||||
|
exclude=.venv,.tox,dist,doc,test,*egg,tests,runtests.py
|
||||||
|
|
||||||
|
[testenv:pylint]
|
||||||
|
commands = pylint --rcfile .pylintrc freezer_ui
|
||||||
|
|
Loading…
Reference in New Issue