Merge "Remove the invariable value in string.format()"

This commit is contained in:
Jenkins 2017-05-24 01:37:03 +00:00 committed by Gerrit Code Review
commit 741c6d5be9
1 changed files with 3 additions and 6 deletions

View File

@ -53,12 +53,9 @@ for element in passwords:
nsname = 'kolla_kubernetes_namespace'
nsname = KollaKubernetesResources.GetJinjaDict()[nsname]
if command == "create":
command_line = 'kubectl create secret generic {} {}{} {}{}'.format(
service_name,
" --from-literal=password=",
password_value,
"--namespace=",
nsname)
command_line = "kubectl create secret generic {} " \
"--from-literal=password={} --namespace={}".format(
service_name, password_value, nsname)
else:
command_line = "kubectl delete secret {} --namespace={}".format(
service_name, nsname)