jumpserver/apps/assets/migrations/0092_add_host.py

49 lines
2.7 KiB
Python
Raw Normal View History

2022-08-04 02:44:11 +00:00
# Generated by Django 3.1.14 on 2022-03-30 10:35
2022-04-02 10:35:46 +00:00
2022-08-04 02:44:11 +00:00
import uuid
2022-04-02 10:35:46 +00:00
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
2022-08-04 02:44:11 +00:00
('assets', '0091_auto_20220629_1826'),
2022-04-02 10:35:46 +00:00
]
operations = [
2022-08-04 02:44:11 +00:00
migrations.CreateModel(
name='Host',
fields=[
('asset_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='assets.asset')),
],
),
2022-04-02 10:35:46 +00:00
migrations.CreateModel(
2022-04-06 03:29:16 +00:00
name='DeviceInfo',
2022-04-02 10:35:46 +00:00
fields=[
2022-04-20 02:15:20 +00:00
('id', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False)),
('created_by', models.CharField(blank=True, max_length=32, null=True, verbose_name='Created by')),
('date_created', models.DateTimeField(auto_now_add=True, null=True, verbose_name='Date created')),
('date_updated', models.DateTimeField(auto_now=True, verbose_name='Date updated')),
2022-04-02 10:35:46 +00:00
('vendor', models.CharField(blank=True, max_length=64, null=True, verbose_name='Vendor')),
('model', models.CharField(blank=True, max_length=54, null=True, verbose_name='Model')),
('sn', models.CharField(blank=True, max_length=128, null=True, verbose_name='Serial number')),
('cpu_model', models.CharField(blank=True, max_length=64, null=True, verbose_name='CPU model')),
('cpu_count', models.IntegerField(null=True, verbose_name='CPU count')),
('cpu_cores', models.IntegerField(null=True, verbose_name='CPU cores')),
('cpu_vcpus', models.IntegerField(null=True, verbose_name='CPU vcpus')),
('memory', models.CharField(blank=True, max_length=64, null=True, verbose_name='Memory')),
('disk_total', models.CharField(blank=True, max_length=1024, null=True, verbose_name='Disk total')),
('disk_info', models.CharField(blank=True, max_length=1024, null=True, verbose_name='Disk info')),
('os', models.CharField(blank=True, max_length=128, null=True, verbose_name='OS')),
('os_version', models.CharField(blank=True, max_length=16, null=True, verbose_name='OS version')),
('os_arch', models.CharField(blank=True, max_length=16, null=True, verbose_name='OS arch')),
('hostname_raw', models.CharField(blank=True, max_length=128, null=True, verbose_name='Hostname raw')),
2022-04-20 02:15:20 +00:00
('host', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='assets.host', verbose_name='Host')),
2022-04-02 10:35:46 +00:00
],
options={
2022-04-06 03:29:16 +00:00
'verbose_name': 'DeviceInfo',
2022-04-02 10:35:46 +00:00
},
),
]