mockups for cassandra, nagios, kairosdb
diff --git a/planetstack/cassandra/__init__.py b/planetstack/cassandra/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/planetstack/cassandra/__init__.py
diff --git a/planetstack/cassandra/admin.py b/planetstack/cassandra/admin.py
new file mode 100644
index 0000000..8cb6d9d
--- /dev/null
+++ b/planetstack/cassandra/admin.py
@@ -0,0 +1,30 @@
+from django.contrib import admin
+
+from cassandra.models import *
+from django import forms
+from django.utils.safestring import mark_safe
+from django.contrib.auth.admin import UserAdmin
+from django.contrib.admin.widgets import FilteredSelectMultiple
+from django.contrib.auth.forms import ReadOnlyPasswordHashField
+from django.contrib.auth.signals import user_logged_in
+from django.utils import timezone
+from django.contrib.contenttypes import generic
+from suit.widgets import LinkedSelect
+from core.admin import SingletonAdmin,SliceInline,ServiceAttrAsTabInline, SliceROInline,ServiceAttrAsTabROInline, ReadOnlyAwareAdmin
+
+class CassandraServiceAdmin(SingletonAdmin):
+ model = CassandraService
+ verbose_name = "Cassandra Service"
+ verbose_name_plural = "Cassandra Service"
+ list_display = ("name","enabled")
+ fieldsets = [(None, {'fields': ['name','enabled','versionNumber', 'description','clusterSize','replicationFactor'], 'classes':['suit-tab suit-tab-general']})]
+ inlines = [SliceInline,ServiceAttrAsTabInline]
+
+ user_readonly_inlines = [SliceROInline, ServiceAttrAsTabROInline]
+ suit_form_tabs =(('general', 'Cassandra Service Details'),
+ ('slices','Slices'),
+ ('serviceattrs','Additional Attributes'),
+ )
+
+admin.site.register(CassandraService, CassandraServiceAdmin)
+
diff --git a/planetstack/cassandra/models.py b/planetstack/cassandra/models.py
new file mode 100644
index 0000000..12479b3
--- /dev/null
+++ b/planetstack/cassandra/models.py
@@ -0,0 +1,17 @@
+from core.models import User,Site,Service,SingletonModel,PlCoreBase, Slice
+import os
+from django.db import models
+from django.forms.models import model_to_dict
+
+# Create your models here.
+
+class CassandraService(SingletonModel,Service):
+ class Meta:
+ app_label = "cassandra"
+ verbose_name = "Cassandra Service"
+
+ clusterSize = models.PositiveIntegerField(default=1)
+ replicationFactor = models.PositiveIntegerField(default=1)
+
+ def __unicode__(self): return u'Cassandra Service'
+
diff --git a/planetstack/kairos/__init__.py b/planetstack/kairos/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/planetstack/kairos/__init__.py
diff --git a/planetstack/kairos/admin.py b/planetstack/kairos/admin.py
new file mode 100644
index 0000000..1eeb426
--- /dev/null
+++ b/planetstack/kairos/admin.py
@@ -0,0 +1,30 @@
+from django.contrib import admin
+
+from nagios.models import *
+from django import forms
+from django.utils.safestring import mark_safe
+from django.contrib.auth.admin import UserAdmin
+from django.contrib.admin.widgets import FilteredSelectMultiple
+from django.contrib.auth.forms import ReadOnlyPasswordHashField
+from django.contrib.auth.signals import user_logged_in
+from django.utils import timezone
+from django.contrib.contenttypes import generic
+from suit.widgets import LinkedSelect
+from core.admin import SingletonAdmin,SliceInline,ServiceAttrAsTabInline, SliceROInline,ServiceAttrAsTabROInline, ReadOnlyAwareAdmin
+
+class NagiosServiceAdmin(SingletonAdmin):
+ model = NagiosService
+ verbose_name = "Nagios Service"
+ verbose_name_plural = "Nagios Service"
+ list_display = ("name","enabled")
+ fieldsets = [(None, {'fields': ['name','enabled','versionNumber', 'description'], 'classes':['suit-tab suit-tab-general']})]
+ inlines = [SliceInline,ServiceAttrAsTabInline]
+
+ user_readonly_inlines = [SliceROInline, ServiceAttrAsTabROInline]
+ suit_form_tabs =(('general', 'Nagios Service Details'),
+ ('slices','Slices'),
+ ('serviceattrs','Additional Attributes'),
+ )
+
+admin.site.register(NagiosService, NagiosServiceAdmin)
+
diff --git a/planetstack/kairos/models.py b/planetstack/kairos/models.py
new file mode 100644
index 0000000..ed916d7
--- /dev/null
+++ b/planetstack/kairos/models.py
@@ -0,0 +1,14 @@
+from core.models import User,Site,Service,SingletonModel,PlCoreBase, Slice
+import os
+from django.db import models
+from django.forms.models import model_to_dict
+
+# Create your models here.
+
+class KairosDBService(SingletonModel,Service):
+ class Meta:
+ app_label = "kairos"
+ verbose_name = "KairosDB Service"
+
+ def __unicode__(self): return u'KairosDB Service'
+
diff --git a/planetstack/nagios/__init__.py b/planetstack/nagios/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/planetstack/nagios/__init__.py
diff --git a/planetstack/nagios/admin.py b/planetstack/nagios/admin.py
new file mode 100644
index 0000000..156e376
--- /dev/null
+++ b/planetstack/nagios/admin.py
@@ -0,0 +1,30 @@
+from django.contrib import admin
+
+from kairos.models import *
+from django import forms
+from django.utils.safestring import mark_safe
+from django.contrib.auth.admin import UserAdmin
+from django.contrib.admin.widgets import FilteredSelectMultiple
+from django.contrib.auth.forms import ReadOnlyPasswordHashField
+from django.contrib.auth.signals import user_logged_in
+from django.utils import timezone
+from django.contrib.contenttypes import generic
+from suit.widgets import LinkedSelect
+from core.admin import SingletonAdmin,SliceInline,ServiceAttrAsTabInline, SliceROInline,ServiceAttrAsTabROInline, ReadOnlyAwareAdmin
+
+class KairosDBServiceAdmin(SingletonAdmin):
+ model = KairosDBService
+ verbose_name = "KairosDB Service"
+ verbose_name_plural = "KairosDB Service"
+ list_display = ("name","enabled")
+ fieldsets = [(None, {'fields': ['name','enabled','versionNumber', 'description'], 'classes':['suit-tab suit-tab-general']})]
+ inlines = [SliceInline,ServiceAttrAsTabInline]
+
+ user_readonly_inlines = [SliceROInline, ServiceAttrAsTabROInline]
+ suit_form_tabs =(('general', 'KairosDB Service Details'),
+ ('slices','Slices'),
+ ('serviceattrs','Additional Attributes'),
+ )
+
+admin.site.register(KairosDBService, KairosDBServiceAdmin)
+
diff --git a/planetstack/nagios/models.py b/planetstack/nagios/models.py
new file mode 100644
index 0000000..ec7b6bb
--- /dev/null
+++ b/planetstack/nagios/models.py
@@ -0,0 +1,14 @@
+from core.models import User,Site,Service,SingletonModel,PlCoreBase, Slice
+import os
+from django.db import models
+from django.forms.models import model_to_dict
+
+# Create your models here.
+
+class NagiosService(SingletonModel,Service):
+ class Meta:
+ app_label = "nagios"
+ verbose_name = "Nagios Service"
+
+ def __unicode__(self): return u'Nagios Service'
+
diff --git a/planetstack/planetstack/settings.py b/planetstack/planetstack/settings.py
index ce13f08..0f4f0d7 100644
--- a/planetstack/planetstack/settings.py
+++ b/planetstack/planetstack/settings.py
@@ -143,6 +143,9 @@
'core',
'hpc',
'requestrouter',
+ 'cassandra',
+ 'kairos',
+ 'nagios',
'syndicate',
'geoposition',
)
@@ -197,9 +200,13 @@
{'label': 'Sites', 'icon':'icon-site', 'url': '/admin/core/site/'},
{'label': 'Slices', 'icon':'icon-slice', 'url': '/admin/core/slice/'},
{'label': 'Users', 'icon':'icon-user', 'url': '/admin/core/user/'},
- {'label': 'Request Routing', 'icon':'icon-cog', 'app': 'requestrouter'},
+ {'label': 'RequestRouter', 'icon':'icon-cog', 'app': 'requestrouter'},
{'label': 'HyperCache', 'icon':'icon-cog', 'app': 'hpc'},
{'label': 'Syndicate', 'icon':'icon-cog', 'app': 'syndicate'},
+ {'label': 'Cassandra', 'icon':'icon-cog', 'app': 'cassandra'},
+ {'label': 'KairosDB', 'icon':'icon-cog', 'app': 'kairos'},
+ {'label': 'Nagios', 'icon':'icon-cog', 'app': 'nagios'},
+
#{'label': 'Configured Services', 'icon':'icon-cog', 'models': [{'label': 'Content Delivery Network', 'app':'hpc'}]},
# 'sites',
# {'app': 'auth', 'icon':'icon-lock', 'models': ('user', 'group')},