# -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2017-10-07 12:28
from __future__ import unicode_literals

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import fernet_fields.fields


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Cloud',
            fields=[
                ('added', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('name', models.CharField(max_length=60)),
                ('access_instructions_url', models.URLField(blank=True, max_length=2048, null=True)),
                ('kind', models.CharField(default='cloud', editable=False, max_length=10)),
                ('slug', models.SlugField(primary_key=True, serialize=False)),
            ],
            options={
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='Credentials',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('added', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('name', models.CharField(max_length=60)),
                ('default', models.BooleanField(default=False, help_text='If set, use as default credentials for the selected cloud')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='EC2',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('added', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('name', models.CharField(max_length=60)),
                ('ec2_region_name', models.CharField(max_length=100, verbose_name='EC2 region name')),
                ('ec2_region_endpoint', models.CharField(max_length=255, verbose_name='EC2 region endpoint')),
                ('ec2_conn_path', models.CharField(default='/', max_length=255, verbose_name='EC2 conn path')),
                ('ec2_is_secure', models.BooleanField(default=True, verbose_name='EC2 is secure')),
                ('ec2_port', models.IntegerField(blank=True, null=True, verbose_name='EC2 port')),
            ],
            options={
                'verbose_name': 'EC2',
                'verbose_name_plural': 'EC2',
            },
        ),
        migrations.CreateModel(
            name='S3',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('added', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('name', models.CharField(max_length=60)),
                ('s3_host', models.CharField(blank=True, max_length=255, null=True)),
                ('s3_conn_path', models.CharField(blank=True, default='/', max_length=255, null=True)),
                ('s3_is_secure', models.BooleanField(default=True)),
                ('s3_port', models.IntegerField(blank=True, null=True)),
            ],
            options={
                'verbose_name_plural': 'S3',
            },
        ),
        migrations.CreateModel(
            name='UserProfile',
            fields=[
                ('slug', models.SlugField(editable=False, primary_key=True, serialize=False, unique=True)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'User Profile',
                'verbose_name_plural': 'User Profiles',
            },
        ),
        migrations.CreateModel(
            name='AWS',
            fields=[
                ('cloud_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='djcloudbridge.Cloud')),
                ('compute', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='djcloudbridge.EC2')),
                ('object_store', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='djcloudbridge.S3')),
            ],
            options={
                'verbose_name': 'AWS',
                'verbose_name_plural': 'AWS',
            },
            bases=('djcloudbridge.cloud',),
        ),
        migrations.CreateModel(
            name='AWSCredentials',
            fields=[
                ('credentials_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='djcloudbridge.Credentials')),
                ('access_key', models.CharField(max_length=50)),
                ('secret_key', fernet_fields.fields.EncryptedCharField(max_length=50)),
            ],
            options={
                'verbose_name': 'AWS Credential',
                'verbose_name_plural': 'AWS Credentials',
            },
            bases=('djcloudbridge.credentials',),
        ),
        migrations.CreateModel(
            name='Azure',
            fields=[
                ('cloud_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='djcloudbridge.Cloud')),
                ('resource_group', models.CharField(blank=True, max_length=100)),
                ('region_name', models.CharField(blank=True, max_length=100)),
                ('storage_account', models.CharField(blank=True, max_length=100)),
                ('vm_default_user_name', models.CharField(blank=True, max_length=100)),
            ],
            options={
                'verbose_name': 'Azure',
                'verbose_name_plural': 'Azure',
            },
            bases=('djcloudbridge.cloud',),
        ),
        migrations.CreateModel(
            name='AzureCredentials',
            fields=[
                ('credentials_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='djcloudbridge.Credentials')),
                ('subscription_id', models.CharField(max_length=50)),
                ('client_id', models.CharField(max_length=50)),
                ('secret', fernet_fields.fields.EncryptedCharField(max_length=50)),
                ('tenant', models.CharField(blank=True, max_length=50, null=True)),
            ],
            options={
                'verbose_name': 'Azure Credential',
                'verbose_name_plural': 'Azure Credentials',
            },
            bases=('djcloudbridge.credentials',),
        ),
        migrations.CreateModel(
            name='GCE',
            fields=[
                ('cloud_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='djcloudbridge.Cloud')),
                ('region_name', models.CharField(max_length=100)),
                ('zone_name', models.CharField(max_length=100)),
            ],
            options={
                'verbose_name': 'GCE',
                'verbose_name_plural': 'GCE',
            },
            bases=('djcloudbridge.cloud',),
        ),
        migrations.CreateModel(
            name='GCECredentials',
            fields=[
                ('credentials_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='djcloudbridge.Credentials')),
                ('credentials', fernet_fields.fields.EncryptedTextField()),
            ],
            options={
                'verbose_name': 'GCE Credential',
                'verbose_name_plural': 'GCE Credentials',
            },
            bases=('djcloudbridge.credentials',),
        ),
        migrations.CreateModel(
            name='OpenStack',
            fields=[
                ('cloud_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='djcloudbridge.Cloud')),
                ('auth_url', models.CharField(max_length=255)),
                ('region_name', models.CharField(max_length=100)),
                ('identity_api_version', models.CharField(blank=True, choices=[('v2.0', 'v2.0'), ('v3.0', 'v3.0')], max_length=10, null=True)),
            ],
            options={
                'verbose_name': 'OpenStack',
                'verbose_name_plural': 'OpenStack',
            },
            bases=('djcloudbridge.cloud',),
        ),
        migrations.CreateModel(
            name='OpenStackCredentials',
            fields=[
                ('credentials_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='djcloudbridge.Credentials')),
                ('username', models.CharField(max_length=50)),
                ('password', <PASSWORD>(max_length=50)),
                ('project_name', models.CharField(max_length=50)),
                ('project_domain_name', models.CharField(blank=True, max_length=50, null=True)),
                ('user_domain_name', models.CharField(blank=True, max_length=50, null=True)),
            ],
            options={
                'verbose_name': 'OpenStack Credential',
                'verbose_name_plural': 'OpenStack Credentials',
            },
            bases=('djcloudbridge.credentials',),
        ),
        migrations.AddField(
            model_name='credentials',
            name='cloud',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='credentials', to='djcloudbridge.Cloud'),
        ),
        migrations.AddField(
            model_name='credentials',
            name='user_profile',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='credentials', to='djcloudbridge.UserProfile'),
        ),
    ]

# -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2017-10-07 12:28
from __future__ import unicode_literals

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import fernet_fields.fields


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Cloud',
            fields=[
                ('added', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('name', models.CharField(max_length=60)),
                ('access_instructions_url', models.URLField(blank=True, max_length=2048, null=True)),
                ('kind', models.CharField(default='cloud', editable=False, max_length=10)),
                ('slug', models.SlugField(primary_key=True, serialize=False)),
            ],
            options={
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='Credentials',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('added', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('name', models.CharField(max_length=60)),
                ('default', models.BooleanField(default=False, help_text='If set, use as default credentials for the selected cloud')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='EC2',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('added', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('name', models.CharField(max_length=60)),
                ('ec2_region_name', models.CharField(max_length=100, verbose_name='EC2 region name')),
                ('ec2_region_endpoint', models.CharField(max_length=255, verbose_name='EC2 region endpoint')),
                ('ec2_conn_path', models.CharField(default='/', max_length=255, verbose_name='EC2 conn path')),
                ('ec2_is_secure', models.BooleanField(default=True, verbose_name='EC2 is secure')),
                ('ec2_port', models.IntegerField(blank=True, null=True, verbose_name='EC2 port')),
            ],
            options={
                'verbose_name': 'EC2',
                'verbose_name_plural': 'EC2',
            },
        ),
        migrations.CreateModel(
            name='S3',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('added', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('name', models.CharField(max_length=60)),
                ('s3_host', models.CharField(blank=True, max_length=255, null=True)),
                ('s3_conn_path', models.CharField(blank=True, default='/', max_length=255, null=True)),
                ('s3_is_secure', models.BooleanField(default=True)),
                ('s3_port', models.IntegerField(blank=True, null=True)),
            ],
            options={
                'verbose_name_plural': 'S3',
            },
        ),
        migrations.CreateModel(
            name='UserProfile',
            fields=[
                ('slug', models.SlugField(editable=False, primary_key=True, serialize=False, unique=True)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'User Profile',
                'verbose_name_plural': 'User Profiles',
            },
        ),
        migrations.CreateModel(
            name='AWS',
            fields=[
                ('cloud_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='djcloudbridge.Cloud')),
                ('compute', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='djcloudbridge.EC2')),
                ('object_store', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='djcloudbridge.S3')),
            ],
            options={
                'verbose_name': 'AWS',
                'verbose_name_plural': 'AWS',
            },
            bases=('djcloudbridge.cloud',),
        ),
        migrations.CreateModel(
            name='AWSCredentials',
            fields=[
                ('credentials_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='djcloudbridge.Credentials')),
                ('access_key', models.CharField(max_length=50)),
                ('secret_key', fernet_fields.fields.EncryptedCharField(max_length=50)),
            ],
            options={
                'verbose_name': 'AWS Credential',
                'verbose_name_plural': 'AWS Credentials',
            },
            bases=('djcloudbridge.credentials',),
        ),
        migrations.CreateModel(
            name='Azure',
            fields=[
                ('cloud_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='djcloudbridge.Cloud')),
                ('resource_group', models.CharField(blank=True, max_length=100)),
                ('region_name', models.CharField(blank=True, max_length=100)),
                ('storage_account', models.CharField(blank=True, max_length=100)),
                ('vm_default_user_name', models.CharField(blank=True, max_length=100)),
            ],
            options={
                'verbose_name': 'Azure',
                'verbose_name_plural': 'Azure',
            },
            bases=('djcloudbridge.cloud',),
        ),
        migrations.CreateModel(
            name='AzureCredentials',
            fields=[
                ('credentials_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='djcloudbridge.Credentials')),
                ('subscription_id', models.CharField(max_length=50)),
                ('client_id', models.CharField(max_length=50)),
                ('secret', fernet_fields.fields.EncryptedCharField(max_length=50)),
                ('tenant', models.CharField(blank=True, max_length=50, null=True)),
            ],
            options={
                'verbose_name': 'Azure Credential',
                'verbose_name_plural': 'Azure Credentials',
            },
            bases=('djcloudbridge.credentials',),
        ),
        migrations.CreateModel(
            name='GCE',
            fields=[
                ('cloud_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='djcloudbridge.Cloud')),
                ('region_name', models.CharField(max_length=100)),
                ('zone_name', models.CharField(max_length=100)),
            ],
            options={
                'verbose_name': 'GCE',
                'verbose_name_plural': 'GCE',
            },
            bases=('djcloudbridge.cloud',),
        ),
        migrations.CreateModel(
            name='GCECredentials',
            fields=[
                ('credentials_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='djcloudbridge.Credentials')),
                ('credentials', fernet_fields.fields.EncryptedTextField()),
            ],
            options={
                'verbose_name': 'GCE Credential',
                'verbose_name_plural': 'GCE Credentials',
            },
            bases=('djcloudbridge.credentials',),
        ),
        migrations.CreateModel(
            name='OpenStack',
            fields=[
                ('cloud_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='djcloudbridge.Cloud')),
                ('auth_url', models.CharField(max_length=255)),
                ('region_name', models.CharField(max_length=100)),
                ('identity_api_version', models.CharField(blank=True, choices=[('v2.0', 'v2.0'), ('v3.0', 'v3.0')], max_length=10, null=True)),
            ],
            options={
                'verbose_name': 'OpenStack',
                'verbose_name_plural': 'OpenStack',
            },
            bases=('djcloudbridge.cloud',),
        ),
        migrations.CreateModel(
            name='OpenStackCredentials',
            fields=[
                ('credentials_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='djcloudbridge.Credentials')),
                ('username', models.CharField(max_length=50)),
                ('password', <PASSWORD>(max_length=50)),
                ('project_name', models.CharField(max_length=50)),
                ('project_domain_name', models.CharField(blank=True, max_length=50, null=True)),
                ('user_domain_name', models.CharField(blank=True, max_length=50, null=True)),
            ],
            options={
                'verbose_name': 'OpenStack Credential',
                'verbose_name_plural': 'OpenStack Credentials',
            },
            bases=('djcloudbridge.credentials',),
        ),
        migrations.AddField(
            model_name='credentials',
            name='cloud',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='credentials', to='djcloudbridge.Cloud'),
        ),
        migrations.AddField(
            model_name='credentials',
            name='user_profile',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='credentials', to='djcloudbridge.UserProfile'),
        ),
    ]

# -*- coding: utf-8 -*- # Generated by Django 1.11.6 on 2017-10-07 12:28