Commit fadd60ca authored by Kostas Papadimitriou's avatar Kostas Papadimitriou Committed by Georgios D. Tsoukalas
Browse files

cyclades: Remove userdata api from ui prefix

- Individualize userdata api by placing module under synnefo namespace and
  urs under it's own USERDATA_PREFIX
parent 396943df
......@@ -44,7 +44,7 @@ from django.conf import settings
from synnefo.api.util import get_existing_users
from synnefo.lib.utils import case_unique
from synnefo.db.models import Network, VirtualMachine
from synnefo.ui.userdata.models import PublicKeyPair
from synnefo.userdata.models import PublicKeyPair
from snf_django.lib import astakos
......
......@@ -442,7 +442,7 @@ def get_existing_users():
Retrieve user ids stored in cyclades user agnostic models.
"""
# also check PublicKeys a user with no servers/networks exist
from synnefo.ui.userdata.models import PublicKeyPair
from synnefo.userdata.models import PublicKeyPair
from synnefo.db.models import VirtualMachine, Network
keypairusernames = PublicKeyPair.objects.filter().values_list('user',
......
......@@ -6,7 +6,7 @@ synnefo_web_apps = [
'synnefo.plankton',
'synnefo.vmapi',
'synnefo.helpdesk',
'synnefo.ui.userdata',
'synnefo.userdata',
'synnefo.helpdesk',
'synnefo.quotas',
]
......
......@@ -38,8 +38,8 @@ from snf_django.lib.api.utils import prefix_pattern
from synnefo.cyclades_settings import (
BASE_URL, BASE_HOST, BASE_PATH, COMPUTE_PREFIX, VMAPI_PREFIX,
PLANKTON_PREFIX, HELPDESK_PREFIX, UI_PREFIX, ASTAKOS_BASE_URL,
ASTAKOS_BASE_PATH, BASE_ASTAKOS_PROXY_PATH, ASTAKOS_ACCOUNTS_PREFIX,
ASTAKOS_VIEWS_PREFIX, PROXY_USER_SERVICES)
USERDATA_PREFIX, ASTAKOS_BASE_PATH, BASE_ASTAKOS_PROXY_PATH,
ASTAKOS_ACCOUNTS_PREFIX, ASTAKOS_VIEWS_PREFIX, PROXY_USER_SERVICES)
from urlparse import urlparse
from functools import partial
......@@ -54,6 +54,7 @@ cyclades_patterns = patterns('',
(prefix_pattern(PLANKTON_PREFIX), include('synnefo.plankton.urls')),
(prefix_pattern(HELPDESK_PREFIX), include('synnefo.helpdesk.urls')),
(prefix_pattern(COMPUTE_PREFIX), include('synnefo.api.urls')),
(prefix_pattern(USERDATA_PREFIX), include('synnefo.userdata.urls')),
)
urlpatterns = patterns(
......
......@@ -47,6 +47,7 @@ VMAPI_PREFIX = getattr(settings, 'CYCLADES_VMAPI_PREFIX', 'vmapi')
PLANKTON_PREFIX = getattr(settings, 'CYCLADES_PLANKTON_PREFIX', 'plankton')
HELPDESK_PREFIX = getattr(settings, 'CYCLADES_HELPDESK_PREFIX', 'helpdesk')
UI_PREFIX = getattr(settings, 'CYCLADES_UI_PREFIX', 'ui')
USERDATA_PREFIX = getattr(settings, 'CYCLADES_USERDATA_PREFIX', 'userdata')
# The API implementation needs to accept and return absolute references
# to its resources. Thus, it needs to know its public URL.
......
......@@ -37,7 +37,6 @@ import os
urlpatterns = patterns('',
url(r'^$', 'synnefo.ui.views.home', name='ui_index'),
url(r'userdata/', include('synnefo.ui.userdata.urls')),
url(r'^machines/console$', 'synnefo.ui.views.machines_console',
name='ui_machines_console'),
url(r'^machines/connect$', 'synnefo.ui.views.machines_connect',
......
......@@ -40,7 +40,7 @@ from django.utils import simplejson as json
from django.conf import settings
from django.core.urlresolvers import reverse
from synnefo.ui.userdata.models import *
from synnefo.userdata.models import *
class AaiClient(Client):
......
......@@ -33,7 +33,7 @@
# or implied, of GRNET S.A.
from django.conf.urls.defaults import *
from synnefo.ui.userdata import views
from synnefo.userdata import views
from django.http import Http404
......
import binascii
from synnefo.ui.userdata.asn1 import DerObject, DerSequence
from synnefo.userdata.asn1 import DerObject, DerSequence
def exportKey(keyobj, format='PEM'):
"""Export the RSA key. A string is returned
......
......@@ -36,9 +36,9 @@ from django import http
from django.utils import simplejson as json
from django.conf import settings
from synnefo.ui.userdata import rest
from synnefo.ui.userdata.models import PublicKeyPair
from synnefo.ui.userdata.util import exportKey
from synnefo.userdata import rest
from synnefo.userdata.models import PublicKeyPair
from synnefo.userdata.util import exportKey
from snf_django.lib.astakos import get_user
SUPPORT_GENERATE_KEYS = True
......
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