Skip to content

Commit

Permalink
Esxi dvs (#34352)
Browse files Browse the repository at this point in the history
* Better error messages when proxy fails to start

* Complete module to add host & migrate adapters to DVS

* Lint, and add documentation for function parameters.

* Lint, rebase.
  • Loading branch information
cro authored and Nicole Thomas committed Jun 30, 2016
1 parent 70e1f18 commit a8cc887
Show file tree
Hide file tree
Showing 2 changed files with 284 additions and 61 deletions.
14 changes: 8 additions & 6 deletions salt/minion.py
Original file line number Diff line number Diff line change
Expand Up @@ -2949,10 +2949,11 @@ def _post_master_init(self, master):
).compile_pillar()

if 'proxy' not in self.opts['pillar']:
log.error('No proxy key found in pillar for id '+self.opts['id']+'.')
log.error('Check your pillar configuration and contents. Salt-proxy aborted.')
errmsg = 'No proxy key found in pillar for id '+self.opts['id']+'. '+\
'Check your pillar configuration and contents. Salt-proxy aborted.'
log.error(errmsg)
self._running = False
raise SaltSystemExit(code=-1)
raise SaltSystemExit(code=-1, msg=errmsg)

fq_proxyname = self.opts['pillar']['proxy']['proxytype']
self.opts['proxy'] = self.opts['pillar']['proxy']
Expand Down Expand Up @@ -2987,10 +2988,11 @@ def _post_master_init(self, master):

if ('{0}.init'.format(fq_proxyname) not in self.proxy
or '{0}.shutdown'.format(fq_proxyname) not in self.proxy):
log.error('Proxymodule {0} is missing an init() or a shutdown() or both.'.format(fq_proxyname))
log.error('Check your proxymodule. Salt-proxy aborted.')
errmsg = 'Proxymodule {0} is missing an init() or a shutdown() or both. '.format(fq_proxyname)+\
'Check your proxymodule. Salt-proxy aborted.'
log.error(errmsg)
self._running = False
raise SaltSystemExit(code=-1)
raise SaltSystemExit(code=-1, msg=errmsg)

proxy_init_fn = self.proxy[fq_proxyname+'.init']
proxy_init_fn(self.opts)
Expand Down
Loading

0 comments on commit a8cc887

Please sign in to comment.