Updated snf-webproject hooks
authorKostas Papadimitriou <kpap@grnet.gr>
Thu, 23 Feb 2012 13:32:32 +0000 (15:32 +0200)
committerKostas Papadimitriou <kpap@grnet.gr>
Thu, 23 Feb 2012 13:33:45 +0000 (15:33 +0200)
snf-pithos-app/conf/20-snf-pithos-app-settings.conf
snf-pithos-app/pithos/api/synnefo_settings.py
snf-pithos-app/pithos/synnefo_settings.py [deleted file]
snf-pithos-app/pithos/urls.py [deleted file]
snf-pithos-app/setup.py
snf-pithos-backend/setup.py
snf-pithos-tools/setup.py

index cab94bd..f8dc4d3 100644 (file)
@@ -13,7 +13,7 @@ PITHOS_BACKEND_DB_CONNECTION = 'sqlite://///user/share/synnefo/pithos/backend.db
 
 # Block storage.
 #PITHOS_BACKEND_BLOCK_MODULE = 'pithos.backends.lib.hashfiler'
-PITHOS_BACKEND_BLOCK_PATH = '/user/share/synnefo/pithos/data'
+PITHOS_BACKEND_BLOCK_PATH = '/usr/share/synnefo/pithos/data'
 
 # Queue for billing.
 #
index e1d1681..e3e9125 100644 (file)
@@ -1,33 +1,18 @@
-# Setup logging (use this name for the setting to avoid conflicts with django > 1.2.x).
-LOGGING_SETUP = {
-    'version': 1,
-    'disable_existing_loggers': True,
-    'formatters': {
-        'simple': {
-            'format': '%(message)s'
-        },
-        'verbose': {
-            'format': '%(asctime)s [%(levelname)s] %(name)s %(message)s'
-        },
-    },
-    'handlers': {
-        'null': {
-            'class': 'logging.NullHandler',
-        },
-        'console': {
-            'class': 'logging.StreamHandler',
-            'formatter': 'verbose'
-        },
-        'file': {
-            'class': 'logging.FileHandler',
-            'formatter': 'verbose'
-        },
+"""
+Hooks for snf-webproject used in snf-pithos-app setup.py entry_points
+"""
+
+synnefo_installed_apps = ['pithos.api']
+
+# apply required middleware
+synnefo_middlewares = [
+    'synnefo.lib.middleware.LoggingConfigMiddleware',
+    'synnefo.lib.middleware.SecureMiddleware'
+]
+
+loggers = {
+    'pithos': {
+        'handlers': ['console'],
+        'level': 'INFO'
     },
-    'loggers': {
-        'pithos': {
-            'handlers': ['console'],
-            'level': 'INFO'
-        },
-    }
 }
-
diff --git a/snf-pithos-app/pithos/synnefo_settings.py b/snf-pithos-app/pithos/synnefo_settings.py
deleted file mode 100644 (file)
index d59687b..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-"""
-Hooks for snf-webproject used in snf-pithos-app setup.py entry_points
-"""
-
-from django.conf.urls.defaults import include, patterns
-
-synnefo_installed_apps = ['pithos.api']
-synnefo_urls = patterns('',
-    (r'', include('pithos.urls')),
-)
-synnefo_middlewares = [
-    'pithos.middleware.LoggingConfigMiddleware',
-    'pithos.middleware.SecureMiddleware'
-]
-
-from pithos.api.synnefo_settings import *
diff --git a/snf-pithos-app/pithos/urls.py b/snf-pithos-app/pithos/urls.py
deleted file mode 100644 (file)
index 3442897..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-# Copyright 2011-2012 GRNET S.A. All rights reserved.
-# 
-# Redistribution and use in source and binary forms, with or
-# without modification, are permitted provided that the following
-# conditions are met:
-#
-#   1. Redistributions of source code must retain the above
-#      copyright notice, this list of conditions and the following
-#      disclaimer.
-#
-#   2. 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.
-#
-# THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``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 GRNET S.A 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.
-#
-# The views and conclusions contained in the software and
-# documentation are those of the authors and should not be
-# interpreted as representing official policies, either expressed
-# or implied, of GRNET S.A.
-
-from django.conf.urls.defaults import include, patterns
-
-
-urlpatterns = patterns('',
-    (r'', include('pithos.api.urls')),
-)
index cd7484b..3d7dcf5 100644 (file)
@@ -65,7 +65,7 @@ CLASSIFIERS = []
 
 # Package requirements
 INSTALL_REQUIRES = [
-    'snf-common',
+    'snf-common>=0.8.1',
     'snf-pithos-backend',
     'Django>=1.2, <1.3',
     'south>=0.7, <=0.7.3'
@@ -200,10 +200,11 @@ setup(
      'console_scripts': [
          ],
      'synnefo': [
-         'default_settings = pithos.synnefo_settings',
-         'web_apps = pithos.synnefo_settings:synnefo_installed_apps',
-         'web_middleware = pithos.synnefo_settings:synnefo_middlewares',
-         'urls = pithos.synnefo_settings:synnefo_urls'
+         'default_settings = pithos.api.synnefo_settings',
+         'web_apps = pithos.api.synnefo_settings:synnefo_installed_apps',
+         'web_middleware = pithos.api.synnefo_settings:synnefo_middlewares',
+         'urls = pithos.api.urls:urlpatterns',
+         'loggers = pithos.api.synnefo_settings:logging'
          ]
       },
 )
index 5c348fe..e04b75b 100644 (file)
@@ -65,7 +65,7 @@ CLASSIFIERS = []
 
 # Package requirements
 INSTALL_REQUIRES = [
-    'snf-common',
+    'snf-common>=0.8.1',
     'SQLAlchemy>=0.6.3',
 ]
 
index 96c9bf7..4b05271 100644 (file)
@@ -67,7 +67,7 @@ CLASSIFIERS = []
 
 # Package requirements
 INSTALL_REQUIRES = [
-    'snf-common'
+    'snf-common>=0.8.1'
 ]
 
 EXTRAS_REQUIRES = {