mirror of
https://github.com/retspen/webvirtcloud
synced 2025-07-31 12:41:08 +00:00
user can now clone instances, admin can specify user quotas (instances,cpus,memory)
user can only select predefined instance names, mac and disk names are selected automatically
This commit is contained in:
parent
de5cb19913
commit
317c2a85ae
9 changed files with 221 additions and 54 deletions
|
|
@ -20,3 +20,13 @@ class UserSSHKey(models.Model):
|
|||
|
||||
def __unicode__(self):
|
||||
return self.keyname
|
||||
|
||||
class UserAttributes(models.Model):
|
||||
user = models.OneToOneField(User, on_delete=models.CASCADE)
|
||||
can_clone_instances = models.BooleanField(default=False)
|
||||
max_instances = models.IntegerField(default=0)
|
||||
max_cpus = models.IntegerField(default=0)
|
||||
max_memory = models.IntegerField(default=0)
|
||||
|
||||
def __unicode__(self):
|
||||
return self.user.username
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue