diff options
27 files changed, 232 insertions, 262 deletions
@@ -45,6 +45,8 @@ nosetests.xml coverage.xml *,cover .hypothesis/ +data/hosts +data/my_key.pem # Translations *.mo @@ -58,3 +60,8 @@ docs/_build/ # PyBuilder target/ + +*~ +.*.sw? +/docs_build/ +/docs_output/ diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..980a15ac --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + 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. diff --git a/data/hosts b/data/hosts deleted file mode 100644 index 1d3f32d8..00000000 --- a/data/hosts +++ /dev/null @@ -1,4 +0,0 @@ -[2-host] -172.18.1.65 -[1-server] -172.18.1.66 diff --git a/data/my_key.pem b/data/my_key.pem deleted file mode 100644 index b47325a5..00000000 --- a/data/my_key.pem +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEpQIBAAKCAQEArKdjCi8b5pez+UO/hdpdaTKJA4AYDXB5kK51QKgxKRiVzlbX -72Cyg0U9HaVF1LM/lkqT6KNY+GT2HtchO40pR2AVsedkAQgShm+rx0wj7bEO8qAE -nm/IIowYO5m01mt6VKUCDiY/KNzDus1+24sSj/FnynMMhI/x9A8LG4/9P+dRNRUh -qtqcYeKWaWDhOgpOmOmlflLocMPby0jmvMOz0/4M/ULk2qn2j2geI0NpG4DiUTrG -lj2BSmBe7X+O7ppXCS6Q2+mLp0yncOU+LFcFrvS2hiIVWuy2Hl4/9qBtp/BtcPLm -88b9/XCVzQ9cYQMqCLGmzzsZjsnr4fuMlWyu4wIDAQABAoIBAQCXkVarsRGATHst -fyEaY8mPOVL45LG40p2VuuGqQjzuA+w3ORvVxIDSJq1xYg68nCNdT9kq6IOJhDBg -gKFnAxRS2XISPL0Y/roslMorapc76iziKEIFyMHcOjpn0BbmCXJZ7oWwYDkgKTYW -vqH4H83K2bUxD/DUSv2wMKiiqLQ9LOYSwAUS0A/bQ8jVcmxXvtkqMofNesv3OEVJ -5yrnbhNfXJCIfVsn2NtM/q3boY3j7SNUellyL/XXy6BVXYU/aCN28uosjkXlADW7 -Dwphdu5iEY0eA94YQaRIFVwFerrPXIEmBMAoZd0/57Ai2tYa2B1MQgHNelkAOHb/ -9mzqR/mpAoGBANz6tsmGIbX/WiNUcixHt7T8f4+2Rb+cDI7yI+VM4/E9ba8J/Fi9 -3JjVZUfaUN2NxOf1f1oVBw/UNlCpGQ9Tiuaq6EvOHP26dqdr5EDDjbW0m6/q6Sd1 -gK6sTX2l3aEcQrUPpuuMLgo4jkiEuI7mQSqNt51Z5qHSJRLRp6ri+GedAoGBAMgE -Euf+93VoV2M46A9d1oXVDO6qL/U/FCTJmr0tW1X5tMmgXKHiM15Zp5bfPYzQsSoL -7x6v+M+26uJHPWmSTmJDOBe7gFbcIIzacJficSqGhR3Dm3GBqaUgw3tl7KfBeR1T -hpLovRthcJChLij174fB2nUtUQ6jhziqml5dB+h/AoGAWv35yl2q//AXw7iAEu+t -G59lP14EtnOhUDMwyLiym6F5yrvH5xq2/U/Rlpa0+aXo0MLsH8HM2J2/h9M5eHAk -H/t8D8rdcTUYqrPolypu7cVi3jtSqmbeCA73Eaf87NxgM4Iwb4mXY6oKHJ5aCK2T -Y9xbITXlm/iWP3uJGPrA4pkCgYEAimynWP/P6uVndTfxApGC4eRsqtAFmMkq+7q6 -6Kn3SC0kvVXKRg7yVh3eKkAdrNLRibPwrWBD5h1FuYxsKCAlN0QmEeamD3cQ3+pd -egAxKaknf03cylVePvXJ1CDaA8+WLoGb5RhFqClraezisV5jg6TZt7bBHkx2TPVl -GGFyE6kCgYEAnYNXrBfmyJDb737e8Aca3fEGXhJHNUKbTMp62CGj2oe1AzDly4ab -k2c4ID9IukmjljZ2G911BdSa2D9V7Aj5D02g5bmvi5e4zjZYiwxK4j5Gd4zEje4w -G4l3ndezp6O6KfMvEqGdC7njK31yUy7991lqqpg4skYfhryPyUAH/TY= ------END RSA PRIVATE KEY----- diff --git a/docs/etc/conf.py b/docs/etc/conf.py deleted file mode 100644 index 65e85db9..00000000 --- a/docs/etc/conf.py +++ /dev/null @@ -1,31 +0,0 @@ -import datetime - - -try: - __import__('imp').find_module('sphinx.ext.numfig') - extensions = ['sphinx.ext.numfig'] -except ImportError: - # 'pip install sphinx_numfig' - extensions = ['sphinx_numfig'] - -# numfig: -number_figures = True -figure_caption_prefix = "Fig." - -source_suffix = '.rst' -master_doc = 'index' -pygments_style = 'sphinx' -html_use_index = False - -pdf_documents = [('index', u'OPNFV', u'OPNFV Project', u'OPNFV')] -pdf_fit_mode = "shrink" -pdf_stylesheets = ['sphinx', 'kerning', 'a4'] - -latex_elements = { - 'printindex': '', -} - -project = u'OPNFV: Template documentation config' -copyright = u'%s, OPNFV' % datetime.date.today().year -version = u'1.0.0' -release = u'1.0.0' diff --git a/docs/etc/opnfv-logo.png b/docs/etc/opnfv-logo.png Binary files differdeleted file mode 100644 index 1519503e..00000000 --- a/docs/etc/opnfv-logo.png +++ /dev/null diff --git a/docs/how-to-use-docs/documentation-example.rst b/docs/how-to-use-docs/documentation-example.rst deleted file mode 100644 index 89b95075..00000000 --- a/docs/how-to-use-docs/documentation-example.rst +++ /dev/null @@ -1,87 +0,0 @@ -.. two dots create a comment. please leave this logo at the top of each of your rst files. -.. image:: ../etc/opnfv-logo.png - :height: 40 - :width: 200 - :alt: OPNFV - :align: left -.. these two pipes are to seperate the logo from the first title -| -| -How to create documentation for your OPNFV project -================================================== - -this is the directory structure of the docs/ directory that can be found in the root of your project directory - -.. code-block:: bash - - ./etc - ./etc/opnfv-logo.png - ./etc/conf.py - ./how-to-use-docs - ./how-to-use-docs/documentation-example.rst - ./how-to-use-docs/index.rst - -To create your own documentation, Create any number of directories (depending on your need) -and place in each of them an index.rst. -This index file must refence your other rst files. - -* Here is an example index.rst - -.. code-block:: bash - - Example Documentation table of contents - ======================================= - - Contents: - - .. toctree:: - :numbered: - :maxdepth: 4 - - documentation-example.rst - - Indices and tables - ================== - - * :ref:`search` - - Revision: _sha1_ - - Build date: |today| - - -The Sphinx Build -================ - -When you push documentation changes to gerrit a jenkins job will create html documentation. - -* Verify Jobs -For verify jobs a link to the documentation will show up as a comment in gerrit for you to see the result. - -* Merge jobs - -Once you are happy with the look of your documentation you can submit the patchset the merge job will -copy the output of each documentation directory to http://artifacts.opnfv.org/$project/docs/$name_of_your_folder/index.html - -Here are some quick examples of how to use rst markup - -This is a headline:: - - here is some code, note that it is indented - -links are easy to add: Here is a link to sphinx, the tool that we are using to generate documetation http://sphinx-doc.org/ - -* Bulleted Items - - **this will be bold** - -.. code-block:: bash - - echo "Heres is a code block with bash syntax highlighting" - - -Leave these at the bottom of each of your documents they are used internally - -Revision: _sha1_ - -Build date: |today| diff --git a/docs/how-to-use-docs/index.rst b/docs/how-to-use-docs/index.rst deleted file mode 100644 index 713599c0..00000000 --- a/docs/how-to-use-docs/index.rst +++ /dev/null @@ -1,34 +0,0 @@ -.. OPNFV Release Engineering documentation, created by - sphinx-quickstart on Tue Jun 9 19:12:31 2015. - You can adapt this file completely to your liking, but it should at least - contain the root `toctree` directive. - -.. image:: ../etc/opnfv-logo.png - :height: 40 - :width: 200 - :alt: OPNFV - :align: left - -Example Documentation table of contents -======================================= - -Contents: - -.. toctree:: - :numbered: - :maxdepth: 4 - - documentation-example.rst - 01-introduction.rst - 02-methodology.rst - 03-usage-guide.rst - - -Indices and tables -================== - -* :ref:`search` - -Revision: _sha1_ - -Build date: |today| diff --git a/func/cli.py b/func/cli.py index 5e8f02cf..4613b507 100644 --- a/func/cli.py +++ b/func/cli.py @@ -54,13 +54,15 @@ class cli: @staticmethod def _parse_args(args): parser = argparse.ArgumentParser() - parser.add_argument('-l ', '--lab', help='Name of Lab on which being tested, These can' + parser.add_argument('-l ', '--lab', required=True, help='Name of Lab ' + 'on which being tested, These can' 'be found in the test_cases/ directory. Please ' 'ensure that you have edited the respective files ' 'before using them. For testing other than through Jenkins' ' The user should list default after -l . all the fields in' ' the files are necessary and should be filled') - parser.add_argument('-f', '--file', help='File in test_list with the list of tests. there are three files' + parser.add_argument('-f', '--file', required=True, help='File in ' + 'test_list with the list of tests. there are three files' '\n compute ' '\n storage ' '\n network ' diff --git a/func/env_setup.py b/func/env_setup.py index 9c0dadb3..f59883a0 100644 --- a/func/env_setup.py +++ b/func/env_setup.py @@ -98,16 +98,18 @@ class Env_setup: print 'Retrying SSH %s' % infinity @staticmethod - def ping_test(lister): - + def ping_test(lister, attempts=30): for k, v in lister.iteritems(): time.sleep(10) for val in v: ipvar = val ping_cmd = 'ping -D -c1 {0}'.format(ipvar) - while os.system(ping_cmd) != 0: - print '\nWaiting for machine\n' - time.sleep(10) + for i in range(attempts): + if os.system(ping_cmd) != 0: + print '\nWaiting for machine\n' + time.sleep(10) + else: + break print ('\n\n %s is UP \n\n ' % ipvar) def get_host_machine_info(self, host_tag): diff --git a/func/spawn_vm.py b/func/spawn_vm.py index ec63230c..15c26861 100644 --- a/func/spawn_vm.py +++ b/func/spawn_vm.py @@ -26,7 +26,6 @@ class SpawnVM(Env_setup): installer = ''
def __init__(self, vm_info):
- Env_setup.__init__(self)
print 'SpawnVM Class initiated'
vm_role_ip_dict = vm_info.copy()
print 'Generating Heat Template\n'
diff --git a/test_cases/zte-pod1/compute/dhrystone_bm.yaml b/test_cases/zte-pod1/compute/dhrystone_bm.yaml index 437dafd8..15a40d42 100644 --- a/test_cases/zte-pod1/compute/dhrystone_bm.yaml +++ b/test_cases/zte-pod1/compute/dhrystone_bm.yaml @@ -17,12 +17,6 @@ Context: Virtual_Machines: - Proxy_Environment: - http_proxy: http://10.20.0.1:8118 - https_proxy: http://10.20.0.1:8118 - no_proxy: localhost,127.0.0.1,10.20.*,192.168.* - - Test_Description: Test_category: "Compute" diff --git a/test_cases/zte-pod1/compute/dhrystone_vm.yaml b/test_cases/zte-pod1/compute/dhrystone_vm.yaml index 6f213426..9e3f2113 100644 --- a/test_cases/zte-pod1/compute/dhrystone_vm.yaml +++ b/test_cases/zte-pod1/compute/dhrystone_vm.yaml @@ -20,11 +20,6 @@ Context: flavor: m1.large role: host - Proxy_Environment: - http_proxy: http://10.20.0.1:8118 - https_proxy: http://10.20.0.1:8118 - no_proxy: localhost,127.0.0.1,10.20.*,192.168.* - Test_Description: Test_category: "Compute" Benchmark: "dhrystone" diff --git a/test_cases/zte-pod1/compute/dpi_bm.yaml b/test_cases/zte-pod1/compute/dpi_bm.yaml index d1c5963e..940307c3 100644 --- a/test_cases/zte-pod1/compute/dpi_bm.yaml +++ b/test_cases/zte-pod1/compute/dpi_bm.yaml @@ -14,10 +14,6 @@ Context: role: host Virtual_Machines: - Proxy_Environment: - http_proxy: http://10.20.0.1:8118 - https_proxy: http://10.20.0.1:8118 - no_proxy: localhost,127.0.0.1,10.20.*,192.168.* Test_Description: Test_category: "Compute" diff --git a/test_cases/zte-pod1/compute/dpi_vm.yaml b/test_cases/zte-pod1/compute/dpi_vm.yaml index d47b7f31..e61bf79f 100644 --- a/test_cases/zte-pod1/compute/dpi_vm.yaml +++ b/test_cases/zte-pod1/compute/dpi_vm.yaml @@ -20,11 +20,6 @@ Context: role: 1Run flavor: m1.large - Proxy_Environment: - http_proxy: http://10.20.0.1:8118 - https_proxy: http://10.20.0.1:8118 - no_proxy: localhost,127.0.0.1,10.20.*,192.168.* - Test_Description: Test_category: "Compute" Benchmark: "dpi" diff --git a/test_cases/zte-pod1/compute/ramspeed_bm.yaml b/test_cases/zte-pod1/compute/ramspeed_bm.yaml index d9e1f170..f126a19d 100644 --- a/test_cases/zte-pod1/compute/ramspeed_bm.yaml +++ b/test_cases/zte-pod1/compute/ramspeed_bm.yaml @@ -17,10 +17,6 @@ Context: Virtual_Machines: - Proxy_Environment: - http_proxy: http://10.20.0.1:8118 - https_proxy: http://10.20.0.1:8118 - no_proxy: localhost,127.0.0.1,10.20.*,192.168.* Test_Description: diff --git a/test_cases/zte-pod1/compute/ramspeed_vm.yaml b/test_cases/zte-pod1/compute/ramspeed_vm.yaml index 942aa3fe..7a2ef849 100644 --- a/test_cases/zte-pod1/compute/ramspeed_vm.yaml +++ b/test_cases/zte-pod1/compute/ramspeed_vm.yaml @@ -20,10 +20,6 @@ Context: flavor: m1.large role: host - Proxy_Environment: - http_proxy: http://10.20.0.1:8118 - https_proxy: http://10.20.0.1:8118 - no_proxy: localhost,127.0.0.1,10.20.*,192.168.* Test_Description: Test_category: "Compute" diff --git a/test_cases/zte-pod1/compute/ssl_bm.yaml b/test_cases/zte-pod1/compute/ssl_bm.yaml index e4f608e6..95d53840 100644 --- a/test_cases/zte-pod1/compute/ssl_bm.yaml +++ b/test_cases/zte-pod1/compute/ssl_bm.yaml @@ -14,12 +14,6 @@ Context: role: host Virtual_Machines: - Proxy_Environment: - http_proxy: http://10.20.0.1:8118 - https_proxy: http://10.20.0.1:8118 - no_proxy: localhost,127.0.0.1,10.20.*,192.168.* - - Test_Description: Test_category: "Compute" Benchmark: "ssl" diff --git a/test_cases/zte-pod1/compute/ssl_vm.yaml b/test_cases/zte-pod1/compute/ssl_vm.yaml index cc97ecfd..60045903 100644 --- a/test_cases/zte-pod1/compute/ssl_vm.yaml +++ b/test_cases/zte-pod1/compute/ssl_vm.yaml @@ -19,10 +19,6 @@ Context: flavor: 'm1.large' role: host - Proxy_Environment: - http_proxy: http://10.20.0.1:8118 - https_proxy: http://10.20.0.1:8118 - no_proxy: localhost,127.0.0.1,10.20.*,192.168.* Test_Description: Test_category: "Compute" diff --git a/test_cases/zte-pod1/compute/whetstone_bm.yaml b/test_cases/zte-pod1/compute/whetstone_bm.yaml index 6c703de1..bf14ea3a 100644 --- a/test_cases/zte-pod1/compute/whetstone_bm.yaml +++ b/test_cases/zte-pod1/compute/whetstone_bm.yaml @@ -16,12 +16,6 @@ Context: role: host Virtual_Machines: - Proxy_Environment: - http_proxy: http://10.20.0.1:8118 - https_proxy: http://10.20.0.1:8118 - no_proxy: localhost,127.0.0.1,10.20.*,192.168.* - - Test_Description: Test_category: "Compute" Benchmark: "whetstone" diff --git a/test_cases/zte-pod1/compute/whetstone_vm.yaml b/test_cases/zte-pod1/compute/whetstone_vm.yaml index bcde58c1..9f12597f 100644 --- a/test_cases/zte-pod1/compute/whetstone_vm.yaml +++ b/test_cases/zte-pod1/compute/whetstone_vm.yaml @@ -20,10 +20,6 @@ Context: flavor: m1.large role: host - Proxy_Environment: - http_proxy: http://10.20.0.1:8118 - https_proxy: http://10.20.0.1:8118 - no_proxy: localhost,127.0.0.1,10.20.*,192.168.* Test_Description: Test_category: "Compute" diff --git a/test_cases/zte-pod1/network/iperf_bm.yaml b/test_cases/zte-pod1/network/iperf_bm.yaml index 5b2126fd..e022d4a4 100644 --- a/test_cases/zte-pod1/network/iperf_bm.yaml +++ b/test_cases/zte-pod1/network/iperf_bm.yaml @@ -21,11 +21,6 @@ Context: Virtual_Machines: - Proxy_Environment: - http_proxy: http://10.20.0.1:8118 - https_proxy: http://10.20.0.1:8118 - no_proxy: localhost,127.0.0.1,10.20.*,192.168.* - Test_Description: Test_category: "network" Benchmark: "iperf" diff --git a/test_cases/zte-pod1/network/iperf_vm.yaml b/test_cases/zte-pod1/network/iperf_vm.yaml index f03b5b6f..57e09e02 100644 --- a/test_cases/zte-pod1/network/iperf_vm.yaml +++ b/test_cases/zte-pod1/network/iperf_vm.yaml @@ -27,11 +27,6 @@ Context: role: 2-host flavor: m1.large - Proxy_Environment: - http_proxy: http://10.20.0.1:8118 - https_proxy: http://10.20.0.1:8118 - no_proxy: localhost,127.0.0.1,10.20.*,192.168.* - Test_Description: Test_category: "network" Benchmark: "iperf" diff --git a/test_cases/zte-pod1/network/iperf_vm_2.yaml b/test_cases/zte-pod1/network/iperf_vm_2.yaml index 649adf8c..c3cd6b35 100644 --- a/test_cases/zte-pod1/network/iperf_vm_2.yaml +++ b/test_cases/zte-pod1/network/iperf_vm_2.yaml @@ -28,10 +28,6 @@ Context: role: 2-host flavor: m1.large - Proxy_Environment: - http_proxy: http://10.20.0.1:8118 - https_proxy: http://10.20.0.1:8118 - no_proxy: localhost,127.0.0.1,10.20.*,192.168.* Test_Description: Test_category: "network" diff --git a/test_cases/zte-pod1/storage/fio_bm.yaml b/test_cases/zte-pod1/storage/fio_bm.yaml index d07623c5..e940e9ba 100644 --- a/test_cases/zte-pod1/storage/fio_bm.yaml +++ b/test_cases/zte-pod1/storage/fio_bm.yaml @@ -17,10 +17,6 @@ Context: Virtual_Machines: - Proxy_Environment: - http_proxy: http://10.20.0.1:8118 - https_proxy: http://10.20.0.1:8118 - no_proxy: localhost,127.0.0.1,10.20.*,192.168.* Test_Description: diff --git a/test_cases/zte-pod1/storage/fio_vm.yaml b/test_cases/zte-pod1/storage/fio_vm.yaml index 3e2f9174..65a1e67b 100644 --- a/test_cases/zte-pod1/storage/fio_vm.yaml +++ b/test_cases/zte-pod1/storage/fio_vm.yaml @@ -20,10 +20,6 @@ Context: flavor: m1.large role: host - Proxy_Environment: - http_proxy: http://10.20.0.1:8118 - https_proxy: http://10.20.0.1:8118 - no_proxy: localhost,127.0.0.1,10.20.*,192.168.* Test_Description: Test_category: "Storage" diff --git a/tests/fetchimg_test.py b/tests/fetchimg_test.py index 683c9701..5d482567 100644 --- a/tests/fetchimg_test.py +++ b/tests/fetchimg_test.py @@ -17,6 +17,18 @@ class TestClass: def test_fetch_img_fail(self, mock_path, mock_system, mock_time): img = FetchImg() mock_system.return_value = True - mock_path.isfile.side_effect = [False, True] + mock_path.isfile.side_effect = [False, False, True] img.download() assert mock_time.sleep.call_count == 2 + + @mock.patch('func.fetchimg.time') + @mock.patch('func.fetchimg.os.system') + @mock.patch('func.fetchimg.os.path') + def test_fetch_temp_success(self, mock_path, mock_system, mock_time): + img = FetchImg() + mock_system.return_value = True + mock_path.isfile.side_effect = [True] + img.download() + filepath = './Temp_Img/QTIP_CentOS.qcow2' + imgstorepath = "/home/opnfv/imgstore/QTIP_CentOS.qcow2" + mock_system.assert_called_with("ln -s %s %s" % (imgstorepath, filepath)) |