From a09db9f287a02873c0226759f8ea444bb304cd59 Mon Sep 17 00:00:00 2001 From: Justin Choquette Date: Thu, 8 Jun 2023 12:46:53 -0400 Subject: LaaS 3.0 Almost MVP Change-Id: Ided9a43cf3088bb58a233dc459711c03f43e11b8 Signed-off-by: Justin Choquette --- src/analytics/admin.py | 5 ----- .../migrations/0003_delete_activevpnuser.py | 16 ++++++++++++++++ src/analytics/models.py | 22 ---------------------- 3 files changed, 16 insertions(+), 27 deletions(-) create mode 100644 src/analytics/migrations/0003_delete_activevpnuser.py (limited to 'src/analytics') diff --git a/src/analytics/admin.py b/src/analytics/admin.py index 63f139f..043bad6 100644 --- a/src/analytics/admin.py +++ b/src/analytics/admin.py @@ -6,8 +6,3 @@ # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## - -from django.contrib import admin -from analytics.models import ActiveVPNUser - -admin.site.register(ActiveVPNUser) diff --git a/src/analytics/migrations/0003_delete_activevpnuser.py b/src/analytics/migrations/0003_delete_activevpnuser.py new file mode 100644 index 0000000..4d21250 --- /dev/null +++ b/src/analytics/migrations/0003_delete_activevpnuser.py @@ -0,0 +1,16 @@ +# Generated by Django 2.2 on 2023-06-08 19:13 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('analytics', '0002_auto_20201109_2149'), + ] + + operations = [ + migrations.DeleteModel( + name='ActiveVPNUser', + ), + ] diff --git a/src/analytics/models.py b/src/analytics/models.py index 10baa0c..043bad6 100644 --- a/src/analytics/models.py +++ b/src/analytics/models.py @@ -6,25 +6,3 @@ # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## - -from django.db import models -from account.models import Lab - - -class ActiveVPNUser(models.Model): - """ Keeps track of how many VPN Users are connected to Lab """ - time_stamp = models.DateTimeField(auto_now_add=True) - lab = models.ForeignKey(Lab, on_delete=models.CASCADE, null=False) - active_users = models.IntegerField() - - @classmethod - def create(cls, lab_name, active_users): - """ - This creates an Active VPN Users entry from - from lab_name as a string - """ - - lab = Lab.objects.get(name=lab_name) - avu = cls(lab=lab, active_users=active_users) - avu.save() - return avu -- cgit 1.2.3-korg