From 5aa06cad704691872c61f0922e205ae1036268a6 Mon Sep 17 00:00:00 2001 From: yuyang Date: Tue, 11 Apr 2017 14:47:07 +0800 Subject: Fix code style issues for specificed path JIRA: BOTTLENECK-100 Fix code syle issues for the path flake8 specified before flake8 check merged into CI pipeline. Change-Id: Iee59bada206fafd4740023e90d08a4b4a7a030db Signed-off-by: yuyang (cherry picked from commit fc30c5208a680d0059cfa48891a1d97747f7f778) --- docker/Dockerfile | 2 +- requirements.txt | 82 --------------------------------------- requirements/requirements.txt | 82 +++++++++++++++++++++++++++++++++++++++ requirements/verify.txt | 10 +++++ utils/infra_setup/runner/stack.py | 12 ++++-- 5 files changed, 102 insertions(+), 86 deletions(-) delete mode 100644 requirements.txt create mode 100644 requirements/requirements.txt create mode 100644 requirements/verify.txt diff --git a/docker/Dockerfile b/docker/Dockerfile index fc3451ba..69e1d65b 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -50,5 +50,5 @@ RUN git clone -b $BRANCH https://gerrit.opnfv.org/gerrit/bottlenecks ${BOTTLENEC RUN git clone https://gerrit.opnfv.org/gerrit/releng ${RELENG_REPO_DIR} RUN easy_install pytz -RUN pip install -r ${REPOS_DIR}/bottlenecks/requirements.txt +RUN pip install -r ${REPOS_DIR}/bottlenecks/requirements/requirements.txt RUN pip install -U /home/opnfv/bottlenecks diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 113be337..00000000 --- a/requirements.txt +++ /dev/null @@ -1,82 +0,0 @@ -############################################################################## -# Copyright (c) 2016 Huawei Tech. and others. -# -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## - -appdirs==1.4.0 -Babel==2.2.0 -backport-ipaddress==0.1 -cliff==2.0.0 -cmd2==0.6.8 -coverage==4.1b2 -debtcollector==1.3.0 -ecdsa==0.13 -extras==0.0.3 -fixtures==1.4.0 -flake8==2.5.4 -funcsigs==0.4 -functools32==3.2.3.post2 -futures==3.0.5 -iso8601==0.1.11 -Jinja2==2.8 -jsonpatch==1.13 -jsonpointer==1.10 -jsonschema==2.5.1 -keystoneauth1==2.3.0 -linecache2==1.0.0 -lxml==3.5.0 -MarkupSafe==0.23 -mccabe==0.4.0 -mock==1.3.0 -monotonic==1.0 -msgpack-python==0.4.7 -netaddr==0.7.18 -netifaces==0.10.4 -nose==1.3.7 -openstacksdk==0.8.1 -os-client-config==1.16.0 -oslo.config==3.9.0 -oslo.i18n==3.4.0 -oslo.serialization==2.4.0 -oslo.utils==3.7.0 -paramiko==1.16.0 -pbr==1.8.1 -pep8==1.7.0 -positional==1.0.1 -prettytable==0.7.2 -pycrypto==2.6.1 -pyflakes==1.0.0 -pyparsing==2.1.0 -pyrsistent==0.11.12 -python-cinderclient==1.6.0 -python-glanceclient==2.0.0 -python-heatclient==1.0.0 -python-keystoneclient==2.3.1 -python-mimeparse==1.5.1 -python-neutronclient==4.1.1 -python-novaclient==3.3.0 -python-openstackclient==2.2.0 -python-subunit==1.2.0 -python-swiftclient==3.0.0 -pytz==2015.7 -PyYAML==3.11 -requests==2.9.1 -requestsexceptions==1.1.3 -scp==0.10.2 -simplejson==3.8.2 -six==1.10.0 -stevedore==1.12.0 -testrepository==0.0.20 -testtools==2.0.0 -traceback2==1.4.0 -unicodecsv==0.14.1 -unittest2==1.1.0 -warlock==1.2.0 -wrapt==1.10.6 -pyroute2==0.4.10 -elasticsearch==5.0.1 -docker==2.0.2 diff --git a/requirements/requirements.txt b/requirements/requirements.txt new file mode 100644 index 00000000..113be337 --- /dev/null +++ b/requirements/requirements.txt @@ -0,0 +1,82 @@ +############################################################################## +# Copyright (c) 2016 Huawei Tech. and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +appdirs==1.4.0 +Babel==2.2.0 +backport-ipaddress==0.1 +cliff==2.0.0 +cmd2==0.6.8 +coverage==4.1b2 +debtcollector==1.3.0 +ecdsa==0.13 +extras==0.0.3 +fixtures==1.4.0 +flake8==2.5.4 +funcsigs==0.4 +functools32==3.2.3.post2 +futures==3.0.5 +iso8601==0.1.11 +Jinja2==2.8 +jsonpatch==1.13 +jsonpointer==1.10 +jsonschema==2.5.1 +keystoneauth1==2.3.0 +linecache2==1.0.0 +lxml==3.5.0 +MarkupSafe==0.23 +mccabe==0.4.0 +mock==1.3.0 +monotonic==1.0 +msgpack-python==0.4.7 +netaddr==0.7.18 +netifaces==0.10.4 +nose==1.3.7 +openstacksdk==0.8.1 +os-client-config==1.16.0 +oslo.config==3.9.0 +oslo.i18n==3.4.0 +oslo.serialization==2.4.0 +oslo.utils==3.7.0 +paramiko==1.16.0 +pbr==1.8.1 +pep8==1.7.0 +positional==1.0.1 +prettytable==0.7.2 +pycrypto==2.6.1 +pyflakes==1.0.0 +pyparsing==2.1.0 +pyrsistent==0.11.12 +python-cinderclient==1.6.0 +python-glanceclient==2.0.0 +python-heatclient==1.0.0 +python-keystoneclient==2.3.1 +python-mimeparse==1.5.1 +python-neutronclient==4.1.1 +python-novaclient==3.3.0 +python-openstackclient==2.2.0 +python-subunit==1.2.0 +python-swiftclient==3.0.0 +pytz==2015.7 +PyYAML==3.11 +requests==2.9.1 +requestsexceptions==1.1.3 +scp==0.10.2 +simplejson==3.8.2 +six==1.10.0 +stevedore==1.12.0 +testrepository==0.0.20 +testtools==2.0.0 +traceback2==1.4.0 +unicodecsv==0.14.1 +unittest2==1.1.0 +warlock==1.2.0 +wrapt==1.10.6 +pyroute2==0.4.10 +elasticsearch==5.0.1 +docker==2.0.2 diff --git a/requirements/verify.txt b/requirements/verify.txt new file mode 100644 index 00000000..e8d51f47 --- /dev/null +++ b/requirements/verify.txt @@ -0,0 +1,10 @@ +############################################################################## +# Copyright (c) 2016 Huawei Tech. and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +flake8==3.0.4 \ No newline at end of file diff --git a/utils/infra_setup/runner/stack.py b/utils/infra_setup/runner/stack.py index fb78c360..c3fa00a8 100644 --- a/utils/infra_setup/runner/stack.py +++ b/utils/infra_setup/runner/stack.py @@ -12,13 +12,20 @@ a template is use to create a stack in openstack. This file will be amended in the furture.''' import utils.infra_setup.heat.template as Heat +import os +import sys +import utils.parser as Parser + class stack_api(): - def from_config_template(stack_info): + def __init__(self): + pass + + def from_config_template(self, stack_info): stack_name = stack_info['name'] ext_gw_net = os.environ.get("EXTERNAL_NETWORK") - heat_parser = HeatTemplate_Parser() + heat_parser = Parser.HeatTemplate_Parser() heat_parser.add_security_group(stack_name) heat_parser.add_keypair(stack_name) for network in stack_info['networks']: @@ -58,4 +65,3 @@ class stack_api(): if server.floating_ip: server.public_ip = \ self.stack.outputs[server.floating_ip["stack_name"]] - -- cgit 1.2.3-korg