Simplify code by using mask_dict_password (again)

A patch to oslo.utils was done to make mask_dict_password() work like
mask_password(). Using mask_dict_password() makes the code simpler and
easier to understand.

There was a previous patch (6ad85298c4)
similar to this but it missed changing this occurrence.

Change-Id: I25233e49555cee9f856c755b63234cb7ab31d6aa
This commit is contained in:
John L. Villalovos
2016-08-08 09:32:44 -07:00
parent a2236ffcc1
commit 0a8d39a9e9

View File

@@ -16,7 +16,6 @@
# License for the specific language governing permissions and limitations
# under the License.
import ast
import collections
import time
@@ -787,8 +786,8 @@ class BaseAgentVendor(AgentDeployMixin, base.VendorInterface):
ndict = node.as_dict()
if not context.show_password:
ndict['driver_info'] = ast.literal_eval(
strutils.mask_password(ndict['driver_info'], "******"))
ndict['driver_info'] = strutils.mask_dict_password(
ndict['driver_info'], "******")
return {
# heartbeat_timeout is a config, so moving it into the