From 794175526287b5ba14331856af39d4bd2b45e98a Mon Sep 17 00:00:00 2001 From: Simon Murray Date: Mon, 15 Jul 2024 09:25:41 +0100 Subject: [PATCH] Make Regions Organization Scoped After playing with the UI, it semms quite apparent that mapping a region ID to a name, when the region is itself project scoped is quite heavy weight and unwieldy. To remedy this we move regions back to the organization scope so we need only a single lookup, relying on RBAC information to do any filtering. This also splits up regions and instrastructure so readers can map to regions, but not create identities etc. --- go.mod | 2 +- go.sum | 4 +- pkg/handler/handler.go | 71 ++--- pkg/openapi/client.go | 466 +++++++++++++--------------- pkg/openapi/router.go | 158 ++++------ pkg/openapi/schema.go | 163 +++++----- pkg/openapi/server.spec.yaml | 80 ++--- pkg/openapi/types.go | 16 +- pkg/providers/interfaces.go | 2 +- pkg/providers/openstack/provider.go | 25 +- 10 files changed, 440 insertions(+), 547 deletions(-) diff --git a/go.mod b/go.mod index 49d3440..880b6db 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/oapi-codegen/runtime v1.1.1 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.9.0 - github.com/unikorn-cloud/core v0.1.59 + github.com/unikorn-cloud/core v0.1.60 github.com/unikorn-cloud/identity v0.2.25 go.opentelemetry.io/otel v1.28.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0 diff --git a/go.sum b/go.sum index 0d8c9be..950b205 100644 --- a/go.sum +++ b/go.sum @@ -138,8 +138,8 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65EE= github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= -github.com/unikorn-cloud/core v0.1.59 h1:Fow+RmWADvIHcDGnKxeE+m7uJzq2ARJb1/nPA2tY6+o= -github.com/unikorn-cloud/core v0.1.59/go.mod h1:Cd0zU1LrKo+OwnnCwuTQ+QL3yibnkjDHtkujfDM4AdE= +github.com/unikorn-cloud/core v0.1.60 h1:N/4xkv3dNv8/ZM3VqyxsECm2Ji/gE3QBoLjGsEUQTg4= +github.com/unikorn-cloud/core v0.1.60/go.mod h1:Cd0zU1LrKo+OwnnCwuTQ+QL3yibnkjDHtkujfDM4AdE= github.com/unikorn-cloud/identity v0.2.25 h1:nb45gnI8o/12idVodWtAVO5WRFW8cTg6PFQHYjLd3DM= github.com/unikorn-cloud/identity v0.2.25/go.mod h1:8WxgWetyrCvLjRGAeEWy5hWXDJ8prVz+FNt9sG17lV8= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= diff --git a/pkg/handler/handler.go b/pkg/handler/handler.go index 75ff9fa..cea6bb8 100644 --- a/pkg/handler/handler.go +++ b/pkg/handler/handler.go @@ -41,7 +41,7 @@ import ( "github.com/unikorn-cloud/region/pkg/providers" "github.com/unikorn-cloud/region/pkg/server/util" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + kerrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "sigs.k8s.io/controller-runtime/pkg/client" @@ -80,8 +80,8 @@ func (h *Handler) setUncacheable(w http.ResponseWriter) { w.Header().Add("Cache-Control", "no-cache") } -func (h *Handler) GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegions(w http.ResponseWriter, r *http.Request, organizationID openapi.OrganizationIDParameter, projectID openapi.ProjectIDParameter) { - if err := rbac.AllowProjectScope(r.Context(), "infrastructure", identityapi.Read, organizationID, projectID); err != nil { +func (h *Handler) GetApiV1OrganizationsOrganizationIDRegions(w http.ResponseWriter, r *http.Request, organizationID openapi.OrganizationIDParameter) { + if err := rbac.AllowOrganizationScope(r.Context(), "regions", identityapi.Read, organizationID); err != nil { errors.HandleError(w, r, err) return } @@ -133,8 +133,8 @@ func convertFlavor(in providers.Flavor) openapi.Flavor { return out } -func (h *Handler) GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDFlavors(w http.ResponseWriter, r *http.Request, organizationID openapi.OrganizationIDParameter, projectID openapi.ProjectIDParameter, regionID openapi.RegionIDParameter) { - if err := rbac.AllowProjectScope(r.Context(), "infrastructure", identityapi.Read, organizationID, projectID); err != nil { +func (h *Handler) GetApiV1OrganizationsOrganizationIDRegionsRegionIDFlavors(w http.ResponseWriter, r *http.Request, organizationID openapi.OrganizationIDParameter, regionID openapi.RegionIDParameter) { + if err := rbac.AllowOrganizationScope(r.Context(), "regions", identityapi.Read, organizationID); err != nil { errors.HandleError(w, r, err) return } @@ -194,8 +194,8 @@ func convertImage(in providers.Image) openapi.Image { return out } -func (h *Handler) GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDImages(w http.ResponseWriter, r *http.Request, organizationID openapi.OrganizationIDParameter, projectID openapi.ProjectIDParameter, regionID openapi.RegionIDParameter) { - if err := rbac.AllowProjectScope(r.Context(), "infrastructure", identityapi.Read, organizationID, projectID); err != nil { +func (h *Handler) GetApiV1OrganizationsOrganizationIDRegionsRegionIDImages(w http.ResponseWriter, r *http.Request, organizationID openapi.OrganizationIDParameter, regionID openapi.RegionIDParameter) { + if err := rbac.AllowOrganizationScope(r.Context(), "regions", identityapi.Read, organizationID); err != nil { errors.HandleError(w, r, err) return } @@ -250,29 +250,12 @@ func convertTags(in unikornv1.TagList) openapi.TagList { return out } -func regionScopedResourceReadMetadata(in metav1.Object, status coreapi.ResourceProvisioningStatus) coreapi.RegionScopedResourceMetadata { - labels := in.GetLabels() - - temp := conversion.ProjectScopedResourceReadMetadata(in, status) - - out := coreapi.RegionScopedResourceMetadata{ - Id: temp.Id, - Name: temp.Name, - Description: temp.Description, - CreatedBy: temp.CreatedBy, - CreationTime: temp.CreationTime, - ProvisioningStatus: temp.ProvisioningStatus, - OrganizationId: temp.OrganizationId, - ProjectId: temp.ProjectId, - RegionId: labels[constants.RegionLabel], - } - - return out -} - func convertIdentity(identity *unikornv1.Identity, in *providers.CloudConfig) *openapi.IdentityRead { out := &openapi.IdentityRead{ - Metadata: regionScopedResourceReadMetadata(identity, coreapi.ResourceProvisioningStatusProvisioned), + Metadata: conversion.ProjectScopedResourceReadMetadata(identity, coreapi.ResourceProvisioningStatusProvisioned), + Spec: openapi.IdentitySpec{ + RegionId: identity.Labels[constants.RegionLabel], + }, } if tags := convertTags(identity.Spec.Tags); tags != nil { @@ -310,7 +293,7 @@ func convertIdentityList(in unikornv1.IdentityList) openapi.IdentitiesRead { } func (h *Handler) GetApiV1OrganizationsOrganizationIDIdentities(w http.ResponseWriter, r *http.Request, organizationID openapi.OrganizationIDParameter) { - if err := rbac.AllowOrganizationScope(r.Context(), "infrastructure", identityapi.Read, organizationID); err != nil { + if err := rbac.AllowOrganizationScope(r.Context(), "identities", identityapi.Read, organizationID); err != nil { errors.HandleError(w, r, err) return } @@ -331,8 +314,8 @@ func (h *Handler) GetApiV1OrganizationsOrganizationIDIdentities(w http.ResponseW util.WriteJSONResponse(w, r, http.StatusOK, convertIdentityList(resources)) } -func (h *Handler) PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentities(w http.ResponseWriter, r *http.Request, organizationID openapi.OrganizationIDParameter, projectID openapi.ProjectIDParameter, regionID openapi.RegionIDParameter) { - if err := rbac.AllowProjectScope(r.Context(), "infrastructure", identityapi.Create, organizationID, projectID); err != nil { +func (h *Handler) PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentities(w http.ResponseWriter, r *http.Request, organizationID openapi.OrganizationIDParameter, projectID openapi.ProjectIDParameter) { + if err := rbac.AllowProjectScope(r.Context(), "identities", identityapi.Create, organizationID, projectID); err != nil { errors.HandleError(w, r, err) return } @@ -344,7 +327,7 @@ func (h *Handler) PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRe return } - provider, err := region.NewClient(h.client, h.namespace).Provider(r.Context(), regionID) + provider, err := region.NewClient(h.client, h.namespace).Provider(r.Context(), request.Spec.RegionId) if err != nil { errors.HandleError(w, r, err) return @@ -372,8 +355,8 @@ func convertPhysicalNetwork(in *unikornv1.PhysicalNetwork) *openapi.PhysicalNetw return out } -func (h *Handler) PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesIdentityIDPhysicalNetworks(w http.ResponseWriter, r *http.Request, organizationID openapi.OrganizationIDParameter, projectID openapi.ProjectIDParameter, regionID openapi.RegionIDParameter, identityID openapi.IdentityIDParameter) { - if err := rbac.AllowProjectScope(r.Context(), "infrastructure", identityapi.Create, organizationID, projectID); err != nil { +func (h *Handler) PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDPhysicalNetworks(w http.ResponseWriter, r *http.Request, organizationID openapi.OrganizationIDParameter, projectID openapi.ProjectIDParameter, identityID openapi.IdentityIDParameter) { + if err := rbac.AllowProjectScope(r.Context(), "identities", identityapi.Create, organizationID, projectID); err != nil { errors.HandleError(w, r, err) return } @@ -385,13 +368,25 @@ func (h *Handler) PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRe return } - provider, err := region.NewClient(h.client, h.namespace).Provider(r.Context(), regionID) + identity := &unikornv1.Identity{} + + if err := h.client.Get(r.Context(), client.ObjectKey{Namespace: h.namespace, Name: identityID}, identity); err != nil { + if kerrors.IsNotFound(err) { + errors.HandleError(w, r, errors.HTTPNotFound().WithError(err)) + return + } + + errors.HandleError(w, r, err) + return + } + + provider, err := region.NewClient(h.client, h.namespace).Provider(r.Context(), identity.Labels[constants.RegionLabel]) if err != nil { errors.HandleError(w, r, err) return } - network, err := provider.CreatePhysicalNetwork(r.Context(), organizationID, projectID, identityID, request) + network, err := provider.CreatePhysicalNetwork(r.Context(), identity, request) if err != nil { errors.HandleError(w, r, err) return @@ -419,8 +414,8 @@ func convertExternalNetworks(in providers.ExternalNetworks) openapi.ExternalNetw return out } -func (h *Handler) GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDExternalnetworks(w http.ResponseWriter, r *http.Request, organizationID openapi.OrganizationIDParameter, projectID openapi.ProjectIDParameter, regionID openapi.RegionIDParameter) { - if err := rbac.AllowProjectScope(r.Context(), "infrastructure", identityapi.Read, organizationID, projectID); err != nil { +func (h *Handler) GetApiV1OrganizationsOrganizationIDRegionsRegionIDExternalnetworks(w http.ResponseWriter, r *http.Request, organizationID openapi.OrganizationIDParameter, regionID openapi.RegionIDParameter) { + if err := rbac.AllowOrganizationScope(r.Context(), "regions", identityapi.Read, organizationID); err != nil { errors.HandleError(w, r, err) return } diff --git a/pkg/openapi/client.go b/pkg/openapi/client.go index 5acef1e..93d8164 100644 --- a/pkg/openapi/client.go +++ b/pkg/openapi/client.go @@ -93,27 +93,27 @@ type ClientInterface interface { // GetApiV1OrganizationsOrganizationIDIdentities request GetApiV1OrganizationsOrganizationIDIdentities(ctx context.Context, organizationID OrganizationIDParameter, reqEditors ...RequestEditorFn) (*http.Response, error) - // GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegions request - GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegions(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, reqEditors ...RequestEditorFn) (*http.Response, error) + // PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesWithBody request with any body + PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesWithBody(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - // GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDExternalnetworks request - GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDExternalnetworks(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, regionID RegionIDParameter, reqEditors ...RequestEditorFn) (*http.Response, error) + PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentities(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, body PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDFlavors request - GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDFlavors(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, regionID RegionIDParameter, reqEditors ...RequestEditorFn) (*http.Response, error) + // PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDPhysicalNetworksWithBody request with any body + PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDPhysicalNetworksWithBody(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, identityID IdentityIDParameter, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - // PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesWithBody request with any body - PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesWithBody(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, regionID RegionIDParameter, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDPhysicalNetworks(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, identityID IdentityIDParameter, body PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDPhysicalNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentities(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, regionID RegionIDParameter, body PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetApiV1OrganizationsOrganizationIDRegions request + GetApiV1OrganizationsOrganizationIDRegions(ctx context.Context, organizationID OrganizationIDParameter, reqEditors ...RequestEditorFn) (*http.Response, error) - // PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesIdentityIDPhysicalNetworksWithBody request with any body - PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesIdentityIDPhysicalNetworksWithBody(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, regionID RegionIDParameter, identityID IdentityIDParameter, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetApiV1OrganizationsOrganizationIDRegionsRegionIDExternalnetworks request + GetApiV1OrganizationsOrganizationIDRegionsRegionIDExternalnetworks(ctx context.Context, organizationID OrganizationIDParameter, regionID RegionIDParameter, reqEditors ...RequestEditorFn) (*http.Response, error) - PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesIdentityIDPhysicalNetworks(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, regionID RegionIDParameter, identityID IdentityIDParameter, body PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesIdentityIDPhysicalNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetApiV1OrganizationsOrganizationIDRegionsRegionIDFlavors request + GetApiV1OrganizationsOrganizationIDRegionsRegionIDFlavors(ctx context.Context, organizationID OrganizationIDParameter, regionID RegionIDParameter, reqEditors ...RequestEditorFn) (*http.Response, error) - // GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDImages request - GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDImages(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, regionID RegionIDParameter, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetApiV1OrganizationsOrganizationIDRegionsRegionIDImages request + GetApiV1OrganizationsOrganizationIDRegionsRegionIDImages(ctx context.Context, organizationID OrganizationIDParameter, regionID RegionIDParameter, reqEditors ...RequestEditorFn) (*http.Response, error) } func (c *Client) GetApiV1OrganizationsOrganizationIDIdentities(ctx context.Context, organizationID OrganizationIDParameter, reqEditors ...RequestEditorFn) (*http.Response, error) { @@ -128,8 +128,8 @@ func (c *Client) GetApiV1OrganizationsOrganizationIDIdentities(ctx context.Conte return c.Client.Do(req) } -func (c *Client) GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegions(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRequest(c.Server, organizationID, projectID) +func (c *Client) PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesWithBody(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesRequestWithBody(c.Server, organizationID, projectID, contentType, body) if err != nil { return nil, err } @@ -140,8 +140,8 @@ func (c *Client) GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegions(ctx return c.Client.Do(req) } -func (c *Client) GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDExternalnetworks(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, regionID RegionIDParameter, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDExternalnetworksRequest(c.Server, organizationID, projectID, regionID) +func (c *Client) PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentities(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, body PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesRequest(c.Server, organizationID, projectID, body) if err != nil { return nil, err } @@ -152,8 +152,8 @@ func (c *Client) GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegi return c.Client.Do(req) } -func (c *Client) GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDFlavors(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, regionID RegionIDParameter, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDFlavorsRequest(c.Server, organizationID, projectID, regionID) +func (c *Client) PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDPhysicalNetworksWithBody(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, identityID IdentityIDParameter, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDPhysicalNetworksRequestWithBody(c.Server, organizationID, projectID, identityID, contentType, body) if err != nil { return nil, err } @@ -164,8 +164,8 @@ func (c *Client) GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegi return c.Client.Do(req) } -func (c *Client) PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesWithBody(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, regionID RegionIDParameter, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesRequestWithBody(c.Server, organizationID, projectID, regionID, contentType, body) +func (c *Client) PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDPhysicalNetworks(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, identityID IdentityIDParameter, body PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDPhysicalNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDPhysicalNetworksRequest(c.Server, organizationID, projectID, identityID, body) if err != nil { return nil, err } @@ -176,8 +176,8 @@ func (c *Client) PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsReg return c.Client.Do(req) } -func (c *Client) PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentities(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, regionID RegionIDParameter, body PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesRequest(c.Server, organizationID, projectID, regionID, body) +func (c *Client) GetApiV1OrganizationsOrganizationIDRegions(ctx context.Context, organizationID OrganizationIDParameter, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV1OrganizationsOrganizationIDRegionsRequest(c.Server, organizationID) if err != nil { return nil, err } @@ -188,8 +188,8 @@ func (c *Client) PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsReg return c.Client.Do(req) } -func (c *Client) PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesIdentityIDPhysicalNetworksWithBody(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, regionID RegionIDParameter, identityID IdentityIDParameter, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesIdentityIDPhysicalNetworksRequestWithBody(c.Server, organizationID, projectID, regionID, identityID, contentType, body) +func (c *Client) GetApiV1OrganizationsOrganizationIDRegionsRegionIDExternalnetworks(ctx context.Context, organizationID OrganizationIDParameter, regionID RegionIDParameter, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV1OrganizationsOrganizationIDRegionsRegionIDExternalnetworksRequest(c.Server, organizationID, regionID) if err != nil { return nil, err } @@ -200,8 +200,8 @@ func (c *Client) PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsReg return c.Client.Do(req) } -func (c *Client) PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesIdentityIDPhysicalNetworks(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, regionID RegionIDParameter, identityID IdentityIDParameter, body PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesIdentityIDPhysicalNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesIdentityIDPhysicalNetworksRequest(c.Server, organizationID, projectID, regionID, identityID, body) +func (c *Client) GetApiV1OrganizationsOrganizationIDRegionsRegionIDFlavors(ctx context.Context, organizationID OrganizationIDParameter, regionID RegionIDParameter, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV1OrganizationsOrganizationIDRegionsRegionIDFlavorsRequest(c.Server, organizationID, regionID) if err != nil { return nil, err } @@ -212,8 +212,8 @@ func (c *Client) PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsReg return c.Client.Do(req) } -func (c *Client) GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDImages(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, regionID RegionIDParameter, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDImagesRequest(c.Server, organizationID, projectID, regionID) +func (c *Client) GetApiV1OrganizationsOrganizationIDRegionsRegionIDImages(ctx context.Context, organizationID OrganizationIDParameter, regionID RegionIDParameter, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV1OrganizationsOrganizationIDRegionsRegionIDImagesRequest(c.Server, organizationID, regionID) if err != nil { return nil, err } @@ -258,8 +258,19 @@ func NewGetApiV1OrganizationsOrganizationIDIdentitiesRequest(server string, orga return req, nil } -// NewGetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRequest generates requests for GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegions -func NewGetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRequest(server string, organizationID OrganizationIDParameter, projectID ProjectIDParameter) (*http.Request, error) { +// NewPostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesRequest calls the generic PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentities builder with application/json body +func NewPostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesRequest(server string, organizationID OrganizationIDParameter, projectID ProjectIDParameter, body PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesRequestWithBody(server, organizationID, projectID, "application/json", bodyReader) +} + +// NewPostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesRequestWithBody generates requests for PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentities with any type of body +func NewPostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesRequestWithBody(server string, organizationID OrganizationIDParameter, projectID ProjectIDParameter, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -281,7 +292,7 @@ func NewGetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRequest(serve return nil, err } - operationPath := fmt.Sprintf("/api/v1/organizations/%s/projects/%s/regions", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/api/v1/organizations/%s/projects/%s/identities", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -291,16 +302,29 @@ func NewGetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRequest(serve return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewGetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDExternalnetworksRequest generates requests for GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDExternalnetworks -func NewGetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDExternalnetworksRequest(server string, organizationID OrganizationIDParameter, projectID ProjectIDParameter, regionID RegionIDParameter) (*http.Request, error) { +// NewPostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDPhysicalNetworksRequest calls the generic PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDPhysicalNetworks builder with application/json body +func NewPostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDPhysicalNetworksRequest(server string, organizationID OrganizationIDParameter, projectID ProjectIDParameter, identityID IdentityIDParameter, body PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDPhysicalNetworksJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDPhysicalNetworksRequestWithBody(server, organizationID, projectID, identityID, "application/json", bodyReader) +} + +// NewPostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDPhysicalNetworksRequestWithBody generates requests for PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDPhysicalNetworks with any type of body +func NewPostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDPhysicalNetworksRequestWithBody(server string, organizationID OrganizationIDParameter, projectID ProjectIDParameter, identityID IdentityIDParameter, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -319,7 +343,7 @@ func NewGetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDExter var pathParam2 string - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "regionID", runtime.ParamLocationPath, regionID) + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "identityID", runtime.ParamLocationPath, identityID) if err != nil { return nil, err } @@ -329,7 +353,7 @@ func NewGetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDExter return nil, err } - operationPath := fmt.Sprintf("/api/v1/organizations/%s/projects/%s/regions/%s/externalnetworks", pathParam0, pathParam1, pathParam2) + operationPath := fmt.Sprintf("/api/v1/organizations/%s/projects/%s/identities/%s/physicalNetworks", pathParam0, pathParam1, pathParam2) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -339,16 +363,18 @@ func NewGetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDExter return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewGetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDFlavorsRequest generates requests for GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDFlavors -func NewGetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDFlavorsRequest(server string, organizationID OrganizationIDParameter, projectID ProjectIDParameter, regionID RegionIDParameter) (*http.Request, error) { +// NewGetApiV1OrganizationsOrganizationIDRegionsRequest generates requests for GetApiV1OrganizationsOrganizationIDRegions +func NewGetApiV1OrganizationsOrganizationIDRegionsRequest(server string, organizationID OrganizationIDParameter) (*http.Request, error) { var err error var pathParam0 string @@ -358,26 +384,12 @@ func NewGetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDFlavo return nil, err } - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) - if err != nil { - return nil, err - } - - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "regionID", runtime.ParamLocationPath, regionID) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/api/v1/organizations/%s/projects/%s/regions/%s/flavors", pathParam0, pathParam1, pathParam2) + operationPath := fmt.Sprintf("/api/v1/organizations/%s/regions", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -395,19 +407,8 @@ func NewGetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDFlavo return req, nil } -// NewPostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesRequest calls the generic PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentities builder with application/json body -func NewPostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesRequest(server string, organizationID OrganizationIDParameter, projectID ProjectIDParameter, regionID RegionIDParameter, body PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesRequestWithBody(server, organizationID, projectID, regionID, "application/json", bodyReader) -} - -// NewPostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesRequestWithBody generates requests for PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentities with any type of body -func NewPostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesRequestWithBody(server string, organizationID OrganizationIDParameter, projectID ProjectIDParameter, regionID RegionIDParameter, contentType string, body io.Reader) (*http.Request, error) { +// NewGetApiV1OrganizationsOrganizationIDRegionsRegionIDExternalnetworksRequest generates requests for GetApiV1OrganizationsOrganizationIDRegionsRegionIDExternalnetworks +func NewGetApiV1OrganizationsOrganizationIDRegionsRegionIDExternalnetworksRequest(server string, organizationID OrganizationIDParameter, regionID RegionIDParameter) (*http.Request, error) { var err error var pathParam0 string @@ -419,14 +420,7 @@ func NewPostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIden var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) - if err != nil { - return nil, err - } - - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "regionID", runtime.ParamLocationPath, regionID) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "regionID", runtime.ParamLocationPath, regionID) if err != nil { return nil, err } @@ -436,7 +430,7 @@ func NewPostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIden return nil, err } - operationPath := fmt.Sprintf("/api/v1/organizations/%s/projects/%s/regions/%s/identities", pathParam0, pathParam1, pathParam2) + operationPath := fmt.Sprintf("/api/v1/organizations/%s/regions/%s/externalnetworks", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -446,29 +440,16 @@ func NewPostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIden return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewPostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesIdentityIDPhysicalNetworksRequest calls the generic PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesIdentityIDPhysicalNetworks builder with application/json body -func NewPostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesIdentityIDPhysicalNetworksRequest(server string, organizationID OrganizationIDParameter, projectID ProjectIDParameter, regionID RegionIDParameter, identityID IdentityIDParameter, body PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesIdentityIDPhysicalNetworksJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesIdentityIDPhysicalNetworksRequestWithBody(server, organizationID, projectID, regionID, identityID, "application/json", bodyReader) -} - -// NewPostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesIdentityIDPhysicalNetworksRequestWithBody generates requests for PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesIdentityIDPhysicalNetworks with any type of body -func NewPostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesIdentityIDPhysicalNetworksRequestWithBody(server string, organizationID OrganizationIDParameter, projectID ProjectIDParameter, regionID RegionIDParameter, identityID IdentityIDParameter, contentType string, body io.Reader) (*http.Request, error) { +// NewGetApiV1OrganizationsOrganizationIDRegionsRegionIDFlavorsRequest generates requests for GetApiV1OrganizationsOrganizationIDRegionsRegionIDFlavors +func NewGetApiV1OrganizationsOrganizationIDRegionsRegionIDFlavorsRequest(server string, organizationID OrganizationIDParameter, regionID RegionIDParameter) (*http.Request, error) { var err error var pathParam0 string @@ -480,21 +461,7 @@ func NewPostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIden var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) - if err != nil { - return nil, err - } - - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "regionID", runtime.ParamLocationPath, regionID) - if err != nil { - return nil, err - } - - var pathParam3 string - - pathParam3, err = runtime.StyleParamWithLocation("simple", false, "identityID", runtime.ParamLocationPath, identityID) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "regionID", runtime.ParamLocationPath, regionID) if err != nil { return nil, err } @@ -504,7 +471,7 @@ func NewPostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIden return nil, err } - operationPath := fmt.Sprintf("/api/v1/organizations/%s/projects/%s/regions/%s/identities/%s/physicalNetworks", pathParam0, pathParam1, pathParam2, pathParam3) + operationPath := fmt.Sprintf("/api/v1/organizations/%s/regions/%s/flavors", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -514,18 +481,16 @@ func NewPostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIden return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewGetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDImagesRequest generates requests for GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDImages -func NewGetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDImagesRequest(server string, organizationID OrganizationIDParameter, projectID ProjectIDParameter, regionID RegionIDParameter) (*http.Request, error) { +// NewGetApiV1OrganizationsOrganizationIDRegionsRegionIDImagesRequest generates requests for GetApiV1OrganizationsOrganizationIDRegionsRegionIDImages +func NewGetApiV1OrganizationsOrganizationIDRegionsRegionIDImagesRequest(server string, organizationID OrganizationIDParameter, regionID RegionIDParameter) (*http.Request, error) { var err error var pathParam0 string @@ -537,14 +502,7 @@ func NewGetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDImage var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) - if err != nil { - return nil, err - } - - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "regionID", runtime.ParamLocationPath, regionID) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "regionID", runtime.ParamLocationPath, regionID) if err != nil { return nil, err } @@ -554,7 +512,7 @@ func NewGetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDImage return nil, err } - operationPath := fmt.Sprintf("/api/v1/organizations/%s/projects/%s/regions/%s/images", pathParam0, pathParam1, pathParam2) + operationPath := fmt.Sprintf("/api/v1/organizations/%s/regions/%s/images", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -618,27 +576,27 @@ type ClientWithResponsesInterface interface { // GetApiV1OrganizationsOrganizationIDIdentitiesWithResponse request GetApiV1OrganizationsOrganizationIDIdentitiesWithResponse(ctx context.Context, organizationID OrganizationIDParameter, reqEditors ...RequestEditorFn) (*GetApiV1OrganizationsOrganizationIDIdentitiesResponse, error) - // GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsWithResponse request - GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsWithResponse(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, reqEditors ...RequestEditorFn) (*GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsResponse, error) + // PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesWithBodyWithResponse request with any body + PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesWithBodyWithResponse(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesResponse, error) - // GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDExternalnetworksWithResponse request - GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDExternalnetworksWithResponse(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, regionID RegionIDParameter, reqEditors ...RequestEditorFn) (*GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDExternalnetworksResponse, error) + PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesWithResponse(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, body PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesResponse, error) - // GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDFlavorsWithResponse request - GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDFlavorsWithResponse(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, regionID RegionIDParameter, reqEditors ...RequestEditorFn) (*GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDFlavorsResponse, error) + // PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDPhysicalNetworksWithBodyWithResponse request with any body + PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDPhysicalNetworksWithBodyWithResponse(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, identityID IdentityIDParameter, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDPhysicalNetworksResponse, error) - // PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesWithBodyWithResponse request with any body - PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesWithBodyWithResponse(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, regionID RegionIDParameter, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesResponse, error) + PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDPhysicalNetworksWithResponse(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, identityID IdentityIDParameter, body PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDPhysicalNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDPhysicalNetworksResponse, error) - PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesWithResponse(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, regionID RegionIDParameter, body PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesResponse, error) + // GetApiV1OrganizationsOrganizationIDRegionsWithResponse request + GetApiV1OrganizationsOrganizationIDRegionsWithResponse(ctx context.Context, organizationID OrganizationIDParameter, reqEditors ...RequestEditorFn) (*GetApiV1OrganizationsOrganizationIDRegionsResponse, error) - // PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesIdentityIDPhysicalNetworksWithBodyWithResponse request with any body - PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesIdentityIDPhysicalNetworksWithBodyWithResponse(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, regionID RegionIDParameter, identityID IdentityIDParameter, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesIdentityIDPhysicalNetworksResponse, error) + // GetApiV1OrganizationsOrganizationIDRegionsRegionIDExternalnetworksWithResponse request + GetApiV1OrganizationsOrganizationIDRegionsRegionIDExternalnetworksWithResponse(ctx context.Context, organizationID OrganizationIDParameter, regionID RegionIDParameter, reqEditors ...RequestEditorFn) (*GetApiV1OrganizationsOrganizationIDRegionsRegionIDExternalnetworksResponse, error) - PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesIdentityIDPhysicalNetworksWithResponse(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, regionID RegionIDParameter, identityID IdentityIDParameter, body PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesIdentityIDPhysicalNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesIdentityIDPhysicalNetworksResponse, error) + // GetApiV1OrganizationsOrganizationIDRegionsRegionIDFlavorsWithResponse request + GetApiV1OrganizationsOrganizationIDRegionsRegionIDFlavorsWithResponse(ctx context.Context, organizationID OrganizationIDParameter, regionID RegionIDParameter, reqEditors ...RequestEditorFn) (*GetApiV1OrganizationsOrganizationIDRegionsRegionIDFlavorsResponse, error) - // GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDImagesWithResponse request - GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDImagesWithResponse(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, regionID RegionIDParameter, reqEditors ...RequestEditorFn) (*GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDImagesResponse, error) + // GetApiV1OrganizationsOrganizationIDRegionsRegionIDImagesWithResponse request + GetApiV1OrganizationsOrganizationIDRegionsRegionIDImagesWithResponse(ctx context.Context, organizationID OrganizationIDParameter, regionID RegionIDParameter, reqEditors ...RequestEditorFn) (*GetApiV1OrganizationsOrganizationIDRegionsRegionIDImagesResponse, error) } type GetApiV1OrganizationsOrganizationIDIdentitiesResponse struct { @@ -667,16 +625,18 @@ func (r GetApiV1OrganizationsOrganizationIDIdentitiesResponse) StatusCode() int return 0 } -type GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsResponse struct { +type PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *RegionsResponse + JSON201 *IdentityResponse + JSON400 *externalRef0.BadRequestResponse JSON401 *externalRef0.UnauthorizedResponse + JSON403 *externalRef0.ForbiddenResponse JSON500 *externalRef0.InternalServerErrorResponse } // Status returns HTTPResponse.Status -func (r GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsResponse) Status() string { +func (r PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -684,25 +644,25 @@ func (r GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsResponse) Sta } // StatusCode returns HTTPResponse.StatusCode -func (r GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsResponse) StatusCode() int { +func (r PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDExternalnetworksResponse struct { +type PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDPhysicalNetworksResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ExternalNetworksResponse + JSON201 *PhysicalNetworkResponse + JSON400 *externalRef0.BadRequestResponse JSON401 *externalRef0.UnauthorizedResponse JSON403 *externalRef0.ForbiddenResponse - JSON404 *externalRef0.NotFoundResponse JSON500 *externalRef0.InternalServerErrorResponse } // Status returns HTTPResponse.Status -func (r GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDExternalnetworksResponse) Status() string { +func (r PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDPhysicalNetworksResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -710,24 +670,23 @@ func (r GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDExter } // StatusCode returns HTTPResponse.StatusCode -func (r GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDExternalnetworksResponse) StatusCode() int { +func (r PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDPhysicalNetworksResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDFlavorsResponse struct { +type GetApiV1OrganizationsOrganizationIDRegionsResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *FlavorsResponse - JSON400 *externalRef0.BadRequestResponse + JSON200 *RegionsResponse JSON401 *externalRef0.UnauthorizedResponse JSON500 *externalRef0.InternalServerErrorResponse } // Status returns HTTPResponse.Status -func (r GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDFlavorsResponse) Status() string { +func (r GetApiV1OrganizationsOrganizationIDRegionsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -735,25 +694,25 @@ func (r GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDFlavo } // StatusCode returns HTTPResponse.StatusCode -func (r GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDFlavorsResponse) StatusCode() int { +func (r GetApiV1OrganizationsOrganizationIDRegionsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesResponse struct { +type GetApiV1OrganizationsOrganizationIDRegionsRegionIDExternalnetworksResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *IdentityResponse - JSON400 *externalRef0.BadRequestResponse + JSON200 *ExternalNetworksResponse JSON401 *externalRef0.UnauthorizedResponse JSON403 *externalRef0.ForbiddenResponse + JSON404 *externalRef0.NotFoundResponse JSON500 *externalRef0.InternalServerErrorResponse } // Status returns HTTPResponse.Status -func (r PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesResponse) Status() string { +func (r GetApiV1OrganizationsOrganizationIDRegionsRegionIDExternalnetworksResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -761,25 +720,24 @@ func (r PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIden } // StatusCode returns HTTPResponse.StatusCode -func (r PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesResponse) StatusCode() int { +func (r GetApiV1OrganizationsOrganizationIDRegionsRegionIDExternalnetworksResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesIdentityIDPhysicalNetworksResponse struct { +type GetApiV1OrganizationsOrganizationIDRegionsRegionIDFlavorsResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *PhysicalNetworkResponse + JSON200 *FlavorsResponse JSON400 *externalRef0.BadRequestResponse JSON401 *externalRef0.UnauthorizedResponse - JSON403 *externalRef0.ForbiddenResponse JSON500 *externalRef0.InternalServerErrorResponse } // Status returns HTTPResponse.Status -func (r PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesIdentityIDPhysicalNetworksResponse) Status() string { +func (r GetApiV1OrganizationsOrganizationIDRegionsRegionIDFlavorsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -787,14 +745,14 @@ func (r PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIden } // StatusCode returns HTTPResponse.StatusCode -func (r PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesIdentityIDPhysicalNetworksResponse) StatusCode() int { +func (r GetApiV1OrganizationsOrganizationIDRegionsRegionIDFlavorsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDImagesResponse struct { +type GetApiV1OrganizationsOrganizationIDRegionsRegionIDImagesResponse struct { Body []byte HTTPResponse *http.Response JSON200 *ImagesResponse @@ -804,7 +762,7 @@ type GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDImagesRe } // Status returns HTTPResponse.Status -func (r GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDImagesResponse) Status() string { +func (r GetApiV1OrganizationsOrganizationIDRegionsRegionIDImagesResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -812,7 +770,7 @@ func (r GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDImage } // StatusCode returns HTTPResponse.StatusCode -func (r GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDImagesResponse) StatusCode() int { +func (r GetApiV1OrganizationsOrganizationIDRegionsRegionIDImagesResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -828,74 +786,74 @@ func (c *ClientWithResponses) GetApiV1OrganizationsOrganizationIDIdentitiesWithR return ParseGetApiV1OrganizationsOrganizationIDIdentitiesResponse(rsp) } -// GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsWithResponse request returning *GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsResponse -func (c *ClientWithResponses) GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsWithResponse(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, reqEditors ...RequestEditorFn) (*GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsResponse, error) { - rsp, err := c.GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegions(ctx, organizationID, projectID, reqEditors...) +// PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesWithBodyWithResponse request with arbitrary body returning *PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesResponse +func (c *ClientWithResponses) PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesWithBodyWithResponse(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesResponse, error) { + rsp, err := c.PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesWithBody(ctx, organizationID, projectID, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseGetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsResponse(rsp) + return ParsePostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesResponse(rsp) } -// GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDExternalnetworksWithResponse request returning *GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDExternalnetworksResponse -func (c *ClientWithResponses) GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDExternalnetworksWithResponse(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, regionID RegionIDParameter, reqEditors ...RequestEditorFn) (*GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDExternalnetworksResponse, error) { - rsp, err := c.GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDExternalnetworks(ctx, organizationID, projectID, regionID, reqEditors...) +func (c *ClientWithResponses) PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesWithResponse(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, body PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesResponse, error) { + rsp, err := c.PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentities(ctx, organizationID, projectID, body, reqEditors...) if err != nil { return nil, err } - return ParseGetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDExternalnetworksResponse(rsp) + return ParsePostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesResponse(rsp) } -// GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDFlavorsWithResponse request returning *GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDFlavorsResponse -func (c *ClientWithResponses) GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDFlavorsWithResponse(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, regionID RegionIDParameter, reqEditors ...RequestEditorFn) (*GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDFlavorsResponse, error) { - rsp, err := c.GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDFlavors(ctx, organizationID, projectID, regionID, reqEditors...) +// PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDPhysicalNetworksWithBodyWithResponse request with arbitrary body returning *PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDPhysicalNetworksResponse +func (c *ClientWithResponses) PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDPhysicalNetworksWithBodyWithResponse(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, identityID IdentityIDParameter, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDPhysicalNetworksResponse, error) { + rsp, err := c.PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDPhysicalNetworksWithBody(ctx, organizationID, projectID, identityID, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseGetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDFlavorsResponse(rsp) + return ParsePostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDPhysicalNetworksResponse(rsp) } -// PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesWithBodyWithResponse request with arbitrary body returning *PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesResponse -func (c *ClientWithResponses) PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesWithBodyWithResponse(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, regionID RegionIDParameter, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesResponse, error) { - rsp, err := c.PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesWithBody(ctx, organizationID, projectID, regionID, contentType, body, reqEditors...) +func (c *ClientWithResponses) PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDPhysicalNetworksWithResponse(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, identityID IdentityIDParameter, body PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDPhysicalNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDPhysicalNetworksResponse, error) { + rsp, err := c.PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDPhysicalNetworks(ctx, organizationID, projectID, identityID, body, reqEditors...) if err != nil { return nil, err } - return ParsePostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesResponse(rsp) + return ParsePostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDPhysicalNetworksResponse(rsp) } -func (c *ClientWithResponses) PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesWithResponse(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, regionID RegionIDParameter, body PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesResponse, error) { - rsp, err := c.PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentities(ctx, organizationID, projectID, regionID, body, reqEditors...) +// GetApiV1OrganizationsOrganizationIDRegionsWithResponse request returning *GetApiV1OrganizationsOrganizationIDRegionsResponse +func (c *ClientWithResponses) GetApiV1OrganizationsOrganizationIDRegionsWithResponse(ctx context.Context, organizationID OrganizationIDParameter, reqEditors ...RequestEditorFn) (*GetApiV1OrganizationsOrganizationIDRegionsResponse, error) { + rsp, err := c.GetApiV1OrganizationsOrganizationIDRegions(ctx, organizationID, reqEditors...) if err != nil { return nil, err } - return ParsePostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesResponse(rsp) + return ParseGetApiV1OrganizationsOrganizationIDRegionsResponse(rsp) } -// PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesIdentityIDPhysicalNetworksWithBodyWithResponse request with arbitrary body returning *PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesIdentityIDPhysicalNetworksResponse -func (c *ClientWithResponses) PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesIdentityIDPhysicalNetworksWithBodyWithResponse(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, regionID RegionIDParameter, identityID IdentityIDParameter, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesIdentityIDPhysicalNetworksResponse, error) { - rsp, err := c.PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesIdentityIDPhysicalNetworksWithBody(ctx, organizationID, projectID, regionID, identityID, contentType, body, reqEditors...) +// GetApiV1OrganizationsOrganizationIDRegionsRegionIDExternalnetworksWithResponse request returning *GetApiV1OrganizationsOrganizationIDRegionsRegionIDExternalnetworksResponse +func (c *ClientWithResponses) GetApiV1OrganizationsOrganizationIDRegionsRegionIDExternalnetworksWithResponse(ctx context.Context, organizationID OrganizationIDParameter, regionID RegionIDParameter, reqEditors ...RequestEditorFn) (*GetApiV1OrganizationsOrganizationIDRegionsRegionIDExternalnetworksResponse, error) { + rsp, err := c.GetApiV1OrganizationsOrganizationIDRegionsRegionIDExternalnetworks(ctx, organizationID, regionID, reqEditors...) if err != nil { return nil, err } - return ParsePostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesIdentityIDPhysicalNetworksResponse(rsp) + return ParseGetApiV1OrganizationsOrganizationIDRegionsRegionIDExternalnetworksResponse(rsp) } -func (c *ClientWithResponses) PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesIdentityIDPhysicalNetworksWithResponse(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, regionID RegionIDParameter, identityID IdentityIDParameter, body PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesIdentityIDPhysicalNetworksJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesIdentityIDPhysicalNetworksResponse, error) { - rsp, err := c.PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesIdentityIDPhysicalNetworks(ctx, organizationID, projectID, regionID, identityID, body, reqEditors...) +// GetApiV1OrganizationsOrganizationIDRegionsRegionIDFlavorsWithResponse request returning *GetApiV1OrganizationsOrganizationIDRegionsRegionIDFlavorsResponse +func (c *ClientWithResponses) GetApiV1OrganizationsOrganizationIDRegionsRegionIDFlavorsWithResponse(ctx context.Context, organizationID OrganizationIDParameter, regionID RegionIDParameter, reqEditors ...RequestEditorFn) (*GetApiV1OrganizationsOrganizationIDRegionsRegionIDFlavorsResponse, error) { + rsp, err := c.GetApiV1OrganizationsOrganizationIDRegionsRegionIDFlavors(ctx, organizationID, regionID, reqEditors...) if err != nil { return nil, err } - return ParsePostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesIdentityIDPhysicalNetworksResponse(rsp) + return ParseGetApiV1OrganizationsOrganizationIDRegionsRegionIDFlavorsResponse(rsp) } -// GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDImagesWithResponse request returning *GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDImagesResponse -func (c *ClientWithResponses) GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDImagesWithResponse(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, regionID RegionIDParameter, reqEditors ...RequestEditorFn) (*GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDImagesResponse, error) { - rsp, err := c.GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDImages(ctx, organizationID, projectID, regionID, reqEditors...) +// GetApiV1OrganizationsOrganizationIDRegionsRegionIDImagesWithResponse request returning *GetApiV1OrganizationsOrganizationIDRegionsRegionIDImagesResponse +func (c *ClientWithResponses) GetApiV1OrganizationsOrganizationIDRegionsRegionIDImagesWithResponse(ctx context.Context, organizationID OrganizationIDParameter, regionID RegionIDParameter, reqEditors ...RequestEditorFn) (*GetApiV1OrganizationsOrganizationIDRegionsRegionIDImagesResponse, error) { + rsp, err := c.GetApiV1OrganizationsOrganizationIDRegionsRegionIDImages(ctx, organizationID, regionID, reqEditors...) if err != nil { return nil, err } - return ParseGetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDImagesResponse(rsp) + return ParseGetApiV1OrganizationsOrganizationIDRegionsRegionIDImagesResponse(rsp) } // ParseGetApiV1OrganizationsOrganizationIDIdentitiesResponse parses an HTTP response from a GetApiV1OrganizationsOrganizationIDIdentitiesWithResponse call @@ -952,26 +910,33 @@ func ParseGetApiV1OrganizationsOrganizationIDIdentitiesResponse(rsp *http.Respon return response, nil } -// ParseGetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsResponse parses an HTTP response from a GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsWithResponse call -func ParseGetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsResponse(rsp *http.Response) (*GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsResponse, error) { +// ParsePostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesResponse parses an HTTP response from a PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesWithResponse call +func ParsePostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesResponse(rsp *http.Response) (*PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsResponse{ + response := &PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest RegionsResponse + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest IdentityResponse if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest externalRef0.BadRequestResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest externalRef0.UnauthorizedResponse @@ -980,6 +945,13 @@ func ParseGetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsResponse(rs } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest externalRef0.ForbiddenResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest externalRef0.InternalServerErrorResponse if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -992,26 +964,33 @@ func ParseGetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsResponse(rs return response, nil } -// ParseGetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDExternalnetworksResponse parses an HTTP response from a GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDExternalnetworksWithResponse call -func ParseGetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDExternalnetworksResponse(rsp *http.Response) (*GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDExternalnetworksResponse, error) { +// ParsePostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDPhysicalNetworksResponse parses an HTTP response from a PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDPhysicalNetworksWithResponse call +func ParsePostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDPhysicalNetworksResponse(rsp *http.Response) (*PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDPhysicalNetworksResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDExternalnetworksResponse{ + response := &PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDPhysicalNetworksResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ExternalNetworksResponse + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest PhysicalNetworkResponse if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest externalRef0.BadRequestResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest externalRef0.UnauthorizedResponse @@ -1027,13 +1006,6 @@ func ParseGetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDExt } response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest externalRef0.NotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest externalRef0.InternalServerErrorResponse if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -1046,34 +1018,27 @@ func ParseGetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDExt return response, nil } -// ParseGetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDFlavorsResponse parses an HTTP response from a GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDFlavorsWithResponse call -func ParseGetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDFlavorsResponse(rsp *http.Response) (*GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDFlavorsResponse, error) { +// ParseGetApiV1OrganizationsOrganizationIDRegionsResponse parses an HTTP response from a GetApiV1OrganizationsOrganizationIDRegionsWithResponse call +func ParseGetApiV1OrganizationsOrganizationIDRegionsResponse(rsp *http.Response) (*GetApiV1OrganizationsOrganizationIDRegionsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDFlavorsResponse{ + response := &GetApiV1OrganizationsOrganizationIDRegionsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest FlavorsResponse + var dest RegionsResponse if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest externalRef0.BadRequestResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest externalRef0.UnauthorizedResponse if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -1093,33 +1058,26 @@ func ParseGetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDFla return response, nil } -// ParsePostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesResponse parses an HTTP response from a PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesWithResponse call -func ParsePostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesResponse(rsp *http.Response) (*PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesResponse, error) { +// ParseGetApiV1OrganizationsOrganizationIDRegionsRegionIDExternalnetworksResponse parses an HTTP response from a GetApiV1OrganizationsOrganizationIDRegionsRegionIDExternalnetworksWithResponse call +func ParseGetApiV1OrganizationsOrganizationIDRegionsRegionIDExternalnetworksResponse(rsp *http.Response) (*GetApiV1OrganizationsOrganizationIDRegionsRegionIDExternalnetworksResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesResponse{ + response := &GetApiV1OrganizationsOrganizationIDRegionsRegionIDExternalnetworksResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest IdentityResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON201 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest externalRef0.BadRequestResponse + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ExternalNetworksResponse if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest externalRef0.UnauthorizedResponse @@ -1135,6 +1093,13 @@ func ParsePostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDId } response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest externalRef0.NotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest externalRef0.InternalServerErrorResponse if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -1147,26 +1112,26 @@ func ParsePostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDId return response, nil } -// ParsePostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesIdentityIDPhysicalNetworksResponse parses an HTTP response from a PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesIdentityIDPhysicalNetworksWithResponse call -func ParsePostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesIdentityIDPhysicalNetworksResponse(rsp *http.Response) (*PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesIdentityIDPhysicalNetworksResponse, error) { +// ParseGetApiV1OrganizationsOrganizationIDRegionsRegionIDFlavorsResponse parses an HTTP response from a GetApiV1OrganizationsOrganizationIDRegionsRegionIDFlavorsWithResponse call +func ParseGetApiV1OrganizationsOrganizationIDRegionsRegionIDFlavorsResponse(rsp *http.Response) (*GetApiV1OrganizationsOrganizationIDRegionsRegionIDFlavorsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesIdentityIDPhysicalNetworksResponse{ + response := &GetApiV1OrganizationsOrganizationIDRegionsRegionIDFlavorsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest PhysicalNetworkResponse + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest FlavorsResponse if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON201 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest externalRef0.BadRequestResponse @@ -1182,13 +1147,6 @@ func ParsePostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDId } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest externalRef0.ForbiddenResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest externalRef0.InternalServerErrorResponse if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -1201,15 +1159,15 @@ func ParsePostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDId return response, nil } -// ParseGetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDImagesResponse parses an HTTP response from a GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDImagesWithResponse call -func ParseGetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDImagesResponse(rsp *http.Response) (*GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDImagesResponse, error) { +// ParseGetApiV1OrganizationsOrganizationIDRegionsRegionIDImagesResponse parses an HTTP response from a GetApiV1OrganizationsOrganizationIDRegionsRegionIDImagesWithResponse call +func ParseGetApiV1OrganizationsOrganizationIDRegionsRegionIDImagesResponse(rsp *http.Response) (*GetApiV1OrganizationsOrganizationIDRegionsRegionIDImagesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDImagesResponse{ + response := &GetApiV1OrganizationsOrganizationIDRegionsRegionIDImagesResponse{ Body: bodyBytes, HTTPResponse: rsp, } diff --git a/pkg/openapi/router.go b/pkg/openapi/router.go index cc663ef..248cf9f 100644 --- a/pkg/openapi/router.go +++ b/pkg/openapi/router.go @@ -18,23 +18,23 @@ type ServerInterface interface { // (GET /api/v1/organizations/{organizationID}/identities) GetApiV1OrganizationsOrganizationIDIdentities(w http.ResponseWriter, r *http.Request, organizationID OrganizationIDParameter) - // (GET /api/v1/organizations/{organizationID}/projects/{projectID}/regions) - GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegions(w http.ResponseWriter, r *http.Request, organizationID OrganizationIDParameter, projectID ProjectIDParameter) + // (POST /api/v1/organizations/{organizationID}/projects/{projectID}/identities) + PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentities(w http.ResponseWriter, r *http.Request, organizationID OrganizationIDParameter, projectID ProjectIDParameter) - // (GET /api/v1/organizations/{organizationID}/projects/{projectID}/regions/{regionID}/externalnetworks) - GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDExternalnetworks(w http.ResponseWriter, r *http.Request, organizationID OrganizationIDParameter, projectID ProjectIDParameter, regionID RegionIDParameter) + // (POST /api/v1/organizations/{organizationID}/projects/{projectID}/identities/{identityID}/physicalNetworks) + PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDPhysicalNetworks(w http.ResponseWriter, r *http.Request, organizationID OrganizationIDParameter, projectID ProjectIDParameter, identityID IdentityIDParameter) - // (GET /api/v1/organizations/{organizationID}/projects/{projectID}/regions/{regionID}/flavors) - GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDFlavors(w http.ResponseWriter, r *http.Request, organizationID OrganizationIDParameter, projectID ProjectIDParameter, regionID RegionIDParameter) + // (GET /api/v1/organizations/{organizationID}/regions) + GetApiV1OrganizationsOrganizationIDRegions(w http.ResponseWriter, r *http.Request, organizationID OrganizationIDParameter) - // (POST /api/v1/organizations/{organizationID}/projects/{projectID}/regions/{regionID}/identities) - PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentities(w http.ResponseWriter, r *http.Request, organizationID OrganizationIDParameter, projectID ProjectIDParameter, regionID RegionIDParameter) + // (GET /api/v1/organizations/{organizationID}/regions/{regionID}/externalnetworks) + GetApiV1OrganizationsOrganizationIDRegionsRegionIDExternalnetworks(w http.ResponseWriter, r *http.Request, organizationID OrganizationIDParameter, regionID RegionIDParameter) - // (POST /api/v1/organizations/{organizationID}/projects/{projectID}/regions/{regionID}/identities/{identityID}/physicalNetworks) - PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesIdentityIDPhysicalNetworks(w http.ResponseWriter, r *http.Request, organizationID OrganizationIDParameter, projectID ProjectIDParameter, regionID RegionIDParameter, identityID IdentityIDParameter) + // (GET /api/v1/organizations/{organizationID}/regions/{regionID}/flavors) + GetApiV1OrganizationsOrganizationIDRegionsRegionIDFlavors(w http.ResponseWriter, r *http.Request, organizationID OrganizationIDParameter, regionID RegionIDParameter) - // (GET /api/v1/organizations/{organizationID}/projects/{projectID}/regions/{regionID}/images) - GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDImages(w http.ResponseWriter, r *http.Request, organizationID OrganizationIDParameter, projectID ProjectIDParameter, regionID RegionIDParameter) + // (GET /api/v1/organizations/{organizationID}/regions/{regionID}/images) + GetApiV1OrganizationsOrganizationIDRegionsRegionIDImages(w http.ResponseWriter, r *http.Request, organizationID OrganizationIDParameter, regionID RegionIDParameter) } // Unimplemented server implementation that returns http.StatusNotImplemented for each endpoint. @@ -46,33 +46,33 @@ func (_ Unimplemented) GetApiV1OrganizationsOrganizationIDIdentities(w http.Resp w.WriteHeader(http.StatusNotImplemented) } -// (GET /api/v1/organizations/{organizationID}/projects/{projectID}/regions) -func (_ Unimplemented) GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegions(w http.ResponseWriter, r *http.Request, organizationID OrganizationIDParameter, projectID ProjectIDParameter) { +// (POST /api/v1/organizations/{organizationID}/projects/{projectID}/identities) +func (_ Unimplemented) PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentities(w http.ResponseWriter, r *http.Request, organizationID OrganizationIDParameter, projectID ProjectIDParameter) { w.WriteHeader(http.StatusNotImplemented) } -// (GET /api/v1/organizations/{organizationID}/projects/{projectID}/regions/{regionID}/externalnetworks) -func (_ Unimplemented) GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDExternalnetworks(w http.ResponseWriter, r *http.Request, organizationID OrganizationIDParameter, projectID ProjectIDParameter, regionID RegionIDParameter) { +// (POST /api/v1/organizations/{organizationID}/projects/{projectID}/identities/{identityID}/physicalNetworks) +func (_ Unimplemented) PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDPhysicalNetworks(w http.ResponseWriter, r *http.Request, organizationID OrganizationIDParameter, projectID ProjectIDParameter, identityID IdentityIDParameter) { w.WriteHeader(http.StatusNotImplemented) } -// (GET /api/v1/organizations/{organizationID}/projects/{projectID}/regions/{regionID}/flavors) -func (_ Unimplemented) GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDFlavors(w http.ResponseWriter, r *http.Request, organizationID OrganizationIDParameter, projectID ProjectIDParameter, regionID RegionIDParameter) { +// (GET /api/v1/organizations/{organizationID}/regions) +func (_ Unimplemented) GetApiV1OrganizationsOrganizationIDRegions(w http.ResponseWriter, r *http.Request, organizationID OrganizationIDParameter) { w.WriteHeader(http.StatusNotImplemented) } -// (POST /api/v1/organizations/{organizationID}/projects/{projectID}/regions/{regionID}/identities) -func (_ Unimplemented) PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentities(w http.ResponseWriter, r *http.Request, organizationID OrganizationIDParameter, projectID ProjectIDParameter, regionID RegionIDParameter) { +// (GET /api/v1/organizations/{organizationID}/regions/{regionID}/externalnetworks) +func (_ Unimplemented) GetApiV1OrganizationsOrganizationIDRegionsRegionIDExternalnetworks(w http.ResponseWriter, r *http.Request, organizationID OrganizationIDParameter, regionID RegionIDParameter) { w.WriteHeader(http.StatusNotImplemented) } -// (POST /api/v1/organizations/{organizationID}/projects/{projectID}/regions/{regionID}/identities/{identityID}/physicalNetworks) -func (_ Unimplemented) PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesIdentityIDPhysicalNetworks(w http.ResponseWriter, r *http.Request, organizationID OrganizationIDParameter, projectID ProjectIDParameter, regionID RegionIDParameter, identityID IdentityIDParameter) { +// (GET /api/v1/organizations/{organizationID}/regions/{regionID}/flavors) +func (_ Unimplemented) GetApiV1OrganizationsOrganizationIDRegionsRegionIDFlavors(w http.ResponseWriter, r *http.Request, organizationID OrganizationIDParameter, regionID RegionIDParameter) { w.WriteHeader(http.StatusNotImplemented) } -// (GET /api/v1/organizations/{organizationID}/projects/{projectID}/regions/{regionID}/images) -func (_ Unimplemented) GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDImages(w http.ResponseWriter, r *http.Request, organizationID OrganizationIDParameter, projectID ProjectIDParameter, regionID RegionIDParameter) { +// (GET /api/v1/organizations/{organizationID}/regions/{regionID}/images) +func (_ Unimplemented) GetApiV1OrganizationsOrganizationIDRegionsRegionIDImages(w http.ResponseWriter, r *http.Request, organizationID OrganizationIDParameter, regionID RegionIDParameter) { w.WriteHeader(http.StatusNotImplemented) } @@ -113,8 +113,8 @@ func (siw *ServerInterfaceWrapper) GetApiV1OrganizationsOrganizationIDIdentities handler.ServeHTTP(w, r.WithContext(ctx)) } -// GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegions operation middleware -func (siw *ServerInterfaceWrapper) GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegions(w http.ResponseWriter, r *http.Request) { +// PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentities operation middleware +func (siw *ServerInterfaceWrapper) PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentities(w http.ResponseWriter, r *http.Request) { ctx := r.Context() var err error @@ -140,7 +140,7 @@ func (siw *ServerInterfaceWrapper) GetApiV1OrganizationsOrganizationIDProjectsPr ctx = context.WithValue(ctx, Oauth2AuthenticationScopes, []string{}) handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - siw.Handler.GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegions(w, r, organizationID, projectID) + siw.Handler.PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentities(w, r, organizationID, projectID) })) for _, middleware := range siw.HandlerMiddlewares { @@ -150,8 +150,8 @@ func (siw *ServerInterfaceWrapper) GetApiV1OrganizationsOrganizationIDProjectsPr handler.ServeHTTP(w, r.WithContext(ctx)) } -// GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDExternalnetworks operation middleware -func (siw *ServerInterfaceWrapper) GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDExternalnetworks(w http.ResponseWriter, r *http.Request) { +// PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDPhysicalNetworks operation middleware +func (siw *ServerInterfaceWrapper) PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDPhysicalNetworks(w http.ResponseWriter, r *http.Request) { ctx := r.Context() var err error @@ -174,19 +174,19 @@ func (siw *ServerInterfaceWrapper) GetApiV1OrganizationsOrganizationIDProjectsPr return } - // ------------- Path parameter "regionID" ------------- - var regionID RegionIDParameter + // ------------- Path parameter "identityID" ------------- + var identityID IdentityIDParameter - err = runtime.BindStyledParameterWithLocation("simple", false, "regionID", runtime.ParamLocationPath, chi.URLParam(r, "regionID"), ®ionID) + err = runtime.BindStyledParameterWithLocation("simple", false, "identityID", runtime.ParamLocationPath, chi.URLParam(r, "identityID"), &identityID) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "regionID", Err: err}) + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "identityID", Err: err}) return } ctx = context.WithValue(ctx, Oauth2AuthenticationScopes, []string{}) handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - siw.Handler.GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDExternalnetworks(w, r, organizationID, projectID, regionID) + siw.Handler.PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDPhysicalNetworks(w, r, organizationID, projectID, identityID) })) for _, middleware := range siw.HandlerMiddlewares { @@ -196,8 +196,8 @@ func (siw *ServerInterfaceWrapper) GetApiV1OrganizationsOrganizationIDProjectsPr handler.ServeHTTP(w, r.WithContext(ctx)) } -// GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDFlavors operation middleware -func (siw *ServerInterfaceWrapper) GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDFlavors(w http.ResponseWriter, r *http.Request) { +// GetApiV1OrganizationsOrganizationIDRegions operation middleware +func (siw *ServerInterfaceWrapper) GetApiV1OrganizationsOrganizationIDRegions(w http.ResponseWriter, r *http.Request) { ctx := r.Context() var err error @@ -211,28 +211,10 @@ func (siw *ServerInterfaceWrapper) GetApiV1OrganizationsOrganizationIDProjectsPr return } - // ------------- Path parameter "projectID" ------------- - var projectID ProjectIDParameter - - err = runtime.BindStyledParameterWithLocation("simple", false, "projectID", runtime.ParamLocationPath, chi.URLParam(r, "projectID"), &projectID) - if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) - return - } - - // ------------- Path parameter "regionID" ------------- - var regionID RegionIDParameter - - err = runtime.BindStyledParameterWithLocation("simple", false, "regionID", runtime.ParamLocationPath, chi.URLParam(r, "regionID"), ®ionID) - if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "regionID", Err: err}) - return - } - ctx = context.WithValue(ctx, Oauth2AuthenticationScopes, []string{}) handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - siw.Handler.GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDFlavors(w, r, organizationID, projectID, regionID) + siw.Handler.GetApiV1OrganizationsOrganizationIDRegions(w, r, organizationID) })) for _, middleware := range siw.HandlerMiddlewares { @@ -242,8 +224,8 @@ func (siw *ServerInterfaceWrapper) GetApiV1OrganizationsOrganizationIDProjectsPr handler.ServeHTTP(w, r.WithContext(ctx)) } -// PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentities operation middleware -func (siw *ServerInterfaceWrapper) PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentities(w http.ResponseWriter, r *http.Request) { +// GetApiV1OrganizationsOrganizationIDRegionsRegionIDExternalnetworks operation middleware +func (siw *ServerInterfaceWrapper) GetApiV1OrganizationsOrganizationIDRegionsRegionIDExternalnetworks(w http.ResponseWriter, r *http.Request) { ctx := r.Context() var err error @@ -257,15 +239,6 @@ func (siw *ServerInterfaceWrapper) PostApiV1OrganizationsOrganizationIDProjectsP return } - // ------------- Path parameter "projectID" ------------- - var projectID ProjectIDParameter - - err = runtime.BindStyledParameterWithLocation("simple", false, "projectID", runtime.ParamLocationPath, chi.URLParam(r, "projectID"), &projectID) - if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) - return - } - // ------------- Path parameter "regionID" ------------- var regionID RegionIDParameter @@ -278,7 +251,7 @@ func (siw *ServerInterfaceWrapper) PostApiV1OrganizationsOrganizationIDProjectsP ctx = context.WithValue(ctx, Oauth2AuthenticationScopes, []string{}) handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - siw.Handler.PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentities(w, r, organizationID, projectID, regionID) + siw.Handler.GetApiV1OrganizationsOrganizationIDRegionsRegionIDExternalnetworks(w, r, organizationID, regionID) })) for _, middleware := range siw.HandlerMiddlewares { @@ -288,8 +261,8 @@ func (siw *ServerInterfaceWrapper) PostApiV1OrganizationsOrganizationIDProjectsP handler.ServeHTTP(w, r.WithContext(ctx)) } -// PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesIdentityIDPhysicalNetworks operation middleware -func (siw *ServerInterfaceWrapper) PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesIdentityIDPhysicalNetworks(w http.ResponseWriter, r *http.Request) { +// GetApiV1OrganizationsOrganizationIDRegionsRegionIDFlavors operation middleware +func (siw *ServerInterfaceWrapper) GetApiV1OrganizationsOrganizationIDRegionsRegionIDFlavors(w http.ResponseWriter, r *http.Request) { ctx := r.Context() var err error @@ -303,15 +276,6 @@ func (siw *ServerInterfaceWrapper) PostApiV1OrganizationsOrganizationIDProjectsP return } - // ------------- Path parameter "projectID" ------------- - var projectID ProjectIDParameter - - err = runtime.BindStyledParameterWithLocation("simple", false, "projectID", runtime.ParamLocationPath, chi.URLParam(r, "projectID"), &projectID) - if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) - return - } - // ------------- Path parameter "regionID" ------------- var regionID RegionIDParameter @@ -321,19 +285,10 @@ func (siw *ServerInterfaceWrapper) PostApiV1OrganizationsOrganizationIDProjectsP return } - // ------------- Path parameter "identityID" ------------- - var identityID IdentityIDParameter - - err = runtime.BindStyledParameterWithLocation("simple", false, "identityID", runtime.ParamLocationPath, chi.URLParam(r, "identityID"), &identityID) - if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "identityID", Err: err}) - return - } - ctx = context.WithValue(ctx, Oauth2AuthenticationScopes, []string{}) handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - siw.Handler.PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesIdentityIDPhysicalNetworks(w, r, organizationID, projectID, regionID, identityID) + siw.Handler.GetApiV1OrganizationsOrganizationIDRegionsRegionIDFlavors(w, r, organizationID, regionID) })) for _, middleware := range siw.HandlerMiddlewares { @@ -343,8 +298,8 @@ func (siw *ServerInterfaceWrapper) PostApiV1OrganizationsOrganizationIDProjectsP handler.ServeHTTP(w, r.WithContext(ctx)) } -// GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDImages operation middleware -func (siw *ServerInterfaceWrapper) GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDImages(w http.ResponseWriter, r *http.Request) { +// GetApiV1OrganizationsOrganizationIDRegionsRegionIDImages operation middleware +func (siw *ServerInterfaceWrapper) GetApiV1OrganizationsOrganizationIDRegionsRegionIDImages(w http.ResponseWriter, r *http.Request) { ctx := r.Context() var err error @@ -358,15 +313,6 @@ func (siw *ServerInterfaceWrapper) GetApiV1OrganizationsOrganizationIDProjectsPr return } - // ------------- Path parameter "projectID" ------------- - var projectID ProjectIDParameter - - err = runtime.BindStyledParameterWithLocation("simple", false, "projectID", runtime.ParamLocationPath, chi.URLParam(r, "projectID"), &projectID) - if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) - return - } - // ------------- Path parameter "regionID" ------------- var regionID RegionIDParameter @@ -379,7 +325,7 @@ func (siw *ServerInterfaceWrapper) GetApiV1OrganizationsOrganizationIDProjectsPr ctx = context.WithValue(ctx, Oauth2AuthenticationScopes, []string{}) handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - siw.Handler.GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDImages(w, r, organizationID, projectID, regionID) + siw.Handler.GetApiV1OrganizationsOrganizationIDRegionsRegionIDImages(w, r, organizationID, regionID) })) for _, middleware := range siw.HandlerMiddlewares { @@ -506,22 +452,22 @@ func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handl r.Get(options.BaseURL+"/api/v1/organizations/{organizationID}/identities", wrapper.GetApiV1OrganizationsOrganizationIDIdentities) }) r.Group(func(r chi.Router) { - r.Get(options.BaseURL+"/api/v1/organizations/{organizationID}/projects/{projectID}/regions", wrapper.GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegions) + r.Post(options.BaseURL+"/api/v1/organizations/{organizationID}/projects/{projectID}/identities", wrapper.PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentities) }) r.Group(func(r chi.Router) { - r.Get(options.BaseURL+"/api/v1/organizations/{organizationID}/projects/{projectID}/regions/{regionID}/externalnetworks", wrapper.GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDExternalnetworks) + r.Post(options.BaseURL+"/api/v1/organizations/{organizationID}/projects/{projectID}/identities/{identityID}/physicalNetworks", wrapper.PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDPhysicalNetworks) }) r.Group(func(r chi.Router) { - r.Get(options.BaseURL+"/api/v1/organizations/{organizationID}/projects/{projectID}/regions/{regionID}/flavors", wrapper.GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDFlavors) + r.Get(options.BaseURL+"/api/v1/organizations/{organizationID}/regions", wrapper.GetApiV1OrganizationsOrganizationIDRegions) }) r.Group(func(r chi.Router) { - r.Post(options.BaseURL+"/api/v1/organizations/{organizationID}/projects/{projectID}/regions/{regionID}/identities", wrapper.PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentities) + r.Get(options.BaseURL+"/api/v1/organizations/{organizationID}/regions/{regionID}/externalnetworks", wrapper.GetApiV1OrganizationsOrganizationIDRegionsRegionIDExternalnetworks) }) r.Group(func(r chi.Router) { - r.Post(options.BaseURL+"/api/v1/organizations/{organizationID}/projects/{projectID}/regions/{regionID}/identities/{identityID}/physicalNetworks", wrapper.PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesIdentityIDPhysicalNetworks) + r.Get(options.BaseURL+"/api/v1/organizations/{organizationID}/regions/{regionID}/flavors", wrapper.GetApiV1OrganizationsOrganizationIDRegionsRegionIDFlavors) }) r.Group(func(r chi.Router) { - r.Get(options.BaseURL+"/api/v1/organizations/{organizationID}/projects/{projectID}/regions/{regionID}/images", wrapper.GetApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDImages) + r.Get(options.BaseURL+"/api/v1/organizations/{organizationID}/regions/{regionID}/images", wrapper.GetApiV1OrganizationsOrganizationIDRegionsRegionIDImages) }) return r diff --git a/pkg/openapi/schema.go b/pkg/openapi/schema.go index fd72ea2..8a9cb42 100644 --- a/pkg/openapi/schema.go +++ b/pkg/openapi/schema.go @@ -19,89 +19,88 @@ import ( // Base64 encoded, gzipped, json marshaled Swagger object var swaggerSpec = []string{ - "H4sIAAAAAAAC/+w8+3PbuJn/CobXmW3nRFlvW/ql5022Wc9uEl/ipDeNchmQ+ChhTQIsAMrRevy/3+DB", - "p0hJlpNLd5ppd2KReHz43i/w3gt5knIGTElvce+lWOAEFAjzixJgiqrt1fPr/Ll+TECGgqaKcuYtvJs1", - "oHyg+yOiIPpez6P6fYrV2ut5DCfgLSpLej1PwD8zKoB4CyUy6HkyXEOC9RZ/EhB5C+8/zkrwzuxbeXab", - "BSAYKJCvcAIlZA8PPY+LFWb0d6xh2wv1JUPVsejqeQfA9RX3Aq22qZ4hlaBsZcBJBf8NQnUQf24c0nt2", - "wFEs9VXwJmB1CGMaTjvsMJXz5b4CrA92SZDqR04o1Pj0jX2hH4WcKWDmT5ymMQ0NAc9+k/os9x58xkka", + "H4sIAAAAAAAC/+w8aXPbOJZ/BcWdqp6pFWXdtvRl1p10p12dTryJk9maKJsCiUcJbRLgAKActcv/fQsH", + "T5GSrDib2Z3UTFcsEsfDuy/w3gt5knIGTElvce+lWOAEFAjzixJgiqrt1fPr/Ll+TECGgqaKcuYtvJs1", + "oHyg+yOiIPpez6P6fYrV2ut5DCfgLSpLej1PwD8yKoB4CyUy6HkyXEOC9RZ/EhB5C+/fzkrwzuxbeXab", + "BSAYKJCvcAIlZA8PPY+LFWb0D6xh2wv1JUPVsejqeQfA9RX3Aq22qZ4hlaBsZcBJBf8dQnUQf24c0nt2", + "wFEs9VXwJmB1CGMaTjvsMJXz5b4CrA92SZDqR04o1Pj0jX2hH4WcKWDmT5ymMQ0NAc9+l/os9x58xkka", "g/4zAYUJVriFR9AGRMAloOrznkeJt/DC8+nsAkbEj+Y48CfTMfHneIz96XB8Po3OLyajWbDL9r75/dDz", - "ZAqh4Rm8kt7iw30+MI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x1qq40k79YYZar", + "7Bw5r/6XnayGBjZpZ8Wg24T8M6iPBlr2a4EErzrIrt98qwDObH46kYvZjzhYzU0/4KS5gR21r71oaY5/", + "eOg6wN7w5JGlr2OdLcMNLV5WWc57iQOI39v+w5auSdPl9WsWgBmMYj0amXbFHlLblIY4jrfW8muhqiVI", + "3HG0jxDAklFG4DMUJkETXat1QzmsFAi95X9/GPjzS//v2P/j45//uih/+Z/6H+8HvdnwoTLiL3/9U5t0", + "dfUKtxzw12Kozemg3zKpTI3Nnf35q7d5m59NicZbFPM7EKZwhsI1FjjUSqXn4haJuEDrbboGJntIKiyU", + "8aaAucwnLifpoUV2gBGzr0IJlwrNxpW1Nc5iYCu11thK8OeX5oe3mI17XkJZ/nPYgoxq5WePh7u493Ac", + "v45MceMYpd/wj++bnluj4NSmPmv99hVTrKqptgBizlbaJzlsIxub7uqSj23VvY5AY6dm9M3DiwbkJ+vT", + "tnXaMVBFwA/yUEyfV/NalPTV9WaCMCECpDaQetyTG0a3/REn7nKOdoj+jX2kJyP4QQ48WvyPVCe7CmGP", + "N1698PIUamCfh/yxiAm7BN++/XKKnyLhdu+T6VyZvnOwK6ZdB6trccAz5fDbftinCFi7Ibxxq3d51D/I", + "Mlmgl6gmtMqUQFs2K68973G1isrzkU5UhVtaPCnR9Ihb4g/HwjkFnWdheoTjGF1eX5VsLgATm325E7aH", + "skmZvWW7WpGq8splgrn5YVw2nK0SfUzDBSZuN85Jwo3zyRR8VnuLY8fd1ap4l00WsXWxCgavW9oTOjRF", + "Mc6Ujk3KodrCUzJLxm4Zv2ON5ofqT1NHJdB4bQuX7Qz2JdqzM4q636FyDGVLSRsaFE2griJte3sMylYb", + "rLh7C49gBb4e3pEkacH6MfqthV4tirg5pEUj9x4pMEZG+lVi1I3rdwl8pARKSDbt4ZGEBDNFw7yi1AjW", + "Nssl+fflsl/5pzUga4uqG9ZJR6raMSwKZvmWxb858XYJUm1OPSB/9qStQXqHbD46MNoj1ZU+wDa+MVdE", + "7tYcuXE18W5Pm9Y6z45XE26D49VEVy9Fxug/skMtFW1tETXIj1AKN6b/NZdfKmvpBpdp+F3H7qZF1IbT", + "tcLGkmG2rRsPPWYNOFZr14Jkm5UCYBBRhSLBE4T1K0awaSJasgICi7b+knktrKTwqjUKwiKgSmCxRQqv", + "rMxrGEw+ZZet2/tQLnOc50u01yfbMzqaZOZVnqVXeHWYYAaQfM2P7ec1Edker0sHdke7XBp/O76WUVRh", + "JqjavtXjXJ7BdLzVe+924XidgrCub1Hmcs1qAWChvUzTmFdvDTTSEfM7s0/eSWbePOMEdh6+E7G38NZK", + "pXJxVqS3+xmjt1ww39Qs+lyszizIZ5vRWW2+dux1QKW304fXEJ2wpplX03Dmle1YpCziu9h5ZsopLplN", + "qAz5BsTW1gB5ZpLkEsSGOiVEVazXraTO3tipb+0gbU9rtwsG/WF/aHJRKTCcUm/hjfuD/tgak7XB7xlO", + "6dlmWIsv5dl9/WMLD5WLSLvH+A0zvAJS5uId0LKP0FUxD8k1z2KTa5OUrWKjdm27Ds6fuMvZtnuDhdBf", + "MqN/YppQJVEQY6mQwIRmMk9nwgZskwuuXHBEMeBbcwOQMiR5YrvtJcIbTolEQbbS85es7tI6Y6lxvQLV", + "1guqjNtSXLSylw7NlQRc/4qFXoPnvG+auF+Aukzp++HrKp5f17Bc4spr3PkeDQZdoluMO2u5n/jQ8ybH", + "TG25U26mDg9Pbe0hNpPHhyfvXn996HnTow675wJKVWMZ76FdV334aNOSlQ+tdHga5ZCzrs+amKWOlCWX", + "JpFn98WnRP7lBOyJsN47OLXlwy/ayUl5m9l8ZtwzhBGDu0ppkTVSNnXJvubyoGi7ure8zqFpyHr+GZVt", + "N+dXvrRy1vzMysOOvhgerS+237XF0driyWT87L78/NJDM93cqQHkTp5ca4Dr5jNTyCx+GA/dXWArP5PB", + "xZIFWID2q2PEOGnkd5zaeP/y8lUfoVdcgV3I1OEKdVIkC/O0PZXIXJxjKt4uyyZ5lJZtGdsewrLSwWag", + "1QQydxRMU5J2XfWMlEJoPObdno1vqj8Oz2r7XteRaqeJ0ydXOFclbE2+O0EVdXw/6CSN1HX/77tiejrF", + "1Jmof+OaFQlElGlmtEEOQjeVG7Ar4CuB07XRN+bO6xbFfGV+plhoBuOsv2Q/UXOJ6A5vi1Zo+2EN7WfQ", + "jVMmVNoOBu0/S8lDqqWgiPRlFq4RlktW2zTmIY6hVzrc9vMgP0gkwNwSIiiIeaC1hsZ4pgCBCjVIOFzn", + "sdZaayAlEb9jpbwVILh+Aap6JtnhrruVPXs9e9U3X0CCcY+qn1eRHJlWP+maMKqBQtlCKmNq1RteMrnG", + "omiwU2vBs9Ua3a2xgg0IlEC41kdNNMqKvmx7/QsrNys/SGf88lLrVZvILSoxjw5SHJucFKE0b35+qXD+", + "v48UHMLO7vPP+D0Ut4lY9+2lOOZ3srz5iJbezuWlpWdYO2cZ5yU4e61FNekv2d9MY/Ozy+vXho2LFuad", + "u1BaliCOeogqFAqcSsQzhfwlw9LY8UxmOEY+opHNspu7hZyBTSdmjPTQncDhbSF5TJ/I+CImQMkkugMk", + "FY1j0yirD7XGjMSQ35i3QoVjJBm/i2J8eyCKL9Jjrde6ThWKN45KPzVpdIqwdH6+7NuZtMlgcnjmzgcL", + "/s8K6mE3b/djnV8o3Z0Xqp45W2YHlAmAfbpeGmUf1mY6Sc8/r+WQB8TWQLRdLPTGEwjCz+44p/B/82N2", + "39AJ/M6+R7JvV79tzr3m/SnMW23TPYZ3n0KLX9nDnJSKrX/T6Dvr/u+w7sPD/wQAAP//MPauMUZbAAA=", } // GetSwagger returns the content of the embedded swagger specification file diff --git a/pkg/openapi/server.spec.yaml b/pkg/openapi/server.spec.yaml index 5e78638..1d27d83 100644 --- a/pkg/openapi/server.spec.yaml +++ b/pkg/openapi/server.spec.yaml @@ -5,7 +5,7 @@ info: Cloud region discovery and routing service. version: 0.1.1 paths: - /api/v1/organizations/{organizationID}/projects/{projectID}/regions: + /api/v1/organizations/{organizationID}/regions: description: |- Regions define a cloud. This may be geographical or any logical partition. Either way this is the primitive that is used to associate metadata such as @@ -15,7 +15,6 @@ paths: shared cloud through whatever mechanism is available on that cloud provider. parameters: - $ref: '#/components/parameters/organizationIDParameter' - - $ref: '#/components/parameters/projectIDParameter' get: description: |- List all regions. @@ -28,11 +27,10 @@ paths: $ref: 'https://raw.githubusercontent.com/unikorn-cloud/core/main/pkg/openapi/common.spec.yaml#/components/responses/unauthorizedResponse' '500': $ref: 'https://raw.githubusercontent.com/unikorn-cloud/core/main/pkg/openapi/common.spec.yaml#/components/responses/internalServerErrorResponse' - /api/v1/organizations/{organizationID}/projects/{projectID}/regions/{regionID}/flavors: + /api/v1/organizations/{organizationID}/regions/{regionID}/flavors: description: Compute flavor services. parameters: - $ref: '#/components/parameters/organizationIDParameter' - - $ref: '#/components/parameters/projectIDParameter' - $ref: '#/components/parameters/regionIDParameter' get: description: |- @@ -48,11 +46,10 @@ paths: $ref: 'https://raw.githubusercontent.com/unikorn-cloud/core/main/pkg/openapi/common.spec.yaml#/components/responses/unauthorizedResponse' '500': $ref: 'https://raw.githubusercontent.com/unikorn-cloud/core/main/pkg/openapi/common.spec.yaml#/components/responses/internalServerErrorResponse' - /api/v1/organizations/{organizationID}/projects/{projectID}/regions/{regionID}/images: + /api/v1/organizations/{organizationID}/regions/{regionID}/images: description: Compute image services. parameters: - $ref: '#/components/parameters/organizationIDParameter' - - $ref: '#/components/parameters/projectIDParameter' - $ref: '#/components/parameters/regionIDParameter' get: description: |- @@ -68,6 +65,30 @@ paths: $ref: 'https://raw.githubusercontent.com/unikorn-cloud/core/main/pkg/openapi/common.spec.yaml#/components/responses/unauthorizedResponse' '500': $ref: 'https://raw.githubusercontent.com/unikorn-cloud/core/main/pkg/openapi/common.spec.yaml#/components/responses/internalServerErrorResponse' + /api/v1/organizations/{organizationID}/regions/{regionID}/externalnetworks: + description: |- + Allows access to "external networks" for providers that support them. + While CAPO can infer the external network itself, it craps out - + as per usual - if more than one is found, wracked with indescision. + Thus we still need to handle it as a special snowflake. + parameters: + - $ref: '#/components/parameters/organizationIDParameter' + - $ref: '#/components/parameters/regionIDParameter' + get: + description: Get a list of external networks. + security: + - oauth2Authentication: [] + responses: + '200': + $ref: '#/components/responses/externalNetworksResponse' + '401': + $ref: 'https://raw.githubusercontent.com/unikorn-cloud/core/main/pkg/openapi/common.spec.yaml#/components/responses/unauthorizedResponse' + '403': + $ref: 'https://raw.githubusercontent.com/unikorn-cloud/core/main/pkg/openapi/common.spec.yaml#/components/responses/forbiddenResponse' + '404': + $ref: 'https://raw.githubusercontent.com/unikorn-cloud/core/main/pkg/openapi/common.spec.yaml#/components/responses/notFoundResponse' + '500': + $ref: 'https://raw.githubusercontent.com/unikorn-cloud/core/main/pkg/openapi/common.spec.yaml#/components/responses/internalServerErrorResponse' /api/v1/organizations/{organizationID}/identities: description: |- Managed identity services. Identities should be single use e.g. a single cluster instance. @@ -90,7 +111,7 @@ paths: $ref: 'https://raw.githubusercontent.com/unikorn-cloud/core/main/pkg/openapi/common.spec.yaml#/components/responses/forbiddenResponse' '500': $ref: 'https://raw.githubusercontent.com/unikorn-cloud/core/main/pkg/openapi/common.spec.yaml#/components/responses/internalServerErrorResponse' - /api/v1/organizations/{organizationID}/projects/{projectID}/regions/{regionID}/identities: + /api/v1/organizations/{organizationID}/projects/{projectID}/identities: description: |- Managed identity services. Identities should be single use e.g. a single cluster instance. This limits blast radius in the event of a credential leak, or in some cases avoids bugs in @@ -98,7 +119,6 @@ paths: parameters: - $ref: '#/components/parameters/organizationIDParameter' - $ref: '#/components/parameters/projectIDParameter' - - $ref: '#/components/parameters/regionIDParameter' post: description: Create a new identity in the region. security: @@ -116,7 +136,7 @@ paths: $ref: 'https://raw.githubusercontent.com/unikorn-cloud/core/main/pkg/openapi/common.spec.yaml#/components/responses/forbiddenResponse' '500': $ref: 'https://raw.githubusercontent.com/unikorn-cloud/core/main/pkg/openapi/common.spec.yaml#/components/responses/internalServerErrorResponse' - /api/v1/organizations/{organizationID}/projects/{projectID}/regions/{regionID}/identities/{identityID}/physicalNetworks: + /api/v1/organizations/{organizationID}/projects/{projectID}/identities/{identityID}/physicalNetworks: description: |- Manages physical networks. Physical networks are networks that may be required for baremetal node provisioning e.g. a VLAN. Note that only a single provider network is currently @@ -124,7 +144,6 @@ paths: parameters: - $ref: '#/components/parameters/organizationIDParameter' - $ref: '#/components/parameters/projectIDParameter' - - $ref: '#/components/parameters/regionIDParameter' - $ref: '#/components/parameters/identityIDParameter' post: description: Create a new provider network. @@ -143,31 +162,6 @@ paths: $ref: 'https://raw.githubusercontent.com/unikorn-cloud/core/main/pkg/openapi/common.spec.yaml#/components/responses/forbiddenResponse' '500': $ref: 'https://raw.githubusercontent.com/unikorn-cloud/core/main/pkg/openapi/common.spec.yaml#/components/responses/internalServerErrorResponse' - /api/v1/organizations/{organizationID}/projects/{projectID}/regions/{regionID}/externalnetworks: - description: |- - Allows access to "external networks" for providers that support them. - While CAPO can infer the external network itself, it craps out - - as per usual - if more than one is found, wracked with indescision. - Thus we still need to handle it as a special snowflake. - parameters: - - $ref: '#/components/parameters/organizationIDParameter' - - $ref: '#/components/parameters/projectIDParameter' - - $ref: '#/components/parameters/regionIDParameter' - get: - description: Get a list of external networks. - security: - - oauth2Authentication: [] - responses: - '200': - $ref: '#/components/responses/externalNetworksResponse' - '401': - $ref: 'https://raw.githubusercontent.com/unikorn-cloud/core/main/pkg/openapi/common.spec.yaml#/components/responses/unauthorizedResponse' - '403': - $ref: 'https://raw.githubusercontent.com/unikorn-cloud/core/main/pkg/openapi/common.spec.yaml#/components/responses/forbiddenResponse' - '404': - $ref: 'https://raw.githubusercontent.com/unikorn-cloud/core/main/pkg/openapi/common.spec.yaml#/components/responses/notFoundResponse' - '500': - $ref: 'https://raw.githubusercontent.com/unikorn-cloud/core/main/pkg/openapi/common.spec.yaml#/components/responses/internalServerErrorResponse' components: parameters: organizationIDParameter: @@ -363,9 +357,14 @@ components: identityWriteSpec: description: Request parameters for creating an identity. type: object + required: + - regionId properties: tags: $ref: '#/components/schemas/tagList' + regionId: + description: The region an identity is provisioned in. + type: string identityWrite: description: An identity request. type: object @@ -404,11 +403,15 @@ components: type: object required: - type + - regionId properties: tags: $ref: '#/components/schemas/tagList' type: $ref: '#/components/schemas/regionType' + regionId: + description: The region an identity is provisioned in. + type: string openstack: $ref: '#/components/schemas/identitySpecOpenStack' identityRead: @@ -419,7 +422,7 @@ components: - spec properties: metadata: - $ref: 'https://raw.githubusercontent.com/unikorn-cloud/core/main/pkg/openapi/common.spec.yaml#/components/schemas/regionScopedResourceMetadata' + $ref: 'https://raw.githubusercontent.com/unikorn-cloud/core/main/pkg/openapi/common.spec.yaml#/components/schemas/projectScopedResourceReadMetadata' spec: $ref: '#/components/schemas/identitySpec' identitiesRead: @@ -492,6 +495,7 @@ components: name: identity-name description: A verbose description spec: + regionId: c7568e2d-f9ab-453d-9a3a-51375f78426b tags: - name: cluster-id value: 9361402c-f998-49cc-ab21-9bb99afcfde8 @@ -577,11 +581,11 @@ components: name: unused organizationId: 9a8c6370-4065-4d4a-9da0-7678df40cd9d projectId: e36c058a-8eba-4f5b-91f4-f6ffb983795c - regionId: d891dbf0-0a01-4efc-ae3a-5d77f6d3424b creationTime: 2024-05-31T14:11:00Z createdBy: john.doe@acme.com provisioningStatus: provisioned spec: + regionId: d891dbf0-0a01-4efc-ae3a-5d77f6d3424b type: openstack openstack: cloud: default @@ -600,11 +604,11 @@ components: name: unused organizationId: 9a8c6370-4065-4d4a-9da0-7678df40cd9d projectId: e36c058a-8eba-4f5b-91f4-f6ffb983795c - regionId: d891dbf0-0a01-4efc-ae3a-5d77f6d3424b creationTime: 2024-05-31T14:11:00Z createdBy: john.doe@acme.com provisioningStatus: provisioned spec: + regionId: d891dbf0-0a01-4efc-ae3a-5d77f6d3424b type: openstack openstack: cloud: default diff --git a/pkg/openapi/types.go b/pkg/openapi/types.go index 8008a2a..4519ed8 100644 --- a/pkg/openapi/types.go +++ b/pkg/openapi/types.go @@ -98,7 +98,7 @@ type IdentitiesRead = []IdentityRead // IdentityRead A provider specific identity. type IdentityRead struct { - Metadata externalRef0.RegionScopedResourceMetadata `json:"metadata"` + Metadata externalRef0.ProjectScopedResourceReadMetadata `json:"metadata"` // Spec A provider specific identity, while the client can list regions to infer the // type, we don't requires this and return it with the response. That can then @@ -113,6 +113,9 @@ type IdentitySpec struct { // Openstack Everything an OpenStack client needs to function. Openstack *IdentitySpecOpenStack `json:"openstack,omitempty"` + // RegionId The region an identity is provisioned in. + RegionId string `json:"regionId"` + // Tags A list of tags. Tags *TagList `json:"tags,omitempty"` @@ -146,6 +149,9 @@ type IdentityWrite struct { // IdentityWriteSpec Request parameters for creating an identity. type IdentityWriteSpec struct { + // RegionId The region an identity is provisioned in. + RegionId string `json:"regionId"` + // Tags A list of tags. Tags *TagList `json:"tags,omitempty"` } @@ -280,8 +286,8 @@ type IdentityRequest = IdentityWrite // PhysicalNetworkRequest A physical network request. type PhysicalNetworkRequest = PhysicalNetworkWrite -// PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesJSONRequestBody defines body for PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentities for application/json ContentType. -type PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesJSONRequestBody = IdentityWrite +// PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesJSONRequestBody defines body for PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentities for application/json ContentType. +type PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesJSONRequestBody = IdentityWrite -// PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesIdentityIDPhysicalNetworksJSONRequestBody defines body for PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesIdentityIDPhysicalNetworks for application/json ContentType. -type PostApiV1OrganizationsOrganizationIDProjectsProjectIDRegionsRegionIDIdentitiesIdentityIDPhysicalNetworksJSONRequestBody = PhysicalNetworkWrite +// PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDPhysicalNetworksJSONRequestBody defines body for PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDPhysicalNetworks for application/json ContentType. +type PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDPhysicalNetworksJSONRequestBody = PhysicalNetworkWrite diff --git a/pkg/providers/interfaces.go b/pkg/providers/interfaces.go index 2766b86..ab0b87a 100644 --- a/pkg/providers/interfaces.go +++ b/pkg/providers/interfaces.go @@ -36,7 +36,7 @@ type Provider interface { // DeleteIdentity cleans up an identity for cloud infrastructure. DeleteIdentity(ctx context.Context, identityID string) error // CreatePhysicalNetwork create a new physical network. - CreatePhysicalNetwork(ctx context.Context, organizationID, projectID, identityID string, request *openapi.PhysicalNetworkWrite) (*unikornv1.PhysicalNetwork, error) + CreatePhysicalNetwork(ctx context.Context, identity *unikornv1.Identity, request *openapi.PhysicalNetworkWrite) (*unikornv1.PhysicalNetwork, error) // ListExternalNetworks returns a list of external networks if the platform // supports such a concept. ListExternalNetworks(ctx context.Context) (ExternalNetworks, error) diff --git a/pkg/providers/openstack/provider.go b/pkg/providers/openstack/provider.go index d7b32ca..f81d799 100644 --- a/pkg/providers/openstack/provider.go +++ b/pkg/providers/openstack/provider.go @@ -31,6 +31,7 @@ import ( "github.com/gophercloud/gophercloud/v2/openstack/identity/v3/users" "github.com/gophercloud/utils/openstack/clientconfig" + coreconstants "github.com/unikorn-cloud/core/pkg/constants" "github.com/unikorn-cloud/core/pkg/server/conversion" unikornv1 "github.com/unikorn-cloud/region/pkg/apis/unikorn/v1alpha1" "github.com/unikorn-cloud/region/pkg/constants" @@ -597,24 +598,8 @@ func (p *Provider) DeleteIdentity(ctx context.Context, identityID string) error return nil } -// GetIdentity looks up the specified identity resource. -func (p *Provider) GetIdentity(ctx context.Context, id string) (*unikornv1.Identity, error) { - out := &unikornv1.Identity{} - - if err := p.client.Get(ctx, client.ObjectKey{Namespace: p.region.Namespace, Name: id}, out); err != nil { - return nil, err - } - - return out, nil -} - // CreatePhysicalNetwork creates a physical network for an identity. -func (p *Provider) CreatePhysicalNetwork(ctx context.Context, organizationID, projectID, identityID string, request *openapi.PhysicalNetworkWrite) (*unikornv1.PhysicalNetwork, error) { - identity, err := p.GetIdentity(ctx, identityID) - if err != nil { - return nil, err - } - +func (p *Provider) CreatePhysicalNetwork(ctx context.Context, identity *unikornv1.Identity, request *openapi.PhysicalNetworkWrite) (*unikornv1.PhysicalNetwork, error) { networkService, err := p.network(ctx) if err != nil { return nil, err @@ -626,10 +611,10 @@ func (p *Provider) CreatePhysicalNetwork(ctx context.Context, organizationID, pr } objectMeta := conversion.NewObjectMetadata(&request.Metadata, p.region.Namespace) - objectMeta = objectMeta.WithOrganization(organizationID) - objectMeta = objectMeta.WithProject(projectID) + objectMeta = objectMeta.WithOrganization(identity.Labels[coreconstants.OrganizationLabel]) + objectMeta = objectMeta.WithProject(identity.Labels[coreconstants.ProjectLabel]) objectMeta = objectMeta.WithLabel(constants.RegionLabel, p.region.Name) - objectMeta = objectMeta.WithLabel(constants.IdentityLabel, identityID) + objectMeta = objectMeta.WithLabel(constants.IdentityLabel, identity.Name) physicalNetwork := &unikornv1.PhysicalNetwork{ ObjectMeta: objectMeta.Get(ctx),