Commit b848a167 authored by Dmitry Lukhtionov's avatar Dmitry Lukhtionov
Browse files

PEP8 formatting

--HG--
branch : feature/microservices
parent 827a1e03
# -*- coding: utf-8 -*-
##----------------------------------------------------------------------
## Inventory module datasources
##----------------------------------------------------------------------
## Copyright (C) 2007-2013 The NOC Project
## See LICENSE for details
##----------------------------------------------------------------------
# ---------------------------------------------------------------------
# Inventory module datasources
# ---------------------------------------------------------------------
# Copyright (C) 2007-2013 The NOC Project
# See LICENSE for details
# ---------------------------------------------------------------------
## NOC modules
# NOC modules
from noc.lib.datasource import DataSource
from noc.inv.models.interface import Interface
from noc.inv.models.subinterface import SubInterface
......
# -*- coding: utf-8 -*-
##----------------------------------------------------------------------
## ./noc clean-asset
##----------------------------------------------------------------------
## Copyright (C) 2007-2014 The NOC Project
## See LICENSE for details
##----------------------------------------------------------------------
# ---------------------------------------------------------------------
# ./noc clean-asset
# ---------------------------------------------------------------------
# Copyright (C) 2007-2014 The NOC Project
# See LICENSE for details
# ---------------------------------------------------------------------
## Django modules
# Django modules
from django.core.management.base import BaseCommand, CommandError
## NOC modules
# NOC modules
from noc.sa.models.managedobjectselector import ManagedObjectSelector
from noc.inv.models.object import Object
from noc.inv.models.objectconnection import ObjectConnection
......@@ -39,4 +39,4 @@ class Command(BaseCommand):
# Clean inner connections
for name, remote, remote_name in obj.iter_connections("i"):
self.clean_obj(remote)
obj.delete()
\ No newline at end of file
obj.delete()
# -*- coding: utf-8 -*-
##----------------------------------------------------------------------
## Interface profile management
##----------------------------------------------------------------------
## Copyright (C) 2007-2015 The NOC Project
## See LICENSE for details
##----------------------------------------------------------------------
# ---------------------------------------------------------------------
# Interface profile management
# ---------------------------------------------------------------------
# Copyright (C) 2007-2015 The NOC Project
# See LICENSE for details
# ---------------------------------------------------------------------
## Python modules
# Python modules
from optparse import OptionParser, make_option
from collections import defaultdict
## Django modules
# Django modules
from django.core.management.base import BaseCommand, CommandError
## NOC modules
# NOC modules
from noc.inv.models.interface import Interface
from noc.inv.models.interfaceprofile import InterfaceProfile
from noc.sa.models.managedobjectselector import ManagedObjectSelector
......
# -*- coding: utf-8 -*-
##----------------------------------------------------------------------
## L3 topology
##----------------------------------------------------------------------
## Copyright (C) 2007-2012 The NOC Project
## See LICENSE for details
##----------------------------------------------------------------------
# ---------------------------------------------------------------------
# L3 topology
# ---------------------------------------------------------------------
# Copyright (C) 2007-2012 The NOC Project
# See LICENSE for details
# ---------------------------------------------------------------------
## Python modules
# Python modules
import os
import tempfile
import subprocess
from optparse import make_option
from collections import namedtuple, defaultdict
## Django modules
# Django modules
from django.core.management.base import BaseCommand, CommandError
## NOC modules
# NOC modules
from noc.ip.models.vrf import VRF
from noc.sa.models.managedobject import ManagedObject
from noc.inv.models.forwardinginstance import ForwardingInstance
......
# -*- coding: utf-8 -*-
##----------------------------------------------------------------------
## Link management CLI interface
##----------------------------------------------------------------------
## Copyright (C) 2007-2012 The NOC Project
## See LICENSE for details
##----------------------------------------------------------------------
# ---------------------------------------------------------------------
# Link management CLI interface
# ---------------------------------------------------------------------
# Copyright (C) 2007-2012 The NOC Project
# See LICENSE for details
# ---------------------------------------------------------------------
## Python modules
# Python modules
from optparse import OptionParser, make_option
from collections import defaultdict
## Django modules
# Django modules
from django.core.management.base import BaseCommand, CommandError
## NOC modules
# NOC modules
from noc.inv.models.interface import Interface
from noc.inv.models.link import Link
......
# -*- coding: utf-8 -*-
##----------------------------------------------------------------------
## Link management CLI interface
##----------------------------------------------------------------------
## Copyright (C) 2007-2012 The NOC Project
## See LICENSE for details
##----------------------------------------------------------------------
## Python modules
# ---------------------------------------------------------------------
# Link management CLI interface
# ---------------------------------------------------------------------
# Copyright (C) 2007-2012 The NOC Project
# See LICENSE for details
# ---------------------------------------------------------------------
# Python modules
from optparse import OptionParser, make_option
## Django modules
# Django modules
from django.core.management.base import BaseCommand, CommandError
## NOC modules
# NOC modules
from noc.inv.models.objectmodel import ObjectModel, ModelConnectionsCache
......
# -*- coding: utf-8 -*-
##----------------------------------------------------------------------
## Initialize SubInterface.managed_object
##----------------------------------------------------------------------
## Copyright (C) 2007-2012 The NOC Project
## See LICENSE for details
##----------------------------------------------------------------------
# ---------------------------------------------------------------------
# Initialize SubInterface.managed_object
# ---------------------------------------------------------------------
# Copyright (C) 2007-2012 The NOC Project
# See LICENSE for details
# ---------------------------------------------------------------------
from noc.lib.nosql import get_db
class Migration:
......@@ -21,4 +21,4 @@ class Migration:
{"$set": {"managed_object": imo[i_oid]}})
def backwards(self):
pass
\ No newline at end of file
pass
# -*- coding: utf-8 -*-
##----------------------------------------------------------------------
## Initialize discovery templates
##----------------------------------------------------------------------
## Copyright (C) 2007-2012 The NOC Project
## See LICENSE for details
##----------------------------------------------------------------------
# ---------------------------------------------------------------------
# Initialize discovery templates
# ---------------------------------------------------------------------
# Copyright (C) 2007-2012 The NOC Project
# See LICENSE for details
# ---------------------------------------------------------------------
from south.db import db
......
# -*- coding: utf-8 -*-
##----------------------------------------------------------------------
## Create "default" interface profie
##----------------------------------------------------------------------
## Copyright (C) 2007-2012 The NOC Project
## See LICENSE for details
##----------------------------------------------------------------------
# ---------------------------------------------------------------------
# Create "default" interface profie
# ---------------------------------------------------------------------
# Copyright (C) 2007-2012 The NOC Project
# See LICENSE for details
# ---------------------------------------------------------------------
from noc.lib.nosql import get_db
DEFAULT_NAME = "default"
......@@ -21,4 +21,4 @@ class Migration:
})
def backwards(self):
pass
\ No newline at end of file
pass
# -*- coding: utf-8 -*-
## Third-party modules
# Third-party modules
from south.db import db
## NOC modules
# NOC modules
from django.db import models
......
# -*- coding: utf-8 -*-
##----------------------------------------------------------------------
## Cleanup SubInterface's is_* indexes
##----------------------------------------------------------------------
## Copyright (C) 2007-2013 The NOC Project
## See LICENSE for details
##----------------------------------------------------------------------
# ---------------------------------------------------------------------
# Cleanup SubInterface's is_* indexes
# ---------------------------------------------------------------------
# Copyright (C) 2007-2013 The NOC Project
# See LICENSE for details
# ---------------------------------------------------------------------
from noc.lib.nosql import get_db
class Migration:
......@@ -17,4 +17,4 @@ class Migration:
pass
def backwards(self):
pass
\ No newline at end of file
pass
# -*- coding: utf-8 -*-
##----------------------------------------------------------------------
## Initialize vlan discovery template
##----------------------------------------------------------------------
## Copyright (C) 2007-2012 The NOC Project
## See LICENSE for details
##----------------------------------------------------------------------
# ---------------------------------------------------------------------
# Initialize vlan discovery template
# ---------------------------------------------------------------------
# Copyright (C) 2007-2012 The NOC Project
# See LICENSE for details
# ---------------------------------------------------------------------
from south.db import db
......
# -*- coding: utf-8 -*-
##----------------------------------------------------------------------
## Migrate chassis ids to ranged version
##----------------------------------------------------------------------
## Copyright (C) 2007-2013 The NOC Project
## See LICENSE for details
##----------------------------------------------------------------------
# ---------------------------------------------------------------------
# Migrate chassis ids to ranged version
# ---------------------------------------------------------------------
# Copyright (C) 2007-2013 The NOC Project
# See LICENSE for details
# ---------------------------------------------------------------------
## NOC modules
# NOC modules
from noc.lib.nosql import get_db
......@@ -37,4 +37,4 @@ class Migration(object):
)
def backwards(self):
pass
\ No newline at end of file
pass
# -*- coding: utf-8 -*-
##----------------------------------------------------------------------
## Initialize inventory hierarchy
##----------------------------------------------------------------------
## Copyright (C) 2007-2013 The NOC Project
## See LICENSE for details
##----------------------------------------------------------------------
# ---------------------------------------------------------------------
# Initialize inventory hierarchy
# ---------------------------------------------------------------------
# Copyright (C) 2007-2013 The NOC Project
# See LICENSE for details
# ---------------------------------------------------------------------
## NOC modules
# NOC modules
from noc.lib.nosql import get_db
......
# -*- coding: utf-8 -*-
##----------------------------------------------------------------------
## Initialize inventory hierarchy
##----------------------------------------------------------------------
## Copyright (C) 2007-2013 The NOC Project
## See LICENSE for details
##----------------------------------------------------------------------
# ---------------------------------------------------------------------
# Initialize inventory hierarchy
# ---------------------------------------------------------------------
# Copyright (C) 2007-2013 The NOC Project
# See LICENSE for details
# ---------------------------------------------------------------------
## NOC modules
# NOC modules
from noc.lib.nosql import get_db
......
# -*- coding: utf-8 -*-
##----------------------------------------------------------------------
## Initialize inventory hierarchy
##----------------------------------------------------------------------
## Copyright (C) 2007-2013 The NOC Project
## See LICENSE for details
##----------------------------------------------------------------------
# ---------------------------------------------------------------------
# Initialize inventory hierarchy
# ---------------------------------------------------------------------
# Copyright (C) 2007-2013 The NOC Project
# See LICENSE for details
# ---------------------------------------------------------------------
## NOC modules
# NOC modules
from noc.lib.nosql import get_db
......
# -*- coding: utf-8 -*-
##----------------------------------------------------------------------
## Migrate segment settings
##----------------------------------------------------------------------
## Copyright (C) 2007-2015 The NOC Project
## See LICENSE for details
##----------------------------------------------------------------------
# ---------------------------------------------------------------------
# Migrate segment settings
# ---------------------------------------------------------------------
# Copyright (C) 2007-2015 The NOC Project
# See LICENSE for details
# ---------------------------------------------------------------------
## Python modules
# Python modules
import datetime
import logging
## Third-party applications
# Third-party applications
from south.db import db
from bson import ObjectId
## NOC modules
# NOC modules
from noc.lib.nosql import get_db
logger = logging.getLogger(__name__)
......
# -*- coding: utf-8 -*-
##----------------------------------------------------------------------
## Drop scheduler indexes
##----------------------------------------------------------------------
## Copyright (C) 2007-2016 The NOC Project
## See LICENSE for details
##----------------------------------------------------------------------
# ---------------------------------------------------------------------
# Drop scheduler indexes
# ---------------------------------------------------------------------
# Copyright (C) 2007-2016 The NOC Project
# See LICENSE for details
# ---------------------------------------------------------------------
## Python modules
# Python modules
import logging
## NOC modules
# NOC modules
from noc.lib.nosql import get_db
logger = logging.getLogger(__name__)
......
## -*- coding: utf-8 -*-
##----------------------------------------------------------------------
## models for *inventory* module
##----------------------------------------------------------------------
## Copyright (C) 2007-2015 The NOC Project
## See LICENSE for details
##----------------------------------------------------------------------
# -*- coding: utf-8 -*-
# ---------------------------------------------------------------------
# models for *inventory* module
# ---------------------------------------------------------------------
# Copyright (C) 2007-2015 The NOC Project
# See LICENSE for details
# ---------------------------------------------------------------------
## -*- coding: utf-8 -*-
##----------------------------------------------------------------------
## Capability model
##----------------------------------------------------------------------
## Copyright (C) 2007-2013 The NOC Project
## See LICENSE for details
##----------------------------------------------------------------------
# -*- coding: utf-8 -*-
# ---------------------------------------------------------------------
# Capability model
# ---------------------------------------------------------------------
# Copyright (C) 2007-2013 The NOC Project
# See LICENSE for details
# ---------------------------------------------------------------------
## Python modules
# Python modules
import os
import operator
from threading import RLock
## Third-party modules
# Third-party modules
from mongoengine.document import Document
from mongoengine.fields import (StringField, UUIDField, ObjectIdField)
import cachetools
## NOC modules
# NOC modules
from noc.main.models.doccategory import category
from noc.lib.prettyjson import to_json
from noc.lib.text import quote_safe_path
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment