2018-06-23 14:47:24 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
# Generated by Django 1.10.7 on 2018-06-23 14:07
|
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
|
|
|
from django.db import migrations, models
|
|
|
|
import re2o.mixins
|
|
|
|
|
|
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
|
2019-11-04 16:55:03 +00:00
|
|
|
dependencies = [("machines", "0085_sshfingerprint")]
|
2018-06-23 14:47:24 +00:00
|
|
|
|
|
|
|
operations = [
|
|
|
|
migrations.CreateModel(
|
2019-11-04 16:55:03 +00:00
|
|
|
name="Role",
|
2018-06-23 14:47:24 +00:00
|
|
|
fields=[
|
2019-11-04 16:55:03 +00:00
|
|
|
(
|
|
|
|
"id",
|
|
|
|
models.AutoField(
|
|
|
|
auto_created=True,
|
|
|
|
primary_key=True,
|
|
|
|
serialize=False,
|
|
|
|
verbose_name="ID",
|
|
|
|
),
|
|
|
|
),
|
|
|
|
("role_type", models.CharField(max_length=255, unique=True)),
|
|
|
|
("servers", models.ManyToManyField(to="machines.Interface")),
|
|
|
|
(
|
|
|
|
"specific_role",
|
|
|
|
models.CharField(
|
|
|
|
blank=True,
|
|
|
|
choices=[
|
|
|
|
("dhcp-server", "DHCP server"),
|
|
|
|
("switch-conf-server", "Switches configuration server"),
|
|
|
|
("dns-recursif-server", "Recursive DNS server"),
|
|
|
|
("ntp-server", "NTP server"),
|
|
|
|
("radius-server", "Radius 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", "Gatewaw"),
|
|
|
|
],
|
|
|
|
max_length=32,
|
|
|
|
null=True,
|
|
|
|
),
|
|
|
|
),
|
2018-06-23 14:47:24 +00:00
|
|
|
],
|
2019-11-04 16:55:03 +00:00
|
|
|
options={
|
|
|
|
"permissions": (("view_role", "Can view a role."),),
|
|
|
|
"verbose_name": "Server role",
|
|
|
|
},
|
2018-06-23 14:47:24 +00:00
|
|
|
bases=(re2o.mixins.RevMixin, re2o.mixins.AclMixin, models.Model),
|
2019-11-04 16:55:03 +00:00
|
|
|
)
|
2018-06-23 14:47:24 +00:00
|
|
|
]
|