1324 Commits

Author SHA1 Message Date
Cao Xuan Hoang
f7eec152c2 Use ThemableChoiceField
There are still remain some ChoiceField that have not covered.

Closes-Bug: #1732317
Change-Id: Ib9be4f252eba08374f87e4fef5e702a6ea8c1226
2017-11-15 02:27:56 +00:00
Zuul
ed6a22b0fd Merge "Support security groups association per port" 2017-11-08 08:39:24 +00:00
Trygve Vea
b5896d6fbb Implement setting availability zone hint on network creation
If the 'network_availability_zone'-extension is enabled, this patch adds a
field to the Create Network-workflow named 'Availability Zone Hints'.

Change-Id: Ic4206d5765c2d01afedf0e64f9aa50ffce76b661
Closes-Bug: #1725617
2017-10-24 16:25:19 +00:00
Zuul
bb2e5804f4 Merge "Implement network availability zone column in network list" 2017-10-24 14:41:58 +00:00
Ivan Kolodyazhny
14a350d013 Switch Cinder-related tests to mock
This patch changes mox to mock for the following test module:
* openstack_dashboard/dashboards/admin/volumes/tests.py

Change-Id: Id487feb397207b3544c9398a446077e3f6a39b1a
Partially-Implements: blueprint mock-framework-in-unit-tests
2017-10-23 15:43:41 +00:00
Trygve Vea
2949a9800f Implement network availability zone column in network list
If the 'network_availability_zone'-extension is enabled, this patch adds a
column in the Networks-table named 'Availability Zones'.

Change-Id: Iea2bac351b922a0d267c4a55e0d74f6c2639d967
Partial-Bug: #1725617
2017-10-23 12:29:35 +00:00
Zuul
89b6557ec0 Merge "Add network availability zone information for network agents" 2017-10-21 13:22:17 +00:00
Trygve Vea
887d7fb847 Add network availability zone information for network agents
This patch adds the availability zone column for network agents on the system
information page, if either the router_availability_zone or the
network_availability_zone extension is enabled.

Change-Id: Id7509fab440383bff45cb8ce5bdc3f8eb62045f4
Closes-Bug: #1716638
2017-10-21 09:10:34 +00:00
Zuul
9a7fac93ed Merge "Correct the subnets quota check in admin networks panel" 2017-10-21 01:48:20 +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
59021766b8 Router lists display availability zone information
When 'availability_zone'-extension is enabled, we present the user with
a column showing the availability zones for which the router is
scheduled in.

Change-Id: I87f6bfcee1f129a77e6bf9efa973a79bfa2afe14
Partial-bug: #1716638
2017-10-19 07:14:32 +02:00
Jenkins
1eb61ef506 Merge "Do not fail on AdminUpdateRow if tenant is not found" 2017-10-05 14:28:20 +00:00
Ivan Kolodyazhny
65baa5fa6d Do not fail on AdminUpdateRow if tenant is not found
We still can show instance info on admin/instances page even if tenant
is deleted or we can't retrieve tenant's information.

Change-Id: Idb1a5ffbb4103cce5258657d559bf4fe784b98d6
Closes-Bug: #1712565
2017-10-04 23:04:35 +03:00
Jenkins
6bc974850e Merge "flake8-import-order: Ensure to place project imports last" 2017-10-03 21:46:21 +00:00
wei.ying
b5bd7589e6 Correct the subnets quota check in admin networks panel
Currently when checking the subnets quota in admin networks table,
the current tenant subnets quota is checked, while the subnet is
created, using the tenant of the selected network[1], this doesn't
look the same. Similarly, in the network details subnets table,
the creation of subnets actions lacks quota checking.

[1] https://github.com/openstack/horizon/blob/master/openstack_dashboard/dashboards/admin/networks/subnets/workflows.py#L75

Change-Id: Ifb88b97168fc4f500e4bb15658f96363ddc7651f
Closes-Bug:#1719606
2017-09-30 15:32:01 +08:00
Huan Xiong
6107983761 Fix non-API bound filters in project and admin instance panels
Filters like "image_name", "flavor_name" and "project" in instance
panels are keys not supported in Nova List-Servers API directly, so they
should be converted to "image", "flavor" and "project_id", respectively,
before Horizon calling Nova List-Servers API.

That used to work, but was broken in commit
df194c8b4c25c6128f03a98fd0e628ba14b743ff because the code change messed
up the order. This commit fixes it by converting those filters first and
then calling Nova API with modified filters.

Change-Id: I504caaab2b6f256e7eb8c2605acaec39c004e80f
Closes-Bug: #1718725
2017-09-28 15:10:19 +08:00
Ying Zuo
a4aed76ab9 Include add subnet action on admin networks panel
Currently users can only add and delete networks on admin networks panel.

This patch adds the add subnet action to the admin networks panel so it
is consistent with the project networks panel.

Change-Id: I84e2d51baa4d2adb81ca3fd36e35063a69097326
Closes-bug: #1710723
2017-09-21 19:49:02 -07:00
Jenkins
20eaa03174 Merge "Fix actions inside instance details view page" 2017-09-21 13:29:41 +00:00
Jenkins
141faa4f6a Merge "Add server-side filtering Floating IPs" 2017-09-20 11:43:25 +00:00
Akihiro Motoki
ee989fc925 Fix Http302 error message in UT
When running openstack_dashboard unit tests,
we see an error message:

    Error while checking action permissions.
    ...
    Http302

This is caused by unsufficient mocking.

Change-Id: I0edb89a0e804f38be891c9397438fce0ddd469ff
2017-09-20 08:00:55 +00:00
Akihiro Motoki
af3b7e4134 flake8-import-order: Ensure to place project imports last
To ensure project imports are placed after third party import,
we need to specify application-import-names.
Previously flake8-import-check checks only standard imports or not.

Change-Id: I9beb2105f686dc7d9aebfce8e21c5e182698e2fe
2017-09-20 01:19:38 +00:00
Eddie Ramirez
d6f1d117b4 Add server-side filtering Floating IPs
References for field selection:
https://developer.openstack.org/api-ref/networking/v2/index.html?expanded=list-floating-ips-detail
https://github.com/openstack/python-neutronclient/blob/master/neutronclient/neutron/v2_0/floatingip.py

Co-authored-by: Eddie Ramirez <eddie.ramirez@intel.com>
Co-authored-by: David Lyle <dklyle0@gmail.com>

Implements blueprint: server-side-filtering

Change-Id: I614f0b1d9cf685aed3e3663d512a4ccd92455093
2017-09-14 23:30:57 +00:00
Dmitry Ratushyy
9e1eb5f5d7 Fix actions inside instance details view page
At the current moment user can not suspend an
instance from the instance "Details" page if the
instance does not belong to the first page of the
instances list. This is fixed.

Co-Authored-By: Ivan Kolodyazhny <e0ne@e0ne.info>
Co-Authored-By: Vladislav Kuzmin <vkuzmin@mirantis.com>
Change-Id: I4d805e4a65e838242af38677cbb9efefc498a96f
Closes-Bug: #1553142
2017-09-07 01:08:41 +04:00
Jenkins
5428b96c2c Merge "Get all needed instances for volumes attachments at Admin->Volumes" 2017-09-05 11:53:52 +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
4d64d616ce Make cinder generic group quotas translatable
'groups' in cinder quota is not marked as translatable in
the default quota table. 'groups' means the number of volume generic groups
in Cinder, but 'groups' is too generic, so this commit uses 'Volume Groups'
as a lable.

Also sort quota names per back-end services (nova and cinder)

Change-Id: I2deff8fcdd832e9c2a7987ef3e54017b4aa47daf
Closes-Bug: #1710775
2017-08-16 13:17:36 +00:00
Kenji Ishii
5aab8bf508 Refactor the current UpdatePort form to workflow version
This patch change UpdatePort form to workflow in order to
be able to add extra tabs like the setting of security groups.
Originally, this work is a part of the subsequent patch
"Support security groups association per port",
but the changes are big so it is divided into two patches.
This patch focuses on refactoring the existing implementation
from the form to the workflow.

Change-Id: Id42b311242b66ee25e8870ed86e45b5464e19c01
Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
Related-bug: #1637444
2017-08-09 12:41:16 +00:00
Rob Cresswell
9a98a5fd98 Disable Edit Flavour by default
Closes-bug: 1709056
Change-Id: Ifa4e9cdfbbac1a1d4bf28679b24a17b13f637ddd
2017-08-07 12:06:33 +00:00
Jenkins
d5900c33c2 Merge "Show instance resize and rebuild actions in red" 2017-08-04 11:09:23 +00:00
Adit Sarfaty
245da1d812 Do not call list_l3_agent_hosting_router if not supported
For the admin router view, list_l3_agent_hosting_router is called.
If this extension is not supported, it returns "resource not found"
and an error popup.
This api should not be called in case the extension is not supported.

Closes-bug: #1708081
Change-Id: I38f7386689d95dde3fc76bbf4d6b5e781b515878
2017-08-03 08:16:54 +03:00
Jan Gutter
587c3de89b Add support for virtio-forwarder VNIC type
* This patch adds support for the virtio-forwarder VNIC type.
  * The virtio-forwarder VNIC type has been added as another option for
    setting the "binding:vnic_type" property on a port. This requests a
    low-latency virtio port inside the instance, likely backed by hardware
    acceleration.
  * The documentation for OPENSTACK_NEUTRON_NETWORK/supported_vnic_types
    has been updated to clarify the term "supported VNIC types".
    Unfortunately, the VNIC binding happens at scheduling and error
    reporting in core Nova and Neutron is not optimal in this case.
  * Corresponding python-openstackclient change:
    https://review.openstack.org/#/c/483532/
  * Corresponding neutron-lib change:
    https://review.openstack.org/#/c/483530/

Signed-off-by: Jan Gutter <jan.gutter@netronome.com>
Closes-Bug: 1705548
Depends-On: I28315fb12f62dc7d52d099c211086b2b81eca39a
Change-Id: I02dc3581de8f31c659e545e340cbdf6a1b2bb837
2017-07-24 13:40:54 +00:00
Jenkins
99cd5bb25c Merge "Support removing projects from flavor access list" 2017-07-24 00:28:27 +00:00
zhangdebo1987
ddd486f67b Support removing projects from flavor access list
When we remove one or more projects from a flavor access list,
it doesn't work, now I fix it.

Change-Id: I92f4fd83a958ff7a7249d0848f9fd128fc73e13f
Closes-bug: #1703760
2017-07-17 16:55:46 +08:00
Rob Cresswell
69c81b16e0 Fix an incorrect policy rule in Admin > Instances
Change-Id: I765ae0c36d19c88138fbea9545a2ca4791377ffb
Closes-Bug: #1703066
2017-07-13 19:27:22 +01:00
Ivan Kolodyazhny
3a99499ba0 Get all needed instances for volumes attachments at Admin->Volumes
Nova server_list() wrapper needs to receive an explicit `all_tenants`
boolean flag in order to request instances for _all_ tenants -
otherwise while rendering Admin->Volumes table Django will request
missing instances (to get their names for volume attachments) one by
one, thus significantly increasing response time.

This patch adds check if all_tenants in search_opts and add it to
the search else uses tenant_id in the search_opts.

Co-Authored-By: Dmitry Sutyagin <dsutyagin@mirantis.com>
Co-Authored-By: Ivan Kolodyazhny <e0ne@e0ne.info>
Change-Id: I4761d7da15036b69619649871aef91e1799ee385
Closes-Bug: #1508568
2017-07-13 20:35:21 +03:00
Ying Zuo
9a975ebaf5 Show instance resize and rebuild actions in red
Updated the template used for LinkAction to add the css class for
destructive action if action_type is set to "danger".

Removed the action_type for live  migration action because it is
not a destructive action.

Change-Id: Ib957597aa065df4c8a65303b1dc95a5c762ae3d3
Closes-bug: #1704014
2017-07-12 17:47:27 -07:00
Jenkins
3765a5827a Merge "Removed default value for 'Physical Network'" 2017-07-10 12:18:42 +00:00
Beth Elwell
449aa1a48c Removed default value for 'Physical Network'
When creating a network there is currently a default value of 'default'
which causes the network creation to fail. It is nonsensical to have
a default value here as it will change depending on the provider
network type and needs to be set according to custom settings if the
user is not creating a simple local network which then does not require
the physical network value at all.

Change-Id: I448713d986f17ea1c00cd4dd22487291545cfe2a
Closes-Bug: #1417305
2017-07-10 11:05:34 +01:00
zhurong
c6f060a12a Remove the extra Networks url in ports details page's breadcrumb
There are two Networks url in ports details page's breadcrumb,
This patch remove the extra one.

Change-Id: I8ce37da8f999eb18e925eecda22664490db2381a
2017-07-09 20:27:35 +08:00
Jenkins
0ec208fcd8 Merge "Correct the admin snapshot detail row actions are inconsistent with the table" 2017-07-03 20:40:46 +00:00
Akihiro Motoki
e6b78f92f2 Use flake8-import-order plugin
In reviews we usually check import grouping but it is boring.
By using flake8-import-order plugin, we can avoid this.
This flake8 plugin is already used in tempest.
It enforces loose checking so it sounds good to use.

Note that flake8-import-order version is pinned to avoid unexpected
breakage of pep8 job.

Change-Id: I8ccd05eb70350a2441cc2a4d1eafc09ee690b83b
2017-07-03 08:02:23 +00:00
wei.ying
69a1cc3117 Correct the admin snapshot detail row actions are inconsistent with the table
An availabe snapshot has three row actions in admin snapshots table,
but four row actions in its detail page. This inconsistency seems to be
due to the admin snapshot table inheriting the project.

Change-Id: I33e5d5c1e78d714f6792c5c23538f7f015d30b3c
Closes-Bug: #1678462
2017-06-26 19:53:59 +08:00
Akihiro Motoki
b498474309 Fix locations of included templates in admin volume panels
Change-Id: I777e2ae75dd96effc3dd0eba92e2654659788008
Closes-Bug: #1699524
2017-06-23 11:58:36 +00:00
Akihiro Motoki
ed4c4b3442 I18n cleanup on recent merged changes
* (admin/instances/tables.py)
  _(" ") is confusing to translators. We already use an empty string ""
  in the project instance table, so there is no need to use a string
  only with a space.
* (project/instances/templates/instances/_detail_overview.html)
  "Locked" in the instance detail template means an attribute name.
  The word "locked" is potentially used in various contexts:
  passive voice, adjective or some name like attribute name.
  We can clarify the meaning of the string by using gettext context.
* (Angular workflow/launch-instance/keypair/create-keypair.html)
  <label> with "translate" attribute leads to an extracted string
  with HTML tagws. It can be avoided by using <translate> tag.
  The fix is same as what were fixed in commit fcd30d95e8.

Change-Id: Ib30306d82e45d81188393d4965493abac93699e3
2017-06-20 10:11:59 +00:00
Ying Zuo
ddfa667d02 Add instance locked status on instances table
Added a column to show the locked status on project/admin instances table.

There will be a locked or unlocked icon with help tooltip if nova 2.9 or
above is used. See openstack_dashboard/api/microversions.py

Added the locked field on project/admin instance details panel.

Change-Id: If31ae281d2782c71cd6112f3bd6228647a6130e4
Closes-bug: #1593903
2017-06-14 20:00:56 -07:00
Jenkins
b20a85deb2 Merge "Do not display UUID in network/rotuer forms" 2017-06-13 10:52:20 +00:00
Jenkins
9e04d18529 Merge "Fix Volume Snapshot tab pagination" 2017-06-13 10:48:57 +00:00
Akihiro Motoki
b9d0243c33 Fix H405 (multi line docstring) warnings (openstack_dashboard)
H405: multi line docstring summary not separated with an empty line

Closes-Bug: #1696996

Change-Id: Id895695663b19522d9cdc22f8b012e49680d708b
2017-06-09 16:05:31 +00:00
Vladislav Kuzmin
bf0998f853 Fix Volume Snapshot tab pagination
horizon/templates/horizon/common/_data_table_pagination.html template
that responsible for pagination link uses
"has_prev_data" and "has_more_data" methods.
These methods available in "snapshots" object that return
the "openstack_dashboard.dashboards.project.snapshots.SnapshotView"
(and "openstack_dashboard.dashboards.admin.snapshots.SnapshotView")
views. In turn, these views inherits from
"horizon.tables.PagedTableMixin" and "horizon.tables.DataTableView".
If we look at the chain of inheritance of the "DataTableView" class
we can see the following inheritance
MultiTableMixin -> MultiTableView -> DataTableView.
Class MultiTableMixin has it own "has_prev_data"
and "has_more_data" methods that in always return "False"
and bacause of this pagination doesn't work.
In turn, class PagedTableMixin also has "has_prev_data"
and "has_more_data" methods. These method returns value from
self._has_prev_data and self._has_more_data that assigned
in the original view. Because of this pagination depends
on multiple inheritance in this case.

Do it for Admin and Project tab.

To test: set 'Items Per Page' in the UI Settings page to a low number.

Change-Id: I08ccc430dd0a5d425a15e824ee0906995b56a425
Closes-Bug: #1695052
2017-06-09 12:29:44 +04:00
Jenkins
1eaa564098 Merge "Fix AttributeError in project/admin snapshot detail page" 2017-06-07 17:02:53 +00:00