summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Reports
diff options
context:
space:
mode:
authorJoey Hagedorn <hagedorn@mcs.anl.gov>2007-07-13 17:41:12 +0000
committerJoey Hagedorn <hagedorn@mcs.anl.gov>2007-07-13 17:41:12 +0000
commit0c97a66c15226197468654b83e19c79015dcf5d7 (patch)
treea3e61589cbb24b3668dcef760c0ea40103fe74a1 /src/lib/Server/Reports
parent14063a8f707a5f8d715f0aab196615915c7ecb83 (diff)
downloadbcfg2-0c97a66c15226197468654b83e19c79015dcf5d7.tar.gz
bcfg2-0c97a66c15226197468654b83e19c79015dcf5d7.tar.bz2
bcfg2-0c97a66c15226197468654b83e19c79015dcf5d7.zip
adding new testing XML-RPC client/server code
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@3437 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Server/Reports')
-rw-r--r--src/lib/Server/Reports/reports/models.py29
1 files changed, 28 insertions, 1 deletions
diff --git a/src/lib/Server/Reports/reports/models.py b/src/lib/Server/Reports/reports/models.py
index b54d83912..6e56e6227 100644
--- a/src/lib/Server/Reports/reports/models.py
+++ b/src/lib/Server/Reports/reports/models.py
@@ -57,12 +57,39 @@ class Client(models.Model):
class Admin:
pass
+#sql to add "profile"
class Metadata(models.Model):
- '''insert magical interface to client metadata here'''
+ '''This is a mirror of clients.xml file, versioned by time'''
+ '''Generally, you look for the latest timestamp for a given client'''
client = models.ForeignKey(Client)
+ profile = models.ForeignKey(Group)
timestamp = models.DateTimeField()
+ expiration = models.DateTimeField()#Set when group of given name disappears
+
+ def __str__(self):
+ return self.timestamp
+
+#SQL to add everything here
+class Group(models.Model):
+ '''this is a mirror of groups.xml'''
+ '''generally, look for latest timestampf for a givenname that is not expired'''
+ name = models.CharField(maxlength=128)
+ groups = models.ManyToManyField(Group, related_name="containing_groups")
+ bundles = models.ManyToManyField(Bundle, related_name="containing_groups")
+ timestamp = models.DateTimeField()
+ expiration = models.DateTimeField()#Set when group of given name disappears
+ is_profile = models.BooleanField()
+
def __str__(self):
return self.timestamp
+
+#SQL to add all of this tooooo
+class Bundle(models.Model):
+ name = models.CharField(maxlength=128)
+ def __str__(self):
+ return self.timestamp
+
+
class Repository(models.Model):
'''insert magical interface to subversioned repository here'''