text: # -*- coding: utf-8 -*-
  from __future__ import unicode_literals
  
  from django.db import models, migrations
  import uuidfield.fields
  import django.core.validators
  import django_fsm
  
  
  class Migration(migrations.Migration):
  
      dependencies = [
          ('openstack', '0007_openstackservice_available_for_all'),
      ]
  
      operations = [
          migrations.CreateModel(
              name='InstanceSecurityGroup',
              fields=[
                  ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                  ('instance', models.ForeignKey(related_name='security_groups', to='openstack.Instance')),
              ],
              options={
              },
              bases=(models.Model,),
          ),
          migrations.CreateModel(
              name='SecurityGroup',
              fields=[
                  ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                  ('description', models.CharField(max_length=500, verbose_name='description', blank=True)),
                  ('name', models.CharField(max_length=150, verbose_name='name')),
                  ('uuid', uuidfield.fields.UUIDField(unique=True, max_length=32, editable=False, blank=True)),
                  ('state', django_fsm.FSMIntegerField(default=1, choices=[(1, 'Sync Scheduled'), (2, 'Syncing'), (3, 'In Sync'), (4, 'Erred')])),
                  ('backend_id', models.CharField(max_length=128, blank=True)),
                  ('service_project_link', models.ForeignKey(related_name='security_groups', to='openstack.OpenStackServiceProjectLink')),
              ],
              options={
                  'abstract': False,
              },
              bases=(models.Model,),
          ),
          migrations.CreateModel(
              name='SecurityGroupRule',
              fields=[
                  ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                  ('protocol', models.CharField(blank=True, max_length=4, choices=[(b'tcp', b'tcp'), (b'udp', b'udp'), (b'icmp', b'icmp')])),
                  ('from_port', models.IntegerField(null=True, validators=[django.core.validators.MaxValueValidator(65535)])),
                  ('to_port', models.IntegerField(null=True, validators=[django.core.validators.MaxValueValidator(65535)])),
                  ('cidr', models.CharField(max_length=32, blank=True)),
                  ('backend_id', models.CharField(max_length=128, blank=True)),
                  ('security_group', models.ForeignKey(related_name='rules', to='openstack.SecurityGroup')),
              ],
              options={
              },
              bases=(models.Model,),
          ),
          migrations.AddField(
              model_name='instancesecuritygroup',
              name='security_group',
              field=models.ForeignKey(related_name='instance_groups', to='openstack.SecurityGroup'),
              preserve_default=True,
          ),
      ]
  