Commit Graph

30 Commits

Author SHA1 Message Date
Spyros Trigazis c0d3683608 Allow cluster config for any cluster state
Similar to what the certificates api does, it doesn't make sense to
disallow cluster config.

story: 2006651
task: 36891

Change-Id: Ia57e95e4570d04c2a20f7674d1ae3e21b8dd8efb
Signed-off-by: Spyros Trigazis <spyridon.trigazis@cern.ch>
2019-10-03 12:26:00 +00:00
Daniel Abad 05ccd7f5fc Add deprecation warnings to magnum client commands
In order to enforce the transition to the new
OpenStack client, added deprecation warnings to the
magnum cluster-list, cluster-show, cluster-update,
cluster-delete, cluster-config, cluster-create,
cluster-template-list, cluster-template-show,
cluster-template-create, cluster-template-delete,
cluster-template-update, ca-sign, ca-rotate,
ca-show and stats-list, commands.

Change-Id: I0103f686e0feb4dad4173ba7aa00768c8e25440d
Partially-Implements: blueprint deprecate-magnum-client
2018-02-27 12:24:35 +00:00
Ricardo Rocha 5e9f07b77c Set --labels default to None on cluster create
Set the default value for --labels to None, so the cluster template value is
used when no explicit labels argument is given on cluster create.

Closes-Bug: #1697651
Change-Id: I284db3f32cd5c8b6541d60c2a86d7d693ffbedea
2017-12-18 14:15:03 +00:00
Ricardo Rocha 57dc025007 Add --labels for cluster-create
Add a labels override parameter on cluster-create to override
the value present on the cluster template.

Partial-Bug: #1697651
Depends-On: I8990c78433dcbbca5bc4aa121678b02636346802

Change-Id: I39f3423f6889ce93021248223600e342f4217cec
2017-09-27 12:16:47 +00:00
Jenkins 83a13e44d8 Merge "OSC: Add cluster config command" 2017-07-27 14:25:23 +00:00
Spyros Trigazis 5f3b69b15c OSC: Add cluster config command
Move certificate generation and config  generation
in magnum utils so that all clusters_shell, bays_shell
and OSC can use.

* Remove / from context name (see #1705480)
* Use absolute paths for the certificates in kubeconfig
  It's the same principle like #1614682

Change-Id: I5b8bb11b199b7646a984c7171f3853d3e73923ec
Implements: blueprint openstackclient-support
Related-Bug: #1705480
Related-Bug: #1614682
2017-07-26 19:05:51 +00:00
Spyros Trigazis 05c2494f0c Remove docker-volume-size from cluster-list
Showing docker-volume-size in cluster-list is excessive information.

Related-Bug: #1697648
Change-Id: I2460fb4a4a0f8c3daca5d49203aaabf5aeb7e2ea
2017-07-24 13:00:22 +00:00
Clenimar Filemon 14774588c0 remove slash from kubernetes cluster context name
magnum names kubernetes clusters context as "default/something",
whose slash may cause some problems with certains tools, such as
kubefed. remove the slash from the context name.

Change-Id: I9b0c64b524d303ed51d5d2f3e0464245bcc66896
Closes-Bug: #1705480
2017-07-20 16:44:58 +02:00
Mark Goddard 899e6c2303 Don't set a default for docker_volume_size
When creating clusters, we should only pass the docker_volume_size
parameter to the magnum API if it was specified by the user. If not,
omitting it allows the API to set a default based on the cluster
template.

Change-Id: I510ff10d708a237be0cb88d3ff7094d7c81f5875
Closes-Bug: #1702314
Related-Bug: #1635244
2017-07-04 16:43:35 +01:00
Ricardo Rocha 0f03836628 Add --docker-volume-size for cluster-create
Add a docker-volume-size override parameter on cluster-create to override
the value present on the cluster template.

Partial-Bug: #1697648

Change-Id: Ib4d4af20dc5bb5fe631802dabe73d8ee341899b1
2017-06-13 09:28:30 +00:00
ricolin 69363f9632 Remove support for keyapir UUID
Remove support for keypair UUID, since it's never been able to use.
Partial-Bug: #1674211

Change-Id: I00ea74abe6e301ff86c4115269ad2b0023c1d901
2017-03-20 19:09:42 +08:00
Jenkins 8ad0230e33 Merge "Allow name as positional argument" 2017-02-23 18:28:50 +00: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
Vijendar Komalla 485637798b Print exception details on update failure
Change-Id: Ifa924da9a2c6a9fa2425b5d1f508ec52feea091c
Closes-Bug: #1664739
2017-02-22 17:37:19 +00:00
Spyros Trigazis 5c2c5d1493 Fix passing TLS_VERIFIED in clusters/bays_shell
Instead of printing a JSON we need to print the env vars.

Change-Id: I154e198ae369569cf3b905cf4c1885a0a3ee6979
Closes-Bug: #1659337
2017-01-25 17:10:10 +01:00
Jenkins 34cd785838 Merge "Mark help messages for Translation" 2017-01-23 17:16:33 +00:00
yatin b68ce22fd1 Fix: swarm cluster-config, bay-config with tls_disabled
magnum cluster-config, bay-config for swarm cluster
didn't work with tls_disabled.

With this patch following is done:-
if tls_disabled then set DOCKER_TLS_VERIFY=""
if not tls_disabled then set DOCKER_TLS_VERIFY=True

Change-Id: I57eb1d49b5157958f9c5f6d89a613896300fdb6e
Closes-Bug: #1647254
2017-01-20 11:14:15 +05:30
yatin f2af2b255f Mark help messages for Translation
Currently only few help messages are marked for translation.

With this patch all the help messages are marked for
translation so that they can be tracked by Zanata bot.

Change-Id: I025e94f5148b32ba2cdcb1fa7ee2219d27da68a1
Closes-Bug: #1653053
2017-01-04 12:18:58 +05:30
yatinkarel afa2281424 Allow cluster-config on cluster status 'ROLLBACK_COMPLETE'
When cluster is updated with --rollback and cluster update
fails the cluster state changes to 'ROLLBACK_COMPLETE'.
We should allow cluster-config to work on 'ROLLBACK_COMPLETE'
state as well.

Change-Id: Iada1aa5451374b881085a3447af6ce6d0cabada6
Closes-Bug: #1652560
2016-12-26 09:53:17 +05:30
Jenkins 47b4c9de59 Merge "Rollback cluster/bay on update failure" 2016-12-16 08:37:36 +00:00
Mike Fedosin 1aed004a50 Rollback cluster/bay on update failure
Rollback mechanism was added in Magnum in patch
https://review.openstack.org/343478 but currently
there is no support on the client side.

This patch add rollback support for Magnum cluster/bay,
user can enable rollback on cluster update failure by specifying
option '--rollback' when executing 'magnum cluster-update',
for example:

magnum cluster-update XXX replace node_count=5 --rollback

The code is based on outdated patch
https://review.openstack.org/347586 and improves it:
 * added rollback support for clusters
 * added API version check in CLI (should be >= 1.3)
 * added several unit tests

Change-Id: Iaae51e084e8ffd69be38512eec8c4c54b158b55e
Co-authored-by: Wenzhi Yu <wenzhi_yu@163.com>
Implements: blueprint bay-rollback-on-update-failure
2016-12-16 07:36:40 +00:00
Hieu LE d6a0d5d268 Magnum cluster-config/bay-config compatible with py3
Fix issue related to bytes (py3) and str (py2) while running magnum
cluster-config/bay-config command.

Also increate code coverage for cluster_shell and bay_shell to 92%.
Overall code coverage now is 75%

Closes-Bug: #1649192
Partially implements: blueprint magnumclient-ut-coverage

Change-Id: I99610eea1e1e24f187baf1bd03c7e4e5a337bc7d
2016-12-14 16:54:04 +07:00
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
Jenkins f31816cd92 Merge "Add --keypair-id for cluster-create" 2016-10-10 08:35:49 +00:00
Stephen Watson 06290d21d1 Add --keypair-id for cluster-create
Adds a keypair-id override parameter on cluster-create
to optionally override the keypair present on the
given ClusterTemplate.

In cluster-template-create, keypair-id is now an optional
parameter.

Fixes old help text referencing Bays/Baymodel.

Change-Id: Iaa934432ec56268c70001579a02658eceaa76b6d
Implements: blueprint keypair-override-on-create
Depends-On: I177a5aa06f881156944a9f74c9ccc3cd2abac492
2016-10-07 13:24:22 -07:00
Hongbin Lu 95bcdd6dbc cluster-config return absolute path
Currently cluster-config returns relative path. In case current
working directory is changed then relative path will not work.
Changes has been made to return absolute path. Which solve the
problem introduced by relative path.

Note: The issue was already fixed in bay-config [1] and this commit
ported it to cluster-config.

[1] https://review.openstack.org/#/c/358403/

Change-Id: Ic27a28e55e2115355febb9d7e405bda5500eda22
Closes-bug: #1614682
2016-09-21 13:07:22 -05:00
Rajiv Kumar 40dfdbb00b Cluster creation command returns complete cluster uuid
Cluster creation command shows complete uuid of the created
cluster.

Change-Id: I69ddbd706a5c6a06c5368db77c8e8d7445c46a11
Closes-bug: #1619543
2016-09-05 09:17:24 +05:30
Vijendar Komalla f12e7a99f9 Magnum client to support sync and async bay opts
Providing support to magnum client for Sync and Async Bay
operations based on the magnum-api-version supplied.

Change-Id: If2ad6ed438a74e47f83a2775560ded413feaf315
Depends-On: I4ca1f9f386b6417726154c466e7a9104b6e6e5e1
2016-08-29 12:45:40 -05: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