# -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2017-11-27 17:27
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    dependencies = [
        ('dcim', '0051_rackreservation_tenant'),
    ]

    operations = [
        migrations.CreateModel(
            name='VirtualChassis',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('domain', models.CharField(blank=True, max_length=30)),
                ('master', models.OneToOneField(default=1, on_delete=django.db.models.deletion.PROTECT, related_name='vc_master_for', to='dcim.Device')),
            ],
        ),
        migrations.AddField(
            model_name='device',
            name='virtual_chassis',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='members', to='dcim.VirtualChassis'),
        ),
        migrations.AddField(
            model_name='device',
            name='vc_position',
            field=models.PositiveSmallIntegerField(blank=True, null=True, validators=[django.core.validators.MaxValueValidator(255)]),
        ),
        migrations.AddField(
            model_name='device',
            name='vc_priority',
            field=models.PositiveSmallIntegerField(blank=True, null=True, validators=[django.core.validators.MaxValueValidator(255)]),
        ),
        migrations.AlterUniqueTogether(
            name='device',
            unique_together=set([('virtual_chassis', 'vc_position'), ('rack', 'position', 'face')]),
        ),
    ]
