Remove usage of six

Six is not used anymore for python3

Change-Id: I2734efe490014d164b53caa164ac491c53c8e09c
This commit is contained in:
songwenping 2022-04-19 15:33:38 +08:00
parent 1473bfe29c
commit 5d33d80371
6 changed files with 7 additions and 6 deletions

View File

@ -14,7 +14,7 @@ apiVersion: v1
appVersion: v1.0.0
description: OpenStack-Helm Keystone
name: keystone
version: 0.2.22
version: 0.2.23
home: https://docs.openstack.org/keystone/latest/
icon: https://www.openstack.org/themes/openstack/images/project-mascots/Keystone/OpenStack_Project_Keystone_vertical.png
sources:

View File

@ -22,7 +22,6 @@ import logging
import os
import pwd
import re
import six
import subprocess #nosec
import sys
import time
@ -96,7 +95,7 @@ def read_from_files():
def get_keys_data():
keys = read_from_files()
return dict([(key, base64.b64encode(value.encode()).decode())
for (key, value) in six.iteritems(keys)])
for (key, value) in keys.items()])
def write_to_files(data):
@ -110,7 +109,7 @@ def write_to_files(data):
gid = grp.getgrnam(KEYSTONE_GROUP).gr_gid
os.chown(FERNET_DIR, uid, gid)
for (key, value) in six.iteritems(data):
for (key, value) in data.items():
with open(FERNET_DIR + key, 'w') as f:
decoded_value = base64.b64decode(value).decode()
f.write(decoded_value)

View File

@ -14,7 +14,7 @@ apiVersion: v1
appVersion: v1.0.0
description: OpenStack-Helm Neutron
name: neutron
version: 0.2.15
version: 0.2.16
home: https://docs.openstack.org/neutron/latest/
icon: https://www.openstack.org/themes/openstack/images/project-mascots/Neutron/OpenStack_Project_Neutron_vertical.png
sources:

View File

@ -36,7 +36,7 @@ Usage example for Neutron metadata agent:
"""
import httplib2
from six.moves import http_client as httplib
from http import client as httplib
import json
import os
import psutil

View File

@ -38,4 +38,5 @@ keystone:
- 0.2.20 Enable taint toleration for Openstack services
- 0.2.21 Updated naming for subchart compatibility
- 0.2.22 Remove older values overrides
- 0.2.23 Remove usage of six
...

View File

@ -29,4 +29,5 @@ neutron:
- 0.2.13 Enable taint toleration for Openstack services
- 0.2.14 Migrate IP from bridge for auto_bridge_add
- 0.2.15 Remove unsupported values overrides
- 0.2.16 Remove usage of six
...