Commit 02a5d4cc authored by Aleksey Shirokih's avatar Aleksey Shirokih
Browse files

autofix flake8

parent 08d15d61
......@@ -6,28 +6,28 @@
# See LICENSE for details
# ----------------------------------------------------------------------
# NOC modules
from noc.core.clickhouse.model import Model
from noc.core.bi.dictionaries.administrativedomain import AdministrativeDomain
from noc.core.bi.dictionaries.alarmclass import AlarmClass
from noc.core.bi.dictionaries.container import Container
from noc.core.bi.dictionaries.managedobject import ManagedObject
from noc.core.bi.dictionaries.networksegment import NetworkSegment
from noc.core.bi.dictionaries.platform import Platform
from noc.core.bi.dictionaries.pool import Pool
from noc.core.bi.dictionaries.profile import Profile
from noc.core.bi.dictionaries.vendor import Vendor
from noc.core.bi.dictionaries.version import Version
from noc.core.clickhouse.engines import MergeTree
from noc.core.clickhouse.fields import (DateField, DateTimeField,
Int16Field,
Int32Field, Int64Field,
StringField,
Float64Field, ReferenceField,
IPv4Field)
from noc.core.clickhouse.engines import MergeTree
from noc.core.bi.dictionaries.managedobject import ManagedObject
from noc.core.bi.dictionaries.vendor import Vendor
from noc.core.bi.dictionaries.platform import Platform
from noc.core.bi.dictionaries.version import Version
from noc.core.bi.dictionaries.profile import Profile
from noc.core.bi.dictionaries.administrativedomain import AdministrativeDomain
from noc.core.bi.dictionaries.networksegment import NetworkSegment
from noc.core.bi.dictionaries.container import Container
from noc.core.bi.dictionaries.alarmclass import AlarmClass
from noc.core.bi.dictionaries.pool import Pool
# NOC modules
from noc.core.clickhouse.model import Model
from noc.core.translation import ugettext as _
from noc.sa.models.useraccess import UserAccess
from noc.sa.models.administrativedomain import AdministrativeDomain as AdministrativeDomainM
from noc.sa.models.useraccess import UserAccess
class Alarms(Model):
......
......@@ -8,13 +8,14 @@
# Python modules
import datetime
# Third-party modules
from mongoengine.document import Document, EmbeddedDocument
from mongoengine.fields import (StringField, DateTimeField, ListField,
IntField, BinaryField, EmbeddedDocumentField)
from noc.lib.nosql import ForeignKeyField
# NOC modules
from noc.main.models import User, Group
from noc.lib.nosql import ForeignKeyField
DAL_NONE = -1
DAL_RO = 0
......@@ -74,11 +75,11 @@ class Dashboard(Document):
if ar.group and ar.group in groups:
level = max(level, ar.level)
if level == DAL_ADMIN:
return level
return level
return level
def save(self, force_insert=False, validate=True, clean=True,
write_concern=None, cascade=None, cascade_kwargs=None,
write_concern=None, cascade=None, cascade_kwargs=None,
_refs=None, save_condition=None, **kwargs):
# Split DashBoard Acces to {User, level}, {Group, level}
# self.update(add_to_set__access=[parent_1, parent_2, parent_1])
......@@ -107,7 +108,7 @@ class Dashboard(Document):
self.access = access
super(Dashboard, self).save(force_insert=force_insert, validate=validate, clean=clean,
write_concern=write_concern, cascade=cascade, cascade_kwargs=cascade_kwargs,
write_concern=write_concern, cascade=cascade, cascade_kwargs=cascade_kwargs,
_refs=_refs, save_condition=save_condition, **kwargs)
def clean_access(self, item=None):
......
......@@ -8,15 +8,16 @@
# Python modules
from collections import defaultdict
# NOC modules
from noc.core.clickhouse.model import Model
from noc.core.bi.dictionaries.interfaceprofile import InterfaceProfile
from noc.core.bi.dictionaries.managedobject import ManagedObject
from noc.core.bi.dictionaries.networksegment import NetworkSegment
from noc.core.clickhouse.engines import MergeTree
from noc.core.clickhouse.fields import (
DateField, DateTimeField, UInt64Field, UInt16Field, UInt8Field,
StringField, ReferenceField)
from noc.core.clickhouse.engines import MergeTree
from noc.core.bi.dictionaries.managedobject import ManagedObject
from noc.core.bi.dictionaries.interfaceprofile import InterfaceProfile
from noc.core.bi.dictionaries.networksegment import NetworkSegment
# NOC modules
from noc.core.clickhouse.model import Model
from noc.core.translation import ugettext as _
......
......@@ -6,27 +6,27 @@
# See LICENSE for details
# ----------------------------------------------------------------------
# NOC modules
from noc.core.clickhouse.model import Model
from noc.core.clickhouse.fields import (DateField, DateTimeField,
UInt16Field,
Int32Field, BooleanField,
StringField,
Float64Field, ReferenceField,
IPv4Field, UInt8Field)
from noc.core.clickhouse.engines import MergeTree
from noc.core.bi.dictionaries.administrativedomain import AdministrativeDomain
from noc.core.bi.dictionaries.container import Container
from noc.core.bi.dictionaries.managedobject import ManagedObject as ManagedObjectDict
from noc.core.bi.dictionaries.networksegment import NetworkSegment
from noc.core.bi.dictionaries.platform import Platform
from noc.core.bi.dictionaries.pool import Pool
from noc.core.bi.dictionaries.profile import Profile
from noc.core.bi.dictionaries.vendor import Vendor
from noc.core.bi.dictionaries.platform import Platform
from noc.core.bi.dictionaries.version import Version
from noc.core.bi.dictionaries.administrativedomain import AdministrativeDomain
from noc.core.bi.dictionaries.networksegment import NetworkSegment
from noc.core.bi.dictionaries.container import Container
from noc.core.clickhouse.engines import MergeTree
from noc.core.clickhouse.fields import (DateField, DateTimeField,
UInt16Field,
Int32Field, BooleanField,
StringField,
Float64Field, ReferenceField,
IPv4Field)
# NOC modules
from noc.core.clickhouse.model import Model
from noc.core.translation import ugettext as _
from noc.sa.models.useraccess import UserAccess
from noc.sa.models.administrativedomain import AdministrativeDomain as AdministrativeDomainM
from noc.sa.models.useraccess import UserAccess
class ManagedObject(Model):
......
......@@ -6,24 +6,24 @@
# See LICENSE for details
# ----------------------------------------------------------------------
# NOC modules
from noc.core.clickhouse.model import Model
from noc.core.clickhouse.fields import (DateField, DateTimeField,
Float64Field, ReferenceField,
IPv4Field)
from noc.core.clickhouse.engines import MergeTree
from noc.core.bi.dictionaries.managedobject import ManagedObject
from noc.core.bi.dictionaries.vendor import Vendor
from noc.core.bi.dictionaries.platform import Platform
from noc.core.bi.dictionaries.version import Version
from noc.core.bi.dictionaries.profile import Profile
from noc.core.bi.dictionaries.administrativedomain import AdministrativeDomain
from noc.core.bi.dictionaries.networksegment import NetworkSegment
from noc.core.bi.dictionaries.container import Container
from noc.core.bi.dictionaries.managedobject import ManagedObject
from noc.core.bi.dictionaries.networksegment import NetworkSegment
from noc.core.bi.dictionaries.platform import Platform
from noc.core.bi.dictionaries.pool import Pool
from noc.sa.models.useraccess import UserAccess
from noc.sa.models.administrativedomain import AdministrativeDomain as AdministrativeDomainM
from noc.core.bi.dictionaries.profile import Profile
from noc.core.bi.dictionaries.vendor import Vendor
from noc.core.bi.dictionaries.version import Version
from noc.core.clickhouse.engines import MergeTree
from noc.core.clickhouse.fields import (DateField, DateTimeField,
Float64Field, ReferenceField,
IPv4Field)
# NOC modules
from noc.core.clickhouse.model import Model
from noc.core.translation import ugettext as _
from noc.sa.models.administrativedomain import AdministrativeDomain as AdministrativeDomainM
from noc.sa.models.useraccess import UserAccess
class Reboots(Model):
......
......@@ -6,12 +6,12 @@
# See LICENSE for details
# ----------------------------------------------------------------------
# NOC modules
from noc.core.clickhouse.model import Model
from noc.core.bi.dictionaries.managedobject import ManagedObject
from noc.core.clickhouse.engines import MergeTree
from noc.core.clickhouse.fields import (
DateField, DateTimeField, UInt64Field, StringField, ReferenceField)
from noc.core.clickhouse.engines import MergeTree
from noc.core.bi.dictionaries.managedobject import ManagedObject
# NOC modules
from noc.core.clickhouse.model import Model
from noc.core.translation import ugettext as _
......
......@@ -6,11 +6,11 @@
# See LICENSE for details
# ----------------------------------------------------------------------
# NOC modules
from noc.core.clickhouse.model import Model
from noc.core.clickhouse.engines import MergeTree
from noc.core.clickhouse.fields import (
DateField, DateTimeField, UInt64Field, Int32Field, UInt32Field, StringField)
from noc.core.clickhouse.engines import MergeTree
# NOC modules
from noc.core.clickhouse.model import Model
from noc.core.translation import ugettext as _
......
......@@ -6,28 +6,29 @@
# See LICENSE for details
# ---------------------------------------------------------------------
import datetime
# Python modules
import logging
from collections import defaultdict
import datetime
import uuid
import threading
import uuid
from collections import defaultdict
import clips
# Third-party modules
import six
import clips
from pymongo.errors import BulkWriteError
from pymongo import UpdateOne, InsertOne, DeleteOne
# NOC modules
from noc.cm.facts.error import Error
from noc.cm.facts.role import Role
from noc.core.log import PrefixLoggerAdapter
from noc.cm.models.objectfact import ObjectFact
from noc.cm.models.validationpolicysettings import ValidationPolicySettings
from noc.inv.models.interface import Interface as InvInterface
from noc.inv.models.subinterface import SubInterface as InvSubInterface
from noc.core.debug import error_report
from noc.core.handler import get_handler
from noc.cm.models.objectfact import ObjectFact
from noc.core.log import PrefixLoggerAdapter
from noc.inv.models.interface import Interface as InvInterface
from noc.inv.models.subinterface import SubInterface as InvSubInterface
from noc.lib.clipsenv import CLIPSEnv
from pymongo import UpdateOne, InsertOne, DeleteOne
from pymongo.errors import BulkWriteError
logger = logging.getLogger(__name__)
......@@ -464,6 +465,7 @@ class Engine(object):
"(return (python-call py-match-re ?rx ?s))"
)
#
from noc.cm.validators.base import BaseValidator
from noc.fm.models.alarmclass import AlarmClass
......
......@@ -8,9 +8,11 @@
# Python modules
import logging
from noc.inv.models.interface import Interface as DBInterface
# NOC modules
from base import BaseFact
from noc.inv.models.interface import Interface as DBInterface
logger = logging.getLogger(__name__)
......@@ -21,7 +23,7 @@ class Interface(BaseFact):
"aggregated_interface"]
ID = ["name"]
def __init__(self, name, description=None, admin_status=False,
def __init__(self, name, description=None, admin_status=False,
speed="auto", duplex="auto", protocols=None,
profile=None, type=None, mac=None, default_name=None,
aggregated_interface=None,
......
......@@ -9,9 +9,11 @@
# Python modules
import bisect
import logging
from noc.inv.models.subinterface import SubInterface as DBSubInterface
# NOC modules
from base import BaseFact
from noc.inv.models.subinterface import SubInterface as DBSubInterface
logger = logging.getLogger(__name__)
......@@ -35,7 +37,7 @@ class SubInterface(BaseFact):
def __init__(self, name, interface=None, description=None,
admin_status=False, profile=None, vlan_ids=None,
ip_proxy_arp=False,
ip_redirects=False, tagged_vlans=None,
ip_redirects=False, tagged_vlans=None,
untagged_vlan=None, ipv4_addresses=None,
ipv6_addresses=None, protocols=None, afi=None,
input_ipv4_filter=None, output_ipv4_filter=None,
......
......@@ -11,43 +11,42 @@ from south.db import db
class Migration:
def forwards(self):
# Model 'ObjectCategory'
db.create_table('cm_objectcategory', (
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
('name', models.CharField("Name",max_length=64,unique=True)),
('description', models.CharField("Description",max_length=128,null=True,blank=True))
('name', models.CharField("Name", max_length=64, unique=True)),
('description', models.CharField("Description", max_length=128, null=True, blank=True))
))
# Model 'Object'
db.create_table('cm_object', (
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
('handler_class_name', models.CharField("Object Type",max_length=64)),
('stream_url', models.CharField("URL",max_length=128)),
('profile_name', models.CharField("Profile",max_length=128)),
('repo_path', models.CharField("Repo Path",max_length=128)),
('push_every', models.PositiveIntegerField("Push Every (secs)",default=86400,blank=True,null=True)),
('next_push', models.DateTimeField("Next Push",blank=True,null=True)),
('last_push', models.DateTimeField("Last Push",blank=True,null=True)),
('pull_every', models.PositiveIntegerField("Pull Every (secs)",default=86400,blank=True,null=True)),
('next_pull', models.DateTimeField("Next Pull",blank=True,null=True)),
('last_pull', models.DateTimeField("Last Pull",blank=True,null=True))
('handler_class_name', models.CharField("Object Type", max_length=64)),
('stream_url', models.CharField("URL", max_length=128)),
('profile_name', models.CharField("Profile", max_length=128)),
('repo_path', models.CharField("Repo Path", max_length=128)),
('push_every', models.PositiveIntegerField("Push Every (secs)", default=86400, blank=True, null=True)),
('next_push', models.DateTimeField("Next Push", blank=True, null=True)),
('last_push', models.DateTimeField("Last Push", blank=True, null=True)),
('pull_every', models.PositiveIntegerField("Pull Every (secs)", default=86400, blank=True, null=True)),
('next_pull', models.DateTimeField("Next Pull", blank=True, null=True)),
('last_pull', models.DateTimeField("Last Pull", blank=True, null=True))
))
# Mock Models
Object = db.mock_model(model_name='Object', db_table='cm_object', db_tablespace='', pk_field_name='id', pk_field_type=models.AutoField)
ObjectCategory = db.mock_model(model_name='ObjectCategory', db_table='cm_objectcategory', db_tablespace='', pk_field_name='id', pk_field_type=models.AutoField)
Object = db.mock_model(model_name='Object', db_table='cm_object', db_tablespace='', pk_field_name='id',
pk_field_type=models.AutoField)
ObjectCategory = db.mock_model(model_name='ObjectCategory', db_table='cm_objectcategory', db_tablespace='',
pk_field_name='id', pk_field_type=models.AutoField)
# M2M field 'Object.categories'
db.create_table('cm_object_categories', (
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
('object', models.ForeignKey(Object, null=False)),
('objectcategory', models.ForeignKey(ObjectCategory, null=False))
))
db.create_index('cm_object', ['handler_class_name','repo_path'], unique=True, db_tablespace='')
))
db.create_index('cm_object', ['handler_class_name', 'repo_path'], unique=True, db_tablespace='')
db.send_create_signal('cm', ['ObjectCategory','Object'])
db.send_create_signal('cm', ['ObjectCategory', 'Object'])
def backwards(self):
db.delete_table('cm_object_categories')
......
......@@ -6,11 +6,10 @@
"""
"""
class Migration:
class Migration:
def forwards(self):
pass
def backwards(self):
pass
......@@ -5,34 +5,37 @@
# ---------------------------------------------------------------------
"""
"""
from south.db import db
from django.db import models
from noc.lib.url import URL
from south.db import db
class Migration:
class Migration:
def forwards(self):
db.add_column("cm_object","scheme",models.IntegerField("Scheme",blank=True,null=True,choices=[(0,"telnet"),(1,"ssh")]))
db.add_column("cm_object","address",models.CharField("Address",max_length=64,blank=True,null=True))
db.add_column("cm_object","port",models.PositiveIntegerField("Port",blank=True,null=True))
db.add_column("cm_object","user",models.CharField("User",max_length=32,blank=True,null=True))
db.add_column("cm_object","password",models.CharField("Password",max_length=32,blank=True,null=True))
db.add_column("cm_object","super_password",models.CharField("Super Password",max_length=32,blank=True,null=True))
db.add_column("cm_object","remote_path",models.CharField("Path",max_length=32,blank=True,null=True))
for id,url in db.execute("SELECT id,stream_url FROM cm_object WHERE stream_url!='ssh://u:p@localhost/'"):
u=URL(url)
scheme={"telnet":0,"ssh":1}[u.scheme]
if u.path=="/":
u.path=None
db.execute("UPDATE cm_object SET scheme=%s,address=%s,port=%s,\"user\"=%s,password=%s,remote_path=%s WHERE id=%s",
[scheme,u.host,u.port,u.user,u.password,u.path,id])
db.delete_column("cm_object","stream_url")
db.add_column("cm_object", "scheme",
models.IntegerField("Scheme", blank=True, null=True, choices=[(0, "telnet"), (1, "ssh")]))
db.add_column("cm_object", "address", models.CharField("Address", max_length=64, blank=True, null=True))
db.add_column("cm_object", "port", models.PositiveIntegerField("Port", blank=True, null=True))
db.add_column("cm_object", "user", models.CharField("User", max_length=32, blank=True, null=True))
db.add_column("cm_object", "password", models.CharField("Password", max_length=32, blank=True, null=True))
db.add_column("cm_object", "super_password",
models.CharField("Super Password", max_length=32, blank=True, null=True))
db.add_column("cm_object", "remote_path", models.CharField("Path", max_length=32, blank=True, null=True))
for id, url in db.execute("SELECT id,stream_url FROM cm_object WHERE stream_url!='ssh://u:p@localhost/'"):
u = URL(url)
scheme = {"telnet": 0, "ssh": 1}[u.scheme]
if u.path == "/":
u.path = None
db.execute(
"UPDATE cm_object SET scheme=%s,address=%s,port=%s,\"user\"=%s,password=%s,remote_path=%s WHERE id=%s",
[scheme, u.host, u.port, u.user, u.password, u.path, id])
db.delete_column("cm_object", "stream_url")
def backwards(self):
db.delete_column("cm_object","scheme")
db.delete_column("cm_object","address")
db.delete_column("cm_object","port")
db.delete_column("cm_object","user")
db.delete_column("cm_object","password")
db.delete_column("cm_object","super_password")
db.delete_column("cm_object","remote_path")
db.delete_column("cm_object", "scheme")
db.delete_column("cm_object", "address")
db.delete_column("cm_object", "port")
db.delete_column("cm_object", "user")
db.delete_column("cm_object", "password")
db.delete_column("cm_object", "super_password")
db.delete_column("cm_object", "remote_path")
......@@ -5,90 +5,99 @@
# ---------------------------------------------------------------------
"""
"""
from south.db import db
from django.db import models
from south.db import db
class Migration:
depends_on=(
("sa","0005_activator"),
depends_on = (
("sa", "0005_activator"),
)
def forwards(self):
Activator = db.mock_model(model_name='Activator', db_table='sa_activator', db_tablespace='', pk_field_name='id', pk_field_type=models.AutoField)
Activator = db.mock_model(model_name='Activator', db_table='sa_activator', db_tablespace='', pk_field_name='id',
pk_field_type=models.AutoField)
# Model 'Config'
db.create_table('cm_config', (
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
('repo_path', models.CharField("Repo Path",max_length=128,unique=True)),
('push_every', models.PositiveIntegerField("Push Every (secs)",default=86400,blank=True,null=True)),
('next_push', models.DateTimeField("Next Push",blank=True,null=True)),
('last_push', models.DateTimeField("Last Push",blank=True,null=True)),
('pull_every', models.PositiveIntegerField("Pull Every (secs)",default=86400,blank=True,null=True)),
('next_pull', models.DateTimeField("Next Pull",blank=True,null=True)),
('last_pull', models.DateTimeField("Last Pull",blank=True,null=True)),
('activator',models.ForeignKey(Activator,verbose_name="Activator")),
('profile_name', models.CharField("Profile",max_length=128)),
('scheme', models.IntegerField("Scheme",choices=[(0,"telnet"),(1,"ssh")])),
('address', models.CharField("Address",max_length=64)),
('port', models.PositiveIntegerField("Port",blank=True,null=True)),
('user', models.CharField("User",max_length=32,blank=True,null=True)),
('password', models.CharField("Password",max_length=32,blank=True,null=True)),
('super_password', models.CharField("Super Password",max_length=32,blank=True,null=True)),
('remote_path', models.CharField("Path",max_length=32,blank=True,null=True))
('repo_path', models.CharField("Repo Path", max_length=128, unique=True)),
('push_every', models.PositiveIntegerField("Push Every (secs)", default=86400, blank=True, null=True)),
('next_push', models.DateTimeField("Next Push", blank=True, null=True)),
('last_push', models.DateTimeField("Last Push", blank=True, null=True)),
('pull_every', models.PositiveIntegerField("Pull Every (secs)", default=86400, blank=True, null=True)),
('next_pull', models.DateTimeField("Next Pull", blank=True, null=True)),
('last_pull', models.DateTimeField("Last Pull", blank=True, null=True)),
('activator', models.ForeignKey(Activator, verbose_name="Activator")),
('profile_name', models.CharField("Profile", max_length=128)),
('scheme', models.IntegerField("Scheme", choices=[(0, "telnet"), (1, "ssh")])),
('address', models.CharField("Address", max_length=64)),
('port', models.PositiveIntegerField("Port", blank=True, null=True)),
('user', models.CharField("User", max_length=32, blank=True, null=True)),
('password', models.CharField("Password", max_length=32, blank=True, null=True)),
('super_password', models.CharField("Super Password", max_length=32, blank=True, null=True)),
('remote_path', models.CharField("Path", max_length=32, blank=True, null=True))
))
# Mock Models
Config = db.mock_model(model_name='Config', db_table='cm_config', db_tablespace='', pk_field_name='id', pk_field_type=models.AutoField)
ObjectCategory = db.mock_model(model_name='ObjectCategory', db_table='cm_objectcategory', db_tablespace='', pk_field_name='id', pk_field_type=models.AutoField)
Config = db.mock_model(model_name='Config', db_table='cm_config', db_tablespace='', pk_field_name='id',
pk_field_type=models.AutoField)
ObjectCategory = db.mock_model(model_name='ObjectCategory', db_table='cm_objectcategory', db_tablespace='',
pk_field_name='id', pk_field_type=models.AutoField)
# M2M field 'Config.categories'
db.create_table('cm_config_categories', (
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
('config', models.ForeignKey(Config, null=False)),
('objectcategory', models.ForeignKey(ObjectCategory, null=False))
))
))
# Model 'PrefixList'
db.create_table('cm_prefixlist', (
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
('repo_path', models.CharField("Repo Path",max_length=128,unique=True)),
('push_every', models.PositiveIntegerField("Push Every (secs)",default=86400,blank=True,null=True)),
('next_push', models.DateTimeField("Next Push",blank=True,null=True)),
('last_push', models.DateTimeField("Last Push",blank=True,null=True)),
('pull_every', models.PositiveIntegerField("Pull Every (secs)",default=86400,blank=True,null=True)),
('next_pull', models.DateTimeField("Next Pull",blank=True,null=True)),
('last_pull', models.DateTimeField("Last Pull",blank=True,null=True))
('repo_path', models.CharField("Repo Path", max_length=128, unique=True)),
('push_every', models.PositiveIntegerField("Push Every (secs)", default=86400, blank=True, null=True)),
('next_push', models.DateTimeField("Next Push", blank=True, null=True)),
('last_push', models.DateTimeField("Last Push", blank=True, null=True)),
('pull_every', models.PositiveIntegerField("Pull Every (secs)", default=86400, blank=True, null=True)),
('next_pull', models.DateTimeField("Next Pull", blank=True, null=True)),
('last_pull', models.DateTimeField("Last Pull", blank=True, null=True))
))
# Mock Models
PrefixList = db.mock_model(model_name='PrefixList', db_table='cm_prefixlist', db_tablespace='', pk_field_name='id', pk_field_type=models.AutoField)
ObjectCategory = db.mock_model(model_name='ObjectCategory', db_table='cm_objectcategory', db_tablespace='', pk_field_name='id', pk_field_type=models.AutoField)
PrefixList = db.mock_model(model_name='PrefixList', db_table='cm_prefixlist', db_tablespace='',
pk_field_name='id', pk_field_type=models.AutoField)
ObjectCategory = db.mock_model(model_name='ObjectCategory', db_table='cm_objectcategory', db_tablespace='',
pk_field_name='id', pk_field_type=models.AutoField)
# M2M field 'PrefixList.categories'
db.create_table('cm_prefixlist_categories', (
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
('prefixlist', models.ForeignKey(PrefixList, null=False)),
('objectcategory', models.ForeignKey(ObjectCategory, null=False))
))
))
# Model 'DNS'
db.create_table('cm_dns', (
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
('repo_path', models.CharField("Repo Path",max_length=128,unique=True)),
('push_every', models.PositiveIntegerField("Push Every (secs)",default=86400,blank=True,null=True)),
('next_push', models.DateTimeField("Next Push",blank=True,null=True)),
('last_push', models.DateTimeField("Last Push",blank=True,null=True)),
('pull_every', models.PositiveIntegerField("Pull Every (secs)",default=86400,blank=True,null=True)),
('next_pull', models.DateTimeField("Next Pull",blank=True,null=True)),
('last_pull', models.DateTimeField("Last Pull",blank=True,null=True))
('repo_path', models.CharField("Repo Path", max_length=128, unique=True)),
('push_every', models.PositiveIntegerField("Push Every (secs)", default=86400, blank=True, null=True)),
('next_push', models.DateTimeField("Next Push", blank=True, null=True)),
('last_push', models.DateTimeField("Last Push", blank=True, null=True)),
('pull_every', models.PositiveIntegerField("Pull Every (secs)", default=86400, blank=True, null=True)),