Commit Graph

93 Commits

Author SHA1 Message Date
Pedro Martins 1db1764749 Add NAT rules to the floating IP workflow
The floating IP workflow is now able to manage NAT
rules (portforwarding) if the floating IP is not
associated with any NICs (ports).

This patch is the one of a series of patches
to implement floating ip port forwarding with
port ranges.

The specification is defined in:
https://github.com/openstack/neutron-specs/blob/master/specs/wallaby/port-forwarding-port-ranges.rst

Implements: blueprint https://blueprints.launchpad.net/neutron/+spec/floatingips-portforwarding-ranges
Change-Id: Id715da6591124de45f41cc367bf39a6bfe190c9a
2023-03-01 10:38:16 -03:00
Akihiro Motoki 516e57bc89 Add UT coverage for attach_interface by port
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
2022-10-26 15:34:17 -05:00
Zuul 3bc1458e60 Merge "Add Rules operation to Network QoS Policy" 2022-02-21 20:20:37 +00:00
zitptan aa83752f20 Add Rules operation to Network QoS Policy
Added create, edit, and delete rules operation to the
network qos policy.
Rules: Minimum-Bandwidth, DSCP-Marking, and
Bandwidth-Limit, Minimum-Packet-Rate

Partially-Implements: https://blueprints.launchpad.net/horizon/+spec/create-network-qos-policy

Change-Id: I49058036f1d78ef022d966f6b375cdc984755813
2022-02-17 13:40:39 +01:00
Rodrigo Barbieri 196de449b6 Implement pagination in admin/proj network tab
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
2022-02-16 18:15:48 -03:00
Hang Yang c7ea66bc3e Support RBAC security groups in dashboard
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
2021-10-18 15:27:35 -05:00
YuehuiLei 87f498bee5 Drop the usage of unicode prefix from unicode strings
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
2021-02-12 13:05:27 -06:00
Akihiro Motoki cdb191ec83 Fix listing security groups when no rules
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
2019-08-19 16:38:57 +09:00
Zuul ea51592827 Merge "python3: Fix handling of other protocol in SG rule" 2019-01-11 16:26:08 +00:00
shutingm d65ebe2054 Add RBAC policies feature to horizon dashboard
Add RBAC Policies panel to support Role-Based Access Control
functionality.

Implements: blueprint rbac-policies
Change-Id: I883ad629d735dadf49e8bf9c50475050fdfcf797
2019-01-02 17:05:07 +08:00
Akihiro Motoki ccb21ca7a9 python3: Fix handling of other protocol in SG rule
In python3 we cannot compare None with an integer,
while this works in python2.

Change-Id: I1321ea68f08241db377a58ed6a22306c63aba204
Closes-Bug: #1789402
2018-12-23 00:40:46 +09:00
Akihiro Motoki 7fabda7ef1 usage: Use tenant_quota_usages() for Limit Summary
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
2018-04-20 05:29:53 +09:00
Zuul 3c4e8a78ff Merge "A description can now be added to a security rule" 2018-04-13 13:33:22 +00:00
Akihiro Motoki f545272f12 Fix pep8 errors
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
2018-04-11 00:34:21 +09:00
Samuel12321 6f37943af9 A description can now be added to a security rule
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
2018-04-10 00:48:30 +09:00
Akihiro Motoki 1340904d47 quota: Use network quota field names consistently
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
2017-12-13 20:27:02 +09:00
Lajos Katona ec299ff301 Trunks panel: edit button
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
2017-11-27 14:05:43 +01:00
Zuul ed6a22b0fd Merge "Support security groups association per port" 2017-11-08 08:39:24 +00:00
Zuul 842e2cdd0c Merge "Hide IPv6-addresses when assigning floating IP addresses" 2017-10-21 00:38:17 +00:00
Kenji Ishii e9db12382e Support security groups association per port
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>
2017-10-20 23:57:40 +00:00
Trygve Vea 9d5be5251f Hide IPv6-addresses when assigning floating IP addresses
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
2017-10-20 21:30:27 +00:00
Trygve Vea b9664a1bf1 Routers can be created with availability zone
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
2017-10-19 11:53:39 +02:00
Ferenc Cserepkei 748d9860bb TrunkPort, Horizon workflow: launch instance
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>
2017-08-31 21:33:56 +00:00
wei.ying 0b65dbc913 Disable 'Create Port' button if ports quota is exceeded
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
2017-08-29 20:41:58 +08:00
Akihiro Motoki 385870317a Split out FWaaS dashboard
Implement blueprint split-out-neutron-xaas-dashboards
Change-Id: Ieaca88dbe28cc2330d9b333082ff7e92c91e8639
2017-06-27 14:20:03 +00:00
Akihiro Motoki 1d6a217da1 Split out VPNaaS dashboard
Implement blueprint split-out-neutron-xaas-dashboards
Change-Id: Ib304ddef381d80011f7030fdd5049aab0e901ae6
2017-06-27 14:20:03 +00:00
Akihiro Motoki 21e4222f61 Show security groups in Port detail page
Closes-Bug: #1677535
Change-Id: I3558b0354dfd91fa3b30afee9263e8bf90482ebd
2017-06-16 00:16:18 +00:00
Beth Elwell 12fe351823 Adds basic angular QoS panel to Horizon
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
2017-06-13 16:36:29 +01:00
Lajos Katona 3524b3d4f7 New readonly panel for trunks
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
2017-05-24 02:34:33 +00:00
Akihiro Motoki acd3f2a240 Drop novalclient security group and floating IP dependency
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
2017-04-28 08:38:28 +00:00
Rob Cresswell a8f17150bf Remove all remaining vendor specific code
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
2017-03-22 20:23:12 +00:00
Jenkins 1d1b3cf1b8 Merge "Replaces uuid.uuid4 with uuidutils.generate_uuid()" 2016-11-14 11:38:25 +00:00
jolie 796625863d Replaces uuid.uuid4 with uuidutils.generate_uuid()
Change-Id: I72e502a07d971de7e5c85519c80c4d054863eabe
Closes-Bug: #1082248
2016-11-08 18:19:34 +08:00
Akihiro Motoki 7e64a1cef1 Drop LBaaS v1 dashboard
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
2016-10-18 08:57:26 +09:00
LIU Yulong 5c238e9117 Add floating IP panel to admin dashboard
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
2016-08-19 12:15:55 +08:00
Ankur Gupta 0b807ac1d0 Add Network IP Availability Extension
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>
2016-06-05 14:35:48 -05:00
Wim De Clercq c140149308 Add allowed address pair extension UI for neutron ports.
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
2016-05-04 19:58:17 +00:00
nikunj2512 dbf251e16e Adds support to accept IPv6 in VIP Address for LB Pool
In VIP assignment for a LB pool, it now allows users to assign a
IPv6 IP address also.

Change-Id: I8e7f047c410cde5c13c14a18e27ed25c6c767eb5
Closes-bug: #1403034
2016-01-27 11:27:13 +00:00
lin-hua-cheng 64a127fbd7 Fix mocks on update firewall rule tests
The new ip_version attribute was not added to existing
tests.

Change-Id: I55555a4ccdd4759154197e5e7a9a01e6ab207463
Closes-Bug: #1517670
2015-11-18 19:10:04 -08:00
Mike Hagedorn 5ba219acbf Neutron Quota Settings Flag Disables Neutron GUI
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
2015-09-24 20:50:50 +00:00
Rob Cresswell 7b1182dc06 Add external IP fields to VPNaaS details
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
2015-09-23 09:13:12 +01:00
Tatiana Ovchinnikova dd901cfd84 FWaaS tests improving
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
2015-09-15 16:11:42 +03:00
Frode Nordahl d2f1592d0d Implement client API bindings for Neutron subnet allocation
Change-Id: I611ef5224ef8fe33e3042f22fca774b7fe68a8cd
Implements: blueprint neutron-subnet-allocation
2015-07-22 01:30:43 +02:00
eric f5f079c22c LBAAS VIP floating IP table actions
This change adds the ability to add / remove floating ips
from lbaas pool vips

Change-Id: I0037df067d58069aa3a48c41b4b0e97442f99952
Implements: blueprint lbaas-vip-fip-associate
2015-07-14 20:33:55 -06:00
Akihiro Motoki 991d8ac86c Remove 'shared' from Neutron Firewall table
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
2015-06-23 21:09:11 +09:00
CHARDON Gerome 440bd19040 Add Extra Routes to Router Tabs View
Add support to neutron extra routes to routers views.

Change-Id: Id5b5c7494d903fff0fdb5cba9297dbed5cf3d62e
Closes-Bug: #1396616
2015-03-31 11:09:05 +02:00
Vishwanath Jayaraman fb9bcd31da Adds configuration support to associate firewall to routers
- Allows router selection during firewall create/update
- Exposes router association information in the firewall details page
- Extends relevant tests

Co-Authored-By: Abishek Subramanian <absubram@cisco.com>
Co-Authored-By: Lin Hua Cheng <os.lcheng@gmail.com>
Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
Change-Id: I602b7273c1a2caf9d80347689d09cbbe166d2048
Implements: blueprint fwaas-router-insertion
2015-03-29 02:14:26 -05:00
Rob Cresswell 3892821174 Adds initial SRIOV creation/config support
- 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
2015-03-19 12:38:54 +00:00
Abishek Subramanian faee0c0c92 Fix multi-nic issue with nexus plugin
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
2015-01-07 14:08:23 -05:00
Georges Dubus 1e2570f208 Display the vip name in the floating IP association dialog
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
2014-12-24 13:06:07 +01:00