summaryrefslogtreecommitdiff
path: root/neutronclient/tests
Commit message (Collapse)AuthorAgeFilesLines
* Merge "OSC: Remove BGP calls to neutronclient"HEAD10.0.0masterZuul2023-05-025-56/+74
|\
| * OSC: Remove BGP calls to neutronclientelajkat2023-03-035-56/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | With [1] the python binding code in Neutronclient prints warning about future deprecation, change neutron-dynamic-routing osc client code to use totally OpenstackSDK. [1]: https://review.opendev.org/c/openstack/python-neutronclient/+/862371 Related-Bug: #1999774 Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/869485 Depends-On: https://review.opendev.org/c/openstack/requirements/+/873598 Change-Id: I5dd143e670b70cc42a2ae48fe4bac0cf09416cb5
* | Remove the CLI code from the Neutron client.Slawek Kaplonski2023-04-1177-13289/+0
|/ | | | | | | | | | | | | | | This project no longer provides CLI support. All code has been removed. Please use openstack CLI instead This patch removes entry point for neutron CLI too, bash completion script and CLI related functional and unit tests but it still keeps neutronclient/neutron/v2_0 module as this is used by e.g. Nova. Co-Authored-By: Slawek Kaplonski <skaplons@redhat.com> Closes-Bug: #2003861 Change-Id: I5b6c735d1ff931d7991a42b262e7faa47b75edeb
* Move network trunk commands from python-neutronclientelajkat2023-01-163-856/+0
| | | | | | | | | The depends-on patch adds trunk commands to OSC, as we can long consider trunk operations as core Networking operations. Change-Id: Ie557a5d541cf117d20f3f2b548620a74dbadb383 Depends-On: https://review.opendev.org/c/openstack/python-openstackclient/+/869447 Related-Bug: #1999774
* Add support for 'smart-nic' vnic-typeFrode Nordahl2021-09-141-0/+20
| | | | | | | | | | | | | | The 'smart-nic' vnic_type was added in the Train time frame in I91f63810626ce4e054e358f5de5e46434c4da131. This vnic_type will also be used to support off-path SmartNIC port binding with OVN, and it is expected that the user will create ports with this vnic_type as part of the workflow. As such the client must allow users to interact with this vnic_type and this patch addresses that. Partial-Bug: #1932154 Change-Id: I7f80bb47db7f8608db4d6a646b0f4b0ef6d6fb48
* Merge "Replace deprecated assertDictContainsSubset"Zuul2021-09-061-3/+3
|\
| * Replace deprecated assertDictContainsSubsetTakashi Kajinami2021-09-051-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The method is deprecated since Python 3.2[1] and shows the following DeprecationWarning. /usr/lib/python3.9/unittest/case.py:1134: DeprecationWarning: assertDictContainsSubset is deprecated warnings.warn('assertDictContainsSubset is deprecated', [1] https://docs.python.org/3/whatsnew/3.2.html#unittest Closes-Bug: #1938103 Change-Id: I1d0ee6c77476707a7e4fe4fbf2b979bf34550d05
* | Merge "Use yaml.safe_load instead of yaml.load"xena-em7.6.0Zuul2021-09-022-4/+4
|\ \
| * | Use yaml.safe_load instead of yaml.loadTakashi Kajinami2021-09-012-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since PyYAML 5.1, yaml.load without specifying the Loader option is deprecated and shows the following warning. YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details. This change replaces usage of yaml.load by yaml.safe_load, to get rid of that warning message. Change-Id: Ibe25c4aaf3aa7226f28ec60b8a929ecc143face1
* | | Merge "Ussuri+ is python3 only and update python to python3"Zuul2021-09-013-3/+0
|\ \ \ | |_|/ |/| |
| * | Ussuri+ is python3 only and update python to python3dengzhaosen2021-06-243-3/+0
| | | | | | | | | | | | | | | | | | To remove the useless shebang Change-Id: I611c5bc47562f8def9a8623117b7b0655474b555
* | | Set ML2/OVS backend explicitly for functional jobBernard Cafarelli2021-07-271-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After default backend change to OVN, some client tests related to DHCP or L3 agents are not working fine. Switch the job to ML2/OVS, as it was done in openstack-client in changeset Idf6466a59c6cf96be2f1d53e696f0564584fa233 test_neutron_dhcp_agent_list_hosting_net was skipped temporarily to pass the gate in the parent commit. It is re-enabled now. Change-Id: I91d03d13adcd38d46ba1b042239a290ae2c99ea4 Closes-Bug: #1936965
* | | tests: change safe_hasattr to hasattrelajkat2021-07-272-3/+4
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | testtools 2.5.0 removed the helper (see [0]) safe_hasattr, and assumes that the hasattr implementation in python reliable enough now. test_neutron_dhcp_agent_list_hosting_net is skipped temporarily as there is no DHCP agent with ML2/OVN. It will be re-enabled [1]. [0] https://github.com/testing-cabal/testtools/blob/2.5.0/NEWS#L31 [1] https://review.opendev.org/c/openstack/python-neutronclient/+/801997 Change-Id: I4fe6fabc4f745e2c9a366e30dbea7e7200151f12
* | Skip metering functional tests when metering extension is not enabledSlawek Kaplonski2021-05-271-0/+4
| | | | | | | | Change-Id: I9e3f41a2be56c1fd5fc3aff9af8e5ff5163087bd
* | Replace getargspec with getfullargspeclikui2021-05-101-1/+1
|/ | | | | | | | inspect.getargspec() is deprecated since py3 [1] https://docs.python.org/3/library/inspect.html#inspect.getargspec Change-Id: I2ae460a7a7f01d7346d5e51ec6ccb44c22d0c53e
* Merge "Allow 4byte ASNs in dynamic routing client"victoria-em7.2.1Zuul2020-09-082-4/+6
|\
| * Allow 4byte ASNs in dynamic routing clientJens Harbott2020-09-012-4/+6
| | | | | | | | | | | | | | | | | | | | Neutron-dynamic-routing has the bgp_4byte_asn extension which allows 4byte ASNs to be used, increasing the range of valid AS numbers. Since we cannot easily tell beforehand whether that extension is available, allow for the maximal interval to be used by clients and let the API validate the input. Change-Id: Ib4695272784b4a5ebbcb792cfec82dac3ef6f3cf
* | Merge "Add aggressive negotiation mode for ikepolicy"Zuul2020-09-081-0/+20
|\ \ | |/ |/|
| * Add aggressive negotiation mode for ikepolicyzhanghao2020-05-131-0/+20
| | | | | | | | | | | | | | | | The phase1 negotiation mode adds support for aggressive mode, which can be selected when creating an ikepolicy. Change-Id: I8148011558094db07b5f9eba70b16cfe6eeaf98f Partial-Bug: #1701413
* | Use unittest.mock instead of mock7.2.0Hervé Beraud2020-06-091-1/+1
| | | | | | | | | | | | | | | | The mock third party library was needed for mock support in py2 runtimes. Since we now only support py36 and later, we can use the standard lib unittest.mock module instead. Change-Id: Ia7226d968b8594677fc8dea664b58a80ba193ac5
* | Use unittest.mock instead of third party mockSean McGinnis2020-06-0149-51/+50
| | | | | | | | | | | | | | | | Now that we no longer support py27, we can use the standard library unittest.mock module instead of the third party mock lib. Change-Id: I12e1a2a4a22116cabd09a3b808f871d98e4bd1f2 Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
* | Remove usage of sixzhanghao2020-05-156-21/+17
|/ | | | | | | | | | | With python3.x, classes can use 'metaclass=' instead of 'six.add_metaclass', 'six.iteritems' and 'six.iterkeys' can be replaced by 'items' and 'keys', 'six.moves.urllib.parse' can be replaced by 'urllib.parse', 'six.StringIO' and 'six.moves.cStringIO' can be replaced by 'io.StringIO', 'six.text_type' and 'six.string_type' are just 'str'. Change-Id: I357968c6a1932856b1600f6c191966bc90cbc258
* Replace 'bgp speaker show dragents' with 'bgp dragent list'7.1.0zhanghao2020-02-172-2/+159
| | | | | | | | | | | In order to follow other agent related commands in OSC, it is more appropriate and friendly to replace 'bgp speaker show dragents' with 'bgp dragent list'. this patch uses 'openstack bgp dragent list' to show the list of dragents, and the optional parameter 'bgp-speaker' shows the list of dragents hosting a specific bgp speaker. Change-Id: I9e0703fccf535b1e1a2055ed917336055b7395f5 Closes-Bug: #1858377
* Avoid py36 error when printing unicode chars in a streamRodolfo Alonso Hernandez2020-01-101-6/+7
| | | | | | | | | The IOStream was not able to encode characters out of range 128: "UnicodeEncodeError: 'ascii' codec can't encode characters in position 19-21: ordinal not in range(128)" Change-Id: Ic95396a5cf73c49d332928857dc064819a6d7ea6 Closes-Bug: #1858421
* Fix pep8 errors with hacking 2.0.0Akihiro Motoki2019-12-172-5/+5
| | | | Change-Id: I4737d4bc4fa116f45e2361eba93f48feae0161a4
* Remove 'public' and 'private' parameters in fwaas_v2zhanghao22019-10-011-14/+0
| | | | | | | | The 'public' and 'private' parameters have been replaced with 'share' and 'no-share' parameters in the Pike version, they can be removed now. Change-Id: I57a2e228ec1cdb6ed259914abc38bdada036d369
* Run functional test correctlyAkihiro Motoki2019-07-181-4/+2
| | | | | | | | | | | | | | | legacy-neutronclient-test-dsvm-functional job actually runs neutronclient.tests.unit because .stestr.conf does not honor OS_TEST_PATH. This commit fixes .stestr.conf to honor OS_TEST_PATH specified in tox.ini. Also fixes the logic of is_extension_enabled() in ClientTestBase to check whether FWaaS v1 (fwaas) is enabled correctly. Previously the logic checks a substring of a specified extension, so 'fwaas' (FWaaS v1) matches 'fwaas_v2' (FWaaS v2), which leads to a failure of FWaaS v1 CLI tests. Change-Id: I958ad496b16cca8d03a7b84ebf5f8f031e4248ea
* Replace git.openstack.org URLs with opendev.org URLsjacky062019-04-282-2/+2
| | | | Change-Id: I3cc418bd8219a3d4f3ab5c018adf06b66ef36b46
* Replace openstack.org git:// URLs with https://Ian Wienand2019-03-242-2/+2
| | | | | | | | | | | | | | | | | This is a mechanically generated change to replace openstack.org git:// URLs with https:// equivalents. This is in aid of a planned future move of the git hosting infrastructure to a self-hosted instance of gitea (https://gitea.io), which does not support the git wire protocol at this stage. This update should result in no functional change. For more information see the thread at http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003825.html Change-Id: I15a69bcf6d51bfb1d5ade8f5119bb77bb2387f77
* Add subnet onboard CLI6.12.0Ryan Tidwell2019-02-272-0/+54
| | | | | | | | | | This is the implementation of the "onboard network subnets" CLI. This enables the subnet onboard feature of neutron to be driven via CLI. Depends-On: https://review.openstack.org/348080 Change-Id: Ic637ed689b0d3806d2c33faa419c3a98a310effa Implements: blueprint subnet-onboard
* Update json module to jsonutilscao.yuan2019-02-251-4/+4
| | | | | | | | | | oslo project provide jsonutils, and neutronclient use it in many place[1], this PS to update the remained json module to oslo jsonutils for consistency. [1]: https://github.com/openstack/python-neutronclient/search?utf8=%E2%9C%93&q=jsonutils&type= Change-Id: Ic4639628c8910b88a14b0fe8f37638bb4f9474be
* Update hacking version to 1.1Akihiro Motoki2019-01-311-1/+1
| | | | | | | | | | | | Older hacking depends on pep8, but pep8 module is replaced by pycodestyle. This can be resolved by updating hackinng version. This commit also fixes E117 (over-indented) and W605 (invalid escape sequence) warnings. pep8 is dropped from lower-constraints.txt as it is no longer used. Change-Id: I3a8e3b0dedf9422e4db02b525b333d12ce012a95
* Merge "Support of the boolean advertise_extra_routes"Zuul2018-11-202-1/+332
|\
| * Support of the boolean advertise_extra_routesSamuel Barré2018-11-202-1/+332
| | | | | | | | | | | | | | | | | | | | | | | | | | This Boolean attribute is added to the Router Association resource (Neutron API, 'bgpvpn' and 'bgpvpn-routes-control' API extensions) in order to support routes control. This allow to propagate routes of subnets not directly connected to the router The corresponding code in networking-bgpvpn has already merged See https://blueprints.launchpad.net/bgpvpn/+spec/routes-control Change-Id: Icdd7f6592a9d657b6414645406f06b74b6f3bb11 Implements: blueprint routes-control
* | Adds the destination and source fwg to fwrGerman Eichberger2018-09-102-1/+134
| | | | | | | | | | | | | | This will add the source and destination firewall group id to firewall rules. Change-Id: If69b87fc58d36aa7d879ace8e73bc0f7534a1ef4
* | Switch to stestrVu Cong Tuan2018-09-061-5/+5
| | | | | | | | | | | | | | | | | | | | According to Openstack summit session [1], stestr is maintained project to which all Openstack projects should migrate. Let's switch to stestr as other projects have already moved to it. [1] https://etherpad.openstack.org/p/YVR-python-pti Change-Id: Ib58745d5c0d98fb79eb3cf7278c2cbfb5160efcd
* | Ensure API calls for subnets are in URL length limitMykola Yakovliev2018-08-311-2/+6
| | | | | | | | | | | | | | | | Fix situation when with pagination enabled, neutronclient failed to read subnets information due to too long URI. Change-Id: I53240c536d77a95510b5c83b81e21782f29d886a Closes-Bug: 1775922
* | [log] Add 'firewall_group' as a loggable resource type for loggingKim Bao Long2018-08-231-1/+92
| | | | | | | | | | | | | | | | | | | | | | Currently, OSC plugin for logging only supports security group as a loggable resource. This patch aims to add 'firewall_group' as a supported resource type. Co-Authored-By: Van Hung Pham <HungPV@vn.fujitsu.com> Depends-On: Ie10063197f02679e987e87cb4852f5230a02f76d Change-Id: I2ac92004c2ad3769c9749e131718a8ef0003c4bd Partial-Bug: #1720727
* | Fix broken unittestsYushiro FURUKAWA2018-08-151-1/+1
| | | | | | | | | | | | | | | | | | | | _clean() method is renamed to clean() in osprofiler 2.3.0. It was suggested in a past neutronclient review. Closes-Bug: #1783789 Co-Authored-By: Akihiro Motoki <amotoki@gmail.com> Depends-On: https://review.openstack.org/#/c/592018/ Change-Id: Ic8e03db85dc08cfdcac5507e99ecdf7eac8eb972
* | Set or unset port pair group failedchenyaguang2018-04-181-2/+2
|/ | | | | | | | Set or unset port pair for port pair group failed because the type of 'existing' is wrong Change-Id: I198e745fccff76184d9813805d1c1915aff5a273 Closes-Bug: #1762884
* Replace insecure function evalGleb Zimin2018-04-121-3/+21
| | | | | | | | | | | In neutronclient we use a eval function for processing CLI neutron arguments. This function possible insecure because eval get argument from client side. Instead of it we can use a dict with allowed types which is more secure. Closes-Bug: #1762938 Change-Id: Idde55d1b9206e9ef8742464825709f098d488a8e Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
* Remove mox/mox3 usage from test_cli20.pyHongbin Lu2018-03-261-228/+233
| | | | | Change-Id: Ib4dc5f6c7ba57d94364f19a049c690d3817c723a Partial-Bug: #1753504
* Remove mox/mox3 usage from lb modulesHongbin Lu2018-03-243-68/+67
| | | | | Change-Id: I667dd870b615d4a9ccefd35fcb1ebf15760b1d6d Partial-Bug: #1753504
* Remove mox/mox3 usage from fw modulesHongbin Lu2018-03-241-25/+27
| | | | | Change-Id: I913993c0bff15df19bf3978ed36062f970eef538 Partial-Bug: #1753504
* Remove mox/mox3 usage from bgpHongbin Lu2018-03-231-8/+5
| | | | | Change-Id: Ie07cf987382281c00023b41ce74c314ec2457502 Partial-Bug: #1753504
* Remove mox/mox3 from test_cli20_address_scope.pyHongbin Lu2018-03-231-8/+5
| | | | | Change-Id: Ibba1061d447a73bb3e13e1b8869300d2c0de1b16 Partial-Bug: #1753504
* Merge "Remove mox/mox3 from test_cli20_agentschedulers.py"Zuul2018-03-231-28/+29
|\
| * Remove mox/mox3 from test_cli20_agentschedulers.pyHongbin Lu2018-03-231-28/+29
| | | | | | | | | | Change-Id: If1b9a9d1d16bed7c28b87bd47c30d5aaa05da546 Partial-Bug: #1753504
* | Merge "Remove mox/mox3 usage from test_cli20_securitygroup.py"Zuul2018-03-233-93/+116
|\ \ | |/ |/|
| * Remove mox/mox3 usage from test_cli20_securitygroup.pyHongbin Lu2018-03-213-93/+116
| | | | | | | | | | Change-Id: I7d15d42ffd0cd94972809569633d6f4a38c60d4b Partial-Bug: #1753504