Check and close all the popup messages in one step
and return all the levels of present messages.
There is no longer necessary to use a separate step for checking
presence/absence of Success message, Error message, etc.
Change-Id: I15a0dbe99282f00c5970d9d7d5c9b480989e9e14
Add wait until checkbox is in active state.
Fix edit_image_description_and_name test.
Add wait until the name text box is filled by default name (is not empty).
In the other case selenium write new name into text box faster than default
name is written there so default name then rewrite the new name.
Change-Id: I56803e19dd80180cc432ca872a28a7ee7f41290d
There's an implementation of navigation modules for pages written
in Angular.
Legacy tests for images page are rewritten to work with the new
navigation.
Change-Id: Ib8a40f0adb0a46c9d646c6796a4242988eefa6e3
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
Looks like the popup that comes up after creating instances is no
longer a SUCCESS, but instead it's INFO.
This patch fixes integration tests which were using the incorrect
message class and revisits all other tests skipped with the same
bug number reason.
Change-Id: I0e2976b56513df3cb45ea00e0f9f05603a8743a8
Closes-bug: #1774697
Most units (KB, MB, GB, TB, PB) are shown in an abbreviated format.
The exception were bytes, which where shown as "Bytes". This commit
resolves this inconsistency by showing "B" for byte units.
Change-Id: Ied94c777a70bf8955f5a328ffcb63d98a7a2befd
Closes-Bug: 1411595
Signed-off-by: Iago Estrela <hiagoestrelas@gmail.com>
Also, rename instance_id field to proper port_id.
Before this change, when instance_id was passed from the Instances
page in the URL, the information would be lost on form submission,
and if the form contained an error, the it would be redisplayed with
the port drop-down containing all ports from all instances. This also
made submitting this form slow, as the drop-down would be populated
with all ports on form validation.
It also creates a bug, where if there are more instances than Nova's
pagination allows, the ports from newer instances would no longer
appear in the drop-down, and the form would fail to validate, even
though the choice of port on initial form was correct.
Closes-bug: #1920010
Change-Id: I3ab26c19dc9ea1ed23fcff790d0db919039099eb
Consistency Groups and Consistency Group Snapshots support
already dropped in the horizon during train release. So this patch
removes these parameters from integration_tests/pages/navigation.py
file.
Change-Id: Ia80271f70a2f7a3228d26d5892ea14971bb4d1f2
In python3, super() does not always require a class and self reference.
In other words, super() is enough for most cases.
This is much simpler and it is time to switch it to the newer style.
pylint provides a check for this.
Let's enable 'super-with-arguments' check.
NOTE: _prepare_mappings() method of FormRegion in
openstack_dashboard/test/integration_tests/regions/forms.py is refactored.
super() (without explicit class and self referece) does not work when
a subclass method calls a same method in a parent class multiple times.
It looks better to prepare a separate method to provide a common logic.
Change-Id: Id9512a14be9f20dbd5ebd63d446570c7b7c825ff
The aim of this PS is to fix existing skipped instances
integration tests listed below:
- TestAdminInstances.test_create_delete_instance
- TestInstances.test_create_delete_instance
This PS also resolves Partial-Bug: #1774697
Change-Id: I9c2385274a2725409f61137ae201d868d24a56b4
We don't support Python 2 anymore so we don't need this
compatibility library.
six.reraise usages are left as is until it'll be moved to some
base lib like oslo.utils to not re-implenent this method in
Horizon.
This patch also removes Python2-specific base test case methods
assertItemsEqual and assertNotRegexpMatches in flavor of new
Python 3 analogues.
Change-Id: I26a59176be9e9f213128e4945a58b9459334b626
The aim of this PS is to fix existing skipped
test_users integration test.
This PS also resolves Partial-Bug: #1774697
Change-Id: I8da7c09d712a12369d2ab757e22f44e1bb5f0960
The aim of this PS is to fix existing skipped integration
tests related to volumes and volume_snapshots listed below:
- TestAdminVolumes.test_volume_create_edit_delete
- TestVolumesActions.test_volume_extend
- TestVolumesBasic.test_volume_create_edit_delete
- TestAdminVolumes.test_volumes_pagination
- TestVolumesBasic.test_volumes_pagination
- TestVolumeSnapshotsAdmin.test_create_edit_delete_volume_snapshot
- TestVolumeSnapshotsBasic.test_create_edit_delete_volume_snapshot
- TestVolumeSnapshotsAdmin.test_volume_snapshots_pagination
- TestVolumeSnapshotsAdvanced.test_create_volume_from_snapshot
- TestVolumeSnapshotsBasic.test_volume_snapshots_pagination
This PS also resolves Partial-Bug: #1792028
Change-Id: I31a8d681f87d22ce8486de38ba6c01be9c9cc469
tox env for the integration tests is now renamed to 'integration'
as it is no longer run under python 2.7.
__hash__() method is now defined in integration_tests.helpers.BaseTestCase
to avoid unhashable error during loading django test runner. This is
originally caused by the fact that the base testcase class for integration
tests is implemented on top of testtools and testtools does not define
__hash__() method. In Python 3, __hash__() method must be defined
if a class (re)defines __eq__() method to make the class hashable [1].
Ideally integration base TestCase class can be implemented on top of
Django test case, but the current implementation depends on features
from testtools a lot, so it seems better to add __hash__() method
as a workaround.
Unbound methods don't exist in Python 3[2], so six.create_unbound_method
doesn' work as expected. To dynamic method generation we have to use new
descriptors interface [3] or just generate new
functools.partialmethod [4] function introduced in Python 3.4 to
generate class methods with pre-defined 'path' argument and pass 'self'
as a first function argument for class instance.
[1] https://docs.python.org/3.5/reference/datamodel.html#object.__hash__
[2] https://six.readthedocs.io/#six.create_unbound_method
[3] https://docs.python.org/3/howto/descriptor.html
[4] https://docs.python.org/3/library/functools.html#functools.partialmethod
Change-Id: I5c3078bdc66e33fe676d431bb28d92b35faaf479
pycodestyle 2.5.0 introduces E117 over-indented.
This commit fixes E117 errors.
pycodestyle 2.5.0 also drops pep8.py. As a result,
horizon/test/unit/hacking/test_checks.py starts to fail.
The equivalent elements are provided by pycodestyle.py,
so we can consume pycodestyle instead of pep8 module.
Change-Id: Ib103998f42ce7c901a10669b771a898783ca1a92
Some test servers require the domain parameter for login.
This small change provides support for servers that require
this additional login step.
Change-Id: Ia9f94b687ee6d3318fa61ad3f446b21ed6cfea6a
Closes-Bug: #1802343
Fix the following new errors:
* E305 expected 2 blank lines after class or function definition, found 1
* E126 continuation line over-indented for hanging indent
max_line_length is set to 80 as the default value in pycodestyle is 79
but horizon uses 80 as max_line_length.
Ignore W504 and F405 by configurations.
Reasons of disabling them are explained as comments in tox.ini.
Change-Id: Iee8bcd60c30883fc8c74f08cf20af853cbb5e271
* updated admin user case navigation to admin - overview page on login
* updated test_update_compute_defaults making it specific to compute
* defined test_update_volume_defaults & updated defaults page module
* removed skip decorator for test_create_delete_project as bug 1777359
is resolved
* cleaned up test_flavors and updated flavors page module
Change-Id: If529bfd7bc7fd0e29b42b12e601824ec6d684fca
* fixed 37 tests in total
* restructured and renamed test modules as per horizon
* fixed page navigation & updated method calls
* fixed css selector and xpaths as per horizon
* Removed decorators.skip for working tests
* included decorators.skip for non - working tests
* updated description for tests as per horizon navigation
* removed *update flavor info* and *update flavor access* test, as feature unavailable on horizon
* updated table column name references in page modules
* updated bind table action names as per horizon
* included help page navigation checkpoint
* fixed rc file download drop down selection
* updated page titles in test modules
* included calls as required for spinner disappearance
* updated form fields as per test needs
* updated default ipv4 and subnet for router interfaces
* included string conversion as required for comparisons
* updated cirros image name in horizon.conf
Change-Id: I9fdc810b37443b616bbb82956d1c90a0fa5ebd6b
Bug #1641383 was not fixed for REST API call.
The two implementation of create_image_metadata are merged
into api/glance.py.
There were minor differences in field naming and handling
(min_ vs minimum_, is_public vs public vs visibility).
This commit normalizes them to simplify the logic.
Closes-Bug: #1757136
Change-Id: I41e9d94345151bc4473d704cdc040ed77870ce45
W503 line break before binary operator
Looking at the code base, it sounds okay to follow this check.
Change-Id: Id511e0104dc6de5b204021661d4a8776ca6d3658
Orchestration tab in the admin info panel needs a discussion.
It seems not to be covered by heat-dashboard yet.
blueprint heat-dashboard-split-out
Change-Id: I56e6edb1f2ac72e2f42d0e9f3291308e67f24cad
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
1.As mentioned in [1], we should avoid using dict.iteritems()
to achieve iterators. We can use dict.items instead, as it will
return iterators in PY3 as well. And dict.items/keys will more
readable.
2.In py2, the performance about list should be negligible,
see the link [2].
[1] https://wiki.openstack.org/wiki/Python3
[2] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.htmls
Change-Id: Idba02079d76b529b344ae96cebb7d6161c0ecbc6
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
The signature for MethodType has changed in Python 3,
and the current implementation won't work, to fix this
we are replacing it with the py 2/3 compatible
python-six equivalent, six.create_unbound_method.
http://six.readthedocs.io/#six.create_unbound_method
This is causing the Python 3.5 tests to fail for the
octavia-dashboard when importing the navigation.py
file, throwing the following error.
> TypeError: method expected 2 arguments, got 3
The following review to fix the gate for the
octavia-dashboard is depending on this patch.
https://review.openstack.org/#/c/471611/
This can also be reproduced by simply executing
navigation.py using Python 3.5.
> python3.5 nagivation.py
Change-Id: Iebca15ae962a1aa0825c6ba6d482206531726696
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
The new volume should have the same type as the snapshot that the volume
is created from. Setting a different type will get an error from the API.
This behavior should be the same when creating a volume from the Volumes
tab and the Volume Snapshots tab.
Closes-bug: #1582458
Change-Id: I0443eb5c6cb18538ff76fc49d4018221691a2ea2
This patch enables all of the features for the Flavors panel to use Angular but
disables it, so that it is easy to switch on/off.
Note that we add integration test switches since it can't read the Django
conf.
Note that I changed the common tests to allow for testing of api calls that
don't produce error toasts, because we needed better branch coverage, and
the deleteFlavor api wasn't fully branch-tested.
Change-Id: I92b1b57bd486e5eb87179cb8d44b7551e9de2e0f
Partially-Implements: blueprint ng-flavors
This patch represents the following patches, combined:
---
integration tests: retry WebDriver instantiation when conn refused
https://review.openstack.org/#/c/375042/
We see connection refused which leads to integration test failure randomly.
This seems to come from high load of test infra. This commit retries
WebDriver instantiation when connection refused is returned.
There is no confident this workaround works, but it would be great
if this reduces the number of failures. Let's try.
---
integration test: ensure IPv4 address is extracted
https://review.openstack.org/#/c/374826/
In test_floatingip_associate_disassociate, IPv6 address is passed
to Floating IP associate API. This commit ensures to pick up IPv4
address of an instance.
Change-Id: Iba71d1e17e252527a82cd53c34dca35723367b28
Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
Partial-Bug: #1626643
Closes-Bug: #1626536
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
This patch follows on the example that the Containers set, providing
a 'switch' in the panel-enablement file that currently defaults to
'legacy' (Python-based Images panel) and allows for 'angular' (Angular-
based Images panel).
To be clear, this does NOT enable Angular Images. It's just setting the
stage to do so at some point, or to allow deployers/devs to easily switch
between the two.
A switch both for HORIZON_CONFIG and for integration tests is necessary
due to the way integration tests operate.
Co-Authored-By: Timur Sufiev <tsufiev@mirantis.com>
Change-Id: I12cd33552218ed1082d2d9a2ae8982639a217a6a
Partially-Implements: blueprint angularize-images-table
The policy rule to create subnets requires a target to make the policy check. This implementation does not provide a target, so is not a proper place to use the workflow policy checks. To do this, a more involved approach needs to be used that supplies a target. However, this will be challenging because the target is the network_id that has yet to be created.
This reverts commit 3befade141.
Change-Id: I6af1cbd559034bd5635dfb4360b525714225677d
Volumes and instances integration tests deleted and validated entities
one row at a time, now they are able to delete and validate multiple
rows at a time.
Change-Id: I7f8fdc7e0ccefdd0f6d71f9f92c8a2aefeec8d54
Closes-bug: #1585209