Commit Graph

16 Commits

Author SHA1 Message Date
Sean McGinnis 3eafa2a001
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: I4a5b1ec999110a50fc904f3ae93e3983efa64f88
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-18 11:58:37 -05:00
Ricardo Rocha ab8392c44c Add hidden property to cluster template
Add a new 'hidden' property to cluster template creation, allowing
operators to hide cluster templates from user listings.

The flag is controlled by two cmd line parameters, --hidden (true) and
--visible (false).

Change-Id: Id1dcf1dabb09b357923d3dda36eafa42377e4f35
Story: 2004941
Task: 29342
2019-02-06 15:26:42 +01:00
M V P Nitesh c165071ff8 Now cluster-template-update works for "labels"
Now we are handling the label values converting them as a dictionary.
But as magnum-api only accepts the input as string. We are converting
the dictionary into string and passing to magnum-api. It is parsing
the string to dictionary and storing the label value a dictionary.

Change-Id: I2cec19e24c6dd32e209ca65a26a2f1999d8289e0
Depends-on: I4d64da78dc4ed4d5599533b54861b65bce609c28
Closes-Bug: #1659189
2018-02-20 14:12:53 +00:00
Costin Gamenț a6a76a31dc Add disable floating ip parameter
Fix behaviour of --floating-ip-enabled and add --floating-ip-disabled.
Removed default setting of floating_ip_enabled API call parameter from
the clients (now the API default is used if it's not explicitly set in
the client arguments).

Change-Id: I9e01addaab17a0d37bb2fed10b4672d421bc1e09
Closes-Bug: #1639119
2018-01-30 16:25:51 +01:00
Jenkins 7d5539f28e Merge "Add the support for 'detail' flag" 2017-06-07 07:40:37 +00:00
Madhuri Kumari 2850d1714f Add the support for 'detail' flag
Magnum API supports a 'detail' flag to show the list
of cluster templates with details but that was not supported
at client.
So this patch adds the support for cluster-template-list command.

Change-Id: I7df73aae1c489132aaf091d162b1d081e65f09c7
Partial-Bug: #1674314
2017-06-06 05:03:00 +00:00
coldmoment 9e372baad4 Magnum client suport insecure_registry
Change-Id: Iaf2c967d4d145aea8c3c127a2c1169105479d98a
Partially-Implements: blueprint support-insecure-registry
2017-05-12 14:33:26 +08:00
Jason Dunsmore cb8edde0b6 Allow name as positional argument
Make "magnum cluster-create" and "magnum cluster-template-create"
accept name as a positional like the other magnum subcommands.

Implements: blueprint positional-name
Change-Id: Ie505ef8ea7e4c13ed2795cde826b9822d094aaeb
2017-02-22 14:06:14 -05:00
Hieu LE de91fd3e0a Remove H903 error in sources.
Some codes in python magnumclient use Windows style
line endings, this violates H903 error pep8.

Change-Id: I4f5424403a5187d6845d59d005be2324ff40f354
Closes-Bug: #1658845
2017-01-24 08:17:11 +07:00
yatin 19e61f295e Use assert_called_*/assert_not_called to verify mock calls
Currently assertTrue and assertFalse are used to check
wheter a mock method is called. It is not checked whether
mock method is called with correct set of arguments.
With this patch following modules uses assert_called_* and
assert_not_called instead of assertTrue and assertFalse.

- magnumclient/tests/v1/test_baymodels_shell.py
- magnumclient/tests/v1/test_clustertemplates_shell.py

Change-Id: Id722b11a46e62c3aa8555ef6bcf77ea334752249
Partially-Implements: blueprint magnumclient-ut-coverage
2016-11-17 12:39:35 +05:30
yatinkarel 6e11ccb082 Fix: some typos in unit test
'--fixed-network private-subnet ' -> '--fixed-subnet private-subnet '
'--server-type vm' -> '--server-type vm '
'--coe swarm' -> '--coe swarm '

Change-Id: I82b9eaf649e14f97e08b2324ff370d528a1d033f
2016-11-16 19:43:54 +05:30
Jenkins 51b26ec9f6 Merge "Renames *-id parameters" 2016-11-15 19:35:18 +00:00
Stephen Watson 503bb3d21b Renames *-id parameters
Deprecates the *-id paramaters in Magnum client using
the cliutils deprecation map decorator.

Implements blueprint rename-id-parameter-names

Change-Id: Idc6b9322ec7c0ecb386162ca46c7d49b910685d8
2016-11-15 10:01:28 -07:00
yatin 7a38e426a3 Increase UT coverage
UT Coverage for following is increased:
- magnumclient/tests/v1/test_baymodels_shell.py
- magnumclient/tests/v1/test_clustertemplates_shell.py

Change-Id: Ie14890a0daf61fa63d5a7e4b3a15fbbd7789b9cc
Partially-Implements: blueprint magnumclient-ut-coverage
2016-11-08 13:38:28 +05:30
OTSUKA, Yuanying 3652bbea60 Add floating_ip_enabled attributes to baymodel
floating_ip_enabled option is added by server, so we should add
this option to client too.

Change-Id: I971ef74f0cc79346a76c1faba55777b0a44465da
Partial-Implements: blueprint bay-with-no-floating-ips
Depends-On: I99677221250480b43a4b95ebf460c43bc77090ad
2016-08-29 14:18:34 +09:00
Stephen Watson d9ae385588 Adds 'cluster' and 'cluster template'
Add new base classes for Bay and Cluster to inherit from.
Add new tests for cluster and cluster_template code.
Leaves all commands in-place and adds new cluster-related
commands for magnumclient.
Add deprecation decorator and messages for bay/baymodel.

Implements: blueprint rename-bay-to-cluster
Change-Id: I64e1aa6a71b109687568005655c6de55f86fad29
2016-08-23 17:14:23 +00:00