151 Commits

Author SHA1 Message Date
Shu Muto
e7f22178b2 Add delete action for key pair
This patch adds delete actions for angularized key pair panel.

Change-Id: Iccb5014add0e19d6154bd6261d97a83b2ecdf32f
Partial-Implements: blueprint ng-keypairs
2017-11-01 14:53:04 +09:00
liyingjun
2161b91264 [Micro version] Support description for instance
In Nova Compute API microversion 2.19, you can specify a “description”
attribute when creating, rebuilding, or updating a server instance. This
description can be retrieved by getting server details, or list details
for servers, this patch adds support for this attribute for instance in
horizon.

Change-Id: Ic9217234021d236aee8295915f1a9c3c544396b0
Implement-blueprint: support-description-for-instance
2017-10-26 22:36:00 +08:00
Ivan Kolodyazhny
b9972f73b0 Fetch Cinder availability zones list for volume creation
We have to fetch and show Cinder availability zones list during volume
creation and volume creation from image.

Change-Id: I1c8746870d94c183f5ef510c1ce09b3fc9c84220
Closes-Bug: #1721286
2017-10-23 14:25:04 +03:00
Cindy Lu
924fb68645 Add REST APIs for Keystone Group
This patch adds REST APIs (read, create, edit, delete)
for Keystone Group.

Change-Id: I9ca3b509bcd6ab3f255094fa367f9b236caf13da
Partially-Implements: blueprint ng-groups
Co-Authored-By: Shu Muto <shu-mutou@rf.jp.nec.com>
2017-10-10 13:35:52 +09:00
Jenkins
631df03dfe Merge "Angularize Key Pair Details" 2017-10-07 04:47:13 +00:00
Shu Muto
194c881396 Angularize Key Pair Details
This patch adds Angularized details view for Key Pair.
Also, added new filter 'mediumDate' that format date as follow:
e.g) Feb 3, 2001 4:05:06 PM

Change-Id: I1eaead66a582c15442b28ae83fb1c573a46b0f43
Partial-Implements: blueprint ng-keypairs
2017-09-28 16:57:49 +09: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
Jenkins
5787b0adc5 Merge "Fix wrong links in horizon" 2017-09-12 16:15:42 +00:00
yanghuichan
c1d91d21a4 Fix wrong links in horizon
Some docs links have changed.
We should update the wrong links in our codes.

Change-Id: Ia726eaa4d3154a4152d1f685349de98386f42ef0
2017-09-12 15:23:26 +08: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
Artem Tiumentcev
0723e60edf Fix Python 3 issues with serialization json from request
Closes-Bug: #1710114
Change-Id: I2c6e2fe24fb8c5b47f36613e9791004a01456ae3
2017-08-11 12:13:56 +03:00
Akihiro Motoki
0c1e179b3c api.rest.neutron: Ensure dict is passed to api.neutron args
Some functions in api/neutron use @memoized decorator,
but @memoized decorator cannot handle request.GET (an instance of
QueryDict) because a weakref to WSGIRequest is not hashable.
(Note that @memoized decorator can handle a dict itself)

What we actually need is the content of request.GET.
By using .dict() method we can ensure arguments which
@memoized can handle are passed to api.neutron functions.

This pattern is used only in api.rest.neutron and
not used in other codes.

Closes-Bug: #1706348
Change-Id: Ibb38ad1d95af1cd90a1fedd834602f444010c151
2017-08-08 16:58:27 +00:00
Jenkins
adb2583e90 Merge "Fix missing volume name on launch instance modal" 2017-08-02 21:06:16 +00:00
Lajos Katona
da92f24bc2 Trunks panel: details for trunks and subports
Add details link to the trunk panel to show details of the given trunk,
like the subports list, with port_id and segmentation details.

Co-Authored-By: Bence Romsics <bence.romsics@ericsson.com>
Change-Id: I9000e2907a8f188d5e72e36818b7171f35158eb9
Partially-Implements: blueprint neutron-trunk-ui
2017-07-27 10:48:55 +02:00
Beth Elwell
b81c5901cd Add details to network_qos panel
This patch adds details drawer summary to network_qos panel to show
policy descriptions and details page with further information and
associated rules.

Implements: blueprint network-bandwidth-limiting-qos

Change-Id: I1a8032206b576cf8dad5f75077bac7a093971973
2017-07-24 13:07:44 +01:00
Ying Zuo
b00f8a603a Fix missing volume name on launch instance modal
The Volume object passed back from cinder doesn't have the name
for volumes created with an instance. It should be passed in to
api.cinder.Volume to get the name properly.

Change-Id: I2a812c898f601c741f232419f96bf93f3965bf81
Closes-bug: #1702966
2017-07-23 20:21:32 -07:00
Jenkins
17e40e7ac0 Merge "Trunks panel: item and batch delete" 2017-06-20 11:47:47 +00:00
Jenkins
f5b2561a09 Merge "Use POST not GET for keypair generation" 2017-06-16 09:00:05 +00:00
Bence Romsics
9120b40038 Trunks panel: item and batch delete
Add delete buttons to the Project/Network/Trunks panel. There is one
button per each trunk item deleting only that trunk. Plus a select and
delete many trunks at once by checkboxes and then delete all selected.
The usual extras (confirmations and toast notifications) are included.

Change-Id: Ie88e169072a563fa238bf870664b71aa7f2a883d
Partially-Implements: bp/neutron-trunk-ui
2017-06-16 09:11:40 +02: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
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
Matt Borland
d07fedc45f Use POST not GET for keypair generation
This patch fixes the Cross-Site Request Forgery (CSRF) attack against
the keypair generation pages:
- HORIZON_URL/project/key_pairs/PAIRNAME/generate/
- HORIZON_URL/project/key_pairs/PAIRNAME/download/
These pages exposed creating and/or overwriting a keypair with a given
name via a CSRF attack.

This patch closes these holes by using only POST-based keypair creation,
and exposing the keypair in the contents of a modal dialog instead of a
download, which ultimately requires a GET.  It uses the same client-side
features for both the Launch Instance keypair creation and Compute / Key
Pairs panel.

Closes-Bug: 1575913
Change-Id: Ie5ca28ff2bd806eb1481eba6f419b797b68856b6
2017-06-08 11:13:31 -07:00
Akihiro Motoki
9067ae8b0f Move SG and FIP API wrapper to api.neutron
We no longer need to have SG and FIP API wrapper in api.network
as we only supports a single network back-end.

Completes blueprint drop-nova-network

Change-Id: I4e59d897508b497a3cd2ae2fda93b30b786610dc
2017-06-04 17:51:25 +00:00
Jenkins
29943d5e85 Merge "hacking: Specify white list rules in noqa explicity" 2017-05-29 15:10:51 +00:00
Akihiro Motoki
5273c27a75 hacking: Specify white list rules in noqa explicity
If 'noqa' is specified all hacking checks are disabled.
It is better to ignore specific rules explicitly rather than
ignoring all. The recent flake8 supports this [1].

[1] http://flake8.pycqa.org/en/latest/user/ignoring-errors.html

Change-Id: I74246adb4d1d2613c2703cf519428b64d00e59bb
2017-05-24 03:03:41 +00: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
f22669058a Clean up logger usage
* Use module-specific logger in integration helper.
  Previously the root logger (returned by getLogger without parameter)
  was used for module-specifc log messages.
  It is better to use module-specific logger for such messages
  and we can easily identify where log messages come from.
* In case of requiring access to the root logger,
  get the root logger explicitly.
* Use 'LOG' for logger name. Almost all modules in horizon use
  'LOG' for logger name, but some do not.
  It is better to follow the convention.

* Use LOG.warning instead of LOG.warn.
  LOG.warning is recommended way in Python3.

Change-Id: Ib9de7ee08a235de9820b95910d8f54724a1f2b91
2017-04-13 04:35:50 +00:00
Jenkins
1e82305f18 Merge "Added Server-side filtering for swift UI" 2017-03-29 05:24:49 +00:00
Jenkins
e3cd250a81 Merge "hacking: noqa cleanup in openstack_dashboard" 2017-03-27 05:11:18 +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
Akihiro Motoki
baa4ca8dce hacking: noqa cleanup in openstack_dashboard
attribute-level imports are not checked by hacking module now.
most noqa is used to disable warnings on attribute-level imports.
This commit drops noqa for this purpose.

After this, there are only 3 noqa under openstack_dashboard/ :)

Change-Id: I4a449802f5dbd6e44e4b8b5c378a555d47d9a99f
2017-03-17 19:38:47 +00:00
liyingjun
942fa3d7cd Fix the return value for glance get_version
The VERSIONS.get_version returned a Version object instead of a string,
it will raise ValueError: Circular reference detected when json encode.

This issue was introduced by commit
834722cf8af7b3471e9c7234da0bac8669025ca2

Change-Id: Ib41b2f7e77ac49911e9d5a4e129047f941bf5d24
Closes-bug: #1672291
2017-03-14 10:48:38 +08:00
Jenkins
834722cf8a Merge "Properly compare versions in APIVersionManager" 2017-03-02 20:53:15 +00:00
Itxaka
4958805863 Merge "missing" quotas with nova quotas
There was an extra variable for the so called "missing"
quotas since 2013. This patch merges them with the
normal nova quotas, cleans up the tests, removes any
usage of that special var and as a side effect, adds
the missing keys to the project quota update page.

Change-Id: Icaac1ebb1749e13fdfc307e89dcc6bbd64bef922
Closes-Bug: 1655393
2017-03-01 15:30:33 +00:00
Luis Daniel Castellanos
277d15abff Added Server-side filtering for swift UI
Added server-side filtering for containers in swift UI using the
magic search directive.

Change-Id: Id0eaa818fab8b2c7d7a0ab40c1a943c2e7342f10
Partial-Implements: blueprint server-side-filtering
2017-02-06 15:28:58 -06:00
Radomir Dopieralski
8377fb9e18 Properly compare versions in APIVersionManager
Since the APIVersionManager stored the version numbers as ints and
floats, it was not possible to distinguish between version 1.2 and 1.20,
and also version 1.2 would be considered higher than version 1.13. With
the introduction of microversioning in some services, the version
numbers inflate quickly, making this a problem.

This patch wraps the version numbers in a Version object, that stores
the information as a semantic_version and correctly compares with other
Version objects, as well as ints, floats and strings.

It also removes the check for version being specified as a string, so
that it's possible to specify versions such as 1.20 without having to
explicitly create Version objects.

Change-Id: I0b0d87582d617290f08359ad181216cb99edb768
Closes-Bug: #1649819
2017-01-27 13:43:47 +00:00
liyingjun
49a5e68a17 Add missing scheduler_hints to _optional_create
The scheduler_hints option is missing from server_create rest api.
This patch adds it.

Change-Id: Iab587abecbfd73fec8e966ca86cdde7242c80207
Closes-bug: #1655255
2017-01-12 06:29:59 +00:00
Cady_Chen
51fe944449 Replace six.iteritems(iter) with iter.items()
As mentioned in [1], we should avoid using six.iteritems(iter) to
achieve iterators. We can use iter.items() instead, as it will
return iterators in PY3 as well.

[1] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html

Change-Id: Ieadd5fa69b3f6058c0641a5b96ef3e8e1e3f6cc2
2016-12-14 11:13:20 +08:00
Jenkins
47edc6b6de Merge "Add Keystone Groups to REST API" 2016-10-13 20:04:32 +00:00
Cindy Lu
8130a79589 Add Keystone Groups to REST API
Adding REST API calls to retrieve group list

Co-Authored-By: zhurong <aaronzhu1121@gmail.com>

Partially-Implements: blueprint angularize-identity-tables
Change-Id: I12ca270036b4963fb20d3f6f1a630ded60a449f8
2016-10-11 11:33:37 -07:00
Jenkins
4304bf3fce Merge "Fix for swift ui displaying infinite folders" 2016-10-06 13:35:41 +00:00
Luis Daniel Castellanos
c30a1ea66e Fix for swift ui displaying infinite folders
When creating a folder in swift ui with the following
name format "f1;/f2" swift ui is not able to pick the
objects/floders for "f1;" and when this folder is
selected the ui ends in an infinite loop of "f1;"
folders

Change-Id: I8e2d8fdb5fb3b67dfd14bbdd1b100f13e84222eb
Closes-Bug: #1624546
2016-10-05 10:11:54 -05:00
Jenkins
1d14504de9 Merge "Enable volumes metadata update" 2016-10-03 23:47:31 +00:00
Bartosz Fic
7f46e5dc23 Enable volumes metadata update
Cinder currently expose an api to let the users update the volumes
metadata so horizon should expose this functionality.

The metadata is filtered to remove image metadata attributes. There is
work in progress (in Cinder) that will expose the ability to
write-through image metadata to underlying images where appropriate.
Allowing setting of image properties in this UI would be confusing.

Change-Id: If721ac1c908df7651d630f6e7d36f2cc4d69f5da
Implements: blueprint ability-to-add-metadata-to-cinder-volumes-and-snapshots
Co-Authored-By: Santiago Baldassin <santiago.b.baldassin@intel.com>
Co-Authored-By: Pawel Skowron <pawel.skowron@intel.com>
Co-Authored-By: Bartosz Fic <bartosz.fic@intel.com>
Co-Authored-By: Pawel Koniszewski <pawel.koniszewski@intel.com>
Co-Authored-By: Michal Dulko <michal.dulko@intel.com>
Co-Authored-By: David Lyle <david.lyle@intel.com>
Co-Authored-By: Paul Karikh <pkarikh@mirantis.com>
2016-09-28 18:17:14 +03:00
Akihiro Motoki
35d2becdd6 Fix docstring warnings
Partial-Bug: #1411719
Partial-Bug: #1486222

Change-Id: I2d649295e7425ab73f09f3a5d91076350bf7ed7a
2016-09-24 20:44:48 +09:00
Timur Sufiev
6609420115 Fix getting the images list in Admin->Images
Do this by converting 'None' / 'True' / 'False' to their Python
counterparts.

Change-Id: Ifd17f4587759e7a67218278d28ee77fc9b80530a
Closes-Bug: #1624700
2016-09-19 13:56:54 +03:00
Julie Pichon
cf0aac9400 Support for Glance v2
Implements wrappers necessary for Horizon to work with either Glance
v1 or v2 and removes the dependency on the Glance v1 endpoint.
Handles the differences between setting properties with v1 and v2 and
restricts some Glance functions that aren't supported in v2.

Implements blueprint: horizon-glance-v2
Co-Authored-By: Travis Tripp <travis.tripp@hp.com>
Co-Authored-By: Brad Pokorny <Brad_Pokorny@symantec.com>
Co-Authored-By: Timur Sufiev <tsufiev@mirantis.com>
Co-Authored-By: Liuqing Jing <jing.liuqing@99cloud.net>

Change-Id: Icca91c53eabf18c3109b3931ed53f70eaaaa0e56
2016-09-12 11:16:33 -07:00
Richard Jones
b05658735b Enable Python 3.5 testing and fix tests
Fixes to a couple of places to make the python 3.5 tests pass.

Change-Id: I3f4b73b24fbe336ac6c80b7aa224a830ab7e36a6
2016-09-06 14:41:15 +10:00
Jenkins
4f294f84da Merge "Implement file update (edit) in Swift UI" 2016-08-25 01:13:47 +00:00
Jenkins
692d77fa1a Merge "Error in cinder quota RESTful api" 2016-08-24 23:55:06 +00:00