Commit 1910b426 authored by Lukas Burgey's avatar Lukas Burgey
Browse files

Merge breaking branch 'urls' into dev

This breaks _all_ urls in the project. Upgrading to this change needs to be coordinated,
as webpage, client, backend and the puppet config need to be upgraded in tandem.
parents b2e62bd9 670fa056
[submodule "webpage"]
path = webpage
url = https://git.scc.kit.edu/feudal/feudalWebpage.git
[submodule "client"]
path = client
url = https://git.scc.kit.edu/feudal/feudalClient.git
Subproject commit dfce6039cd82e9a4e6f455a7353a590b36485229
......@@ -2,22 +2,20 @@ from django.urls import include, path, re_path
from django.contrib import admin
from .views.clients import URLPATTERNS as clientapi_urls
from .views.webpage import URLPATTERNS as frontend_urls
from .views.webpage import URLPATTERNS as webpage_urls
from .views.rest import URLPATTERNS as user_rest_urls
from .views.rest import HelpView
from .auth.v1.urls import URLPATTERNS as auth_urls
# used in tests
API_PATH = 'user-api'
# all these paths must be configured in the nginx config!
urlpatterns = [
path('client/', include(clientapi_urls)),
path('webpage/', include(webpage_urls)),
URLPATTERNS = [
path('clientapi/', include(clientapi_urls)),
path('api/', include(frontend_urls)),
path('user/', include(user_rest_urls)),
path('user', HelpView.as_view()),
path(API_PATH + '/', include(user_rest_urls)),
re_path(API_PATH + r'.*', HelpView.as_view()),
path('auth/v1/', include(auth_urls)),
path('admin/', admin.site.urls),
path('auth/', include(auth_urls)),
path('admin', admin.site.urls),
]
......@@ -253,4 +253,6 @@ URLPATTERNS = [
path('states', DeploymentStateListView.as_view()),
re_path(r'^state/(?P<id>[0-9]+)$', DeploymentStateView.as_view()),
re_path(r'.*', HelpView.as_view()),
]
......@@ -11,7 +11,7 @@ class ClientViewTest(tests.APIClientTest):
def test_configuration_entitlement(self):
response = self.client.put(
'/backend/clientapi/config',
'/client/config',
{
"services": {
"CVMFS": {
......@@ -35,7 +35,7 @@ class ClientViewTest(tests.APIClientTest):
def test_configuration_group(self):
response = self.client.put(
'/backend/clientapi/config',
'/client/config',
{
"services": {
"CVMFS": {
......@@ -86,7 +86,7 @@ class ClientViewTest(tests.APIClientTest):
for invalid_config in invalid_configs:
response = self.client.put(
'/backend/clientapi/config',
'/client/config',
invalid_config,
content_type='application/json',
**self.auth_headers(),
......@@ -97,7 +97,7 @@ class ClientViewTest(tests.APIClientTest):
def test_deregister(self):
response = self.client.put(
'/backend/clientapi/deregister',
'/client/deregister',
{
},
content_type='application/json',
......@@ -109,7 +109,7 @@ class ClientViewTest(tests.APIClientTest):
def test_get_states(self):
response = self.client.get(
'/backend/clientapi/dep-states',
'/client/dep-states',
**self.auth_headers(),
)
LOGGER.debug('response: %s', response)
......
......@@ -4,14 +4,13 @@ import logging
from feudal.backend import models, tests
from feudal.backend.models import deployments
from feudal.backend.urls import API_PATH
LOGGER = logging.getLogger(__name__)
def make_path(path, *args):
p = path.format(*args)
return '/backend/'+API_PATH+'/'+p
return '/user/'+p
class UserViewTest(tests.ClientFeudalTest):
......
......@@ -9,7 +9,7 @@ LOGGER = logging.getLogger(__name__)
class StateViewTest(tests.ClientFeudalTest):
def test_api_state(self):
response = self.client.get('/backend/api/state')
response = self.client.get('/webpage/state')
self.assertTrue('user' in response.json())
LOGGER.info('response: %s', response.json())
......
from django.conf.urls import include, url
from .backend import urls
# pylint: disable=invalid-name
urlpatterns = [
url(r'^backend/', include(urls.URLPATTERNS)),
]
Subproject commit a2b25760458bf8c2372ce54fb52d14b2b0017f2f
Subproject commit b2e34dc949f0dfbbea62b5c93a5b47bd30bedbde
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