aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2015-07-10 21:01:22 +0000
committerGerrit Code Review <review@openstack.org>2015-07-10 21:01:22 +0000
commit9b9923fa716b8d263360e783d9d417f7e420b7d7 (patch)
tree081a77fd0646019fd8947dada1a99aefeef90cdc
parent61a5d91f5b9986cf73a8a403f4d29630e2ac47de (diff)
parent30a1988f0aba4749ce03107f14f34b1602c64a35 (diff)
downloadkolla-9b9923fa716b8d263360e783d9d417f7e420b7d7.tar.gz
kolla-9b9923fa716b8d263360e783d9d417f7e420b7d7.zip
Merge "Fixed additional OpenStack pep8 issues"
-rwxr-xr-xdocker/centos/binary/neutron/neutron-base/ip_wrapper.py4
-rwxr-xr-xdocker/common/hautoproxy/start.py15
-rw-r--r--tests/clients.py6
-rw-r--r--tests/test_images.py4
-rw-r--r--tests/test_keystone.py2
-rwxr-xr-xtools/validate-json.py14
-rwxr-xr-xtools/validate-yaml.py16
7 files changed, 50 insertions, 11 deletions
diff --git a/docker/centos/binary/neutron/neutron-base/ip_wrapper.py b/docker/centos/binary/neutron/neutron-base/ip_wrapper.py
index 94d54d4e0..591fca6f4 100755
--- a/docker/centos/binary/neutron/neutron-base/ip_wrapper.py
+++ b/docker/centos/binary/neutron/neutron-base/ip_wrapper.py
@@ -21,9 +21,9 @@
# This is required for "thin" neutron containers to function properly
-import sys
-import subprocess
import nsenter
+import subprocess
+import sys
def host_mnt_exec(cmd):
diff --git a/docker/common/hautoproxy/start.py b/docker/common/hautoproxy/start.py
index bbdd876b5..914a2ffac 100755
--- a/docker/common/hautoproxy/start.py
+++ b/docker/common/hautoproxy/start.py
@@ -1,12 +1,25 @@
#!/usr/bin/python
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
'''This script configures and starts a local haproxy instances, bound to
127.0.0.1, that forwards connections all of the discovered
docker/kubernetes environment variables.'''
import argparse
+from jinja2 import Environment
+from jinja2 import FileSystemLoader
import os
-from jinja2 import Environment, FileSystemLoader
import re
import urlparse
diff --git a/tests/clients.py b/tests/clients.py
index 9544e239b..6b2aef528 100644
--- a/tests/clients.py
+++ b/tests/clients.py
@@ -11,8 +11,8 @@
# under the License.
-import logging
from keystoneclient.v2_0 import client as ksclient
+import logging
logging.basicConfig(level=logging.WARNING)
LOG = logging.getLogger(__name__)
@@ -48,7 +48,7 @@ class KeystoneClient(OpenStackClients):
def __init__(self):
super(KeystoneClient, self).__init__()
- # TODO: this shouldn't be hard coded
+ # TODO(Jeff Peeler): this shouldn't be hard coded
self.creds = {'auth_url': 'http://10.0.0.4:5000/v2.0',
'username': 'admin',
'password': 'steakfordinner',
@@ -61,7 +61,7 @@ class KeystoneClient(OpenStackClients):
if __name__ == '__main__':
- # TODO: mox this
+ # TODO(Jeff Peeler): mox this
client_mgr = OpenStackClients()
ks = client_mgr.get_client('KeystoneClient')
LOG.info(ks)
diff --git a/tests/test_images.py b/tests/test_images.py
index e8ee41bc0..b336930e9 100644
--- a/tests/test_images.py
+++ b/tests/test_images.py
@@ -14,7 +14,9 @@ from oslo_log import fixture as log_fixture
from oslo_log import log as logging
from oslotest import base
-from subprocess import Popen, PIPE, STDOUT
+from subprocess import PIPE
+from subprocess import Popen
+from subprocess import STDOUT
LOG = logging.getLogger(__name__)
diff --git a/tests/test_keystone.py b/tests/test_keystone.py
index 6c23a203c..a3a850314 100644
--- a/tests/test_keystone.py
+++ b/tests/test_keystone.py
@@ -10,8 +10,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-import testtools
from clients import OpenStackClients
+import testtools
class KeystoneTest(testtools.TestCase):
diff --git a/tools/validate-json.py b/tools/validate-json.py
index 1b0506ba1..eee2276db 100755
--- a/tools/validate-json.py
+++ b/tools/validate-json.py
@@ -1,9 +1,21 @@
#!/usr/bin/python
-import sys
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
import argparse
import json
import logging
+import sys
def parse_args():
diff --git a/tools/validate-yaml.py b/tools/validate-yaml.py
index 66611b85c..c4e4326d9 100755
--- a/tools/validate-yaml.py
+++ b/tools/validate-yaml.py
@@ -1,9 +1,21 @@
#!/usr/bin/python
-import sys
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
import argparse
-import yaml
import logging
+import sys
+import yaml
def parse_args():