mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-22 19:33:11 +00:00
Notion de role spécifique pour retrouver le bon role
This commit is contained in:
parent
793cf302ad
commit
35eb945404
1 changed files with 23 additions and 0 deletions
|
@ -1447,8 +1447,31 @@ class Role(RevMixin, AclMixin, models.Model):
|
||||||
""" Sert à la génération automatique de la conf des serveurs"""
|
""" Sert à la génération automatique de la conf des serveurs"""
|
||||||
PRETTY_NAME = "Roles des serveurs"
|
PRETTY_NAME = "Roles des serveurs"
|
||||||
|
|
||||||
|
ROLE = (
|
||||||
|
('dhcp-server', 'dhcp-server'),
|
||||||
|
('switch-conf-server', 'switch-conf-server'),
|
||||||
|
('dns-recursif-server', 'dns-recursif-server'),
|
||||||
|
('ntp-server', 'ntp-server'),
|
||||||
|
('radius-server', 'radius-server'),
|
||||||
|
('ntp-server', 'ntp-server'),
|
||||||
|
('log-server', 'log-server'),
|
||||||
|
('ldap-master-server', 'ldap-master-server'),
|
||||||
|
('ldap-backup-server', 'ldap-backup-server'),
|
||||||
|
('smtp-server', 'smtp-server'),
|
||||||
|
('postgresql-server', 'postgresql-server'),
|
||||||
|
('mysql-server', 'mysql-server'),
|
||||||
|
('sql-client', 'sql-client'),
|
||||||
|
('gateway', 'gateway'),
|
||||||
|
)
|
||||||
|
|
||||||
role_type = models.CharField(max_length=255, unique=True)
|
role_type = models.CharField(max_length=255, unique=True)
|
||||||
servers = models.ManyToManyField('Interface')
|
servers = models.ManyToManyField('Interface')
|
||||||
|
specific_role = models.CharField(
|
||||||
|
choices=ROLE,
|
||||||
|
null=True,
|
||||||
|
blank=True,
|
||||||
|
max_length=32,
|
||||||
|
)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
permissions = (
|
permissions = (
|
||||||
|
|
Loading…
Reference in a new issue