Fix lint
This commit is contained in:
parent
ba8e315eed
commit
a6c3b85fe1
|
@ -242,13 +242,7 @@ class VaultDestinationPlugin(DestinationPlugin):
|
||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
cert = parse_certificate(body)
|
cert = parse_certificate(body)
|
||||||
|
cname = common_name(cert)
|
||||||
cn = common_name(cert)
|
|
||||||
ou= organizational_unit(cert)
|
|
||||||
o= organization(cert)
|
|
||||||
l= location(cert)
|
|
||||||
s= state(cert)
|
|
||||||
c= country(cert)
|
|
||||||
|
|
||||||
url = self.get_option("vaultUrl", options)
|
url = self.get_option("vaultUrl", options)
|
||||||
auth_method = self.get_option("authenticationMethod", options)
|
auth_method = self.get_option("authenticationMethod", options)
|
||||||
|
@ -293,23 +287,23 @@ class VaultDestinationPlugin(DestinationPlugin):
|
||||||
client.secrets.kv.default_kv_version = api_version
|
client.secrets.kv.default_kv_version = api_version
|
||||||
|
|
||||||
t_path = path.format(
|
t_path = path.format(
|
||||||
CN=cn,
|
CN=cname,
|
||||||
OU=ou,
|
OU=organizational_unit(cert),
|
||||||
O=o,
|
O=organization(cert),
|
||||||
L=l,
|
L=location(cert),
|
||||||
S=s,
|
S=state(cert),
|
||||||
C=c
|
C=country(cert)
|
||||||
)
|
)
|
||||||
if not obj_name:
|
if not obj_name:
|
||||||
obj_name = '{CN}'
|
obj_name = '{CN}'
|
||||||
|
|
||||||
f_obj_name = obj_name.format(
|
f_obj_name = obj_name.format(
|
||||||
CN=cn,
|
CN=cname,
|
||||||
OU=ou,
|
OU=organizational_unit(cert),
|
||||||
O=o,
|
O=organization(cert),
|
||||||
L=l,
|
L=location(cert),
|
||||||
S=s,
|
S=state(cert),
|
||||||
C=c
|
C=country(cert)
|
||||||
)
|
)
|
||||||
|
|
||||||
path = "{0}/{1}".format(t_path, f_obj_name)
|
path = "{0}/{1}".format(t_path, f_obj_name)
|
||||||
|
|
Loading…
Reference in New Issue