We have nova policies for all of these so should observe them. Otherwise
if a user e.g. doesn't have rights to view the console log of a VM they
will get an error every time they click on an instance name.
Change-Id: I78bb67621c4c0aea0a06bf10e9fe07a618ce8766
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
This patch allows to set admin password at Angular Launch Instance
dialog when 'can_set_password' is true in OPENSTACK_HYPERVISOR_FEATURES.
Closes-Bug: #1439905
Closes-Bug: #1609777
Change-Id: I3307521df524da30b910f0001165cefa2be6c8bb
It is easy enough to create instances in the wrong project.
This patch displays project name at launch instance dialog.
Closes-Bug: #1895588
Change-Id: Ied681bc3d1b4213bd6bacb3042b377ec2ac10855
Setting MTU is now available for network creation on project and
admin panels.
Closes-Bug: #1549636
Change-Id: I384a6b78eaf75d9c0373cdfa51c3ea5f53f63e6b
Although Key Pair step at NG Launch Instance dialog automatically picks
a key pair, it's better to make key pair step as required explicitly when
'requires_keypair' is set to true in OPENSTACK_HYPERVISOR_FEATURES.
Closes-Bug: #1765024
Change-Id: I28b0f54fed0dac86e300fb9ed65c16e0dd2aef36
The last bunch of "spec has ho expectations" warnings is fixed
for the latest Jasmine. The option failSpecWithNoExpectations
is set to true now.
Related-Bug: #1894127
Change-Id: I87d6a3e0a21eb8f3e5a548d7fdd0ae01bbda54e1
This patch updates outdated JavaScript dev dependencies.
The latest Jasmine version makes nested beforeEach and unhandled
promise rejection fail, this was fixed.
Also, the latest Jasmine version runs tests in random order by default,
random is set to false for now to prevent tests failures.
Finally, the latest Jasmine version supports a new configuration option
failSpecWithNoExpectations. By default, this option is set to false and
Jasmine reports specs that have no expectations as passed. Setting this
option to true tells Jasmine to report specs without as expectations as
failed. For now, it is set to false for openstack-dashboard tests, this
should be changed in future.
Change-Id: I04d5c3ce7f7e0a9a38251e975b68bfa1998e556f
Containers page uses the standard Magic Search filtering, however its
full text search option doesn't work.
This patch makes the filtering work properly with full text search.
Closes-Bug: #1902610
Change-Id: Ie784d187c89eba1a2673ecafd72e903115a264d3
The issue was that the filtering opts like project_name, image_name,
flavor_name that are not supported by nova API (non-api filters) do
not work expectedly. These filters are mapped to their IDs [1], but
an instance list retrieved before resolving non-API filters is used [2].
This commit changes the logic to resolve non-API filters first and
then retrieve instances using the updated search_opts.
Note that the image list is handled a bit specially. If 'image_name'
is specified as a filter, we retrieve a corresponding image detail
first before fetching instances to resolve the image name into its ID.
Otherwise, we retrieve images only related to instances retrieved
and this happens after retrieving instances.
[1] f90c3cd501/openstack_dashboard/dashboards/admin/instances/views.py (L166)
[2] f90c3cd501/openstack_dashboard/dashboards/admin/instances/views.py (L154)
Closes-Bug: #1888490
Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
Change-Id: Id43adbd44778d3375c0d49da3f7530cbb99e16fe
Part of the removal of OPENSTACK_NOVA_EXTENSIONS_BLACKLIST (2/3)
References to nova extensions are cleaned up.
The logic to fetch nova extension list is finally dropped.
Change-Id: If4876634276eff37ab0a18a49e6e97851d41911b
Part of the removal of OPENSTACK_NOVA_EXTENSIONS_BLACKLIST (1/3)
All references of nova extensions in the python code are cleaned up.
Note that the API layer is not touched yet as it is used by the
JavaScript side.
Change-Id: I66cd0a9629253a6462aace9902ef8200b94b2a21
openstack_dashboard/dashboards/project/floating_ips/tests.py:
The floating IP panel implementation calls
openstack_dashboard.usage.quotas.tenant_quota_usages, but
its unit test mocks functions called inside tenant_quota_usages.
tenant_quota_usages itself should be mocked.
openstack_dashboard/test/unit/usage/test_quotas.py:
Mocked methods were not verified test_tenant_quota_usages_non_legacy.
Verifications for called methods are added.
Mocking floating_ip_supported is dropped as it is not called and
there is no need to mock it.
Change-Id: Iad66c882738fd90eb6dd6de3df96459c10a29aa2
The most elegant way to add pagination is to refactor the table using
<hz-dynamic-table> which already contains pagination instead of wiring
it to the existing table framework.
This solution adds the pagination and makes the code more readable.
Partial-Bug: #1859423
Change-Id: I3816d5b9c69701707d044018a8b45174eb901b3a
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
'unnecessary-comprehension' warning is emitted when
unnecessary use of a comprehension is found.
classes attribute in Action can be a tuple,
so we need list() to ensure it is a list before adding 'disabled'.
I think it is time to introduce a method in Action class or somewhere
but it should be handled separately.
Change-Id: I16a98d56b6d0bd0af234b00735c6ed576620df7e
This pylint check 'no-else-return' might be debatable.
but as far as I checked it works in most cases.
Change-Id: Ie8574d4a529454c6e050fa62a7a17ea097d00240
This patch is a follow-up patch of
64db185c7942721d32308245b1527f2367dceb21
which adds unit tests for the change.
Add message_level to cinder message test data.
Add third cinder message to make tests more robust.
Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
Change-Id: I6be88fbacf998a2ba36fea5a776cd4215cdaba0f
Patch I0cfe9090e8263f983fa5f42f42616a26407be47a adds hypervisor hostname
to the instance details view. This patch adds the rest of instance
attributes allowed by 'os_compute_api:os-extended-server-attributes'
policy.
Change-Id: Id39ee14e3054422a96248f8cdd0a5bf07c27f2fc
Closes-Bug: #1874273
Currently "then" callback functions for these tests aren't called since
digest cycles were never triggered. Jasmine Spec Runner marks them 'passed'
only adding "SPEC HAS NO EXPECTATIONS" into their names.
This patch triggers a digest by calling a scope's $apply functions in a
correct place, deals with timeout properly and makes the tests work.
Closes-Bug: #1894127
Change-Id: I00acc4b13fa0cc05b8c6ccd2024084527562f001
Django provides safer ways to override settings.
We should avoid direct replacement of existing setting.
Change-Id: I1fbcb79d18baaae037536b180989cf69c198fa7d
We dropped glance v1 support in ussuri.
glance v1 related tests still exist in the project instance test.
Change-Id: I3079c579a1f3d42e5b02fc224f7677ea86583a7e