24 Commits

Author SHA1 Message Date
songwenping
a7278fce3e remove unicode from code
Co-authored-by: Jake Yip <jake.yip@ardc.edu.au>

Change-Id: I8f49f06df3894bda78c52a690bf0d712e33d862c
2023-09-14 21:04:21 +10:00
manchandavishal
e203d7791f Fixed Unit test for magnum-ui
After 7052b7f065 merged in openstack/horizon a new Unit
test class introduced in horizon i.e. RestAPITestCase.
This patch updates magnum-ui to import RestAPITestCase
class instead of TestCase. For more info. see [1]

[1] https://review.opendev.org/c/openstack/horizon/+/827097/2/openstack_dashboard/test/helpers.py#485

Change-Id: I4ef0cd315e615e390f15a8fa16fe4aaa380a2470
2022-03-31 17:11:24 +05:30
Sean McGinnis
8cf50a15b5
Use unittest.mock instead of third party mock
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: Ie3c9acbcfd21a7ef02c48dace486e80c502f0833
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-18 11:54:06 -05:00
jacky06
74a312d6ed Update json module to jsonutils
oslo project provide jsonutils, and magnum use it in many place[1],
this PS to update the remained json module to oslo jsonutils for
consistency.

[1]: https://github.com/openstack/magnum/search?utf8=%E2%9C%93&q=jsonutils&type=

Change-Id: I06910797c44c2b1bd2297d4398da9ab984a8f770
2019-03-06 15:32:52 +08:00
jacky06
4618a32fec Update hacking version
Use latest release 1.1.0 and compatible changes w.r.t pep8

Change-Id: I4fbccf98e81ba2ce19210101593011ac3de086ac
2019-01-10 11:29:56 +08:00
Ivan Kolodyazhny
7c4d4199e0 Rename test files to test_* pattern
We're going to switch to default Django test runner by default.
This patch renames test files to make tests descoverable by
Nose and Django test runners without addidional configuration.

This patch alse removes executable flag from test/helpers.py.

Related blueprint: improve-horizon-testing

Change-Id: I495a2ec583ca9ae1df442059ffa9e4abc94d3528
2018-06-04 13:15:31 +00:00
Shu Muto
32aeaeffe6 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/stable/user/ignoring-errors.html

Change-Id: Ieeb62e8d66e626ab2e6cd506ce3a9854c69d5643
2017-06-23 12:53:22 +09:00
Shu Muto
40394040e3 Refresh test environment
To enable py35 tests, refresh test environments.
Also, update docs, remove run_tests.sh that is no longer used.

Change-Id: I9bcf4acdfd4a9811ab2f0fc3bd02898a46fbd112
2017-04-13 15:17:13 +09:00
howardlee
e5d939ad3d Remove mox in helpers.py
Replace mox with mock in helpers.py

Change-Id: I277ecce0a2b1af0cbd0f1cd06403c2f318e254a4
Partially-Implements: blueprint remove-mox-ocata
2016-11-30 21:45:28 +08:00
Nguyen Hung Phuong
535866b090 Clean imports in code
In some part in the code we import objects. In the Openstack style
guidelines they recommend to import only modules.

http://docs.openstack.org/developer/hacking/#imports

Change-Id: I77494f0ad9109a62ba46280eab9ab79b7068fa84
2016-09-15 13:26:11 +07:00
Shu Muto
21afc6c0d5 Use "cluster" and "cluster_template" of magnumclient
This patch changes "bay" and "baymodel" of magnumclient to
"cluster" and "cluster_template", as last change for renaming
bay to cluster.

Change-Id: I77b6dc02738a1c455274bdb34bddcc91e21a30cb
Implements: blueprint rename-bay-to-cluster
2016-09-13 16:41:19 +09:00
Shu Muto
415cb2f64f Add REST api for Certificates
This patch adds REST API for Certificates.

Change-Id: Ifb97de4536e00bdfc806f579784609d9bdac1911
Partial-Implements: blueprint cluster-certificates
2016-09-06 13:24:35 +09:00
Rob Cresswell
1b398928f8 Fix tox and tests
Fixes a bunch of missing __init__.py files to make the docs job pass
without warnings, also cleans up tox (to move away from run_tests)

Change-Id: If305c701b4d601e66f1f9987d2dd70d6634ea624
2016-08-30 14:05:11 +01:00
Shu Muto
8d7104be1a Add cluster template options
Following updates of magnumclient, this patch adds
some properties to cluster template creation and views.

To spec section:
- docker_storage_driver: 'devicemapper' or 'overlay', default='devicemapper'

To network section:
- fixed_subnet: string
- floating_ip_enabled: boolean, default=True
- master_lb_enabled: boolean, default=False

Change-Id: Ibeb9933e68f533b0aea3b6951a3c293dc85343e4
Implements: blueprint cluster-template-options
Depends-On: I971ef74f0cc79346a76c1faba55777b0a44465da
2016-08-29 16:37:20 +09:00
Shu Muto
04c6e4433a Rename bay and baymodel for 'Soft StringFreeze' milestone
"bay" and "baymodel" is not common term.
This patch renames "bay" to "cluster", and "baymodel" to
"cluster template" for 'Soft StringFreeze'[1] in Newton
Release Schedule[2].

[1] Soft StringFreeze: Aug 29 - Sep 02
[2] https://releases.openstack.org/newton/schedule.html

For translation work, this patch should focus to changing
strings to be translated and should be merged soon.

So, until "cluster" and "cluster template" is implemented
into Magnum API, Magnum-UI uses bay and baymodel of magnumclient.

Change-Id: I0db5472c4f19638cc57116101b552ad21fe34651
Implements: blueprint rename-bay-to-cluster
2016-08-26 18:23:01 +09:00
Shu Muto
b31c2bfc90 Rename service to 'container-infra'
Magnum renames its service_type [1]. According to that,
this patch renames service name, Angular module name,
related URLs and related strings.

[1] https://bugs.launchpad.net/magnum/+bug/1584251

Change-Id: If730ff75826b7f6d50b308b78f8e881da6696966
Implements: blueprint rename-service
2016-05-30 10:50:31 +09:00
shu-mutou
bf4897e6f6 Remove Container panel and action
According to decisions that Magnum becomes COE Management Service,
Magnum-UI should remove Container panel and actions that is for
Docker Swarm container manipulations.

This patch removes following items.
- Container views (table and detail)
- Container actions (create and delete)
- Create Container action from bay table view and bay detail view

Change-Id: Ia18e9fa57e0460b9b1a8b473a005d31cb4acc5ca
Implements: blueprint remove-container-panel
2016-05-12 18:10:37 +09:00
Rob Cresswell
cd7870b3f8 Fix workflow display and markup
This patch aligns the workflow markup with Horizon so that it can
correctly inherit styles, works with the theme swap patch, and performs
better with accessibility tools.

Also noted that "BayModel" and "Bay Model" were used all over. We
should settle on the correct term, "Baymodel".

Closes-Bug: 1554527
Change-Id: I2cadcfbb338903c379b40ebc4a39d844065fdb12
2016-03-24 11:46:22 +00:00
Hongbin Lu
1bf9bd005a Remove unused attribute "ssh_authorized_key"
Change-Id: I9d4b32c9e93d3c450a2d90366e07a6c4c0f59f8d
2016-03-22 00:43:42 -04:00
shu-mutou
c955cba77c Add create action to containers panel
This patch adds create button to containers table action,
and container create form as workflow dialog.

Implements: blueprint container-create

Change-Id: I7e47e80109ed5b25b62f5fb774ec3a7610c8caef
2015-11-17 09:55:14 +09:00
shu-mutou
6d50eadcfb Revice REST APIs
Revice REST APIs and tests for BayModel and Container.

Change-Id: I78f0b0100c375187b38215aeb1f1e2fef2e07c1e
Closes-Bug: #1508778
2015-10-22 13:42:27 +09:00
shu-mutou
4738b11e07 Add create action to bay panel
Change-Id: I65100b9f2e52b35e727c077a7ed1c75900cd2b8b
Partially Implements: blueprint bay-create
Co-Authored-By: OTSUKA, Yuanying<yuanying@fraction.jp>
2015-10-22 12:11:40 +09:00
Rob Cresswell
4527b6c7c5 Add API for container create, delete, list, show
This patch adds basic API calls for Containers, as well as the testing
infrastructure necessary to test these API calls.

Also adds some basic testing for Bays and Bay Models.

Change-Id: I7cb5dfbd32695c95a414b8d41aa0aa178fe2472e
Implements: blueprint container-api
2015-10-20 17:52:54 +01:00
Bradley Jones
c17cc5beb4 Initial skeleton repo
Add the basic structure for the magnum-ui repository to serve as a 
starting point for contributions. The structure is likely to change
as development progresses.

Change-Id: I5458741e2dd4c3409992315efaa60b33824b4ec8
Implements: blueprint repo-skeleton
2015-09-08 23:02:28 +00:00