diff --git a/COPYING b/COPYING new file mode 100644 index 0000000000000000000000000000000000000000..b3e1a5b2d8f4f0f8e3f6aa174a163ff0bb4d2d4e --- /dev/null +++ b/COPYING @@ -0,0 +1,17 @@ +Copyright © 2011-2013 Greek Research and Technology Network (GRNET S.A.) + +Developed by Leonidas Poulopoulos (leopoul-at-noc-dot-grnet-dot-gr), +GRNET NOC + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS +ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + diff --git a/README.txt b/README.txt index 8cec0e049cc6e2e28d42aedcc86ace2f1b65b520..530fac2d2f9e980f5ae0578c60b7fa83e805f11b 100644 --- a/README.txt +++ b/README.txt @@ -1,5 +1,7 @@ =========== 1. Tool requirements +Note: Depending on your setup each of the following +may depend on other packages * python-django * python-django-extensions @@ -12,8 +14,8 @@ * python-paramiko (>= 1.7.7.1) * python-memcache * python-django-registration -* python-ncclient -* python-nxpy +* ncclient (http://ncclient.grnet.gr/, http://github.com/leopoul/ncclient) +* nxpy (https://code.grnet.gr/projects/nxpy) * python-lxml * python-ipaddr * python-django-tinymce @@ -39,15 +41,13 @@ Components roles: 3. Operational requirements * Shibboleth authentication - - Required shibboleth attributes: - - HTTP_EPPN - - HTTP_SHIB_INETORGPERSON_MAIL - - An appropriate HTTP_SHIB_EP_ENTITLEMENT - - Optional Attributes: - - HTTP_SHIB_INETORGPERSON_GIVENNAME - - HTTP_SHIB_PERSON_SURNAME -* A valid domain name in peer table (passed through HTTP_SHIB_HOMEORGANIZATION) - + - Shibboleth attributes: + - eduPersonPrincipalName: Provides a string that uniquely identifies an administrator in the management application. + - eduPersonEntitlement: A specific URN value must be provided to authorize an administrator: urn:mace:grnet.gr:fod:admin + - mail: The e-mail address (one or more) of the administrator. It is used for notifications from the management application. It may also be used for further communication, with prior consent. + - givenName (optional): The person's first name. + - sn (optional): The person's last name. + =========== 4. Installation Procedure @@ -77,22 +77,84 @@ In settings.py set the following according to your configuration: 4.2.1 Logos -Inside the static folder you will find two empty png files: logo.dist.png (172x80) and shib_login.dist.png (98x80). -Edit those two with your favourite image processing software and save them as logo.png and shib_login.png under the same folder. Image sizes are optimized to operate without any +Inside the static folder you will find two empty png files: fod_logo.xcf (Gimp file) and shib_login.dist.png. +Edit those two with your favourite image processing software and save them as fod_logo.png (under static/img/) and shib_login.png (under static/). Image sizes are optimized to operate without any other code changes. In case you want to incorporate images of different sizes you have to fine tune css and/or html as well. 4.2.2 Footer Under the templates folder (templates), you can alter the footer.html file to include your own footer messages, badges, etc. -4.3 Installation +4.2.3 Welcome Page + +Under the templates folder (templates), you can alter the welcome page - welcome.html with your own images, carousel, videos, etc. + +4.3 Configuration Examples + +* Gunicorn configuration + /etc/gunicorn.d/project: + CONFIG = { + 'mode': 'django', + 'working_dir': '/path/to/flowspy', + #'python': '/usr/bin/python', + 'args': ( + '--bind=localhost:port', + '--workers=1', + '--timeout=360', + #'--keepalive=90', + '--worker-class=egg:gunicorn#gevent', + '--log-level=debug', + '--log-file=/path/to/fod.log', + 'settings.py', + ), +} + +* Apache operates as a gunicorn Proxy with WSGI and Shibboleth modules enabled. +Depending on the setup the apache configuration may vary. + + +* Celeryd example configuration: + /etc/default/celeryd: + # Name of nodes to start, here we have a single node + CELERYD_NODES="w1" + # or we could have three nodes: + #CELERYD_NODES="w1 w2 w3" + + # Where to chdir at start. + CELERYD_CHDIR="/path/to/flowspy/" + # How to call "manage.py celeryd_multi" + CELERYD_MULTI="$CELERYD_CHDIR/manage.py celeryd_multi" + + # How to call "manage.py celeryctl" + CELERYCTL="$CELERYD_CHDIR/manage.py celeryctl" + + # Extra arguments to celeryd + #CELERYD_OPTS="--time-limit=300 --concurrency=8" + CELERYD_OPTS="-E -B" + # Name of the celery config module. + CELERY_CONFIG_MODULE="celeryconfig" + + # %n will be replaced with the nodename. + CELERYD_LOG_FILE="$CELERYD_CHDIR/celery_var/log/celery/%n.log" + CELERYD_PID_FILE="$CELERYD_CHDIR/celery_var/run/celery/%n.pid" + + # Workers should run as an unprivileged user. + CELERYD_USER="user" + CELERYD_GROUP="usergroup" + + # Name of the projects settings module. + export DJANGO_SETTINGS_MODULE="settings" + + +4.4 Installation * Run: ./manage.py syncdb to create all the necessary tables in the database. Enable the admin account to insert initial data for peers and their contact info. * Then to allow for south migrations: ./manage.py migration -* If you have properly set the primary and alternate whois servers you could go for: +* Only if you wish to obtain info for your peers from a whois server: + If you have properly set the primary and alternate whois servers you could go for: ./manage.py fetch_networks to automatically fill network info. Alternatively you could fill those info manually via the admin interface. @@ -100,7 +162,6 @@ Under the templates folder (templates), you can alter the footer.html file to in * Modify flatpages to suit your needs * Once Apache proxying and shibboleth modules are properly setup, login to the tool. If shibboleth SP is properly setup you should see a user pending activation message and an activation email should arrive at the NOTIFY_ADMIN_MAILS accounts. -5. UPDATING: -* from 0.9.1 to 0.9.2: - - Check diff between urls - - run ./manage.py migrate accounts (data migration for perms) + +** To share ideas and ask questions drop an email at: leopoul-at-noc(dot)grnet{dot}gr + diff --git a/accounts/admin.py b/accounts/admin.py index a7552eff96ff0f57a6dbecbe6dd1412e33dcacdb..3572f02959f502e4a173ccfa3f531637f355263e 100644 --- a/accounts/admin.py +++ b/accounts/admin.py @@ -1,3 +1,22 @@ +# +# -*- coding: utf-8 -*- vim:fileencoding=utf-8: +#Copyright © 2011-2013 Greek Research and Technology Network (GRNET S.A.) + +#Developed by Leonidas Poulopoulos (leopoul-at-noc-dot-grnet-dot-gr), +#GRNET NOC +# +#Permission to use, copy, modify, and/or distribute this software for any +#purpose with or without fee is hereby granted, provided that the above +#copyright notice and this permission notice appear in all copies. +# +#THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD +#TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +#FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR +#CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +#DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS +#ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +#SOFTWARE. +# from django.contrib import admin from flowspy.accounts.models import * from django.contrib.auth.models import User diff --git a/accounts/models.py b/accounts/models.py index 5ecce5cd4c8913df06d6845194a0c11372b4f347..933eb6b6ca4110c7d6d12d83d1f815ba591048b8 100644 --- a/accounts/models.py +++ b/accounts/models.py @@ -1,3 +1,22 @@ +# +# -*- coding: utf-8 -*- vim:fileencoding=utf-8: +#Copyright © 2011-2013 Greek Research and Technology Network (GRNET S.A.) + +#Developed by Leonidas Poulopoulos (leopoul-at-noc-dot-grnet-dot-gr), +#GRNET NOC +# +#Permission to use, copy, modify, and/or distribute this software for any +#purpose with or without fee is hereby granted, provided that the above +#copyright notice and this permission notice appear in all copies. +# +#THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD +#TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +#FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR +#CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +#DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS +#ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +#SOFTWARE. +# from django.db import models from django.contrib.auth.models import User from flowspy.peers.models import * diff --git a/accounts/views.py b/accounts/views.py index e1b8119ec3526ec0cb302bc714a5a59538edadcc..456571bf42ceb2bc9b9a7d100857549a4677ad28 100644 --- a/accounts/views.py +++ b/accounts/views.py @@ -1,3 +1,22 @@ +# +# -*- coding: utf-8 -*- vim:fileencoding=utf-8: +#Copyright © 2011-2013 Greek Research and Technology Network (GRNET S.A.) + +#Developed by Leonidas Poulopoulos (leopoul-at-noc-dot-grnet-dot-gr), +#GRNET NOC +# +#Permission to use, copy, modify, and/or distribute this software for any +#purpose with or without fee is hereby granted, provided that the above +#copyright notice and this permission notice appear in all copies. +# +#THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD +#TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +#FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR +#CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +#DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS +#ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +#SOFTWARE. +# from django.conf import settings from django.core.mail import send_mail from django.contrib.sites.models import Site diff --git a/djangobackends/shibauthBackend.py b/djangobackends/shibauthBackend.py index c262baeb689e59d604dc06c0dcab532bc0377ca8..602e59a96775b8a673baf97f454e94131ee58498 100644 --- a/djangobackends/shibauthBackend.py +++ b/djangobackends/shibauthBackend.py @@ -1,3 +1,22 @@ +# +# -*- coding: utf-8 -*- vim:fileencoding=utf-8: +#Copyright © 2011-2013 Greek Research and Technology Network (GRNET S.A.) + +#Developed by Leonidas Poulopoulos (leopoul-at-noc-dot-grnet-dot-gr), +#GRNET NOC +# +#Permission to use, copy, modify, and/or distribute this software for any +#purpose with or without fee is hereby granted, provided that the above +#copyright notice and this permission notice appear in all copies. +# +#THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD +#TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +#FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR +#CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +#DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS +#ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +#SOFTWARE. +# # -*- coding: utf-8 -*- vim:encoding=utf-8: # vim: tabstop=4:shiftwidth=4:softtabstop=4:expandtab diff --git a/flowspec/admin.py b/flowspec/admin.py index 732f30ba27358092550d500e80627ac5f4d9f21d..01df8e555c071b6e3f6e238f0ee0e14ffe7fe7ea 100644 --- a/flowspec/admin.py +++ b/flowspec/admin.py @@ -1,3 +1,22 @@ +# +# -*- coding: utf-8 -*- vim:fileencoding=utf-8: +#Copyright © 2011-2013 Greek Research and Technology Network (GRNET S.A.) + +#Developed by Leonidas Poulopoulos (leopoul-at-noc-dot-grnet-dot-gr), +#GRNET NOC +# +#Permission to use, copy, modify, and/or distribute this software for any +#purpose with or without fee is hereby granted, provided that the above +#copyright notice and this permission notice appear in all copies. +# +#THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD +#TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +#FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR +#CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +#DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS +#ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +#SOFTWARE. +# from django.contrib import admin from flowspy.flowspec.models import * from flowspy.accounts.models import * diff --git a/flowspec/forms.py b/flowspec/forms.py index a91e7a9ea89b6990d612f3edaa215485ddf4c6a2..3e4d28b463a8ace0ab7862dc12bc33d8f13727e8 100644 --- a/flowspec/forms.py +++ b/flowspec/forms.py @@ -1,3 +1,22 @@ +# +# -*- coding: utf-8 -*- vim:fileencoding=utf-8: +#Copyright © 2011-2013 Greek Research and Technology Network (GRNET S.A.) + +#Developed by Leonidas Poulopoulos (leopoul-at-noc-dot-grnet-dot-gr), +#GRNET NOC +# +#Permission to use, copy, modify, and/or distribute this software for any +#purpose with or without fee is hereby granted, provided that the above +#copyright notice and this permission notice appear in all copies. +# +#THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD +#TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +#FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR +#CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +#DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS +#ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +#SOFTWARE. +# from django import forms from django.utils.safestring import mark_safe from django.utils.translation import ugettext as _ diff --git a/flowspec/models.py b/flowspec/models.py index 165964bc77164113d54b9c32ba6ba31ac9f8ca81..11527f586cd8837facfae44d74ff2dc9d9f573b8 100644 --- a/flowspec/models.py +++ b/flowspec/models.py @@ -1,3 +1,22 @@ +# +# -*- coding: utf-8 -*- vim:fileencoding=utf-8: +#Copyright © 2011-2013 Greek Research and Technology Network (GRNET S.A.) + +#Developed by Leonidas Poulopoulos (leopoul-at-noc-dot-grnet-dot-gr), +#GRNET NOC +# +#Permission to use, copy, modify, and/or distribute this software for any +#purpose with or without fee is hereby granted, provided that the above +#copyright notice and this permission notice appear in all copies. +# +#THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD +#TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +#FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR +#CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +#DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS +#ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +#SOFTWARE. +# # -*- coding: utf-8 -*- vim:encoding=utf-8: # vim: tabstop=4:shiftwidth=4:softtabstop=4:expandtab diff --git a/flowspec/tasks.py b/flowspec/tasks.py index 23419997f70603572e80b76d40e5d85cfcfecb8d..b4011b7bcdddc814b5eb20230bbb6405d930e5f8 100644 --- a/flowspec/tasks.py +++ b/flowspec/tasks.py @@ -1,3 +1,22 @@ +# +# -*- coding: utf-8 -*- vim:fileencoding=utf-8: +#Copyright © 2011-2013 Greek Research and Technology Network (GRNET S.A.) + +#Developed by Leonidas Poulopoulos (leopoul-at-noc-dot-grnet-dot-gr), +#GRNET NOC +# +#Permission to use, copy, modify, and/or distribute this software for any +#purpose with or without fee is hereby granted, provided that the above +#copyright notice and this permission notice appear in all copies. +# +#THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD +#TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +#FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR +#CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +#DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS +#ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +#SOFTWARE. +# from utils import proxy as PR from celery.task import task from celery.task.sets import subtask diff --git a/flowspec/views.py b/flowspec/views.py index 0f14b6e5b48be1c72a89f874177bd45d951b143a..bb48d819f32e985f6d54b8debb6b94103c57c8ff 100644 --- a/flowspec/views.py +++ b/flowspec/views.py @@ -1,3 +1,22 @@ +# +# -*- coding: utf-8 -*- vim:fileencoding=utf-8: +#Copyright © 2011-2013 Greek Research and Technology Network (GRNET S.A.) + +#Developed by Leonidas Poulopoulos (leopoul-at-noc-dot-grnet-dot-gr), +#GRNET NOC +# +#Permission to use, copy, modify, and/or distribute this software for any +#purpose with or without fee is hereby granted, provided that the above +#copyright notice and this permission notice appear in all copies. +# +#THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD +#TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +#FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR +#CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +#DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS +#ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +#SOFTWARE. +# # Create your views here. import urllib2 import socket diff --git a/peers/admin.py b/peers/admin.py index f2c4d2e1323b2a988660f887e5eec8992c22031e..7c8856f41013789e29733ad08101084daecf0f5a 100644 --- a/peers/admin.py +++ b/peers/admin.py @@ -1,3 +1,22 @@ +# +# -*- coding: utf-8 -*- vim:fileencoding=utf-8: +#Copyright © 2011-2013 Greek Research and Technology Network (GRNET S.A.) + +#Developed by Leonidas Poulopoulos (leopoul-at-noc-dot-grnet-dot-gr), +#GRNET NOC +# +#Permission to use, copy, modify, and/or distribute this software for any +#purpose with or without fee is hereby granted, provided that the above +#copyright notice and this permission notice appear in all copies. +# +#THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD +#TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +#FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR +#CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +#DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS +#ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +#SOFTWARE. +# from django.contrib import admin from flowspy.peers.models import * diff --git a/peers/models.py b/peers/models.py index 0b1d7939e9355130cd482c319edb960a5ffbfde9..386c0cfd26bd8316c7c35418b312eaf2f9135fab 100644 --- a/peers/models.py +++ b/peers/models.py @@ -1,3 +1,22 @@ +# +# -*- coding: utf-8 -*- vim:fileencoding=utf-8: +#Copyright © 2011-2013 Greek Research and Technology Network (GRNET S.A.) + +#Developed by Leonidas Poulopoulos (leopoul-at-noc-dot-grnet-dot-gr), +#GRNET NOC +# +#Permission to use, copy, modify, and/or distribute this software for any +#purpose with or without fee is hereby granted, provided that the above +#copyright notice and this permission notice appear in all copies. +# +#THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD +#TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +#FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR +#CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +#DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS +#ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +#SOFTWARE. +# from django.db import models from utils.whois import * from django.contrib.auth.models import User diff --git a/peers/views.py b/peers/views.py index 60f00ef0ef347811e7b0c0921b7fda097acd9fcc..6cb846432bf7bdae2ed7170f5ee03bdf05a5293f 100644 --- a/peers/views.py +++ b/peers/views.py @@ -1 +1,20 @@ +# +# -*- coding: utf-8 -*- vim:fileencoding=utf-8: +#Copyright © 2011-2013 Greek Research and Technology Network (GRNET S.A.) + +#Developed by Leonidas Poulopoulos (leopoul-at-noc-dot-grnet-dot-gr), +#GRNET NOC +# +#Permission to use, copy, modify, and/or distribute this software for any +#purpose with or without fee is hereby granted, provided that the above +#copyright notice and this permission notice appear in all copies. +# +#THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD +#TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +#FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR +#CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +#DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS +#ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +#SOFTWARE. +# # Create your views here. diff --git a/poller/application.py b/poller/application.py index 8be4eee135076e463e0889880d06a3505d28a7d4..d319934bb0e2052f57ddc155beafd70140ad91e5 100644 --- a/poller/application.py +++ b/poller/application.py @@ -1,3 +1,22 @@ +# +# -*- coding: utf-8 -*- vim:fileencoding=utf-8: +#Copyright © 2011-2013 Greek Research and Technology Network (GRNET S.A.) + +#Developed by Leonidas Poulopoulos (leopoul-at-noc-dot-grnet-dot-gr), +#GRNET NOC +# +#Permission to use, copy, modify, and/or distribute this software for any +#purpose with or without fee is hereby granted, provided that the above +#copyright notice and this permission notice appear in all copies. +# +#THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD +#TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +#FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR +#CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +#DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS +#ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +#SOFTWARE. +# #!/usr/bin/python from gevent import monkey; monkey.patch_all() import os diff --git a/poller/urls.py b/poller/urls.py index c25dc1eee0bcc3cc41ef941ff498f10981bcbe2b..79691972cbdd92610aaa422d40cb5f2660c8b680 100644 --- a/poller/urls.py +++ b/poller/urls.py @@ -1,3 +1,22 @@ +# +# -*- coding: utf-8 -*- vim:fileencoding=utf-8: +#Copyright © 2011-2013 Greek Research and Technology Network (GRNET S.A.) + +#Developed by Leonidas Poulopoulos (leopoul-at-noc-dot-grnet-dot-gr), +#GRNET NOC +# +#Permission to use, copy, modify, and/or distribute this software for any +#purpose with or without fee is hereby granted, provided that the above +#copyright notice and this permission notice appear in all copies. +# +#THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD +#TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +#FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR +#CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +#DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS +#ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +#SOFTWARE. +# from django.conf.urls.defaults import * from django.conf import settings diff --git a/poller/views.py b/poller/views.py index 0e756e93198648c64f06d8fa0d47eeaa09ba17d0..aa5d12123b5d1cf155abb2f78deb7205eb2e80bf 100644 --- a/poller/views.py +++ b/poller/views.py @@ -1,3 +1,22 @@ +# +# -*- coding: utf-8 -*- vim:fileencoding=utf-8: +#Copyright © 2011-2013 Greek Research and Technology Network (GRNET S.A.) + +#Developed by Leonidas Poulopoulos (leopoul-at-noc-dot-grnet-dot-gr), +#GRNET NOC +# +#Permission to use, copy, modify, and/or distribute this software for any +#purpose with or without fee is hereby granted, provided that the above +#copyright notice and this permission notice appear in all copies. +# +#THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD +#TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +#FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR +#CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +#DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS +#ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +#SOFTWARE. +# from gevent import monkey monkey.patch_all() from gevent.pool import Pool diff --git a/settings.py.dist b/settings.py.dist index e6172b6b73e805ff9b739185b5f89e0b87518af2..a0c4caeb14e8b1631a9ffc2d5f4df9c02e07ce59 100644 --- a/settings.py.dist +++ b/settings.py.dist @@ -1,3 +1,22 @@ +# +# -*- coding: utf-8 -*- vim:fileencoding=utf-8: +#Copyright © 2011-2013 Greek Research and Technology Network (GRNET S.A.) + +#Developed by Leonidas Poulopoulos (leopoul-at-noc-dot-grnet-dot-gr), +#GRNET NOC +# +#Permission to use, copy, modify, and/or distribute this software for any +#purpose with or without fee is hereby granted, provided that the above +#copyright notice and this permission notice appear in all copies. +# +#THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD +#TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +#FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR +#CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +#DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS +#ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +#SOFTWARE. +# # Django settings for grnet project. # -*- coding: utf-8 -*- vim:encoding=utf-8: # vim: tabstop=4:shiftwidth=4:softtabstop=4:expandtab diff --git a/utils/decorators.py b/utils/decorators.py index c1930f3b33d2d350d4f7f9ba0a16e19b5aa60b27..f6a3733d7964c6220f1b631650e4d2f6575f9dde 100644 --- a/utils/decorators.py +++ b/utils/decorators.py @@ -1,3 +1,22 @@ +# +# -*- coding: utf-8 -*- vim:fileencoding=utf-8: +#Copyright © 2011-2013 Greek Research and Technology Network (GRNET S.A.) + +#Developed by Leonidas Poulopoulos (leopoul-at-noc-dot-grnet-dot-gr), +#GRNET NOC +# +#Permission to use, copy, modify, and/or distribute this software for any +#purpose with or without fee is hereby granted, provided that the above +#copyright notice and this permission notice appear in all copies. +# +#THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD +#TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +#FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR +#CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +#DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS +#ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +#SOFTWARE. +# from django.http import HttpResponseRedirect from django.core.urlresolvers import reverse diff --git a/utils/proxy.py b/utils/proxy.py index 47d0a4cbd29a53e13f837a04bba1d607aabc1903..c581810a2a402c794295ed2178b2188afa10cde7 100644 --- a/utils/proxy.py +++ b/utils/proxy.py @@ -1,3 +1,22 @@ +# +# -*- coding: utf-8 -*- vim:fileencoding=utf-8: +#Copyright © 2011-2013 Greek Research and Technology Network (GRNET S.A.) + +#Developed by Leonidas Poulopoulos (leopoul-at-noc-dot-grnet-dot-gr), +#GRNET NOC +# +#Permission to use, copy, modify, and/or distribute this software for any +#purpose with or without fee is hereby granted, provided that the above +#copyright notice and this permission notice appear in all copies. +# +#THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD +#TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +#FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR +#CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +#DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS +#ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +#SOFTWARE. +# import nxpy as np from ncclient import manager from ncclient.transport.errors import AuthenticationError, SSHError diff --git a/utils/randomizer.py b/utils/randomizer.py index bfb08545927ab6e61fbe192569944f3b04d25127..d19f4307b7f40dace06c15ea5c58e3e83e9d6ab2 100644 --- a/utils/randomizer.py +++ b/utils/randomizer.py @@ -1,3 +1,22 @@ +# +# -*- coding: utf-8 -*- vim:fileencoding=utf-8: +#Copyright © 2011-2013 Greek Research and Technology Network (GRNET S.A.) + +#Developed by Leonidas Poulopoulos (leopoul-at-noc-dot-grnet-dot-gr), +#GRNET NOC +# +#Permission to use, copy, modify, and/or distribute this software for any +#purpose with or without fee is hereby granted, provided that the above +#copyright notice and this permission notice appear in all copies. +# +#THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD +#TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +#FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR +#CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +#DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS +#ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +#SOFTWARE. +# import string import random diff --git a/utils/whois.py b/utils/whois.py index 52150800edcd30ff0651563218722061972a6540..b612492e08da96dfa43fd4fcd25fdaea7c43442d 100644 --- a/utils/whois.py +++ b/utils/whois.py @@ -1,3 +1,22 @@ +# +# -*- coding: utf-8 -*- vim:fileencoding=utf-8: +#Copyright © 2011-2013 Greek Research and Technology Network (GRNET S.A.) + +#Developed by Leonidas Poulopoulos (leopoul-at-noc-dot-grnet-dot-gr), +#GRNET NOC +# +#Permission to use, copy, modify, and/or distribute this software for any +#purpose with or without fee is hereby granted, provided that the above +#copyright notice and this permission notice appear in all copies. +# +#THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD +#TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +#FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR +#CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +#DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS +#ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +#SOFTWARE. +# import socket from ipaddr import * import re