| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979 |
- # Generated by Django 4.2.9 on 2024-01-18 18:27
- import dcim.fields
- import django.contrib.postgres.fields
- import django.core.validators
- from django.db import migrations, models
- import django.db.models.deletion
- import timezone_field.fields
- import utilities.fields
- import utilities.json
- import utilities.ordering
- import utilities.query_functions
- import utilities.tracking
- import utilities.validators
- class Migration(migrations.Migration):
- initial = True
- dependencies = [
- ]
- operations = [
- migrations.CreateModel(
- name='Cable',
- fields=[
- ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
- ('created', models.DateTimeField(auto_now_add=True, null=True)),
- ('last_updated', models.DateTimeField(auto_now=True, null=True)),
- ('custom_field_data', models.JSONField(blank=True, default=dict, encoder=utilities.json.CustomFieldJSONEncoder)),
- ('description', models.CharField(blank=True, max_length=200)),
- ('comments', models.TextField(blank=True)),
- ('type', models.CharField(blank=True, max_length=50)),
- ('status', models.CharField(default='connected', max_length=50)),
- ('label', models.CharField(blank=True, max_length=100)),
- ('color', utilities.fields.ColorField(blank=True, max_length=6)),
- ('length', models.DecimalField(blank=True, decimal_places=2, max_digits=8, null=True)),
- ('length_unit', models.CharField(blank=True, max_length=50)),
- ('_abs_length', models.DecimalField(blank=True, decimal_places=4, max_digits=10, null=True)),
- ],
- options={
- 'verbose_name': 'cable',
- 'verbose_name_plural': 'cables',
- 'ordering': ('pk',),
- },
- ),
- migrations.CreateModel(
- name='CablePath',
- fields=[
- ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
- ('path', models.JSONField(default=list)),
- ('is_active', models.BooleanField(default=False)),
- ('is_complete', models.BooleanField(default=False)),
- ('is_split', models.BooleanField(default=False)),
- ('_nodes', dcim.fields.PathField(base_field=models.CharField(max_length=40), size=None)),
- ],
- options={
- 'verbose_name': 'cable path',
- 'verbose_name_plural': 'cable paths',
- },
- ),
- migrations.CreateModel(
- name='CableTermination',
- fields=[
- ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
- ('created', models.DateTimeField(auto_now_add=True, null=True)),
- ('last_updated', models.DateTimeField(auto_now=True, null=True)),
- ('cable_end', models.CharField(max_length=1)),
- ('termination_id', models.PositiveBigIntegerField()),
- ],
- options={
- 'verbose_name': 'cable termination',
- 'verbose_name_plural': 'cable terminations',
- 'ordering': ('cable', 'cable_end', 'pk'),
- },
- ),
- migrations.CreateModel(
- name='ConsolePort',
- fields=[
- ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
- ('created', models.DateTimeField(auto_now_add=True, null=True)),
- ('last_updated', models.DateTimeField(auto_now=True, null=True)),
- ('custom_field_data', models.JSONField(blank=True, default=dict, encoder=utilities.json.CustomFieldJSONEncoder)),
- ('name', models.CharField(max_length=64)),
- ('_name', utilities.fields.NaturalOrderingField('name', blank=True, max_length=100, naturalize_function=utilities.ordering.naturalize)),
- ('label', models.CharField(blank=True, max_length=64)),
- ('description', models.CharField(blank=True, max_length=200)),
- ('cable_end', models.CharField(blank=True, max_length=1)),
- ('mark_connected', models.BooleanField(default=False)),
- ('type', models.CharField(blank=True, max_length=50)),
- ('speed', models.PositiveIntegerField(blank=True, null=True)),
- ],
- options={
- 'verbose_name': 'console port',
- 'verbose_name_plural': 'console ports',
- 'ordering': ('device', '_name'),
- 'abstract': False,
- },
- bases=(models.Model, utilities.tracking.TrackingModelMixin),
- ),
- migrations.CreateModel(
- name='ConsolePortTemplate',
- fields=[
- ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
- ('created', models.DateTimeField(auto_now_add=True, null=True)),
- ('last_updated', models.DateTimeField(auto_now=True, null=True)),
- ('name', models.CharField(max_length=64)),
- ('_name', utilities.fields.NaturalOrderingField('name', blank=True, max_length=100, naturalize_function=utilities.ordering.naturalize)),
- ('label', models.CharField(blank=True, max_length=64)),
- ('description', models.CharField(blank=True, max_length=200)),
- ('type', models.CharField(blank=True, max_length=50)),
- ],
- options={
- 'verbose_name': 'console port template',
- 'verbose_name_plural': 'console port templates',
- 'ordering': ('device_type', 'module_type', '_name'),
- 'abstract': False,
- },
- bases=(models.Model, utilities.tracking.TrackingModelMixin),
- ),
- migrations.CreateModel(
- name='ConsoleServerPort',
- fields=[
- ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
- ('created', models.DateTimeField(auto_now_add=True, null=True)),
- ('last_updated', models.DateTimeField(auto_now=True, null=True)),
- ('custom_field_data', models.JSONField(blank=True, default=dict, encoder=utilities.json.CustomFieldJSONEncoder)),
- ('name', models.CharField(max_length=64)),
- ('_name', utilities.fields.NaturalOrderingField('name', blank=True, max_length=100, naturalize_function=utilities.ordering.naturalize)),
- ('label', models.CharField(blank=True, max_length=64)),
- ('description', models.CharField(blank=True, max_length=200)),
- ('cable_end', models.CharField(blank=True, max_length=1)),
- ('mark_connected', models.BooleanField(default=False)),
- ('type', models.CharField(blank=True, max_length=50)),
- ('speed', models.PositiveIntegerField(blank=True, null=True)),
- ],
- options={
- 'verbose_name': 'console server port',
- 'verbose_name_plural': 'console server ports',
- 'ordering': ('device', '_name'),
- 'abstract': False,
- },
- bases=(models.Model, utilities.tracking.TrackingModelMixin),
- ),
- migrations.CreateModel(
- name='ConsoleServerPortTemplate',
- fields=[
- ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
- ('created', models.DateTimeField(auto_now_add=True, null=True)),
- ('last_updated', models.DateTimeField(auto_now=True, null=True)),
- ('name', models.CharField(max_length=64)),
- ('_name', utilities.fields.NaturalOrderingField('name', blank=True, max_length=100, naturalize_function=utilities.ordering.naturalize)),
- ('label', models.CharField(blank=True, max_length=64)),
- ('description', models.CharField(blank=True, max_length=200)),
- ('type', models.CharField(blank=True, max_length=50)),
- ],
- options={
- 'verbose_name': 'console server port template',
- 'verbose_name_plural': 'console server port templates',
- 'ordering': ('device_type', 'module_type', '_name'),
- 'abstract': False,
- },
- bases=(models.Model, utilities.tracking.TrackingModelMixin),
- ),
- migrations.CreateModel(
- name='Device',
- fields=[
- ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
- ('created', models.DateTimeField(auto_now_add=True, null=True)),
- ('last_updated', models.DateTimeField(auto_now=True, null=True)),
- ('custom_field_data', models.JSONField(blank=True, default=dict, encoder=utilities.json.CustomFieldJSONEncoder)),
- ('description', models.CharField(blank=True, max_length=200)),
- ('comments', models.TextField(blank=True)),
- ('local_context_data', models.JSONField(blank=True, null=True)),
- ('name', models.CharField(blank=True, max_length=64, null=True)),
- ('_name', utilities.fields.NaturalOrderingField('name', blank=True, max_length=100, naturalize_function=utilities.ordering.naturalize, null=True)),
- ('serial', models.CharField(blank=True, max_length=50)),
- ('asset_tag', models.CharField(blank=True, max_length=50, null=True, unique=True)),
- ('position', models.DecimalField(blank=True, decimal_places=1, max_digits=4, null=True, validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(100.5)])),
- ('face', models.CharField(blank=True, max_length=50)),
- ('status', models.CharField(default='active', max_length=50)),
- ('airflow', models.CharField(blank=True, max_length=50)),
- ('vc_position', models.PositiveSmallIntegerField(blank=True, null=True, validators=[django.core.validators.MaxValueValidator(255)])),
- ('vc_priority', models.PositiveSmallIntegerField(blank=True, null=True, validators=[django.core.validators.MaxValueValidator(255)])),
- ('latitude', models.DecimalField(blank=True, decimal_places=6, max_digits=8, null=True)),
- ('longitude', models.DecimalField(blank=True, decimal_places=6, max_digits=9, null=True)),
- ('console_port_count', utilities.fields.CounterCacheField(default=0, editable=False, to_field='device', to_model='dcim.ConsolePort')),
- ('console_server_port_count', utilities.fields.CounterCacheField(default=0, editable=False, to_field='device', to_model='dcim.ConsoleServerPort')),
- ('power_port_count', utilities.fields.CounterCacheField(default=0, editable=False, to_field='device', to_model='dcim.PowerPort')),
- ('power_outlet_count', utilities.fields.CounterCacheField(default=0, editable=False, to_field='device', to_model='dcim.PowerOutlet')),
- ('interface_count', utilities.fields.CounterCacheField(default=0, editable=False, to_field='device', to_model='dcim.Interface')),
- ('front_port_count', utilities.fields.CounterCacheField(default=0, editable=False, to_field='device', to_model='dcim.FrontPort')),
- ('rear_port_count', utilities.fields.CounterCacheField(default=0, editable=False, to_field='device', to_model='dcim.RearPort')),
- ('device_bay_count', utilities.fields.CounterCacheField(default=0, editable=False, to_field='device', to_model='dcim.DeviceBay')),
- ('module_bay_count', utilities.fields.CounterCacheField(default=0, editable=False, to_field='device', to_model='dcim.ModuleBay')),
- ('inventory_item_count', utilities.fields.CounterCacheField(default=0, editable=False, to_field='device', to_model='dcim.InventoryItem')),
- ],
- options={
- 'verbose_name': 'device',
- 'verbose_name_plural': 'devices',
- 'ordering': ('_name', 'pk'),
- },
- bases=(utilities.tracking.TrackingModelMixin, models.Model),
- ),
- migrations.CreateModel(
- name='DeviceBay',
- fields=[
- ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
- ('created', models.DateTimeField(auto_now_add=True, null=True)),
- ('last_updated', models.DateTimeField(auto_now=True, null=True)),
- ('custom_field_data', models.JSONField(blank=True, default=dict, encoder=utilities.json.CustomFieldJSONEncoder)),
- ('name', models.CharField(max_length=64)),
- ('_name', utilities.fields.NaturalOrderingField('name', blank=True, max_length=100, naturalize_function=utilities.ordering.naturalize)),
- ('label', models.CharField(blank=True, max_length=64)),
- ('description', models.CharField(blank=True, max_length=200)),
- ],
- options={
- 'verbose_name': 'device bay',
- 'verbose_name_plural': 'device bays',
- 'ordering': ('device', '_name'),
- 'abstract': False,
- },
- bases=(models.Model, utilities.tracking.TrackingModelMixin),
- ),
- migrations.CreateModel(
- name='DeviceBayTemplate',
- fields=[
- ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
- ('created', models.DateTimeField(auto_now_add=True, null=True)),
- ('last_updated', models.DateTimeField(auto_now=True, null=True)),
- ('name', models.CharField(max_length=64)),
- ('_name', utilities.fields.NaturalOrderingField('name', blank=True, max_length=100, naturalize_function=utilities.ordering.naturalize)),
- ('label', models.CharField(blank=True, max_length=64)),
- ('description', models.CharField(blank=True, max_length=200)),
- ],
- options={
- 'verbose_name': 'device bay template',
- 'verbose_name_plural': 'device bay templates',
- 'ordering': ('device_type', '_name'),
- 'abstract': False,
- },
- bases=(models.Model, utilities.tracking.TrackingModelMixin),
- ),
- migrations.CreateModel(
- name='DeviceRole',
- fields=[
- ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
- ('created', models.DateTimeField(auto_now_add=True, null=True)),
- ('last_updated', models.DateTimeField(auto_now=True, null=True)),
- ('custom_field_data', models.JSONField(blank=True, default=dict, encoder=utilities.json.CustomFieldJSONEncoder)),
- ('name', models.CharField(max_length=100, unique=True)),
- ('slug', models.SlugField(max_length=100, unique=True)),
- ('description', models.CharField(blank=True, max_length=200)),
- ('color', utilities.fields.ColorField(default='9e9e9e', max_length=6)),
- ('vm_role', models.BooleanField(default=True)),
- ],
- options={
- 'verbose_name': 'device role',
- 'verbose_name_plural': 'device roles',
- 'ordering': ('name',),
- },
- ),
- migrations.CreateModel(
- name='DeviceType',
- fields=[
- ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
- ('created', models.DateTimeField(auto_now_add=True, null=True)),
- ('last_updated', models.DateTimeField(auto_now=True, null=True)),
- ('custom_field_data', models.JSONField(blank=True, default=dict, encoder=utilities.json.CustomFieldJSONEncoder)),
- ('description', models.CharField(blank=True, max_length=200)),
- ('comments', models.TextField(blank=True)),
- ('weight', models.DecimalField(blank=True, decimal_places=2, max_digits=8, null=True)),
- ('weight_unit', models.CharField(blank=True, max_length=50)),
- ('_abs_weight', models.PositiveBigIntegerField(blank=True, null=True)),
- ('model', models.CharField(max_length=100)),
- ('slug', models.SlugField(max_length=100)),
- ('part_number', models.CharField(blank=True, max_length=50)),
- ('u_height', models.DecimalField(decimal_places=1, default=1.0, max_digits=4)),
- ('is_full_depth', models.BooleanField(default=True)),
- ('subdevice_role', models.CharField(blank=True, max_length=50)),
- ('airflow', models.CharField(blank=True, max_length=50)),
- ('front_image', models.ImageField(blank=True, upload_to='devicetype-images')),
- ('rear_image', models.ImageField(blank=True, upload_to='devicetype-images')),
- ('console_port_template_count', utilities.fields.CounterCacheField(default=0, editable=False, to_field='device_type', to_model='dcim.ConsolePortTemplate')),
- ('console_server_port_template_count', utilities.fields.CounterCacheField(default=0, editable=False, to_field='device_type', to_model='dcim.ConsoleServerPortTemplate')),
- ('power_port_template_count', utilities.fields.CounterCacheField(default=0, editable=False, to_field='device_type', to_model='dcim.PowerPortTemplate')),
- ('power_outlet_template_count', utilities.fields.CounterCacheField(default=0, editable=False, to_field='device_type', to_model='dcim.PowerOutletTemplate')),
- ('interface_template_count', utilities.fields.CounterCacheField(default=0, editable=False, to_field='device_type', to_model='dcim.InterfaceTemplate')),
- ('front_port_template_count', utilities.fields.CounterCacheField(default=0, editable=False, to_field='device_type', to_model='dcim.FrontPortTemplate')),
- ('rear_port_template_count', utilities.fields.CounterCacheField(default=0, editable=False, to_field='device_type', to_model='dcim.RearPortTemplate')),
- ('device_bay_template_count', utilities.fields.CounterCacheField(default=0, editable=False, to_field='device_type', to_model='dcim.DeviceBayTemplate')),
- ('module_bay_template_count', utilities.fields.CounterCacheField(default=0, editable=False, to_field='device_type', to_model='dcim.ModuleBayTemplate')),
- ('inventory_item_template_count', utilities.fields.CounterCacheField(default=0, editable=False, to_field='device_type', to_model='dcim.InventoryItemTemplate')),
- ],
- options={
- 'verbose_name': 'device type',
- 'verbose_name_plural': 'device types',
- 'ordering': ['manufacturer', 'model'],
- },
- ),
- migrations.CreateModel(
- name='FrontPort',
- fields=[
- ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
- ('created', models.DateTimeField(auto_now_add=True, null=True)),
- ('last_updated', models.DateTimeField(auto_now=True, null=True)),
- ('custom_field_data', models.JSONField(blank=True, default=dict, encoder=utilities.json.CustomFieldJSONEncoder)),
- ('name', models.CharField(max_length=64)),
- ('_name', utilities.fields.NaturalOrderingField('name', blank=True, max_length=100, naturalize_function=utilities.ordering.naturalize)),
- ('label', models.CharField(blank=True, max_length=64)),
- ('description', models.CharField(blank=True, max_length=200)),
- ('cable_end', models.CharField(blank=True, max_length=1)),
- ('mark_connected', models.BooleanField(default=False)),
- ('type', models.CharField(max_length=50)),
- ('color', utilities.fields.ColorField(blank=True, max_length=6)),
- ('rear_port_position', models.PositiveSmallIntegerField(default=1, validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(1024)])),
- ],
- options={
- 'verbose_name': 'front port',
- 'verbose_name_plural': 'front ports',
- 'ordering': ('device', '_name'),
- 'abstract': False,
- },
- bases=(models.Model, utilities.tracking.TrackingModelMixin),
- ),
- migrations.CreateModel(
- name='FrontPortTemplate',
- fields=[
- ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
- ('created', models.DateTimeField(auto_now_add=True, null=True)),
- ('last_updated', models.DateTimeField(auto_now=True, null=True)),
- ('name', models.CharField(max_length=64)),
- ('_name', utilities.fields.NaturalOrderingField('name', blank=True, max_length=100, naturalize_function=utilities.ordering.naturalize)),
- ('label', models.CharField(blank=True, max_length=64)),
- ('description', models.CharField(blank=True, max_length=200)),
- ('type', models.CharField(max_length=50)),
- ('color', utilities.fields.ColorField(blank=True, max_length=6)),
- ('rear_port_position', models.PositiveSmallIntegerField(default=1, validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(1024)])),
- ],
- options={
- 'verbose_name': 'front port template',
- 'verbose_name_plural': 'front port templates',
- 'ordering': ('device_type', 'module_type', '_name'),
- 'abstract': False,
- },
- bases=(models.Model, utilities.tracking.TrackingModelMixin),
- ),
- migrations.CreateModel(
- name='Interface',
- fields=[
- ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
- ('created', models.DateTimeField(auto_now_add=True, null=True)),
- ('last_updated', models.DateTimeField(auto_now=True, null=True)),
- ('custom_field_data', models.JSONField(blank=True, default=dict, encoder=utilities.json.CustomFieldJSONEncoder)),
- ('name', models.CharField(max_length=64)),
- ('label', models.CharField(blank=True, max_length=64)),
- ('description', models.CharField(blank=True, max_length=200)),
- ('cable_end', models.CharField(blank=True, max_length=1)),
- ('mark_connected', models.BooleanField(default=False)),
- ('enabled', models.BooleanField(default=True)),
- ('mac_address', dcim.fields.MACAddressField(blank=True, null=True)),
- ('mtu', models.PositiveIntegerField(blank=True, null=True, validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(65536)])),
- ('mode', models.CharField(blank=True, max_length=50)),
- ('_name', utilities.fields.NaturalOrderingField('name', blank=True, max_length=100, naturalize_function=utilities.ordering.naturalize_interface)),
- ('type', models.CharField(max_length=50)),
- ('mgmt_only', models.BooleanField(default=False)),
- ('speed', models.PositiveIntegerField(blank=True, null=True)),
- ('duplex', models.CharField(blank=True, max_length=50, null=True)),
- ('wwn', dcim.fields.WWNField(blank=True, null=True)),
- ('rf_role', models.CharField(blank=True, max_length=30)),
- ('rf_channel', models.CharField(blank=True, max_length=50)),
- ('rf_channel_frequency', models.DecimalField(blank=True, decimal_places=2, max_digits=7, null=True)),
- ('rf_channel_width', models.DecimalField(blank=True, decimal_places=3, max_digits=7, null=True)),
- ('tx_power', models.PositiveSmallIntegerField(blank=True, null=True, validators=[django.core.validators.MaxValueValidator(127)])),
- ('poe_mode', models.CharField(blank=True, max_length=50)),
- ('poe_type', models.CharField(blank=True, max_length=50)),
- ],
- options={
- 'verbose_name': 'interface',
- 'verbose_name_plural': 'interfaces',
- 'ordering': ('device', utilities.query_functions.CollateAsChar('_name')),
- 'abstract': False,
- },
- bases=(models.Model, utilities.tracking.TrackingModelMixin),
- ),
- migrations.CreateModel(
- name='InterfaceTemplate',
- fields=[
- ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
- ('created', models.DateTimeField(auto_now_add=True, null=True)),
- ('last_updated', models.DateTimeField(auto_now=True, null=True)),
- ('name', models.CharField(max_length=64)),
- ('label', models.CharField(blank=True, max_length=64)),
- ('description', models.CharField(blank=True, max_length=200)),
- ('_name', utilities.fields.NaturalOrderingField('name', blank=True, max_length=100, naturalize_function=utilities.ordering.naturalize_interface)),
- ('type', models.CharField(max_length=50)),
- ('enabled', models.BooleanField(default=True)),
- ('mgmt_only', models.BooleanField(default=False)),
- ('poe_mode', models.CharField(blank=True, max_length=50)),
- ('poe_type', models.CharField(blank=True, max_length=50)),
- ('rf_role', models.CharField(blank=True, max_length=30)),
- ],
- options={
- 'verbose_name': 'interface template',
- 'verbose_name_plural': 'interface templates',
- 'ordering': ('device_type', 'module_type', '_name'),
- 'abstract': False,
- },
- bases=(models.Model, utilities.tracking.TrackingModelMixin),
- ),
- migrations.CreateModel(
- name='InventoryItem',
- fields=[
- ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
- ('created', models.DateTimeField(auto_now_add=True, null=True)),
- ('last_updated', models.DateTimeField(auto_now=True, null=True)),
- ('custom_field_data', models.JSONField(blank=True, default=dict, encoder=utilities.json.CustomFieldJSONEncoder)),
- ('name', models.CharField(max_length=64)),
- ('_name', utilities.fields.NaturalOrderingField('name', blank=True, max_length=100, naturalize_function=utilities.ordering.naturalize)),
- ('label', models.CharField(blank=True, max_length=64)),
- ('description', models.CharField(blank=True, max_length=200)),
- ('component_id', models.PositiveBigIntegerField(blank=True, null=True)),
- ('part_id', models.CharField(blank=True, max_length=50)),
- ('serial', models.CharField(blank=True, max_length=50)),
- ('asset_tag', models.CharField(blank=True, max_length=50, null=True, unique=True)),
- ('discovered', models.BooleanField(default=False)),
- ('lft', models.PositiveIntegerField(editable=False)),
- ('rght', models.PositiveIntegerField(editable=False)),
- ('tree_id', models.PositiveIntegerField(db_index=True, editable=False)),
- ('level', models.PositiveIntegerField(editable=False)),
- ],
- options={
- 'verbose_name': 'inventory item',
- 'verbose_name_plural': 'inventory items',
- 'ordering': ('device__id', 'parent__id', '_name'),
- },
- bases=(models.Model, utilities.tracking.TrackingModelMixin),
- ),
- migrations.CreateModel(
- name='InventoryItemRole',
- fields=[
- ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
- ('created', models.DateTimeField(auto_now_add=True, null=True)),
- ('last_updated', models.DateTimeField(auto_now=True, null=True)),
- ('custom_field_data', models.JSONField(blank=True, default=dict, encoder=utilities.json.CustomFieldJSONEncoder)),
- ('name', models.CharField(max_length=100, unique=True)),
- ('slug', models.SlugField(max_length=100, unique=True)),
- ('description', models.CharField(blank=True, max_length=200)),
- ('color', utilities.fields.ColorField(default='9e9e9e', max_length=6)),
- ],
- options={
- 'verbose_name': 'inventory item role',
- 'verbose_name_plural': 'inventory item roles',
- 'ordering': ('name',),
- },
- ),
- migrations.CreateModel(
- name='InventoryItemTemplate',
- fields=[
- ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
- ('created', models.DateTimeField(auto_now_add=True, null=True)),
- ('last_updated', models.DateTimeField(auto_now=True, null=True)),
- ('name', models.CharField(max_length=64)),
- ('_name', utilities.fields.NaturalOrderingField('name', blank=True, max_length=100, naturalize_function=utilities.ordering.naturalize)),
- ('label', models.CharField(blank=True, max_length=64)),
- ('description', models.CharField(blank=True, max_length=200)),
- ('component_id', models.PositiveBigIntegerField(blank=True, null=True)),
- ('part_id', models.CharField(blank=True, max_length=50)),
- ('lft', models.PositiveIntegerField(editable=False)),
- ('rght', models.PositiveIntegerField(editable=False)),
- ('tree_id', models.PositiveIntegerField(db_index=True, editable=False)),
- ('level', models.PositiveIntegerField(editable=False)),
- ],
- options={
- 'verbose_name': 'inventory item template',
- 'verbose_name_plural': 'inventory item templates',
- 'ordering': ('device_type__id', 'parent__id', '_name'),
- },
- bases=(models.Model, utilities.tracking.TrackingModelMixin),
- ),
- migrations.CreateModel(
- name='Location',
- fields=[
- ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
- ('created', models.DateTimeField(auto_now_add=True, null=True)),
- ('last_updated', models.DateTimeField(auto_now=True, null=True)),
- ('custom_field_data', models.JSONField(blank=True, default=dict, encoder=utilities.json.CustomFieldJSONEncoder)),
- ('name', models.CharField(max_length=100)),
- ('slug', models.SlugField(max_length=100)),
- ('description', models.CharField(blank=True, max_length=200)),
- ('status', models.CharField(default='active', max_length=50)),
- ('lft', models.PositiveIntegerField(editable=False)),
- ('rght', models.PositiveIntegerField(editable=False)),
- ('tree_id', models.PositiveIntegerField(db_index=True, editable=False)),
- ('level', models.PositiveIntegerField(editable=False)),
- ],
- options={
- 'verbose_name': 'location',
- 'verbose_name_plural': 'locations',
- 'ordering': ['site', 'name'],
- },
- ),
- migrations.CreateModel(
- name='Manufacturer',
- fields=[
- ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
- ('created', models.DateTimeField(auto_now_add=True, null=True)),
- ('last_updated', models.DateTimeField(auto_now=True, null=True)),
- ('custom_field_data', models.JSONField(blank=True, default=dict, encoder=utilities.json.CustomFieldJSONEncoder)),
- ('name', models.CharField(max_length=100, unique=True)),
- ('slug', models.SlugField(max_length=100, unique=True)),
- ('description', models.CharField(blank=True, max_length=200)),
- ],
- options={
- 'verbose_name': 'manufacturer',
- 'verbose_name_plural': 'manufacturers',
- 'ordering': ('name',),
- },
- ),
- migrations.CreateModel(
- name='Module',
- fields=[
- ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
- ('created', models.DateTimeField(auto_now_add=True, null=True)),
- ('last_updated', models.DateTimeField(auto_now=True, null=True)),
- ('custom_field_data', models.JSONField(blank=True, default=dict, encoder=utilities.json.CustomFieldJSONEncoder)),
- ('description', models.CharField(blank=True, max_length=200)),
- ('comments', models.TextField(blank=True)),
- ('local_context_data', models.JSONField(blank=True, null=True)),
- ('status', models.CharField(default='active', max_length=50)),
- ('serial', models.CharField(blank=True, max_length=50)),
- ('asset_tag', models.CharField(blank=True, max_length=50, null=True, unique=True)),
- ],
- options={
- 'verbose_name': 'module',
- 'verbose_name_plural': 'modules',
- 'ordering': ('module_bay',),
- },
- ),
- migrations.CreateModel(
- name='ModuleBay',
- fields=[
- ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
- ('created', models.DateTimeField(auto_now_add=True, null=True)),
- ('last_updated', models.DateTimeField(auto_now=True, null=True)),
- ('custom_field_data', models.JSONField(blank=True, default=dict, encoder=utilities.json.CustomFieldJSONEncoder)),
- ('name', models.CharField(max_length=64)),
- ('_name', utilities.fields.NaturalOrderingField('name', blank=True, max_length=100, naturalize_function=utilities.ordering.naturalize)),
- ('label', models.CharField(blank=True, max_length=64)),
- ('description', models.CharField(blank=True, max_length=200)),
- ('position', models.CharField(blank=True, max_length=30)),
- ],
- options={
- 'verbose_name': 'module bay',
- 'verbose_name_plural': 'module bays',
- 'ordering': ('device', '_name'),
- 'abstract': False,
- },
- bases=(models.Model, utilities.tracking.TrackingModelMixin),
- ),
- migrations.CreateModel(
- name='ModuleBayTemplate',
- fields=[
- ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
- ('created', models.DateTimeField(auto_now_add=True, null=True)),
- ('last_updated', models.DateTimeField(auto_now=True, null=True)),
- ('name', models.CharField(max_length=64)),
- ('_name', utilities.fields.NaturalOrderingField('name', blank=True, max_length=100, naturalize_function=utilities.ordering.naturalize)),
- ('label', models.CharField(blank=True, max_length=64)),
- ('description', models.CharField(blank=True, max_length=200)),
- ('position', models.CharField(blank=True, max_length=30)),
- ],
- options={
- 'verbose_name': 'module bay template',
- 'verbose_name_plural': 'module bay templates',
- 'ordering': ('device_type', '_name'),
- 'abstract': False,
- },
- bases=(models.Model, utilities.tracking.TrackingModelMixin),
- ),
- migrations.CreateModel(
- name='ModuleType',
- fields=[
- ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
- ('created', models.DateTimeField(auto_now_add=True, null=True)),
- ('last_updated', models.DateTimeField(auto_now=True, null=True)),
- ('custom_field_data', models.JSONField(blank=True, default=dict, encoder=utilities.json.CustomFieldJSONEncoder)),
- ('description', models.CharField(blank=True, max_length=200)),
- ('comments', models.TextField(blank=True)),
- ('weight', models.DecimalField(blank=True, decimal_places=2, max_digits=8, null=True)),
- ('weight_unit', models.CharField(blank=True, max_length=50)),
- ('_abs_weight', models.PositiveBigIntegerField(blank=True, null=True)),
- ('model', models.CharField(max_length=100)),
- ('part_number', models.CharField(blank=True, max_length=50)),
- ],
- options={
- 'verbose_name': 'module type',
- 'verbose_name_plural': 'module types',
- 'ordering': ('manufacturer', 'model'),
- },
- ),
- migrations.CreateModel(
- name='Platform',
- fields=[
- ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
- ('created', models.DateTimeField(auto_now_add=True, null=True)),
- ('last_updated', models.DateTimeField(auto_now=True, null=True)),
- ('custom_field_data', models.JSONField(blank=True, default=dict, encoder=utilities.json.CustomFieldJSONEncoder)),
- ('name', models.CharField(max_length=100, unique=True)),
- ('slug', models.SlugField(max_length=100, unique=True)),
- ('description', models.CharField(blank=True, max_length=200)),
- ],
- options={
- 'verbose_name': 'platform',
- 'verbose_name_plural': 'platforms',
- 'ordering': ('name',),
- },
- ),
- migrations.CreateModel(
- name='PowerFeed',
- fields=[
- ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
- ('created', models.DateTimeField(auto_now_add=True, null=True)),
- ('last_updated', models.DateTimeField(auto_now=True, null=True)),
- ('custom_field_data', models.JSONField(blank=True, default=dict, encoder=utilities.json.CustomFieldJSONEncoder)),
- ('description', models.CharField(blank=True, max_length=200)),
- ('comments', models.TextField(blank=True)),
- ('cable_end', models.CharField(blank=True, max_length=1)),
- ('mark_connected', models.BooleanField(default=False)),
- ('name', models.CharField(max_length=100)),
- ('status', models.CharField(default='active', max_length=50)),
- ('type', models.CharField(default='primary', max_length=50)),
- ('supply', models.CharField(default='ac', max_length=50)),
- ('phase', models.CharField(default='single-phase', max_length=50)),
- ('voltage', models.SmallIntegerField(validators=[utilities.validators.ExclusionValidator([0])])),
- ('amperage', models.PositiveSmallIntegerField(validators=[django.core.validators.MinValueValidator(1)])),
- ('max_utilization', models.PositiveSmallIntegerField(validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(100)])),
- ('available_power', models.PositiveIntegerField(default=0, editable=False)),
- ],
- options={
- 'verbose_name': 'power feed',
- 'verbose_name_plural': 'power feeds',
- 'ordering': ['power_panel', 'name'],
- },
- ),
- migrations.CreateModel(
- name='PowerOutlet',
- fields=[
- ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
- ('created', models.DateTimeField(auto_now_add=True, null=True)),
- ('last_updated', models.DateTimeField(auto_now=True, null=True)),
- ('custom_field_data', models.JSONField(blank=True, default=dict, encoder=utilities.json.CustomFieldJSONEncoder)),
- ('name', models.CharField(max_length=64)),
- ('_name', utilities.fields.NaturalOrderingField('name', blank=True, max_length=100, naturalize_function=utilities.ordering.naturalize)),
- ('label', models.CharField(blank=True, max_length=64)),
- ('description', models.CharField(blank=True, max_length=200)),
- ('cable_end', models.CharField(blank=True, max_length=1)),
- ('mark_connected', models.BooleanField(default=False)),
- ('type', models.CharField(blank=True, max_length=50)),
- ('feed_leg', models.CharField(blank=True, max_length=50)),
- ],
- options={
- 'verbose_name': 'power outlet',
- 'verbose_name_plural': 'power outlets',
- 'ordering': ('device', '_name'),
- 'abstract': False,
- },
- bases=(models.Model, utilities.tracking.TrackingModelMixin),
- ),
- migrations.CreateModel(
- name='PowerOutletTemplate',
- fields=[
- ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
- ('created', models.DateTimeField(auto_now_add=True, null=True)),
- ('last_updated', models.DateTimeField(auto_now=True, null=True)),
- ('name', models.CharField(max_length=64)),
- ('_name', utilities.fields.NaturalOrderingField('name', blank=True, max_length=100, naturalize_function=utilities.ordering.naturalize)),
- ('label', models.CharField(blank=True, max_length=64)),
- ('description', models.CharField(blank=True, max_length=200)),
- ('type', models.CharField(blank=True, max_length=50)),
- ('feed_leg', models.CharField(blank=True, max_length=50)),
- ],
- options={
- 'verbose_name': 'power outlet template',
- 'verbose_name_plural': 'power outlet templates',
- 'ordering': ('device_type', 'module_type', '_name'),
- 'abstract': False,
- },
- bases=(models.Model, utilities.tracking.TrackingModelMixin),
- ),
- migrations.CreateModel(
- name='PowerPanel',
- fields=[
- ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
- ('created', models.DateTimeField(auto_now_add=True, null=True)),
- ('last_updated', models.DateTimeField(auto_now=True, null=True)),
- ('custom_field_data', models.JSONField(blank=True, default=dict, encoder=utilities.json.CustomFieldJSONEncoder)),
- ('description', models.CharField(blank=True, max_length=200)),
- ('comments', models.TextField(blank=True)),
- ('name', models.CharField(max_length=100)),
- ],
- options={
- 'verbose_name': 'power panel',
- 'verbose_name_plural': 'power panels',
- 'ordering': ['site', 'name'],
- },
- ),
- migrations.CreateModel(
- name='PowerPort',
- fields=[
- ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
- ('created', models.DateTimeField(auto_now_add=True, null=True)),
- ('last_updated', models.DateTimeField(auto_now=True, null=True)),
- ('custom_field_data', models.JSONField(blank=True, default=dict, encoder=utilities.json.CustomFieldJSONEncoder)),
- ('name', models.CharField(max_length=64)),
- ('_name', utilities.fields.NaturalOrderingField('name', blank=True, max_length=100, naturalize_function=utilities.ordering.naturalize)),
- ('label', models.CharField(blank=True, max_length=64)),
- ('description', models.CharField(blank=True, max_length=200)),
- ('cable_end', models.CharField(blank=True, max_length=1)),
- ('mark_connected', models.BooleanField(default=False)),
- ('type', models.CharField(blank=True, max_length=50)),
- ('maximum_draw', models.PositiveIntegerField(blank=True, null=True, validators=[django.core.validators.MinValueValidator(1)])),
- ('allocated_draw', models.PositiveIntegerField(blank=True, null=True, validators=[django.core.validators.MinValueValidator(1)])),
- ],
- options={
- 'verbose_name': 'power port',
- 'verbose_name_plural': 'power ports',
- 'ordering': ('device', '_name'),
- 'abstract': False,
- },
- bases=(models.Model, utilities.tracking.TrackingModelMixin),
- ),
- migrations.CreateModel(
- name='PowerPortTemplate',
- fields=[
- ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
- ('created', models.DateTimeField(auto_now_add=True, null=True)),
- ('last_updated', models.DateTimeField(auto_now=True, null=True)),
- ('name', models.CharField(max_length=64)),
- ('_name', utilities.fields.NaturalOrderingField('name', blank=True, max_length=100, naturalize_function=utilities.ordering.naturalize)),
- ('label', models.CharField(blank=True, max_length=64)),
- ('description', models.CharField(blank=True, max_length=200)),
- ('type', models.CharField(blank=True, max_length=50)),
- ('maximum_draw', models.PositiveIntegerField(blank=True, null=True, validators=[django.core.validators.MinValueValidator(1)])),
- ('allocated_draw', models.PositiveIntegerField(blank=True, null=True, validators=[django.core.validators.MinValueValidator(1)])),
- ],
- options={
- 'verbose_name': 'power port template',
- 'verbose_name_plural': 'power port templates',
- 'ordering': ('device_type', 'module_type', '_name'),
- 'abstract': False,
- },
- bases=(models.Model, utilities.tracking.TrackingModelMixin),
- ),
- migrations.CreateModel(
- name='Rack',
- fields=[
- ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
- ('created', models.DateTimeField(auto_now_add=True, null=True)),
- ('last_updated', models.DateTimeField(auto_now=True, null=True)),
- ('custom_field_data', models.JSONField(blank=True, default=dict, encoder=utilities.json.CustomFieldJSONEncoder)),
- ('description', models.CharField(blank=True, max_length=200)),
- ('comments', models.TextField(blank=True)),
- ('weight', models.DecimalField(blank=True, decimal_places=2, max_digits=8, null=True)),
- ('weight_unit', models.CharField(blank=True, max_length=50)),
- ('_abs_weight', models.PositiveBigIntegerField(blank=True, null=True)),
- ('name', models.CharField(max_length=100)),
- ('_name', utilities.fields.NaturalOrderingField('name', blank=True, max_length=100, naturalize_function=utilities.ordering.naturalize)),
- ('facility_id', models.CharField(blank=True, max_length=50, null=True)),
- ('status', models.CharField(default='active', max_length=50)),
- ('serial', models.CharField(blank=True, max_length=50)),
- ('asset_tag', models.CharField(blank=True, max_length=50, null=True, unique=True)),
- ('type', models.CharField(blank=True, max_length=50)),
- ('width', models.PositiveSmallIntegerField(default=19)),
- ('u_height', models.PositiveSmallIntegerField(default=42, validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(100)])),
- ('starting_unit', models.PositiveSmallIntegerField(default=1, validators=[django.core.validators.MinValueValidator(1)])),
- ('desc_units', models.BooleanField(default=False)),
- ('outer_width', models.PositiveSmallIntegerField(blank=True, null=True)),
- ('outer_depth', models.PositiveSmallIntegerField(blank=True, null=True)),
- ('outer_unit', models.CharField(blank=True, max_length=50)),
- ('max_weight', models.PositiveIntegerField(blank=True, null=True)),
- ('_abs_max_weight', models.PositiveBigIntegerField(blank=True, null=True)),
- ('mounting_depth', models.PositiveSmallIntegerField(blank=True, null=True)),
- ],
- options={
- 'verbose_name': 'rack',
- 'verbose_name_plural': 'racks',
- 'ordering': ('site', 'location', '_name', 'pk'),
- },
- ),
- migrations.CreateModel(
- name='RackReservation',
- fields=[
- ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
- ('created', models.DateTimeField(auto_now_add=True, null=True)),
- ('last_updated', models.DateTimeField(auto_now=True, null=True)),
- ('custom_field_data', models.JSONField(blank=True, default=dict, encoder=utilities.json.CustomFieldJSONEncoder)),
- ('comments', models.TextField(blank=True)),
- ('units', django.contrib.postgres.fields.ArrayField(base_field=models.PositiveSmallIntegerField(), size=None)),
- ('description', models.CharField(max_length=200)),
- ],
- options={
- 'verbose_name': 'rack reservation',
- 'verbose_name_plural': 'rack reservations',
- 'ordering': ['created', 'pk'],
- },
- ),
- migrations.CreateModel(
- name='RackRole',
- fields=[
- ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
- ('created', models.DateTimeField(auto_now_add=True, null=True)),
- ('last_updated', models.DateTimeField(auto_now=True, null=True)),
- ('custom_field_data', models.JSONField(blank=True, default=dict, encoder=utilities.json.CustomFieldJSONEncoder)),
- ('name', models.CharField(max_length=100, unique=True)),
- ('slug', models.SlugField(max_length=100, unique=True)),
- ('description', models.CharField(blank=True, max_length=200)),
- ('color', utilities.fields.ColorField(default='9e9e9e', max_length=6)),
- ],
- options={
- 'verbose_name': 'rack role',
- 'verbose_name_plural': 'rack roles',
- 'ordering': ('name',),
- },
- ),
- migrations.CreateModel(
- name='RearPort',
- fields=[
- ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
- ('created', models.DateTimeField(auto_now_add=True, null=True)),
- ('last_updated', models.DateTimeField(auto_now=True, null=True)),
- ('custom_field_data', models.JSONField(blank=True, default=dict, encoder=utilities.json.CustomFieldJSONEncoder)),
- ('name', models.CharField(max_length=64)),
- ('_name', utilities.fields.NaturalOrderingField('name', blank=True, max_length=100, naturalize_function=utilities.ordering.naturalize)),
- ('label', models.CharField(blank=True, max_length=64)),
- ('description', models.CharField(blank=True, max_length=200)),
- ('cable_end', models.CharField(blank=True, max_length=1)),
- ('mark_connected', models.BooleanField(default=False)),
- ('type', models.CharField(max_length=50)),
- ('color', utilities.fields.ColorField(blank=True, max_length=6)),
- ('positions', models.PositiveSmallIntegerField(default=1, validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(1024)])),
- ],
- options={
- 'verbose_name': 'rear port',
- 'verbose_name_plural': 'rear ports',
- 'ordering': ('device', '_name'),
- 'abstract': False,
- },
- bases=(models.Model, utilities.tracking.TrackingModelMixin),
- ),
- migrations.CreateModel(
- name='RearPortTemplate',
- fields=[
- ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
- ('created', models.DateTimeField(auto_now_add=True, null=True)),
- ('last_updated', models.DateTimeField(auto_now=True, null=True)),
- ('name', models.CharField(max_length=64)),
- ('_name', utilities.fields.NaturalOrderingField('name', blank=True, max_length=100, naturalize_function=utilities.ordering.naturalize)),
- ('label', models.CharField(blank=True, max_length=64)),
- ('description', models.CharField(blank=True, max_length=200)),
- ('type', models.CharField(max_length=50)),
- ('color', utilities.fields.ColorField(blank=True, max_length=6)),
- ('positions', models.PositiveSmallIntegerField(default=1, validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(1024)])),
- ],
- options={
- 'verbose_name': 'rear port template',
- 'verbose_name_plural': 'rear port templates',
- 'ordering': ('device_type', 'module_type', '_name'),
- 'abstract': False,
- },
- bases=(models.Model, utilities.tracking.TrackingModelMixin),
- ),
- migrations.CreateModel(
- name='Region',
- fields=[
- ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
- ('created', models.DateTimeField(auto_now_add=True, null=True)),
- ('last_updated', models.DateTimeField(auto_now=True, null=True)),
- ('custom_field_data', models.JSONField(blank=True, default=dict, encoder=utilities.json.CustomFieldJSONEncoder)),
- ('name', models.CharField(max_length=100)),
- ('slug', models.SlugField(max_length=100)),
- ('description', models.CharField(blank=True, max_length=200)),
- ('lft', models.PositiveIntegerField(editable=False)),
- ('rght', models.PositiveIntegerField(editable=False)),
- ('tree_id', models.PositiveIntegerField(db_index=True, editable=False)),
- ('level', models.PositiveIntegerField(editable=False)),
- ],
- options={
- 'verbose_name': 'region',
- 'verbose_name_plural': 'regions',
- },
- ),
- migrations.CreateModel(
- name='Site',
- fields=[
- ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
- ('created', models.DateTimeField(auto_now_add=True, null=True)),
- ('last_updated', models.DateTimeField(auto_now=True, null=True)),
- ('custom_field_data', models.JSONField(blank=True, default=dict, encoder=utilities.json.CustomFieldJSONEncoder)),
- ('description', models.CharField(blank=True, max_length=200)),
- ('comments', models.TextField(blank=True)),
- ('name', models.CharField(max_length=100, unique=True)),
- ('_name', utilities.fields.NaturalOrderingField('name', blank=True, max_length=100, naturalize_function=utilities.ordering.naturalize)),
- ('slug', models.SlugField(max_length=100, unique=True)),
- ('status', models.CharField(default='active', max_length=50)),
- ('facility', models.CharField(blank=True, max_length=50)),
- ('time_zone', timezone_field.fields.TimeZoneField(blank=True)),
- ('physical_address', models.CharField(blank=True, max_length=200)),
- ('shipping_address', models.CharField(blank=True, max_length=200)),
- ('latitude', models.DecimalField(blank=True, decimal_places=6, max_digits=8, null=True)),
- ('longitude', models.DecimalField(blank=True, decimal_places=6, max_digits=9, null=True)),
- ],
- options={
- 'verbose_name': 'site',
- 'verbose_name_plural': 'sites',
- 'ordering': ('_name',),
- },
- ),
- migrations.CreateModel(
- name='SiteGroup',
- fields=[
- ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
- ('created', models.DateTimeField(auto_now_add=True, null=True)),
- ('last_updated', models.DateTimeField(auto_now=True, null=True)),
- ('custom_field_data', models.JSONField(blank=True, default=dict, encoder=utilities.json.CustomFieldJSONEncoder)),
- ('name', models.CharField(max_length=100)),
- ('slug', models.SlugField(max_length=100)),
- ('description', models.CharField(blank=True, max_length=200)),
- ('lft', models.PositiveIntegerField(editable=False)),
- ('rght', models.PositiveIntegerField(editable=False)),
- ('tree_id', models.PositiveIntegerField(db_index=True, editable=False)),
- ('level', models.PositiveIntegerField(editable=False)),
- ],
- options={
- 'verbose_name': 'site group',
- 'verbose_name_plural': 'site groups',
- },
- ),
- migrations.CreateModel(
- name='VirtualChassis',
- fields=[
- ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
- ('created', models.DateTimeField(auto_now_add=True, null=True)),
- ('last_updated', models.DateTimeField(auto_now=True, null=True)),
- ('custom_field_data', models.JSONField(blank=True, default=dict, encoder=utilities.json.CustomFieldJSONEncoder)),
- ('description', models.CharField(blank=True, max_length=200)),
- ('comments', models.TextField(blank=True)),
- ('name', models.CharField(max_length=64)),
- ('domain', models.CharField(blank=True, max_length=30)),
- ('member_count', utilities.fields.CounterCacheField(default=0, editable=False, to_field='virtual_chassis', to_model='dcim.Device')),
- ],
- options={
- 'verbose_name': 'virtual chassis',
- 'verbose_name_plural': 'virtual chassis',
- 'ordering': ['name'],
- },
- ),
- migrations.CreateModel(
- name='VirtualDeviceContext',
- fields=[
- ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
- ('created', models.DateTimeField(auto_now_add=True, null=True)),
- ('last_updated', models.DateTimeField(auto_now=True, null=True)),
- ('custom_field_data', models.JSONField(blank=True, default=dict, encoder=utilities.json.CustomFieldJSONEncoder)),
- ('description', models.CharField(blank=True, max_length=200)),
- ('name', models.CharField(max_length=64)),
- ('status', models.CharField(max_length=50)),
- ('identifier', models.PositiveSmallIntegerField(blank=True, null=True)),
- ('comments', models.TextField(blank=True)),
- ('device', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='vdcs', to='dcim.device')),
- ],
- options={
- 'verbose_name': 'virtual device context',
- 'verbose_name_plural': 'virtual device contexts',
- 'ordering': ['name'],
- },
- ),
- ]
|