def _get_ssl_opts():
 sslopts = __salt__['config.option']('cassandra').get('ssl_options', None)
 ssl_opts = {}
 if sslopts:
  ssl_opts['ca_certs'] = sslopts['ca_certs']
  if (SSL_VERSION in sslopts):
   if (not sslopts[SSL_VERSION].startswith('PROTOCOL_')):
    valid_opts = ', '.join([x for x in dir(ssl) if x.startswith('PROTOCOL_')])
    raise CommandExecutionError('Invalid protocol_version specified! Please make sure that the ssl protocolversion is one from the SSLmodule. Valid options are {0}'.format(valid_opts))
   else:
    ssl_opts[SSL_VERSION] = getattr(ssl, sslopts[SSL_VERSION])
  return ssl_opts
 else:
  return None

def _get_ssl_opts ( ) : sslopts = __salt__ [ 'config.option' ] ( 'cassandra' ) . get ( 'ssl_options' , None ) ssl_opts = { } if sslopts : ssl_opts [ 'ca_certs' ] = sslopts [ 'ca_certs' ] if ( SSL_VERSION in sslopts ) : if ( not sslopts [ SSL_VERSION ] . startswith ( 'PROTOCOL_' ) ) : valid_opts = ', ' . join ( [ x for x in dir ( ssl ) if x . startswith ( 'PROTOCOL_' ) ] ) raise CommandExecutionError ( 'Invalid protocol_version specified! Please make sure that the ssl protocolversion is one from the SSLmodule. Valid options are {0}' . format ( valid_opts ) ) else : ssl_opts [ SSL_VERSION ] = getattr ( ssl , sslopts [ SSL_VERSION ] ) return ssl_opts else : return None
parse out ssl_options for cassandra cluster connection .