in ambari-infra-solr-client/src/main/python/migrationHelper.py [0:0]
def get_infra_solr_props(config, accessor):
cluster = config.get('ambari_server', 'cluster')
service_configs = get_json(accessor, CLUSTERS_URL.format(cluster) + GET_ACTUAL_CONFIG_URL.format(SOLR_SERVICE_NAME))
infra_solr_props = {}
infra_solr_env_properties = {}
infra_solr_security_json_properties = {}
if 'items' in service_configs and len(service_configs['items']) > 0:
if 'configurations' in service_configs['items'][0]:
for config in service_configs['items'][0]['configurations']:
if 'type' in config and config['type'] == 'infra-solr-env':
infra_solr_env_properties = config['properties']
if 'type' in config and config['type'] == 'infra-solr-security-json':
infra_solr_security_json_properties = config['properties']
infra_solr_props['infra-solr-env'] = infra_solr_env_properties
infra_solr_props['infra-solr-security-json'] = infra_solr_security_json_properties
return infra_solr_props