HttpRequest.is_ajax() was marked as deprecated since Django 3.1 and will be
removed in Django 4.0 [1].
While the current implementation of is_ajax() relies on a jQuery-specific way
of signifying AJAX as noted in the Django relnotes, horizon works with this.
Thus this commit copies the existing logic of HttpRequest.is_ajax() to the
horizon repo (as horizon.utils.http.is_ajax()) and consumes it.
https: //docs.djangoproject.com/en/4.0/releases/3.1/#features-deprecated-in-3-1
Change-Id: I3def53033524985818a891a1b9d4659fad4ba2ba
Part of the removal of OPENSTACK_NOVA_EXTENSIONS_BLACKLIST (3/3)
Clean up nova extensions related code in the API layer.
Change-Id: I9730095365342cac1023f4112bae4b3a28cdeaf7
Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.
Change-Id: I2de669d8e89b8daeb7ee5405ffab35af6307c40b
The novaclient list_extensions API binding was removed in the
16.0.0 release [1]. The ability to enable/disable extensions
in nova has been deprecated since Liberty [2] and was removed
in Newton [3].
For horizon this only matters for the OPENSTACK_NOVA_EXTENSIONS_BLACKLIST
config setting and some javascript code used to compile panels based on
enabled extensions. In order to work with novaclient 16.0.0+, this
change removes the list_extensions usage since all extensions
are enabled in nova and thus for horizon a nova extension is only
not supported if it's in the configured blacklist. To continue supporting
the javascript code which uses the getExtensions function, the extension
names are hard-coded. Note that the method meant to test that code,
_test_extension_list, was wrong but never ran because of the underscore
prefix on the method name. That is fixed here.
[1] https://review.opendev.org/686516/
[2] https://review.opendev.org/214592/
[3] https://review.opendev.org/351362/
Change-Id: Iebb1e78c718b931d632445e4de6d7a29ccb92be2
Closes-Bug: #1847959
Key type can be selected through both Django and Angular panels.
This change will allow X509 Public Certificates to be imported
or created through Horizon.
Also, the key type is being showed in the keypairs list.
Change-Id: I0a07b4805e6af96f06ec12d2e86708c94946e9c9
Closes-Bug: 1816041
Currently, the flavor list is random on the panel of booting
instance, which is not a good experience for end user. This
patch fixes it and adds test accordingly.
Closes-Bug: #1715042
Change-Id: Id5369ab75487d214a3395ba507b4394d4497903e
- Add use_mox = True to tests which still depend on mox
- Remove use_mox = False from all tests converted into mock
- Update the warning messages
- Replace 'S'-release with 'Stein'
Part of blueprint mock-framework-in-unit-tests
Change-Id: I208185e97b2de346304a09643a9cb3f1425a7683
Signed-off-by: Akihiro Motoki <amotoki@gmail.com>
The current REST API tests have a lot of rooms to be improved like:
- mocking the whole module of the API wrapper
- Some expected status code was 200 wrongly because mock.Mokc()
object was returned from mocked methods. 204 is the correct
response status code.
Change-Id: Ib3d6af27e94fb5577e259078d0215b1ace8617e1
Partial-Bug: #1752917
This patch adds angular server group details page to show details of
the given server group, also shows the server group members under the
current server group.
Change-Id: I5b903972dd4fc5c9f1b52f97bdd7e0852d7d00d3
Partial-Implements: blueprint ng-server-groups
This patch adds delete actions for angular server groups panel.
Change-Id: I9cd887fb315a5523c44c48d284cdea3a6673b3b2
Partial-Implements: blueprint ng-server-groups
This patch adds create server group action for angular server groups
panel.
Change-Id: Ia4354448dcb42bc5e53e2415084f0569a75a68a3
Partial-Implements: blueprint ng-server-groups
In Python 3.5 with Django 2.0 env, some tests fail.
This commit fixes them.
blueprint django2-support
Change-Id: Ib5ba46d501956ebc7d4f69f17ee86f44319418d2
This patch changes mox to mock for the following test modules:
* openstack_dashboard/test/unit/api/test_nova.py
* openstack_dashboard/test/unit/api/rest/test_nova.py
Partially-Implements: blueprint mock-framework-in-unit-tests
Change-Id: I894ba4f1ab2123ce36f451013d8f7ebd70d9bd0f
This commit relocates test codes in openstack_dashboard
according to blueprint relocation-test-codes.
Change-Id: I397a5a47fe9c1bf3a498c22056d924bf409c514b