library/ceph_volume.py: remove six dependency

The ceph nodes couldn't have the python six library installed which
could lead to error during the ceph_volume custom module execution.

  ImportError: No module named six

The six library isn't useful in this module if we're sure that all
action variables passed to the build_ceph_volume_cmd function are a
list and not a string.

Resolves: #4071

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit a64a61429d)
pull/4279/head
Dimitri Savineau 2019-07-12 10:19:48 -04:00 committed by Guillaume Abrioux
parent 8ca88b41cc
commit 5e273a9072
1 changed files with 2 additions and 3 deletions

View File

@ -3,7 +3,6 @@ import datetime
import copy import copy
import json import json
import os import os
import six
ANSIBLE_METADATA = { ANSIBLE_METADATA = {
'metadata_version': '1.0', 'metadata_version': '1.0',
@ -217,7 +216,7 @@ def build_ceph_volume_cmd(action, container_image, cluster=None):
if cluster: if cluster:
cmd.extend(['--cluster', cluster]) cmd.extend(['--cluster', cluster])
cmd.extend(action if not isinstance(action, six.string_types) else [action]) cmd.extend(action)
return cmd return cmd
@ -416,7 +415,7 @@ def list_storage_inventory(module, container_image):
List storage inventory. List storage inventory.
''' '''
action = 'inventory' action = ['inventory']
cmd = build_ceph_volume_cmd(action, container_image) cmd = build_ceph_volume_cmd(action, container_image)
cmd.append('--format=json') cmd.append('--format=json')