Browse Source

Use overlay2 driver by default

Also print deprecation message for devicemapper and overlay.

Change-Id: Idff7f518485528da45430ae85a1580ed9d306330
tags/3.2.0^0
Bharat Kunwar 1 month ago
parent
commit
3da3b4896f
2 changed files with 9 additions and 3 deletions
  1. +8
    -2
      magnumclient/osc/v1/cluster_templates.py
  2. +1
    -1
      magnumclient/tests/osc/unit/v1/test_cluster_templates.py

+ 8
- 2
magnumclient/osc/v1/cluster_templates.py View File

@@ -151,9 +151,9 @@ class CreateClusterTemplate(command.ShowOne):
'--docker-storage-driver',
dest='docker_storage_driver',
metavar='<docker-storage-driver>',
default='devicemapper',
default='overlay2',
help=_('Select a docker storage driver. Supported: devicemapper, '
'overlay. Default: devicemapper'))
'overlay, overlay2. Default: overlay2'))
parser.add_argument(
'--http-proxy',
dest='http_proxy',
@@ -278,6 +278,12 @@ class CreateClusterTemplate(command.ShowOne):
elif len(parsed_args.floating_ip_enabled) == 1:
args['floating_ip_enabled'] = parsed_args.floating_ip_enabled[0]

deprecated = ['devicemapper', 'overlay']
if args['docker_storage_driver'] in deprecated:
print("WARNING: Docker storage drivers %s are deprecated and will "
"be removed in a future release. Use overlay2 instead." %
deprecated)

ct = mag_client.cluster_templates.create(**args)
print("Request to create cluster template %s accepted"
% parsed_args.name)


+ 1
- 1
magnumclient/tests/osc/unit/v1/test_cluster_templates.py View File

@@ -28,7 +28,7 @@ class TestClusterTemplate(magnum_fakes.TestMagnumClientOSCV1):
default_create_args = {
'coe': 'kubernetes',
'dns_nameserver': '8.8.8.8',
'docker_storage_driver': 'devicemapper',
'docker_storage_driver': 'overlay2',
'docker_volume_size': None,
'external_network_id': 'public',
'fixed_network': None,


Loading…
Cancel
Save