Merge "Fixed additional OpenStack pep8 issues"

This commit is contained in:
Jenkins 2015-07-10 21:01:22 +00:00 committed by Gerrit Code Review
commit 9b9923fa71
7 changed files with 50 additions and 11 deletions

View File

@ -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):

View File

@ -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

View File

@ -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)

View File

@ -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__)

View File

@ -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):

View File

@ -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():

View File

@ -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():