Skip to content

Commit

Permalink
name changes for new project name (coco); added BSD 3-clause license$
Browse files Browse the repository at this point in the history
  • Loading branch information
Michel Käser committed Oct 7, 2015
1 parent fb2b360 commit 1de9314
Show file tree
Hide file tree
Showing 124 changed files with 390 additions and 350 deletions.
14 changes: 14 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# EditorConfig is awesome: http://EditorConfig.org

root = true

[*]
charset = utf-8
indent_style = space
indent_size = 4
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
/static

# Bower packages
ipynbsrv/web/static/bower_components
coco/web/static/bower_components
# LESS generated CSS
ipynbsrv/web/static/css/main.css
coco/web/static/css/main.css
# mkdocs generated files
ipynbsrv/web/static/docs/user-guide/*
coco/web/static/docs/user-guide/*
# migrations
**/migrations/*
27 changes: 27 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Copyright (c) 2015, University of Applied Sciences and Arts Northwestern Switzerland FHNW
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

* Neither the name of coco nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4 changes: 2 additions & 2 deletions NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ CORE
[ ] create core containers with "--restart=always" so they are auto started on restart (https://docs.docker.com/reference/run/#restart-policies-restart)
[ ] define the Open vSwitch bridge as a regular interface (rather than through ovs-vsctl tool)
[ ] create Dockerfiles for the core containers and push them to the registry
[ ] use a process supervisor like monit/supervisord to ensure the ipynbsrv_hostapi process is always running
[ ] (optional) put the ipynbsrv_hostapi behind a proxy (gevent, ...). flask debug server should not be used
[ ] use a process supervisor like monit/supervisord to ensure the coco_hostapi process is always running
[ ] (optional) put the coco_hostapi behind a proxy (gevent, ...). flask debug server should not be used
[ ] (optional) run django application in app container as non-root user
[ ] (optional) enable container resource limits so a container cannot eat all i.e. memory (https://docs.docker.com/reference/run/#runtime-constraints-on-resources)

Expand Down
File renamed without changes.
File renamed without changes.
14 changes: 7 additions & 7 deletions ipynbsrv/admin/admin.py → coco/admin/admin.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
from coco.admin.forms import CollaborationGroupAdminForm, ShareAdminForm
from coco.core.models import *
from coco.core.management.commands import import_users
from django_admin_conf_vars.models import ConfigurationVariable
from django.conf.urls import patterns
from django.contrib import admin, messages
from django.contrib.auth.admin import GroupAdmin
from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect
from ipynbsrv.admin.forms import CollaborationGroupAdminForm, ShareAdminForm
from ipynbsrv.core.models import *
from ipynbsrv.core.management.commands import import_users


class CoreAdminSite(admin.AdminSite):

"""
ipynbsrv application admin site.
coco application admin site.
"""

site_header = 'ipynbsrv Administration'
site_title = 'ipynbsrv - Administration'
site_header = 'coco Administration'
site_title = 'coco - Administration'

index_title = 'Management'

Expand Down Expand Up @@ -634,7 +634,7 @@ def import_users(self, request):


# register the model admins with the site
admin_site = CoreAdminSite(name='ipynbsrv')
admin_site = CoreAdminSite(name='coco')
admin_site.register(Backend, BackendAdmin)
admin_site.register(CollaborationGroup, CollaborationGroupAdmin)
admin_site.register(ConfigurationVariable, ConfigurationVariableAdmin)
Expand Down
4 changes: 2 additions & 2 deletions ipynbsrv/admin/apps.py → coco/admin/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ class MyAdmin(AppConfig):
:inherit.
"""

name = 'ipynbsrv.admin'
label = 'ipynbsrv-admin'
name = 'coco.admin'
label = 'coco-admin'
2 changes: 1 addition & 1 deletion ipynbsrv/admin/forms.py → coco/admin/forms.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from coco.core.models import BackendUser, CollaborationGroup, Share
from django import forms
from django.contrib.admin.widgets import FilteredSelectMultiple
from ipynbsrv.core.models import BackendUser, CollaborationGroup, Share


class CollaborationGroupAdminForm(forms.ModelForm):
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion ipynbsrv/api/permissions.py → coco/api/permissions.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from coco.core.models import BackendUser
from django.contrib.auth.models import User
from ipynbsrv.core.models import BackendUser
from rest_framework import permissions
from rest_framework.exceptions import PermissionDenied

Expand Down
4 changes: 2 additions & 2 deletions ipynbsrv/api/serializer.py → coco/api/serializer.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from coco.core import settings
from coco.core.models import *
from django.contrib.auth import get_user_model
from django.contrib.auth.models import Group, User
from django_admin_conf_vars.models import ConfigurationVariable
from ipynbsrv.core import settings
from ipynbsrv.core.models import *
from rest_framework import serializers


Expand Down
2 changes: 1 addition & 1 deletion ipynbsrv/api/urls.py → coco/api/urls.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from coco.api import views
from django.conf.urls import patterns, url
from ipynbsrv.api import views
from rest_framework.urlpatterns import format_suffix_patterns

urlpatterns = patterns('',
Expand Down
8 changes: 4 additions & 4 deletions ipynbsrv/api/views.py → coco/api/views.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from coco.api.permissions import *
from coco.core.helpers import get_server_selection_algorithm
from coco.core.models import *
from coco.api.serializer import *
from django.contrib.auth.models import User, Group
from django.db.models import Q
from django_admin_conf_vars.models import ConfigurationVariable
from ipynbsrv.api.permissions import *
from ipynbsrv.core.helpers import get_server_selection_algorithm
from ipynbsrv.core.models import *
from ipynbsrv.api.serializer import *
from rest_framework import generics, status
from rest_framework.decorators import api_view
from rest_framework.permissions import *
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from django.contrib.auth.models import User
from django.core.exceptions import PermissionDenied
from ipynbsrv.contract.errors import AuthenticationError, ConnectionError, \
from coco.contract.errors import AuthenticationError, ConnectionError, \
UserNotFoundError
from ipynbsrv.core.helpers import get_internal_ldap_connected, get_user_backend_connected
from ipynbsrv.core.models import BackendGroup, BackendUser, \
from coco.core.helpers import get_internal_ldap_connected, get_user_backend_connected
from coco.core.models import BackendGroup, BackendUser, \
CollaborationGroup
from django.contrib.auth.models import User
from django.core.exceptions import PermissionDenied
import logging


Expand Down
2 changes: 1 addition & 1 deletion ipynbsrv/core/auth/checks.py → coco/core/auth/checks.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from coco.core.models import PortMapping
from django.contrib.auth.models import User
from django.core.exceptions import ObjectDoesNotExist
from django.http.response import HttpResponse
from ipynbsrv.core.models import PortMapping


COOKIE_NAME = 'username'
Expand Down
18 changes: 9 additions & 9 deletions ipynbsrv/core/conf.py → coco/core/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,26 @@
Global variable storing the arguments for the internal ldap backend
"""
config.set('INTERNAL_LDAP_CLASS',
default='ipynbsrv.backends.usergroup_backends.LdapBackend',
default='coco.backends.usergroup_backends.LdapBackend',
editable=True,
description='The full class path of the backend to use for the internal server.')

config.set('INTERNAL_LDAP_ARGS',
default='{"server": "ipynbsrv_ldap", "base_dn": "dc=ipynbsrv,dc=ldap", "users_dn": "ou=users", "groups_dn": "ou=groups"}',
default='{"server": "coco_ldap", "base_dn": "dc=coco,dc=ldap", "users_dn": "ou=users", "groups_dn": "ou=groups"}',
editable=True,
description="""The arguments needed to instantiate the internal LDAP backend.
Please provide in JSON format (i.e. {'arg1': "val1", 'arg2': "val2"}).""")

config.set('INTERNAL_LDAP_CONNECT_CREDENTIALS',
default='{"dn": "cn=admin,dc=ipynbsrv,dc=ldap", "password": "123456"}',
default='{"dn": "cn=admin,dc=coco,dc=ldap", "password": "123456"}',
editable=True,
description='The credentials used to establish a connection to the user backend.')


"""
Global variable storing the class of the server selection algorithm to use.
"""
config.set('SERVER_SELECTION_ALGORITHM_CLASS', default='ipynbsrv.core.algorithms.server_selection.RoundRobin',
config.set('SERVER_SELECTION_ALGORITHM_CLASS', default='coco.core.algorithms.server_selection.RoundRobin',
editable=True,
description='The full class path of the server selection algorithm class to use.')

Expand All @@ -33,12 +33,12 @@
Storage backend related configuration options.
"""
config.set('STORAGE_BACKEND_CLASS',
default='ipynbsrv.backends.storage_backends.LocalFileSystem',
default='coco.backends.storage_backends.LocalFileSystem',
editable=True,
description='The full class path of the storage backend to use.')

config.set('STORAGE_BACKEND_ARGS',
default='{"base_dir": "/srv/ipynbsrv/data"}',
default='{"base_dir": "/srv/coco/data"}',
editable=True,
description="""The arguments needed to instantiate the storage backend.
Please provide in JSON format (i.e. {'arg1': "val1", 'arg2': "val2"}).""")
Expand All @@ -48,17 +48,17 @@
User backend related configuration options.
"""
config.set('USER_BACKEND_CLASS',
default='ipynbsrv.backends.usergroup_backends.LdapBackend',
default='coco.backends.usergroup_backends.LdapBackend',
editable=True,
description='The full class path of the user backend to use.')

config.set('USER_BACKEND_ARGS',
default='{"server": "ipynbsrv_ldap", "base_dn": "dc=ipynbsrv,dc=ldap", "users_dn": "ou=users"}',
default='{"server": "coco_ldap", "base_dn": "dc=coco,dc=ldap", "users_dn": "ou=users"}',
editable=True,
description="""The arguments needed to instantiate the provided user backend class.
Please provide in json format (i.e. {'arg1': "val1", 'arg2': "val2"}).""")

config.set('USER_BACKEND_CONNECT_CREDENTIALS',
default='{"dn": "cn=admin,dc=ipynbsrv,dc=ldap", "password": "123456"}',
default='{"dn": "cn=admin,dc=coco,dc=ldap", "password": "123456"}',
editable=True,
description='The credentials used to establish a connection to the user backend.')
2 changes: 1 addition & 1 deletion ipynbsrv/core/helpers.py → coco/core/helpers.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from coco.common.utils import ClassLoader
from django_admin_conf_vars.global_vars import config
from ipynbsrv.common.utils import ClassLoader
import json


Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from coco.core.auth.authentication_backends import BackendProxyAuthentication
from coco.core.helpers import get_user_backend_connected
from coco.core.models import *
from coco.contract.backends import UserBackend
from django.core.management.base import BaseCommand, CommandError
from django.contrib.auth.models import User
from ipynbsrv.core.auth.authentication_backends import BackendProxyAuthentication
from ipynbsrv.core.helpers import get_user_backend_connected
from ipynbsrv.core.models import *
from ipynbsrv.contract.backends import UserBackend


def import_users():
Expand Down
Loading

0 comments on commit 1de9314

Please sign in to comment.