Exemplo n.º 1
0
from autotest.frontend import settings, urls_common
from autotest.frontend.afe import resources
from autotest.frontend.afe.feeds import feed
from django.conf.urls import defaults

feeds = {
    'jobs': feed.JobFeed
}

urlpatterns, debug_patterns = (
    urls_common.generate_patterns('autotest.frontend.afe', 'AfeClient'))

resource_patterns = defaults.patterns(
    '',
    (r'^/?$', resources.ResourceDirectory.dispatch_request),
    (r'^atomic_group_classes/?$',
     resources.AtomicGroupClassCollection.dispatch_request),
    (r'^atomic_group_classes/(?P<ag_name>.+?)/?$',
     resources.AtomicGroupClass.dispatch_request),
    (r'^atomic_taggings/?$',
     resources.AtomicLabelTaggingCollection.dispatch_request),
    (r'^atomic_taggings/(?P<ag_name>.+?),(?P<label_name>.+?)/?$',
     resources.AtomicLabelTagging.dispatch_request),
    (r'^labels/?$', resources.LabelCollection.dispatch_request),
    (r'^labels/(?P<label_name>.+?)/?$', resources.Label.dispatch_request),
    (r'^users/?$', resources.UserCollection.dispatch_request),
    (r'^users/(?P<username>[@\w]+)/?$', resources.User.dispatch_request),
    (r'^user_acls/?$',
     resources.UserAclMembershipCollection.dispatch_request),
    (r'^user_acls/(?P<username>.+?),(?P<acl_name>.+?)/?$',
     resources.UserAclMembership.dispatch_request),
Exemplo n.º 2
0
from autotest.frontend import settings, urls_common
from autotest.frontend.afe import resources
from autotest.frontend.afe.feeds import feed
from django.conf.urls import defaults

feeds = {"jobs": feed.JobFeed}

urlpatterns, debug_patterns = urls_common.generate_patterns("autotest.frontend.afe", "AfeClient")

resource_patterns = defaults.patterns(
    "",
    (r"^/?$", resources.ResourceDirectory.dispatch_request),
    (r"^atomic_group_classes/?$", resources.AtomicGroupClassCollection.dispatch_request),
    (r"^atomic_group_classes/(?P<ag_name>.+?)/?$", resources.AtomicGroupClass.dispatch_request),
    (r"^atomic_taggings/?$", resources.AtomicLabelTaggingCollection.dispatch_request),
    (r"^atomic_taggings/(?P<ag_name>.+?),(?P<label_name>.+?)/?$", resources.AtomicLabelTagging.dispatch_request),
    (r"^labels/?$", resources.LabelCollection.dispatch_request),
    (r"^labels/(?P<label_name>.+?)/?$", resources.Label.dispatch_request),
    (r"^users/?$", resources.UserCollection.dispatch_request),
    (r"^users/(?P<username>[@\w]+)/?$", resources.User.dispatch_request),
    (r"^user_acls/?$", resources.UserAclMembershipCollection.dispatch_request),
    (r"^user_acls/(?P<username>.+?),(?P<acl_name>.+?)/?$", resources.UserAclMembership.dispatch_request),
    (r"^acls/?$", resources.AclCollection.dispatch_request),
    (r"^acls/(?P<acl_name>.+?)/?$", resources.Acl.dispatch_request),
    (r"^hosts/?$", resources.HostCollection.dispatch_request),
    (r"^hosts/(?P<hostname>.+?)/?$", resources.Host.dispatch_request),
    (r"^labelings/?$", resources.HostLabelingCollection.dispatch_request),
    (r"^labelings/(?P<hostname>.+?),(?P<label_name>.+?)/?$", resources.HostLabeling.dispatch_request),
    (r"^host_acls/?$", resources.HostAclMembershipCollection.dispatch_request),
    (r"^host_acls/(?P<hostname>.+?),(?P<acl_name>.+?)/?$", resources.HostAclMembership.dispatch_request),
    (r"^tests/?$", resources.TestCollection.dispatch_request),
Exemplo n.º 3
0
from django.conf.urls import defaults
try:
    import autotest.common as common  # pylint: disable=W0611
except ImportError:
    from . import common  # pylint: disable=W0611
from autotest.frontend import settings, urls_common
from autotest.frontend.tko import resources

urlpatterns, debug_patterns = (urls_common.generate_patterns(
    'autotest.frontend.tko', 'TkoClient'))

resource_patterns = defaults.patterns(
    '',
    (r'^/?$', resources.ResourceDirectory.dispatch_request),
    (r'^test_results/?$', resources.TestResultCollection.dispatch_request),
    (r'^test_results/(?P<test_id>\d+)/?$',
     resources.TestResult.dispatch_request),
)

urlpatterns += defaults.patterns(
    '', (r'^jsonp_rpc/', 'autotest.frontend.tko.views.handle_jsonp_rpc'),
    (r'^csv/', 'autotest.frontend.tko.views.handle_csv'),
    (r'^plot/', 'autotest.frontend.tko.views.handle_plot'),
    (r'^resources/', defaults.include(resource_patterns)))

if settings.DEBUG:
    urlpatterns += debug_patterns
Exemplo n.º 4
0
from django.conf.urls import defaults
try:
    import autotest.common as common
except ImportError:
    import common
from autotest.frontend import settings, urls_common
from autotest.frontend.tko import resources

urlpatterns, debug_patterns = (
        urls_common.generate_patterns('autotest.frontend.tko', 'TkoClient'))

resource_patterns = defaults.patterns(
        '',
        (r'^/?$', resources.ResourceDirectory.dispatch_request),
        (r'^test_results/?$', resources.TestResultCollection.dispatch_request),
        (r'^test_results/(?P<test_id>\d+)/?$',
         resources.TestResult.dispatch_request),
        )

urlpatterns += defaults.patterns(
        '',
        (r'^jsonp_rpc/', 'autotest.frontend.tko.views.handle_jsonp_rpc'),
        (r'^csv/', 'autotest.frontend.tko.views.handle_csv'),
        (r'^plot/', 'autotest.frontend.tko.views.handle_plot'),

        (r'^resources/', defaults.include(resource_patterns)))

if settings.DEBUG:
    urlpatterns += debug_patterns
Exemplo n.º 5
0
from django.conf.urls import defaults
from autotest.frontend import settings, urls_common
from autotest.frontend.afe.feeds import feed
from autotest.frontend.afe import resources

feeds = {
    'jobs': feed.JobFeed
}

urlpatterns, debug_patterns = (
    urls_common.generate_patterns('autotest.frontend.afe', 'AfeClient'))

resource_patterns = defaults.patterns(
    '',
    (r'^/?$', resources.ResourceDirectory.dispatch_request),
    (r'^atomic_group_classes/?$',
     resources.AtomicGroupClassCollection.dispatch_request),
    (r'^atomic_group_classes/(?P<ag_name>.+?)/?$',
     resources.AtomicGroupClass.dispatch_request),
    (r'^atomic_taggings/?$',
     resources.AtomicLabelTaggingCollection.dispatch_request),
    (r'^atomic_taggings/(?P<ag_name>.+?),(?P<label_name>.+?)/?$',
     resources.AtomicLabelTagging.dispatch_request),
    (r'^labels/?$', resources.LabelCollection.dispatch_request),
    (r'^labels/(?P<label_name>.+?)/?$', resources.Label.dispatch_request),
    (r'^users/?$', resources.UserCollection.dispatch_request),
    (r'^users/(?P<username>[@\w]+)/?$', resources.User.dispatch_request),
    (r'^user_acls/?$',
     resources.UserAclMembershipCollection.dispatch_request),
    (r'^user_acls/(?P<username>.+?),(?P<acl_name>.+?)/?$',
     resources.UserAclMembership.dispatch_request),
Exemplo n.º 6
0
from django.conf.urls import defaults
from autotest.frontend import settings, urls_common
from autotest.frontend.afe.feeds import feed
from autotest.frontend.afe import resources

feeds = {'jobs': feed.JobFeed}

urlpatterns, debug_patterns = (urls_common.generate_patterns(
    'frontend.afe', 'AfeClient'))

resource_patterns = defaults.patterns(
    '',
    (r'^/?$', resources.ResourceDirectory.dispatch_request),
    (r'^atomic_group_classes/?$',
     resources.AtomicGroupClassCollection.dispatch_request),
    (r'^atomic_group_classes/(?P<ag_name>.+?)/?$',
     resources.AtomicGroupClass.dispatch_request),
    (r'^atomic_taggings/?$',
     resources.AtomicLabelTaggingCollection.dispatch_request),
    (r'^atomic_taggings/(?P<ag_name>.+?),(?P<label_name>.+?)/?$',
     resources.AtomicLabelTagging.dispatch_request),
    (r'^labels/?$', resources.LabelCollection.dispatch_request),
    (r'^labels/(?P<label_name>.+?)/?$', resources.Label.dispatch_request),
    (r'^users/?$', resources.UserCollection.dispatch_request),
    (r'^users/(?P<username>[@\w]+)/?$', resources.User.dispatch_request),
    (r'^user_acls/?$', resources.UserAclMembershipCollection.dispatch_request),
    (r'^user_acls/(?P<username>.+?),(?P<acl_name>.+?)/?$',
     resources.UserAclMembership.dispatch_request),
    (r'^acls/?$', resources.AclCollection.dispatch_request),
    (r'^acls/(?P<acl_name>.+?)/?$', resources.Acl.dispatch_request),
    (r'^hosts/?$', resources.HostCollection.dispatch_request),
Exemplo n.º 7
0
from django.conf.urls import defaults
try:
    import autotest.common as common
except ImportError:
    import common
from autotest.frontend import settings, urls_common
from autotest.frontend.tko import resources

urlpatterns, debug_patterns = (
        urls_common.generate_patterns('frontend.tko', 'TkoClient'))

resource_patterns = defaults.patterns(
        '',
        (r'^/?$', resources.ResourceDirectory.dispatch_request),
        (r'^test_results/?$', resources.TestResultCollection.dispatch_request),
        (r'^test_results/(?P<test_id>\d+)/?$',
         resources.TestResult.dispatch_request),
        )

urlpatterns += defaults.patterns(
        '',
        (r'^jsonp_rpc/', 'frontend.tko.views.handle_jsonp_rpc'),
        (r'^csv/', 'frontend.tko.views.handle_csv'),
        (r'^plot/', 'frontend.tko.views.handle_plot'),

        (r'^resources/', defaults.include(resource_patterns)))

if settings.DEBUG:
    urlpatterns += debug_patterns