[pep8] Joker pep8 fixes
Import alphabet sort fixes Add some specifics in .gitignore
This commit is contained in:
parent
a742ede88d
commit
601b7170e1
4
.gitignore
vendored
4
.gitignore
vendored
@ -2,8 +2,10 @@
|
||||
*.pyc
|
||||
.idea
|
||||
ProcfileHonchoLocal
|
||||
venv
|
||||
.venv
|
||||
.tox
|
||||
tags
|
||||
.testrepository
|
||||
|
||||
# Vim stuff
|
||||
.swp
|
||||
|
@ -1,3 +1,4 @@
|
||||
from flask import json
|
||||
from itertools import groupby
|
||||
import logging
|
||||
|
||||
@ -7,7 +8,6 @@ import rubick.inspections
|
||||
# Silence PEP8 "unused import"
|
||||
assert rubick.inspections
|
||||
from rubick.json import openstack_for_json
|
||||
from flask import json
|
||||
|
||||
|
||||
def indent_prefix(indent=0):
|
||||
|
@ -1,9 +1,8 @@
|
||||
import collections
|
||||
import paramiko
|
||||
|
||||
from StringIO import StringIO
|
||||
from paramiko.rsakey import RSAKey
|
||||
from paramiko.dsskey import DSSKey
|
||||
from StringIO import StringIO
|
||||
|
||||
|
||||
class TransformedDict(collections.MutableMapping):
|
||||
@ -64,7 +63,10 @@ class Node():
|
||||
|
||||
def discoveryHwAddr(self):
|
||||
try:
|
||||
(stdout, stderr) = self.runCommand("ip link | grep -m1 -A1 BROADCAST,MULTICAST,UP,LOWER_UP | awk -F\" \" '/link/ {print $2}'");
|
||||
(stdout, stderr) = self.runCommand("ip link | grep -m1 -A1 "
|
||||
"BROADCAST,MULTICAST,UP,"
|
||||
"LOWER_UP | awk -F\" \" "
|
||||
"'/link/ {print $2}'");
|
||||
except:
|
||||
raise()
|
||||
return stdout[0].strip()
|
||||
@ -156,7 +158,8 @@ class Node():
|
||||
# tuesday discovery
|
||||
(self.discovery_data, _) = self.runCommand(
|
||||
"ip link | awk -F: '/^[0-9]+?: eth/ {print $2}' |\
|
||||
sudo xargs -I% arp-scan -l -I % 2>&1 | grep -E '^[0-9]+?\.' | grep -E '192.168.(28|30)'.101")
|
||||
sudo xargs -I% arp-scan -l -I % 2>&1 | grep -E '^[0-9]+?\.' | grep"
|
||||
" -E '192.168.(28|30)'.101")
|
||||
|
||||
def discovery(self):
|
||||
self.prepare()
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env python
|
||||
import paramiko
|
||||
import json
|
||||
import paramiko
|
||||
import sys
|
||||
|
||||
|
||||
@ -11,10 +11,14 @@ ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||
|
||||
|
||||
while node = pop(nodes):
|
||||
ssh.connect(node['host']['dst'], port=node['host']['port'], username=node['user']['name'], key_filename=node['user']['private_key_path']);
|
||||
ssh.connect(node['host']['dst'], port=node['host']['port'],
|
||||
username=node['user']['name'],
|
||||
key_filename=node['user']['private_key_path']);
|
||||
|
||||
for node in nodes:
|
||||
ssh.connect(node['host']['dst'], port=node['host']['port'], username=node['user']['name'], key_filename=node['user']['private_key_path']);
|
||||
ssh.connect(node['host']['dst'], port=node['host']['port'],
|
||||
username=node['user']['name'],
|
||||
key_filename=node['user']['private_key_path']);
|
||||
#stdin, stdout, stderr = ssh.exec_command('arp -ad')
|
||||
#print stdout.readlines()
|
||||
ssh.close()
|
||||
|
@ -1,7 +1,5 @@
|
||||
import string
|
||||
|
||||
from rubick.common import Mark
|
||||
|
||||
|
||||
class ConfigurationSection(object):
|
||||
|
||||
|
@ -1,20 +1,19 @@
|
||||
import os.path
|
||||
import re
|
||||
import traceback
|
||||
import tempfile
|
||||
from StringIO import StringIO
|
||||
import logging
|
||||
from StringIO import StringIO
|
||||
import tempfile
|
||||
import traceback
|
||||
|
||||
import spur
|
||||
import paramiko
|
||||
from paramiko.rsakey import RSAKey
|
||||
from paramiko.dsskey import DSSKey
|
||||
from paramiko.ssh_exception import SSHException
|
||||
import joker
|
||||
|
||||
import os.path
|
||||
import paramiko
|
||||
from paramiko.dsskey import DSSKey
|
||||
from paramiko.rsakey import RSAKey
|
||||
from paramiko.ssh_exception import SSHException
|
||||
import re
|
||||
from rubick.common import Issue, index, path_relative_to
|
||||
from rubick.model import *
|
||||
from rubick.exceptions import ValidatorException
|
||||
from rubick.model import *
|
||||
import spur
|
||||
|
||||
|
||||
class SshShell(spur.SshShell):
|
||||
|
@ -2,10 +2,9 @@ from itertools import groupby
|
||||
import logging
|
||||
|
||||
from rubick.common import Mark, Issue, MarkedIssue
|
||||
from rubick.schema import ConfigSchemaRegistry, TypeValidatorRegistry
|
||||
from rubick.config_model import Configuration
|
||||
import rubick.schemas
|
||||
from rubick.config_formats import IniConfigParser
|
||||
from rubick.config_model import Configuration
|
||||
from rubick.schema import ConfigSchemaRegistry, TypeValidatorRegistry
|
||||
from rubick.utils import memoized
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import glob
|
||||
import os.path
|
||||
import json
|
||||
import os.path
|
||||
|
||||
from rubick.common import Error, Version
|
||||
|
||||
|
19
webui.py
19
webui.py
@ -1,24 +1,23 @@
|
||||
import os.path
|
||||
from StringIO import StringIO
|
||||
|
||||
from bson.objectid import ObjectId
|
||||
import os.path
|
||||
from flask import Flask, request, json, send_file
|
||||
from flask_wtf import Form
|
||||
from wtforms import StringField, SelectMultipleField
|
||||
from wtforms.validators import DataRequired
|
||||
import wtforms_json
|
||||
from pymongo import MongoClient
|
||||
from bson.objectid import ObjectId
|
||||
from recordtype import recordtype
|
||||
from paramiko.rsakey import RSAKey
|
||||
from paramiko.dsskey import DSSKey
|
||||
from paramiko.rsakey import RSAKey
|
||||
from paramiko.ssh_exception import SSHException
|
||||
|
||||
from pymongo import MongoClient
|
||||
from recordtype import recordtype
|
||||
from rubick.celery import app as celery, \
|
||||
ostack_inspect_task, InspectionRequest
|
||||
from rubick.common import Inspection, Issue
|
||||
from rubick.model import Openstack
|
||||
from rubick.discovery import OpenstackDiscovery
|
||||
from rubick.json import openstack_for_json
|
||||
from rubick.model import Openstack
|
||||
from wtforms import StringField, SelectMultipleField
|
||||
from wtforms.validators import DataRequired
|
||||
import wtforms_json
|
||||
|
||||
app = Flask(__name__)
|
||||
app.secret_key = 'A0Zr98j/3fooN]LWX/,?RT'
|
||||
|
Loading…
x
Reference in New Issue
Block a user