Skip to content

Commit

Permalink
feat: add synth config to generate datastore_admin_v1
Browse files Browse the repository at this point in the history
  • Loading branch information
AVaksman committed May 1, 2020
1 parent 6218d95 commit da94ca6
Showing 1 changed file with 32 additions and 10 deletions.
42 changes: 32 additions & 10 deletions synth.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,42 @@

gapic = gcp.GAPICGenerator()
common = gcp.CommonTemplates()
versions = [
("v1", "artman_datastore.yaml")
]
admin_versions = [
("v1", "artman_datastore_admin.yaml")
]

# ----------------------------------------------------------------------------
# Generate datastore GAPIC layer
# ----------------------------------------------------------------------------
library = gapic.py_library(
"datastore",
"v1",
config_path="/google/datastore/artman_datastore.yaml",
artman_output_name="datastore-v1",
include_protos=True,
)

s.move(library / "google/cloud/datastore_v1/proto")
s.move(library / "google/cloud/datastore_v1/gapic")
for version, artman_config in versions:
library = gapic.py_library(
"datastore",
f"{version}",
config_path=f"/google/datastore/{artman_config}",
artman_output_name=f"datastore-{version}",
include_protos=True,
)

s.move(library / f"google/cloud/datastore_{version}/proto")
s.move(library / f"google/cloud/datastore_{version}/gapic")

# ----------------------------------------------------------------------------
# Generate datastore admin GAPIC layer
# ----------------------------------------------------------------------------
for version, artman_config in admin_versions:
library = gapic.py_library(
"datastore_admin",
f"{version}",
config_path=f"/google/datastore/admin/{artman_config}",
artman_output_name=f"datastore-admin-{version}",
include_protos=True,
)

s.move(library / f"google/cloud/datastore_admin_{version}/proto")
s.move(library / f"google/cloud/datastore_admin_{version}/gapic")

# ----------------------------------------------------------------------------
# Add templated files
Expand Down

0 comments on commit da94ca6

Please sign in to comment.