This commit is contained in:
@ -2,6 +2,7 @@ import otc_metadata
|
|||||||
import argparse
|
import argparse
|
||||||
import logging
|
import logging
|
||||||
from opensearchpy import OpenSearch
|
from opensearchpy import OpenSearch
|
||||||
|
import json
|
||||||
|
|
||||||
|
|
||||||
metadata = otc_metadata.Services()
|
metadata = otc_metadata.Services()
|
||||||
@ -116,7 +117,7 @@ def generate_os_host_list(hosts):
|
|||||||
|
|
||||||
|
|
||||||
def create_index(client, index, data):
|
def create_index(client, index, data):
|
||||||
return client.indices.create(index, body=data)
|
return client.indices.create(index, body=json.dumps(data))
|
||||||
|
|
||||||
|
|
||||||
def delete_index(client, index):
|
def delete_index(client, index):
|
||||||
|
Reference in New Issue
Block a user