From 1596550a1e548288fd8444c64110fb3a7e9a8d12 Mon Sep 17 00:00:00 2001 From: Gabriel Detraz Date: Wed, 11 Jul 2018 18:49:27 +0200 Subject: [PATCH] =?UTF-8?q?Notion=20de=20role=20sp=C3=A9cifique=20pour=20r?= =?UTF-8?q?etrouver=20le=20bon=20role?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machines/models.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/machines/models.py b/machines/models.py index a5f6ed3f..dac99d71 100644 --- a/machines/models.py +++ b/machines/models.py @@ -1502,8 +1502,31 @@ class Role(RevMixin, AclMixin, models.Model): """ Sert à la génération automatique de la conf 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) servers = models.ManyToManyField('Interface') + specific_role = models.CharField( + choices=ROLE, + null=True, + blank=True, + max_length=32, + ) class Meta: permissions = (