Restore generating image service code
Hotfix schemas sanitizing the locations added stuff. Change-Id: Iddfcebd89f80978d4e674ff7677defce26d6af53
This commit is contained in:
parent
b807ac5889
commit
ae90be1d70
@ -262,7 +262,7 @@ class GlanceGenerator(OpenStackServerSourceBase):
|
||||
proc.start()
|
||||
proc.join()
|
||||
if proc.exitcode != 0:
|
||||
raise RuntimeError("Error generating Glance OpenAPI schma")
|
||||
raise RuntimeError("Error generating Glance OpenAPI schema")
|
||||
return Path(target_dir, "openapi_specs", "image", "v2.yaml")
|
||||
|
||||
def _generate(self, target_dir, args):
|
||||
@ -720,10 +720,23 @@ class GlanceGenerator(OpenStackServerSourceBase):
|
||||
elif name == "ImageShowResponse":
|
||||
for field in i32_fixes:
|
||||
res["properties"][field]["format"] = "int64"
|
||||
elif name in [
|
||||
"ImagesLocationsGet_LocationsResponse",
|
||||
"ImagesLocationsAdd_LocationResponse",
|
||||
]:
|
||||
if "locations" in res["properties"]:
|
||||
res = res["properties"]["locations"]
|
||||
elif name == "ImagesLocationsAdd_LocationRequest":
|
||||
if "locations" in res["properties"]:
|
||||
res = res["properties"]["locations"]["items"]
|
||||
elif name == "MetadefsNamespacesPropertiesListResponse":
|
||||
res["properties"]["properties"]["additionalProperties"][
|
||||
"type"
|
||||
] = "object"
|
||||
|
||||
if res["type"] == "object":
|
||||
res.pop("name", None)
|
||||
res.pop("links", None)
|
||||
return TypeSchema(**res)
|
||||
|
||||
@classmethod
|
||||
|
@ -24,11 +24,9 @@
|
||||
- service: "identity"
|
||||
metadata: "metadata/identity_metadata.yaml"
|
||||
targets: ["rust-sdk", "rust-cli"]
|
||||
# https://review.opendev.org/c/openstack/glance/+/882498 screwed us.
|
||||
# Disable build for glance until we find way to deal with that
|
||||
# - service: "image"
|
||||
# metadata: "metadata/image_metadata.yaml"
|
||||
# targets: ["rust-sdk", "rust-cli"]
|
||||
- service: "image"
|
||||
metadata: "metadata/image_metadata.yaml"
|
||||
targets: ["rust-sdk", "rust-cli"]
|
||||
- service: "load-balancer"
|
||||
metadata: "metadata/load-balancer_metadata.yaml"
|
||||
targets: ["rust-sdk", "rust-cli"]
|
||||
|
Loading…
x
Reference in New Issue
Block a user