def collection_get_options(collection_name, **kwargs):
 cluster = cluster_status(**kwargs)
 options = {'collection.configName': cluster['collections'][collection_name]['configName'], 'router.name': cluster['collections'][collection_name]['router']['name'], 'replicationFactor': int(cluster['collections'][collection_name]['replicationFactor']), 'maxShardsPerNode': int(cluster['collections'][collection_name]['maxShardsPerNode']), 'autoAddReplicas': (cluster['collections'][collection_name]['autoAddReplicas'] is True)}
 if ('rule' in cluster['collections'][collection_name]):
  options['rule'] = cluster['collections'][collection_name]['rule']
 if ('snitch' in cluster['collections'][collection_name]):
  options['snitch'] = cluster['collections'][collection_name]['rule']
 return options

def collection_get_options ( collection_name , ** kwargs ) : cluster = cluster_status ( ** kwargs ) options = { 'collection.configName' : cluster [ 'collections' ] [ collection_name ] [ 'configName' ] , 'router.name' : cluster [ 'collections' ] [ collection_name ] [ 'router' ] [ 'name' ] , 'replicationFactor' : int ( cluster [ 'collections' ] [ collection_name ] [ 'replicationFactor' ] ) , 'maxShardsPerNode' : int ( cluster [ 'collections' ] [ collection_name ] [ 'maxShardsPerNode' ] ) , 'autoAddReplicas' : ( cluster [ 'collections' ] [ collection_name ] [ 'autoAddReplicas' ] is True ) } if ( 'rule' in cluster [ 'collections' ] [ collection_name ] ) : options [ 'rule' ] = cluster [ 'collections' ] [ collection_name ] [ 'rule' ] if ( 'snitch' in cluster [ 'collections' ] [ collection_name ] ) : options [ 'snitch' ] = cluster [ 'collections' ] [ collection_name ] [ 'rule' ] return options
get collection options additional parameters may be passed .