mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
pylint
This commit is contained in:
parent
0222a5a056
commit
59cb07269c
@ -29,7 +29,7 @@ class EsxclusterProxySchema(Schema):
|
|||||||
additional_properties = False
|
additional_properties = False
|
||||||
proxytype = StringItem(required=True,
|
proxytype = StringItem(required=True,
|
||||||
enum=['esxcluster'])
|
enum=['esxcluster'])
|
||||||
vcenter = StringItem(required=True, pattern='[^\s]+')
|
vcenter = StringItem(required=True, pattern=r'[^\s]+')
|
||||||
datacenter = StringItem(required=True)
|
datacenter = StringItem(required=True)
|
||||||
cluster = StringItem(required=True)
|
cluster = StringItem(required=True)
|
||||||
mechanism = StringItem(required=True, enum=['userpass', 'sspi'])
|
mechanism = StringItem(required=True, enum=['userpass', 'sspi'])
|
||||||
|
@ -159,7 +159,7 @@ import os
|
|||||||
|
|
||||||
# Import Salt Libs
|
# Import Salt Libs
|
||||||
import salt.exceptions
|
import salt.exceptions
|
||||||
from salt.config.schemas.esxcluster import EsxclusterProxySchema
|
from salt.config.schemas.esxcluster import EsxclusterProxySchema
|
||||||
from salt.utils.dictupdate import merge
|
from salt.utils.dictupdate import merge
|
||||||
|
|
||||||
# This must be present or the Salt loader won't load this module.
|
# This must be present or the Salt loader won't load this module.
|
||||||
@ -222,18 +222,18 @@ def init(opts):
|
|||||||
raise salt.exceptions.InvalidConfigError(
|
raise salt.exceptions.InvalidConfigError(
|
||||||
'Mechanism is set to \'userpass\', but no '
|
'Mechanism is set to \'userpass\', but no '
|
||||||
'\'username\' key found in proxy config.')
|
'\'username\' key found in proxy config.')
|
||||||
if not 'passwords' in proxy_conf:
|
if 'passwords' not in proxy_conf:
|
||||||
raise salt.exceptions.InvalidConfigError(
|
raise salt.exceptions.InvalidConfigError(
|
||||||
'Mechanism is set to \'userpass\', but no '
|
'Mechanism is set to \'userpass\', but no '
|
||||||
'\'passwords\' key found in proxy config.')
|
'\'passwords\' key found in proxy config.')
|
||||||
for key in ('username', 'passwords'):
|
for key in ('username', 'passwords'):
|
||||||
DETAILS[key] = proxy_conf[key]
|
DETAILS[key] = proxy_conf[key]
|
||||||
else:
|
else:
|
||||||
if not 'domain' in proxy_conf:
|
if 'domain' not in proxy_conf:
|
||||||
raise salt.exceptions.InvalidConfigError(
|
raise salt.exceptions.InvalidConfigError(
|
||||||
'Mechanism is set to \'sspi\', but no '
|
'Mechanism is set to \'sspi\', but no '
|
||||||
'\'domain\' key found in proxy config.')
|
'\'domain\' key found in proxy config.')
|
||||||
if not 'principal' in proxy_conf:
|
if 'principal' not in proxy_conf:
|
||||||
raise salt.exceptions.InvalidConfigError(
|
raise salt.exceptions.InvalidConfigError(
|
||||||
'Mechanism is set to \'sspi\', but no '
|
'Mechanism is set to \'sspi\', but no '
|
||||||
'\'principal\' key found in proxy config.')
|
'\'principal\' key found in proxy config.')
|
||||||
|
Loading…
Reference in New Issue
Block a user