Previously attach_interface tests in project/instances/tests.py
did not cover the case of attach_interface by port.
This commit adds UT for such cases.
Details:
- The second call of the mocked network_list_for_tenant retured
an empty list. It sounds tricky to change the return value for
network_list_for_tenant() in two calls, but this trick was used
to skip the processing of port_field_data.
This should return a same value for the two calls to test
port_field_data() function.
- To test the behavior of attach_interface by "port",
an unbound port (whose device_owner/device_id of the port is empty)
is required, so this commit adds it to neutron_data.py.
- test_interface_attach_get() covers a list of choices when "By Port"
is selected in the form.
- test_interface_attach_post_by_port() is added.
Related to the addition of an unbound port to neutron_data.py,
the following other tests are adjusted.
They assumed that all non-network ports are owned by servers,
but it is no longer true as an unbound port is added to the test data.
Note that associating an unbound port with a floating IP is a valid
operation in neutron, so there is no problem to adjust UTs.
- openstack_dashboard/dashboards/project/floating_ips/tests.py
- openstack_dashboard/test/unit/api/test_neutron.py
Related-Bug: #1943639
Change-Id: Ib0ee342463e5668858078db43c04fe0a1be6e995
Added pagination support to the networks page under
Project and Admin Dashboard.
To accomplish so, the method network_list_for_tenant
in api/neutron.py that is used for listing networks under
the Project Dashboard was refactored to merge the different
requests for shared, non-shared and external networks while
tracking the pagination for each of those requests, so for
instance when all the shared networks are listed and paginated
then the non-shared networks are queried and so on.
For the Admin dashboard all network types are retrieved under
a single request so it is a simpler pagination logic.
Partial-Bug: #1746184
Change-Id: I96a2d6cabed47c89bdc02ec922d7f9451e5ec025
Get the RBAC shared security groups in the dashboard by making
an additional Neutron API call to filter by the shared field. Currently,
the dashboard only shows SGs owned by the tenant.
Depends-On: https://review.opendev.org/c/openstack/neutron/+/811242
Closes-Bug: #1907843
Change-Id: Ifa1acb3f0f6a33d0b4dc3761674e561a8d24c5c2
All strings are considered as unicode strings in python 3,
so we no longer need "u" prefix (u'...').
Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
Change-Id: I796d2fcdca066475bbf29d25cbf2aa67b2b2178b
When listing security groups in the dashboard and
one or more security groups had no rules it failed
because python throws a KeyError.
This commit changes the neutron API wrapper in horizon
to ensure ensure rule information in SG always exists.
Closes-Bug: #1840465
Co-Authored-By: Tobias Urdin <tobias.urdin@binero.se>
Change-Id: I6e05a7dc6b6655514ee2bff6bd327da86f13900a
Add RBAC Policies panel to support Role-Based Access Control
functionality.
Implements: blueprint rbac-policies
Change-Id: I883ad629d735dadf49e8bf9c50475050fdfcf797
In python3 we cannot compare None with an integer,
while this works in python2.
Change-Id: I1321ea68f08241db377a58ed6a22306c63aba204
Closes-Bug: #1789402
Previously we have almost duplicated logic for the limit summary
and quota usages. This commit shares the logic.
blueprint make-quotas-great-again
Change-Id: Ie5d7e51c9424701fdbcbfbcb1032c0b833a69371
Recent pep8 upgrade and corresponding pycodestyle update break
horizon pep8 job due to the new rules.
This commit fixes the following new errors:
- E226 missing whitespace around arithmetic operator
- E241 multiple spaces after ','
- E731 do not assign a lambda expression, use a def
The following errors are added to the ignore list
as there are many errors:
- E402 module level import not at top of file
- W503 line break before binary operator
Change-Id: I3478b0684175d2604bbcc1d89cbfca298b97f1e1
This patch fixes Bug #1742332 (Security Rule Description neither
editable nor shown). I have added the option for a description
to be added to a security rule which will show the description
on the related table.
Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
Change-Id: Ie723deb412977ae460c1e897f5d71fc8dbb7a853
Closes-Bug: #1742332
Previously neutron quota names and nova-network quota names are
mixly used and this makes the readability terrible.
We no longer supports nova-network, so it looks simple to use
neutron quota names consistently.
Neutron quota names use singular form and it is different
from nova and cinder (which adopt plural form as quota names).
Although it might be confusing, the mixed usage is much worse.
Some wrapper layer may address singular vs plural form issue,
but it can be solved later. Let's use neutron quota names
directly now to simplify the code.
blueprint make-quotas-great-again
Change-Id: Ie31414ada34cbdbd046063b512d3cef0a6e68acf
Trunk edit is a 2-step workflow:
* Basic trunk attributes
* Subports selector transfertable:
Selects many ports with segmentation details (optional)
In the port selector step reused and built on port allocator
transfertable from launch instance.
The easiest way to test is to take the whole change series by taking the
last change in it, then build devstack with neutron trunk support. Eg:
local.conf:
enable_plugin neutron https://git.openstack.org/openstack/neutron
enable_service q-trunk
If you want to test this change in isolation you also need the following
Horizon config:
openstack_dashboard/enabled/_1500_project_trunks_panel.py:
DISABLED = False # or just remove this line
Co-Authored-By: Bence Romsics <bence.romsics@ericsson.com>
Change-Id: I4a9f3bd710c9f6bc9ed942b107c6720865b1bc73
Partially-Implements: blueprint neutron-trunk-ui
This patch support operation for operators and project users to
associate security groups to a port. The feature is mentioned at
the neutron user feedback session in Barcelona summit [1].
This function UI is same as the function of security groups
association per instance. To realize this, the way of implementation
for 'Edit port' is changed, which move from a single modal to a
workflow base.
[1] https://etherpad.openstack.org/p/ocata-neutron-end-user-operator-feedback (L.35+)
Also we need to display how security groups is associated at a port.
At the moment, there is not way to be able to see it (only this function).
It should be done as an another patch.
Change-Id: I96e0fafdffbf05b8167ec1b85f7430176fdaab90
Closes-Bug: #1637444
Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
A floating IP can only be associated with an IPv4 address, so we should
not show IPv6 addresses in the list of ports when assigning floating IP
addresses.
Change-Id: I7b39a263445204a9efbc8fe113cc79146d9bee8c
Closes-Bug: #1703360
Closes-Bug: #1724393
When 'availability_zone'-extension is enabled, we present the user with
a drop-down menu containing a list of available availability zones.
This sets the 'availability_zone_hints' parameter on router creation.
Change-Id: I96293202ddd855823e89c4c7ba0b1f6a6423aab2
Partial-bug: #1716638
Ethernet trunks (network interfaces having a vlan tag) cannot be used
as a boot interface. This is a DHCP/PXE limitation. So instead the
interface without the vlan tag can be used. In neutron's nomenclature
they are the trunk parents. It is also an OpenStack limitation. Subports
should not be passed to 'openstack server create --nic ...'. But if you
do, there's no clear error message about it. Please see Armando's
analysis here why:
https://bugs.launchpad.net/neutron/+bug/1636485/comments/9
The server part of this patch signals port kind (i.e. plain, trunkparent,
trunksubport) so the launch widget can easily filter out trunksubports,
what are not suitable for boot interface.
Change-Id: Ie3a6710eeffefcb472c569898d0f1f1554e599f7
Partially-Implements: blueprint neutron-trunk-ui
Signed-off-by: Ferenc Cserepkei <ferenc.cserepkei@ericsson.com>
Ports has quota management in a project, if quota is exceeded,
will create failure and API returns
"Recoverable error: Quota exceeded for resources: ['port']".
So, it should be like creating a network and subnet to
perform quota checks on ports, and if the quota is exceeded,
add text descriptions to the create port button and disable it.
Change-Id: I31bd8f93c312179b86115544ba0fadc9a9ffec63
Closes-Bug:#1712556
This patch adds the QoS panel which displays Neutron QoS policies.
This patch allows read only view of the policies, displaying the name,
id, description and shared status of each policy. Policy actions and
rules to be added in follow-up patches.
To test:
Neutron's QoS plugin must be enabled in your setup.
To enable the QoS plugin in devstack please add the following lines
in the local.conf
enable_plugin neutron git://git.openstack.org/openstack/neutron
enable_service q-qos
and rebuild your stack (./stack.sh).
Create some qos policies via CLI (neutron qos-policy-create policy1).
now you can list the policies using this patch.
Based on initial commit: https://review.openstack.org/#/c/247997
Co-Authored-By: Masco <mkaliyam@redhat.com>
Co-Authored-By: Rob Cresswell <robert.cresswell@outlook.com>
Change-Id: If46aeb04879d91a1a9305a94a23cecea2041d378
Implements: blueprint network-bandwidth-limiting-qos
Enable display of trunks on the project dashboard.
To test it devstack needs to have neutron with trunk support, eg:
local.conf:
enable_plugin neutron https://git.openstack.org/openstack/neutron
enable_service q-trunk
No special horizon config is needed. As long as the 'trunk'
API extension is available (openstack extension show trunk)
the panel should automatically appear under Project/Network/Trunks.
Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
Co-Authored-By: Bence Romsics <bence.romsics@ericsson.com>
Change-Id: Iacb83f22f81e09457953622e61065f0bb2c27407
Partially-Implements: blueprint neutron-trunk-ui
novaclient 8.0.0 dropped python bindings for security group and
floating IP. This commit drops security group and floating IP logics
from the nova API wrapper.
The following changes are made accordingly.
* Update unit tests to consume neutron test data
* Drop API unit tests for nova security group and floating IP
Partially implement blueprint drop-nova-network
Change-Id: I946c508d7a82162fc8434213e006513867b79350
There's some vendor specific code still lingering from several cycles
ago. This patch removes all usage of it, all related tests, and all
default settings.
Implements: blueprint horizon-vendor-split
Change-Id: Ic0bb84f547b07b130480e587bd365f6e7805dfb5
LBaaS v1 feature was removed from neutron-lbaas in Newton.
There is no reason we have LBaaS v1 dashboard in Ocata or later.
Change-Id: Ic7d4ceea1943c3721500ce4b7f769b9dba28a359
Closes-Bug: #1624655
Now system administrators have CRUD abilities to manage floating IP.
1.floating IP list table
2.allocate floating IP to specific tenant
3.release/delete floating IP
Partially implements blueprint: manage-ips
Partially implements blueprint: syspanel-floating-ip-list
Change-Id: Ie5ec59740887d3845b933b37e6e875dbf08a4918
Network IP Availability has been merged in Neutron,
and, as a result, a new extension is available [1]. There
is a patch in Neutron for adding this api extension [2]
and a patch for adding commands for its usage [3]. This
change basically implements the new api that can be used
to check network usage stats of all the networks or specific
networks created by Neutron.
This patch will add the API extensions to Horizon, and
specifically, add IP usage stats to the subnets network table.
Reference
---------
[1] https://review.openstack.org/#/c/180803/
[2] https://review.openstack.org/#/c/212955/
[3] https://review.openstack.org/#/c/269926/
Partially Implements Blueprint: ip-capacity
Change-Id: I4b88adedc8de975d4aca9aeeb5622ec3410686ec
Co-Authored-By: Dariusz Smigiel <dariusz.smigiel@intel.com>
Changed the port detail view to a TabbedTableView where the extra tab is
enabled/disabled when the extension is active or not in neutron. Similar to
how extensions are handled for routers. If the extension is not active the
port detail screen should look the same as it does now.
The extra tab has a table of the allowed address pairs (columns: IP address,
MAC) with create and delete actions.
Change-Id: I07edb1afae5c2004761d1c118a724fb94aaebe3e
implements: blueprint port-allowed-address-pairs-extension
In VIP assignment for a LB pool, it now allows users to assign a
IPv6 IP address also.
Change-Id: I8e7f047c410cde5c13c14a18e27ed25c6c767eb5
Closes-bug: #1403034
if OPENSTACK_NEUTRON_NETWORK["enable_quotas"] = False buttons will not appear
and exceptions are thrown. This is because a dict is searched for a key
("available") which wont be there if its disabled. This generates a
KeyError at runtime.
As currently written enable_quatas -> False essentially disables Neutron usage.
This is not a desirable outcome.
This patch shows Neutron related buttons and ignores the quota settings,
which seems more in line with the notion of disabling quotas.
Closes-Bug:#1482354
Change-Id: I9485ddeece74d87317c2587498f5f79d4ffdb66e
This patch adds the two missing fields that are not displayed on the
VPN Service details page, but are returned by the CLI.
Change-Id: I388424a452fd84d9f9aa36030f105c84ab3a9316
Closes-Bug: 1495642
There is a typo in neutron_data in the second firewall data,
which actually skip this data at all. This patch fixes the typo
and adds corresponding changes to consider this case.
Closes-Bug: #1495968
Change-Id: I9c2250c700c67ee6b6d8495b9347144dd304a3d3
This change adds the ability to add / remove floating ips
from lbaas pool vips
Change-Id: I0037df067d58069aa3a48c41b4b0e97442f99952
Implements: blueprint lbaas-vip-fip-associate
Neutron FWaaS firewall object does not support 'shared' attribute
at now and 'shared' attribute is not included in API response.
This commmit removes 'shared' attribute for firewall object.
For more detail of the background, please see the bug report.
Note that 'shared' attributes for firewall rule and policy
are supported. This commit only affect the firewall object.
Change-Id: I5787529395e0005ce1efee48beb6f0f688c1c736
Closes-Bug: #1465440
- Exposes further information on the Port Details page
- Allows port type selection during Port create/update
- Extends relevant tests
Change-Id: Iadbe18d480415eadd0506a373baade46abc969f7
Implements: blueprint initial-sriov-support
Fixes inability to assign different networks to
multi-nics when launching a vm using the cisco n1k plugin.
This fixes an issue wherein with the cisco n1k plugin
launching an instance with multiple nics via horizon causes the
same network to get assigned to all nics.
Additionally modifying the existing test_launch_instance_post
test to handle the situation wherein two nics are created
with the N1K plugin using the N1K policy profile. Hence a new
unit test reflects two ports being created. Two more unit tests
to test port create exceptions are added to test exception
handling as well.
Closes bug: #1260436
Change-Id: Ie91c94e534e1cc1dddbb6ac563b0bef102451cf1
When LBaaS vips are defined, the floating IP association dialog used to
display them with their IP and the name "None". Now, the name of the vip
is used.
Closes-bug: 1401954
Change-Id: I3e26dc84d0af9f226f1e1fc915c04c4089cf7c93