Add script to convert datastore-indexes.xml to index.yaml

The gcloud datastore cleanup-indexes command takes its input in index.yaml form instead of datastore-indexes.yaml form. This simple translation script allows us to generate one from the other.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=169260811
This commit is contained in:
mountford 2017-09-19 10:26:11 -07:00 committed by jianglai
parent f34d4b6bbb
commit 0994ce76c7
5 changed files with 301 additions and 0 deletions

View file

@ -0,0 +1,20 @@
package(default_visibility = ["//java/google/registry:registry_project"])
licenses(["notice"]) # Apache 2.0
py_binary(
name = "xml_to_index_yaml_translator",
srcs = ["xml_to_index_yaml_translator.py"],
deps = ["//python:python_directory_import"],
)
py_test(
name = "xml_to_index_yaml_translator_test",
size = "small",
srcs = ["xml_to_index_yaml_translator_test.py"],
data = [
"testdata/datastore-indexes.xml",
"testdata/index.yaml",
],
deps = [":xml_to_index_yaml_translator"],
)