diff --git a/pkg/apis/unikorn/v1alpha1/register.go b/pkg/apis/unikorn/v1alpha1/register.go index f630441..fd6a321 100644 --- a/pkg/apis/unikorn/v1alpha1/register.go +++ b/pkg/apis/unikorn/v1alpha1/register.go @@ -59,6 +59,8 @@ func init() { SchemeBuilder.Register(&OpenstackSecurityGroup{}, &OpenstackSecurityGroupList{}) SchemeBuilder.Register(&SecurityGroupRule{}, &SecurityGroupRuleList{}) SchemeBuilder.Register(&OpenstackSecurityGroupRule{}, &OpenstackSecurityGroupRuleList{}) + SchemeBuilder.Register(&Server{}, &ServerList{}) + SchemeBuilder.Register(&OpenstackServer{}, &OpenstackServerList{}) } // Resource maps a resource type to a group resource. diff --git a/pkg/handler/handler.go b/pkg/handler/handler.go index 64b77ca..5584edc 100644 --- a/pkg/handler/handler.go +++ b/pkg/handler/handler.go @@ -41,6 +41,7 @@ import ( unikornv1 "github.com/unikorn-cloud/region/pkg/apis/unikorn/v1alpha1" "github.com/unikorn-cloud/region/pkg/constants" "github.com/unikorn-cloud/region/pkg/handler/region" + "github.com/unikorn-cloud/region/pkg/handler/server" "github.com/unikorn-cloud/region/pkg/openapi" "github.com/unikorn-cloud/region/pkg/providers" @@ -1419,3 +1420,81 @@ func (h *Handler) GetApiV1OrganizationsOrganizationIDProjectsProjectIDIdentities util.WriteJSONResponse(w, r, http.StatusOK, h.convertSecurityGroupRule(resource)) } + +func (h *Handler) GetApiV1OrganizationsOrganizationIDServers(w http.ResponseWriter, r *http.Request, organizationID openapi.OrganizationIDParameter) { + if err := rbac.AllowOrganizationScope(r.Context(), "region:servers", identityapi.Read, organizationID); err != nil { + errors.HandleError(w, r, err) + return + } + + result, err := server.NewClient(h.client, h.namespace).List(r.Context(), organizationID) + if err != nil { + errors.HandleError(w, r, err) + return + } + + util.WriteJSONResponse(w, r, http.StatusOK, result) +} + +func (h *Handler) PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServers(w http.ResponseWriter, r *http.Request, organizationID openapi.OrganizationIDParameter, projectID openapi.ProjectIDParameter, + identityID openapi.IdentityIDParameter) { + + if err := rbac.AllowProjectScope(r.Context(), "region:servers", identityapi.Create, organizationID, projectID); err != nil { + errors.HandleError(w, r, err) + return + } + + request := &openapi.ServerWrite{} + if err := util.ReadJSONBody(r, request); err != nil { + errors.HandleError(w, r, err) + return + } + + identity, err := h.getIdentity(r.Context(), identityID) + if err != nil { + errors.HandleError(w, r, err) + return + } + + result, err := server.NewClient(h.client, h.namespace).Create(r.Context(), organizationID, projectID, identity, request) + if err != nil { + errors.HandleError(w, r, err) + return + } + + util.WriteJSONResponse(w, r, http.StatusCreated, result) +} + +func (h *Handler) DeleteApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerID(w http.ResponseWriter, r *http.Request, organizationID openapi.OrganizationIDParameter, projectID openapi.ProjectIDParameter, + identityID openapi.IdentityIDParameter, serverID openapi.ServerIDParameter) { + + if err := rbac.AllowProjectScope(r.Context(), "region:servers", identityapi.Delete, organizationID, projectID); err != nil { + errors.HandleError(w, r, err) + return + } + + err := server.NewClient(h.client, h.namespace).Delete(r.Context(), serverID) + if err != nil { + errors.HandleError(w, r, err) + return + } + + w.WriteHeader(http.StatusAccepted) +} + +func (h *Handler) GetApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerID(w http.ResponseWriter, r *http.Request, organizationID openapi.OrganizationIDParameter, projectID openapi.ProjectIDParameter, + identityID openapi.IdentityIDParameter, serverID openapi.ServerIDParameter) { + + if err := rbac.AllowProjectScope(r.Context(), "region:servers", identityapi.Read, organizationID, projectID); err != nil { + errors.HandleError(w, r, err) + return + } + + result, err := server.NewClient(h.client, h.namespace).Get(r.Context(), serverID) + if err != nil { + errors.HandleError(w, r, err) + return + } + + util.WriteJSONResponse(w, r, http.StatusOK, result) +} diff --git a/pkg/handler/server/client.go b/pkg/handler/server/client.go new file mode 100644 index 0000000..61859a2 --- /dev/null +++ b/pkg/handler/server/client.go @@ -0,0 +1,127 @@ +/* +Copyright 2024 the Unikorn Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package server + +import ( + "cmp" + "context" + "slices" + + coreconstants "github.com/unikorn-cloud/core/pkg/constants" + "github.com/unikorn-cloud/core/pkg/server/errors" + unikornv1 "github.com/unikorn-cloud/region/pkg/apis/unikorn/v1alpha1" + "github.com/unikorn-cloud/region/pkg/openapi" + + kerrors "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "sigs.k8s.io/controller-runtime/pkg/client" +) + +type Client struct { + // client allows Kubernetes API access. + client client.Client + + // namespace the controller runs in. + namespace string +} + +func NewClient(client client.Client, namespace string) *Client { + return &Client{ + client: client, + namespace: namespace, + } +} + +func (c *Client) List(ctx context.Context, organizationID string) (openapi.ServersRead, error) { + result := &unikornv1.ServerList{} + + options := &client.ListOptions{ + Namespace: c.namespace, + LabelSelector: labels.SelectorFromSet(map[string]string{ + coreconstants.OrganizationLabel: organizationID, + }), + } + + if err := c.client.List(ctx, result, options); err != nil { + return nil, errors.OAuth2ServerError("unable to list servers").WithError(err) + } + + // Apply ordering guarantees, ordered by name. + slices.SortStableFunc(result.Items, func(a, b unikornv1.Server) int { + return cmp.Compare(a.Name, b.Name) + }) + + return convertList(result), nil +} + +func (c *Client) Create(ctx context.Context, organizationID, projectID string, identity *unikornv1.Identity, request *openapi.ServerWrite) (*openapi.ServerRead, error) { + + resource, err := newGenerator(c.client, c.namespace, organizationID, projectID, identity).generate(ctx, request) + if err != nil { + return nil, err + } + + if err := c.client.Create(ctx, resource); err != nil { + return nil, errors.OAuth2ServerError("unable to create server").WithError(err) + } + + return convert(resource), nil +} + +func (c *Client) Get(ctx context.Context, serverID string) (*openapi.ServerRead, error) { + resource, err := c.getServer(ctx, serverID) + if err != nil { + return nil, err + } + + return convert(resource), nil +} + +func (c *Client) Delete(ctx context.Context, serverID string) error { + resource, err := c.getServer(ctx, serverID) + if err != nil { + return err + } + + if resource.DeletionTimestamp != nil { + return errors.OAuth2InvalidRequest("server is already being deleted") + } + + if err := c.client.Delete(ctx, resource); err != nil { + if kerrors.IsNotFound(err) { + return errors.HTTPNotFound().WithError(err) + } + + return errors.OAuth2ServerError("unable to delete server").WithError(err) + } + + return nil +} + +func (c *Client) getServer(ctx context.Context, id string) (*unikornv1.Server, error) { + resource := &unikornv1.Server{} + + if err := c.client.Get(ctx, client.ObjectKey{Namespace: c.namespace, Name: id}, resource); err != nil { + if kerrors.IsNotFound(err) { + return nil, errors.HTTPNotFound().WithError(err) + } + + return nil, errors.OAuth2ServerError("unable to get server").WithError(err) + } + + return resource, nil +} diff --git a/pkg/handler/server/conversion.go b/pkg/handler/server/conversion.go new file mode 100644 index 0000000..3a00bae --- /dev/null +++ b/pkg/handler/server/conversion.go @@ -0,0 +1,277 @@ +/* +Copyright 2024 the Unikorn Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package server + +import ( + "context" + + unikornv1core "github.com/unikorn-cloud/core/pkg/apis/unikorn/v1alpha1" + coreapi "github.com/unikorn-cloud/core/pkg/openapi" + "github.com/unikorn-cloud/core/pkg/server/conversion" + "github.com/unikorn-cloud/core/pkg/server/errors" + "github.com/unikorn-cloud/identity/pkg/middleware/authorization" + unikornv1 "github.com/unikorn-cloud/region/pkg/apis/unikorn/v1alpha1" + "github.com/unikorn-cloud/region/pkg/constants" + "github.com/unikorn-cloud/region/pkg/openapi" + + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" +) + +// convertList converts from a custom resource list into the API definition. +func convertList(in *unikornv1.ServerList) openapi.ServersRead { + out := make(openapi.ServersRead, len(in.Items)) + + for i := range in.Items { + out[i] = *convert(&in.Items[i]) + } + + return out +} + +// convert converts from a custom resource into the API definition. +func convert(in *unikornv1.Server) *openapi.ServerRead { + provisioningStatus := coreapi.ResourceProvisioningStatusUnknown + + if condition, err := in.StatusConditionRead(unikornv1core.ConditionAvailable); err == nil { + provisioningStatus = conversion.ConvertStatusCondition(condition) + } + + out := &openapi.ServerRead{ + Metadata: conversion.ProjectScopedResourceReadMetadata(in, provisioningStatus), + Spec: openapi.ServerReadSpec{ + FlavorId: in.Spec.FlavorID, + Image: convertServerImage(in.Spec.Image), + Networks: convertServerNetworks(in.Spec.Networks), + PublicIPAllocation: convertServerPublicIPAllocation(in.Spec.PublicIPAllocation), + SecurityGroups: convertServerSecurityGroups(in.Spec.SecurityGroups), + }, + } + + if tags := convertTags(in.Spec.Tags); tags != nil { + out.Spec.Tags = &tags + } + + return out +} + +func convertServerImage(in *unikornv1.ServerImage) openapi.ServerImage { + return openapi.ServerImage{ + Id: in.ID, + } +} + +func convertServerNetworks(in []unikornv1.ServerNetworkSpec) openapi.ServerNetworkList { + out := make(openapi.ServerNetworkList, len(in)) + + for i := range in { + out[i] = convertServerNetwork(&in[i]) + } + + return out +} + +func convertServerNetwork(in *unikornv1.ServerNetworkSpec) openapi.ServerNetwork { + return openapi.ServerNetwork{ + PhysicalNetwork: &openapi.ServerPhysicalNetwork{ + Id: in.PhysicalNetwork.ID, + }, + } +} + +func convertServerPublicIPAllocation(in *unikornv1.ServerPublicIPAllocationSpec) *openapi.ServerPublicIPAllocation { + if in == nil { + return nil + } + + return &openapi.ServerPublicIPAllocation{ + Enabled: in.Enabled, + } +} + +func convertServerSecurityGroups(in []unikornv1.ServerSecurityGroupSpec) *openapi.ServerSecurityGroupList { + if in == nil { + return nil + } + + out := make(openapi.ServerSecurityGroupList, len(in)) + + for i := range in { + out[i] = convertServerSecurityGroup(&in[i]) + } + + return &out +} + +func convertServerSecurityGroup(in *unikornv1.ServerSecurityGroupSpec) openapi.ServerSecurityGroup { + return openapi.ServerSecurityGroup{ + Id: in.ID, + } +} + +func convertTag(in unikornv1.Tag) openapi.Tag { + out := openapi.Tag{ + Name: in.Name, + Value: in.Value, + } + + return out +} + +func convertTags(in unikornv1.TagList) openapi.TagList { + if in == nil { + return nil + } + + out := make(openapi.TagList, len(in)) + + for i := range in { + out[i] = convertTag(in[i]) + } + + return out +} + +func generateTag(in openapi.Tag) unikornv1.Tag { + out := unikornv1.Tag{ + Name: in.Name, + Value: in.Value, + } + + return out +} + +func generateTagList(in *openapi.TagList) unikornv1.TagList { + if in == nil { + return nil + } + + out := make(unikornv1.TagList, len(*in)) + + for i := range *in { + out[i] = generateTag((*in)[i]) + } + + return out +} + +type generator struct { + // client allows Kubernetes API access. + client client.Client + // namespace the resource is provisioned in. + namespace string + // organizationID is the unique organization identifier. + organizationID string + // projectID is the unique project identifier. + projectID string + // identity is the identity the resource is provisioned for. + identity *unikornv1.Identity +} + +func newGenerator(client client.Client, namespace, organizationID, projectID string, identity *unikornv1.Identity) *generator { + return &generator{ + client: client, + namespace: namespace, + organizationID: organizationID, + projectID: projectID, + identity: identity, + } +} + +func (g *generator) generate(ctx context.Context, in *openapi.ServerWrite) (*unikornv1.Server, error) { + userinfo, err := authorization.UserinfoFromContext(ctx) + if err != nil { + return nil, errors.OAuth2ServerError("unable to get userinfo").WithError(err) + } + + resource := &unikornv1.Server{ + ObjectMeta: conversion.NewObjectMetadata(&in.Metadata, g.namespace, userinfo.Sub).WithOrganization(g.organizationID).WithProject(g.projectID).WithLabel(constants.RegionLabel, g.identity.Labels[constants.RegionLabel]). + WithLabel(constants.IdentityLabel, g.identity.Name).Get(), + Spec: unikornv1.ServerSpec{ + Tags: generateTagList(in.Spec.Tags), + Provider: g.identity.Spec.Provider, + FlavorID: in.Spec.FlavorId, + Image: g.generateImage(&in.Spec.Image), + PublicIPAllocation: g.generatePublicIPAllocation(in.Spec.PublicIPAllocation), + SecurityGroups: g.generateSecurityGroups(in.Spec.SecurityGroups), + Networks: g.generateNetworks(in.Spec.Networks), + }, + } + + // Ensure the server is owned by the identity so it is automatically cleaned + // up on identity deletion. + if err := controllerutil.SetOwnerReference(g.identity, resource, g.client.Scheme()); err != nil { + return nil, err + } + + return resource, nil +} + +func (g *generator) generateImage(in *openapi.ServerImage) *unikornv1.ServerImage { + out := &unikornv1.ServerImage{ + ID: in.Id, + } + + if in.Selector != nil { + out.Selector = &unikornv1.ServerImageSelector{ + OS: in.Selector.Os, + Version: in.Selector.Version, + } + } + + return out +} + +func (g *generator) generatePublicIPAllocation(in *openapi.ServerPublicIPAllocation) *unikornv1.ServerPublicIPAllocationSpec { + if in == nil { + return nil + } + + return &unikornv1.ServerPublicIPAllocationSpec{ + Enabled: in.Enabled, + } +} + +func (g *generator) generateSecurityGroups(in *openapi.ServerSecurityGroupList) []unikornv1.ServerSecurityGroupSpec { + if in == nil { + return nil + } + + out := make([]unikornv1.ServerSecurityGroupSpec, len(*in)) + + for i, sg := range *in { + out[i] = unikornv1.ServerSecurityGroupSpec{ + ID: sg.Id, + } + } + + return out +} + +func (g *generator) generateNetworks(in openapi.ServerNetworkList) []unikornv1.ServerNetworkSpec { + out := make([]unikornv1.ServerNetworkSpec, len(in)) + + for i, network := range in { + out[i] = unikornv1.ServerNetworkSpec{ + PhysicalNetwork: &unikornv1.ServerPhysicalNetworkSpec{ + ID: network.PhysicalNetwork.Id, + }, + } + } + + return out +} diff --git a/pkg/openapi/client.go b/pkg/openapi/client.go index 5d5fac6..b13f740 100644 --- a/pkg/openapi/client.go +++ b/pkg/openapi/client.go @@ -156,6 +156,17 @@ type ClientInterface interface { // GetApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDSecuritygroupsSecurityGroupIDRulesRuleID request GetApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDSecuritygroupsSecurityGroupIDRulesRuleID(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, identityID IdentityIDParameter, securityGroupID SecurityGroupIDParameter, ruleID RuleIDParameter, reqEditors ...RequestEditorFn) (*http.Response, error) + // PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersWithBody request with any body + PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersWithBody(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, identityID IdentityIDParameter, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServers(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, identityID IdentityIDParameter, body PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerID request + DeleteApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerID(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, identityID IdentityIDParameter, serverID ServerIDParameter, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerID request + GetApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerID(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, identityID IdentityIDParameter, serverID ServerIDParameter, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetApiV1OrganizationsOrganizationIDRegions request GetApiV1OrganizationsOrganizationIDRegions(ctx context.Context, organizationID OrganizationIDParameter, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -170,6 +181,9 @@ type ClientInterface interface { // GetApiV1OrganizationsOrganizationIDSecuritygroups request GetApiV1OrganizationsOrganizationIDSecuritygroups(ctx context.Context, organizationID OrganizationIDParameter, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiV1OrganizationsOrganizationIDServers request + GetApiV1OrganizationsOrganizationIDServers(ctx context.Context, organizationID OrganizationIDParameter, reqEditors ...RequestEditorFn) (*http.Response, error) } func (c *Client) GetApiV1OrganizationsOrganizationIDIdentities(ctx context.Context, organizationID OrganizationIDParameter, reqEditors ...RequestEditorFn) (*http.Response, error) { @@ -460,6 +474,54 @@ func (c *Client) GetApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesI return c.Client.Do(req) } +func (c *Client) PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersWithBody(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, identityID IdentityIDParameter, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersRequestWithBody(c.Server, organizationID, projectID, identityID, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServers(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, identityID IdentityIDParameter, body PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersRequest(c.Server, organizationID, projectID, identityID, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerID(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, identityID IdentityIDParameter, serverID ServerIDParameter, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerIDRequest(c.Server, organizationID, projectID, identityID, serverID) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerID(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, identityID IdentityIDParameter, serverID ServerIDParameter, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerIDRequest(c.Server, organizationID, projectID, identityID, serverID) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) GetApiV1OrganizationsOrganizationIDRegions(ctx context.Context, organizationID OrganizationIDParameter, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewGetApiV1OrganizationsOrganizationIDRegionsRequest(c.Server, organizationID) if err != nil { @@ -520,6 +582,18 @@ func (c *Client) GetApiV1OrganizationsOrganizationIDSecuritygroups(ctx context.C return c.Client.Do(req) } +func (c *Client) GetApiV1OrganizationsOrganizationIDServers(ctx context.Context, organizationID OrganizationIDParameter, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiV1OrganizationsOrganizationIDServersRequest(c.Server, organizationID) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + // NewGetApiV1OrganizationsOrganizationIDIdentitiesRequest generates requests for GetApiV1OrganizationsOrganizationIDIdentities func NewGetApiV1OrganizationsOrganizationIDIdentitiesRequest(server string, organizationID OrganizationIDParameter) (*http.Request, error) { var err error @@ -1504,6 +1578,177 @@ func NewGetApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityID return req, nil } +// NewPostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersRequest calls the generic PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServers builder with application/json body +func NewPostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersRequest(server string, organizationID OrganizationIDParameter, projectID ProjectIDParameter, identityID IdentityIDParameter, body PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersRequestWithBody(server, organizationID, projectID, identityID, "application/json", bodyReader) +} + +// NewPostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersRequestWithBody generates requests for PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServers with any type of body +func NewPostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersRequestWithBody(server string, organizationID OrganizationIDParameter, projectID ProjectIDParameter, identityID IdentityIDParameter, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationID", runtime.ParamLocationPath, organizationID) + if err != nil { + 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, "identityID", runtime.ParamLocationPath, identityID) + 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/identities/%s/servers", pathParam0, pathParam1, pathParam2) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewDeleteApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerIDRequest generates requests for DeleteApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerID +func NewDeleteApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerIDRequest(server string, organizationID OrganizationIDParameter, projectID ProjectIDParameter, identityID IdentityIDParameter, serverID ServerIDParameter) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationID", runtime.ParamLocationPath, organizationID) + if err != nil { + 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, "identityID", runtime.ParamLocationPath, identityID) + if err != nil { + return nil, err + } + + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "serverID", runtime.ParamLocationPath, serverID) + 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/identities/%s/servers/%s", pathParam0, pathParam1, pathParam2, pathParam3) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerIDRequest generates requests for GetApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerID +func NewGetApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerIDRequest(server string, organizationID OrganizationIDParameter, projectID ProjectIDParameter, identityID IdentityIDParameter, serverID ServerIDParameter) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationID", runtime.ParamLocationPath, organizationID) + if err != nil { + 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, "identityID", runtime.ParamLocationPath, identityID) + if err != nil { + return nil, err + } + + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "serverID", runtime.ParamLocationPath, serverID) + 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/identities/%s/servers/%s", pathParam0, pathParam1, pathParam2, pathParam3) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + // NewGetApiV1OrganizationsOrganizationIDRegionsRequest generates requests for GetApiV1OrganizationsOrganizationIDRegions func NewGetApiV1OrganizationsOrganizationIDRegionsRequest(server string, organizationID OrganizationIDParameter) (*http.Request, error) { var err error @@ -1695,6 +1940,40 @@ func NewGetApiV1OrganizationsOrganizationIDSecuritygroupsRequest(server string, return req, nil } +// NewGetApiV1OrganizationsOrganizationIDServersRequest generates requests for GetApiV1OrganizationsOrganizationIDServers +func NewGetApiV1OrganizationsOrganizationIDServersRequest(server string, organizationID OrganizationIDParameter) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "organizationID", runtime.ParamLocationPath, organizationID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v1/organizations/%s/servers", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { for _, r := range c.RequestEditors { if err := r(ctx, req); err != nil { @@ -1804,6 +2083,17 @@ type ClientWithResponsesInterface interface { // GetApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDSecuritygroupsSecurityGroupIDRulesRuleIDWithResponse request GetApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDSecuritygroupsSecurityGroupIDRulesRuleIDWithResponse(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, identityID IdentityIDParameter, securityGroupID SecurityGroupIDParameter, ruleID RuleIDParameter, reqEditors ...RequestEditorFn) (*GetApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDSecuritygroupsSecurityGroupIDRulesRuleIDResponse, error) + // PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersWithBodyWithResponse request with any body + PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersWithBodyWithResponse(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, identityID IdentityIDParameter, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersResponse, error) + + PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersWithResponse(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, identityID IdentityIDParameter, body PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersResponse, error) + + // DeleteApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerIDWithResponse request + DeleteApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerIDWithResponse(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, identityID IdentityIDParameter, serverID ServerIDParameter, reqEditors ...RequestEditorFn) (*DeleteApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerIDResponse, error) + + // GetApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerIDWithResponse request + GetApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerIDWithResponse(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, identityID IdentityIDParameter, serverID ServerIDParameter, reqEditors ...RequestEditorFn) (*GetApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerIDResponse, error) + // GetApiV1OrganizationsOrganizationIDRegionsWithResponse request GetApiV1OrganizationsOrganizationIDRegionsWithResponse(ctx context.Context, organizationID OrganizationIDParameter, reqEditors ...RequestEditorFn) (*GetApiV1OrganizationsOrganizationIDRegionsResponse, error) @@ -1818,6 +2108,9 @@ type ClientWithResponsesInterface interface { // GetApiV1OrganizationsOrganizationIDSecuritygroupsWithResponse request GetApiV1OrganizationsOrganizationIDSecuritygroupsWithResponse(ctx context.Context, organizationID OrganizationIDParameter, reqEditors ...RequestEditorFn) (*GetApiV1OrganizationsOrganizationIDSecuritygroupsResponse, error) + + // GetApiV1OrganizationsOrganizationIDServersWithResponse request + GetApiV1OrganizationsOrganizationIDServersWithResponse(ctx context.Context, organizationID OrganizationIDParameter, reqEditors ...RequestEditorFn) (*GetApiV1OrganizationsOrganizationIDServersResponse, error) } type GetApiV1OrganizationsOrganizationIDIdentitiesResponse struct { @@ -2283,16 +2576,18 @@ func (r GetApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityID return 0 } -type GetApiV1OrganizationsOrganizationIDRegionsResponse struct { +type PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *RegionsResponse + JSON201 *ServerResponse + JSON400 *externalRef0.BadRequestResponse JSON401 *externalRef0.UnauthorizedResponse + JSON403 *externalRef0.ForbiddenResponse JSON500 *externalRef0.InternalServerErrorResponse } // Status returns HTTPResponse.Status -func (r GetApiV1OrganizationsOrganizationIDRegionsResponse) Status() string { +func (r PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -2300,17 +2595,92 @@ func (r GetApiV1OrganizationsOrganizationIDRegionsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetApiV1OrganizationsOrganizationIDRegionsResponse) StatusCode() int { +func (r PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetApiV1OrganizationsOrganizationIDRegionsRegionIDExternalnetworksResponse struct { +type DeleteApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerIDResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ExternalNetworksResponse + JSON400 *externalRef0.BadRequestResponse + JSON401 *externalRef0.UnauthorizedResponse + JSON403 *externalRef0.ForbiddenResponse + JSON500 *externalRef0.InternalServerErrorResponse +} + +// Status returns HTTPResponse.Status +func (r DeleteApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerIDResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerIDResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerIDResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ServerResponse + JSON400 *externalRef0.BadRequestResponse + JSON401 *externalRef0.UnauthorizedResponse + JSON403 *externalRef0.ForbiddenResponse + JSON500 *externalRef0.InternalServerErrorResponse +} + +// Status returns HTTPResponse.Status +func (r GetApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerIDResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerIDResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV1OrganizationsOrganizationIDRegionsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *RegionsResponse + JSON401 *externalRef0.UnauthorizedResponse + JSON500 *externalRef0.InternalServerErrorResponse +} + +// Status returns HTTPResponse.Status +func (r GetApiV1OrganizationsOrganizationIDRegionsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV1OrganizationsOrganizationIDRegionsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiV1OrganizationsOrganizationIDRegionsRegionIDExternalnetworksResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ExternalNetworksResponse JSON401 *externalRef0.UnauthorizedResponse JSON403 *externalRef0.ForbiddenResponse JSON404 *externalRef0.NotFoundResponse @@ -2409,6 +2779,32 @@ func (r GetApiV1OrganizationsOrganizationIDSecuritygroupsResponse) StatusCode() return 0 } +type GetApiV1OrganizationsOrganizationIDServersResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ServersResponse + JSON400 *externalRef0.BadRequestResponse + JSON401 *externalRef0.UnauthorizedResponse + JSON403 *externalRef0.ForbiddenResponse + JSON500 *externalRef0.InternalServerErrorResponse +} + +// Status returns HTTPResponse.Status +func (r GetApiV1OrganizationsOrganizationIDServersResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiV1OrganizationsOrganizationIDServersResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + // GetApiV1OrganizationsOrganizationIDIdentitiesWithResponse request returning *GetApiV1OrganizationsOrganizationIDIdentitiesResponse func (c *ClientWithResponses) GetApiV1OrganizationsOrganizationIDIdentitiesWithResponse(ctx context.Context, organizationID OrganizationIDParameter, reqEditors ...RequestEditorFn) (*GetApiV1OrganizationsOrganizationIDIdentitiesResponse, error) { rsp, err := c.GetApiV1OrganizationsOrganizationIDIdentities(ctx, organizationID, reqEditors...) @@ -2619,6 +3015,41 @@ func (c *ClientWithResponses) GetApiV1OrganizationsOrganizationIDProjectsProject return ParseGetApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDSecuritygroupsSecurityGroupIDRulesRuleIDResponse(rsp) } +// PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersWithBodyWithResponse request with arbitrary body returning *PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersResponse +func (c *ClientWithResponses) PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersWithBodyWithResponse(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, identityID IdentityIDParameter, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersResponse, error) { + rsp, err := c.PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersWithBody(ctx, organizationID, projectID, identityID, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersResponse(rsp) +} + +func (c *ClientWithResponses) PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersWithResponse(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, identityID IdentityIDParameter, body PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersResponse, error) { + rsp, err := c.PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServers(ctx, organizationID, projectID, identityID, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersResponse(rsp) +} + +// DeleteApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerIDWithResponse request returning *DeleteApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerIDResponse +func (c *ClientWithResponses) DeleteApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerIDWithResponse(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, identityID IdentityIDParameter, serverID ServerIDParameter, reqEditors ...RequestEditorFn) (*DeleteApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerIDResponse, error) { + rsp, err := c.DeleteApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerID(ctx, organizationID, projectID, identityID, serverID, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerIDResponse(rsp) +} + +// GetApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerIDWithResponse request returning *GetApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerIDResponse +func (c *ClientWithResponses) GetApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerIDWithResponse(ctx context.Context, organizationID OrganizationIDParameter, projectID ProjectIDParameter, identityID IdentityIDParameter, serverID ServerIDParameter, reqEditors ...RequestEditorFn) (*GetApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerIDResponse, error) { + rsp, err := c.GetApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerID(ctx, organizationID, projectID, identityID, serverID, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerIDResponse(rsp) +} + // GetApiV1OrganizationsOrganizationIDRegionsWithResponse request returning *GetApiV1OrganizationsOrganizationIDRegionsResponse func (c *ClientWithResponses) GetApiV1OrganizationsOrganizationIDRegionsWithResponse(ctx context.Context, organizationID OrganizationIDParameter, reqEditors ...RequestEditorFn) (*GetApiV1OrganizationsOrganizationIDRegionsResponse, error) { rsp, err := c.GetApiV1OrganizationsOrganizationIDRegions(ctx, organizationID, reqEditors...) @@ -2664,6 +3095,15 @@ func (c *ClientWithResponses) GetApiV1OrganizationsOrganizationIDSecuritygroupsW return ParseGetApiV1OrganizationsOrganizationIDSecuritygroupsResponse(rsp) } +// GetApiV1OrganizationsOrganizationIDServersWithResponse request returning *GetApiV1OrganizationsOrganizationIDServersResponse +func (c *ClientWithResponses) GetApiV1OrganizationsOrganizationIDServersWithResponse(ctx context.Context, organizationID OrganizationIDParameter, reqEditors ...RequestEditorFn) (*GetApiV1OrganizationsOrganizationIDServersResponse, error) { + rsp, err := c.GetApiV1OrganizationsOrganizationIDServers(ctx, organizationID, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiV1OrganizationsOrganizationIDServersResponse(rsp) +} + // ParseGetApiV1OrganizationsOrganizationIDIdentitiesResponse parses an HTTP response from a GetApiV1OrganizationsOrganizationIDIdentitiesWithResponse call func ParseGetApiV1OrganizationsOrganizationIDIdentitiesResponse(rsp *http.Response) (*GetApiV1OrganizationsOrganizationIDIdentitiesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) @@ -3601,6 +4041,161 @@ func ParseGetApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentity return response, nil } +// ParsePostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersResponse parses an HTTP response from a PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersWithResponse call +func ParsePostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersResponse(rsp *http.Response) (*PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest ServerResponse + 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 + 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 { + return nil, err + } + 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 { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseDeleteApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerIDResponse parses an HTTP response from a DeleteApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerIDWithResponse call +func ParseDeleteApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerIDResponse(rsp *http.Response) (*DeleteApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerIDResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerIDResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + 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 { + return nil, err + } + 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 { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerIDResponse parses an HTTP response from a GetApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerIDWithResponse call +func ParseGetApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerIDResponse(rsp *http.Response) (*GetApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerIDResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerIDResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ServerResponse + 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 { + return nil, err + } + 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 { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseGetApiV1OrganizationsOrganizationIDRegionsResponse parses an HTTP response from a GetApiV1OrganizationsOrganizationIDRegionsWithResponse call func ParseGetApiV1OrganizationsOrganizationIDRegionsResponse(rsp *http.Response) (*GetApiV1OrganizationsOrganizationIDRegionsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) @@ -3842,3 +4437,57 @@ func ParseGetApiV1OrganizationsOrganizationIDSecuritygroupsResponse(rsp *http.Re return response, nil } + +// ParseGetApiV1OrganizationsOrganizationIDServersResponse parses an HTTP response from a GetApiV1OrganizationsOrganizationIDServersWithResponse call +func ParseGetApiV1OrganizationsOrganizationIDServersResponse(rsp *http.Response) (*GetApiV1OrganizationsOrganizationIDServersResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiV1OrganizationsOrganizationIDServersResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ServersResponse + 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 { + return nil, err + } + 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 { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} diff --git a/pkg/openapi/router.go b/pkg/openapi/router.go index 4505636..66d6fe7 100644 --- a/pkg/openapi/router.go +++ b/pkg/openapi/router.go @@ -69,6 +69,15 @@ type ServerInterface interface { // (GET /api/v1/organizations/{organizationID}/projects/{projectID}/identities/{identityID}/securitygroups/{securityGroupID}/rules/{ruleID}) GetApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDSecuritygroupsSecurityGroupIDRulesRuleID(w http.ResponseWriter, r *http.Request, organizationID OrganizationIDParameter, projectID ProjectIDParameter, identityID IdentityIDParameter, securityGroupID SecurityGroupIDParameter, ruleID RuleIDParameter) + // (POST /api/v1/organizations/{organizationID}/projects/{projectID}/identities/{identityID}/servers) + PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServers(w http.ResponseWriter, r *http.Request, organizationID OrganizationIDParameter, projectID ProjectIDParameter, identityID IdentityIDParameter) + + // (DELETE /api/v1/organizations/{organizationID}/projects/{projectID}/identities/{identityID}/servers/{serverID}) + DeleteApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerID(w http.ResponseWriter, r *http.Request, organizationID OrganizationIDParameter, projectID ProjectIDParameter, identityID IdentityIDParameter, serverID ServerIDParameter) + + // (GET /api/v1/organizations/{organizationID}/projects/{projectID}/identities/{identityID}/servers/{serverID}) + GetApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerID(w http.ResponseWriter, r *http.Request, organizationID OrganizationIDParameter, projectID ProjectIDParameter, identityID IdentityIDParameter, serverID ServerIDParameter) + // (GET /api/v1/organizations/{organizationID}/regions) GetApiV1OrganizationsOrganizationIDRegions(w http.ResponseWriter, r *http.Request, organizationID OrganizationIDParameter) @@ -83,6 +92,9 @@ type ServerInterface interface { // (GET /api/v1/organizations/{organizationID}/securitygroups) GetApiV1OrganizationsOrganizationIDSecuritygroups(w http.ResponseWriter, r *http.Request, organizationID OrganizationIDParameter) + + // (GET /api/v1/organizations/{organizationID}/servers) + GetApiV1OrganizationsOrganizationIDServers(w http.ResponseWriter, r *http.Request, organizationID OrganizationIDParameter) } // Unimplemented server implementation that returns http.StatusNotImplemented for each endpoint. @@ -179,6 +191,21 @@ func (_ Unimplemented) GetApiV1OrganizationsOrganizationIDProjectsProjectIDIdent w.WriteHeader(http.StatusNotImplemented) } +// (POST /api/v1/organizations/{organizationID}/projects/{projectID}/identities/{identityID}/servers) +func (_ Unimplemented) PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServers(w http.ResponseWriter, r *http.Request, organizationID OrganizationIDParameter, projectID ProjectIDParameter, identityID IdentityIDParameter) { + w.WriteHeader(http.StatusNotImplemented) +} + +// (DELETE /api/v1/organizations/{organizationID}/projects/{projectID}/identities/{identityID}/servers/{serverID}) +func (_ Unimplemented) DeleteApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerID(w http.ResponseWriter, r *http.Request, organizationID OrganizationIDParameter, projectID ProjectIDParameter, identityID IdentityIDParameter, serverID ServerIDParameter) { + w.WriteHeader(http.StatusNotImplemented) +} + +// (GET /api/v1/organizations/{organizationID}/projects/{projectID}/identities/{identityID}/servers/{serverID}) +func (_ Unimplemented) GetApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerID(w http.ResponseWriter, r *http.Request, organizationID OrganizationIDParameter, projectID ProjectIDParameter, identityID IdentityIDParameter, serverID ServerIDParameter) { + w.WriteHeader(http.StatusNotImplemented) +} + // (GET /api/v1/organizations/{organizationID}/regions) func (_ Unimplemented) GetApiV1OrganizationsOrganizationIDRegions(w http.ResponseWriter, r *http.Request, organizationID OrganizationIDParameter) { w.WriteHeader(http.StatusNotImplemented) @@ -204,6 +231,11 @@ func (_ Unimplemented) GetApiV1OrganizationsOrganizationIDSecuritygroups(w http. w.WriteHeader(http.StatusNotImplemented) } +// (GET /api/v1/organizations/{organizationID}/servers) +func (_ Unimplemented) GetApiV1OrganizationsOrganizationIDServers(w http.ResponseWriter, r *http.Request, organizationID OrganizationIDParameter) { + w.WriteHeader(http.StatusNotImplemented) +} + // ServerInterfaceWrapper converts contexts to parameters. type ServerInterfaceWrapper struct { Handler ServerInterface @@ -1149,6 +1181,171 @@ func (siw *ServerInterfaceWrapper) GetApiV1OrganizationsOrganizationIDProjectsPr handler.ServeHTTP(w, r) } +// PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServers operation middleware +func (siw *ServerInterfaceWrapper) PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServers(w http.ResponseWriter, r *http.Request) { + + var err error + + // ------------- Path parameter "organizationID" ------------- + var organizationID OrganizationIDParameter + + err = runtime.BindStyledParameterWithOptions("simple", "organizationID", chi.URLParam(r, "organizationID"), &organizationID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "organizationID", Err: err}) + return + } + + // ------------- Path parameter "projectID" ------------- + var projectID ProjectIDParameter + + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) + return + } + + // ------------- Path parameter "identityID" ------------- + var identityID IdentityIDParameter + + err = runtime.BindStyledParameterWithOptions("simple", "identityID", chi.URLParam(r, "identityID"), &identityID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "identityID", Err: err}) + return + } + + ctx := r.Context() + + ctx = context.WithValue(ctx, Oauth2AuthenticationScopes, []string{}) + + r = r.WithContext(ctx) + + handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + siw.Handler.PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServers(w, r, organizationID, projectID, identityID) + })) + + for _, middleware := range siw.HandlerMiddlewares { + handler = middleware(handler) + } + + handler.ServeHTTP(w, r) +} + +// DeleteApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerID operation middleware +func (siw *ServerInterfaceWrapper) DeleteApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerID(w http.ResponseWriter, r *http.Request) { + + var err error + + // ------------- Path parameter "organizationID" ------------- + var organizationID OrganizationIDParameter + + err = runtime.BindStyledParameterWithOptions("simple", "organizationID", chi.URLParam(r, "organizationID"), &organizationID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "organizationID", Err: err}) + return + } + + // ------------- Path parameter "projectID" ------------- + var projectID ProjectIDParameter + + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) + return + } + + // ------------- Path parameter "identityID" ------------- + var identityID IdentityIDParameter + + err = runtime.BindStyledParameterWithOptions("simple", "identityID", chi.URLParam(r, "identityID"), &identityID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "identityID", Err: err}) + return + } + + // ------------- Path parameter "serverID" ------------- + var serverID ServerIDParameter + + err = runtime.BindStyledParameterWithOptions("simple", "serverID", chi.URLParam(r, "serverID"), &serverID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "serverID", Err: err}) + return + } + + ctx := r.Context() + + ctx = context.WithValue(ctx, Oauth2AuthenticationScopes, []string{}) + + r = r.WithContext(ctx) + + handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + siw.Handler.DeleteApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerID(w, r, organizationID, projectID, identityID, serverID) + })) + + for _, middleware := range siw.HandlerMiddlewares { + handler = middleware(handler) + } + + handler.ServeHTTP(w, r) +} + +// GetApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerID operation middleware +func (siw *ServerInterfaceWrapper) GetApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerID(w http.ResponseWriter, r *http.Request) { + + var err error + + // ------------- Path parameter "organizationID" ------------- + var organizationID OrganizationIDParameter + + err = runtime.BindStyledParameterWithOptions("simple", "organizationID", chi.URLParam(r, "organizationID"), &organizationID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "organizationID", Err: err}) + return + } + + // ------------- Path parameter "projectID" ------------- + var projectID ProjectIDParameter + + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) + return + } + + // ------------- Path parameter "identityID" ------------- + var identityID IdentityIDParameter + + err = runtime.BindStyledParameterWithOptions("simple", "identityID", chi.URLParam(r, "identityID"), &identityID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "identityID", Err: err}) + return + } + + // ------------- Path parameter "serverID" ------------- + var serverID ServerIDParameter + + err = runtime.BindStyledParameterWithOptions("simple", "serverID", chi.URLParam(r, "serverID"), &serverID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "serverID", Err: err}) + return + } + + ctx := r.Context() + + ctx = context.WithValue(ctx, Oauth2AuthenticationScopes, []string{}) + + r = r.WithContext(ctx) + + handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + siw.Handler.GetApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerID(w, r, organizationID, projectID, identityID, serverID) + })) + + for _, middleware := range siw.HandlerMiddlewares { + handler = middleware(handler) + } + + handler.ServeHTTP(w, r) +} + // GetApiV1OrganizationsOrganizationIDRegions operation middleware func (siw *ServerInterfaceWrapper) GetApiV1OrganizationsOrganizationIDRegions(w http.ResponseWriter, r *http.Request) { @@ -1331,6 +1528,37 @@ func (siw *ServerInterfaceWrapper) GetApiV1OrganizationsOrganizationIDSecuritygr handler.ServeHTTP(w, r) } +// GetApiV1OrganizationsOrganizationIDServers operation middleware +func (siw *ServerInterfaceWrapper) GetApiV1OrganizationsOrganizationIDServers(w http.ResponseWriter, r *http.Request) { + + var err error + + // ------------- Path parameter "organizationID" ------------- + var organizationID OrganizationIDParameter + + err = runtime.BindStyledParameterWithOptions("simple", "organizationID", chi.URLParam(r, "organizationID"), &organizationID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "organizationID", Err: err}) + return + } + + ctx := r.Context() + + ctx = context.WithValue(ctx, Oauth2AuthenticationScopes, []string{}) + + r = r.WithContext(ctx) + + handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + siw.Handler.GetApiV1OrganizationsOrganizationIDServers(w, r, organizationID) + })) + + for _, middleware := range siw.HandlerMiddlewares { + handler = middleware(handler) + } + + handler.ServeHTTP(w, r) +} + type UnescapedCookieParamError struct { ParamName string Err error @@ -1498,6 +1726,15 @@ func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handl r.Group(func(r chi.Router) { r.Get(options.BaseURL+"/api/v1/organizations/{organizationID}/projects/{projectID}/identities/{identityID}/securitygroups/{securityGroupID}/rules/{ruleID}", wrapper.GetApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDSecuritygroupsSecurityGroupIDRulesRuleID) }) + r.Group(func(r chi.Router) { + r.Post(options.BaseURL+"/api/v1/organizations/{organizationID}/projects/{projectID}/identities/{identityID}/servers", wrapper.PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServers) + }) + r.Group(func(r chi.Router) { + r.Delete(options.BaseURL+"/api/v1/organizations/{organizationID}/projects/{projectID}/identities/{identityID}/servers/{serverID}", wrapper.DeleteApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerID) + }) + r.Group(func(r chi.Router) { + r.Get(options.BaseURL+"/api/v1/organizations/{organizationID}/projects/{projectID}/identities/{identityID}/servers/{serverID}", wrapper.GetApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersServerID) + }) r.Group(func(r chi.Router) { r.Get(options.BaseURL+"/api/v1/organizations/{organizationID}/regions", wrapper.GetApiV1OrganizationsOrganizationIDRegions) }) @@ -1513,6 +1750,9 @@ func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handl r.Group(func(r chi.Router) { r.Get(options.BaseURL+"/api/v1/organizations/{organizationID}/securitygroups", wrapper.GetApiV1OrganizationsOrganizationIDSecuritygroups) }) + r.Group(func(r chi.Router) { + r.Get(options.BaseURL+"/api/v1/organizations/{organizationID}/servers", wrapper.GetApiV1OrganizationsOrganizationIDServers) + }) return r } diff --git a/pkg/openapi/schema.go b/pkg/openapi/schema.go index 8d5f477..4c0154d 100644 --- a/pkg/openapi/schema.go +++ b/pkg/openapi/schema.go @@ -19,127 +19,139 @@ import ( // Base64 encoded, gzipped, json marshaled Swagger object var swaggerSpec = []string{ - "H4sIAAAAAAAC/+x9/XPbOLLgv4LivarZrZNkSZZly7+88ySzM67JJN44yd7tKOeCyKaEMQlwAdCO1uX/", - "/RU+SPEDlChZdpJZ1b5XE4v4aDS6G92N7saD57M4YRSoFN75g5dgjmOQwPVfJAAqiVxevr7Kflc/ByB8", - "ThJJGPXOvQ8LQFlD+4+QAO95HY+o7wmWC6/jURyDd14Y0ut4HP6VEg6Bdy55Ch1P+AuIsZrivziE3rn3", - "v45W4B2Zr+LoNp0BpyBBvMUxrCB7fOx4jM8xJf/GCra1UF9QVGyLLl83AFwecS3QcpmoHkJyQucanGSx", - "FMTH0VuQ94zfbsRj1h5R02EzPmszPAtaE87+AF9uht+0Qwq4JoCzoZ4FUA7zTTuv4DTNNmM3G+55YE0j", - "2AipAD/lirPmnKUJUn1agK1HfhagM3h+VuBsC/1GwCujP8MKHs2QIOSPLCBQEnPvzQf1k8+oBKr/iZMk", - "Ir7m/6M/hFragwdfcJxEoP4Zg8QBltghYtAd8BkTgIq/1yRhV/+tUJuAr0axRBd4555/ejI+g2HQDSd4", - "1h2dHAfdCT7G3ZPB8elJeHo2Go5nXseTeC68898fsqH9KBUSeJcEXse7w1Gqfpwcjwej/tDvhpPJWXc0", - "8f0ung0H3clsNpng0A8DOPMeP+tNboXkbAH/4ESCQW0VARbVKGQcYZofE73axtZl5ctuRjZ51wre2qYE", - "VJOSAH6nD8ffvbOe/p/3WYlHCMkX79wbTIa9wfis1+/1j4ajr7YzFVS23aDa8dNTGPhXyiQWO21HGOE7", - "xg0CfJaqPmcdjyjKnuAzf3x82u+O+uOT7igY4e4kwP3u6fj0LAhHfT+YBGrNbZdsoLxWu7V2oZIhARKZ", - "5np9JZnzslSXTd3V4rFGc1+HeEr4aE06ZUnvQGwawVdFrjoTaxj2ScAV254qttVcOxh6HS8gHHw7C6Fz", - "DkJ4HS9hXANM03imDryzvtGMJPNZ5J170k+8HdGssLMjqrVK0LPKj0gYFe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Kw", + "Vb3+vIuRDt61m0RlUQKqWclwpiK2d9bT//NulCqHkHzxzr3BZNgbjM96/V7/aDj6ZiuzRsqmC1TZKnuK", + "Av9OmMRir+UII3zHuCGAzxLV56zjEcXZE3zmj49P+91Rf3zSHQUj3J0EuN89HZ+eBeGo7weTQM256ZQN", + "ltdqtTZOVDIkQCLTXM+vpB+fl+vSobtalVd47tswT4kejVmnvCs5CJtE8E2Jq/bvCoV9EnAltqdKbLXU", + "DoZexwsIB9+OQuicgxBex4sZ1wjTZDlTO9xZ31hxkvks8s496cfenmRW1NmT1Np8sfRWuum5iazGrNDV", + "CP5lY0HveGSJ52A248baoeNZPWWkZE3r7QjsQenxZBYR//LqIoqYIZamE8WzqLBRlVbODL0L0s1bg6eQ", + "WtcCEs8NvXMdoH4y/95N0NXa7cB2qnnPugQiZlQY8wm+SOA0o7t4bz/uwoIpDf3jcDI8HYy7gzDwu6PZ", + "6aw76Y+hOwqhPzgZBaEfhDn3hYxpEjWb7zqe7klHREjEQnSHIxKgtE+6I5otw+5re060KGw+B93wA9ET", + "GkxO+93+oNsffOj3z/X//dPbZcfMSDPvjXoLMl8sYdnDg36/N5j3Bv35rKT94uQveEmilXfuXVIJEfq/", + "wCi6irAkNFmis8G4/wH96fp2FeFb+LPXUT2Edz5SGlLceufDfsebx4mCFbG5kr1XZpcfdrwlLBlfeefj", + "UcdbsgAiPYiQhPoS/XY5POl7uc1nuw063h3QgCmdfPHba4VrCuZ4+NB8pVO7Y+MC20Z6Qa1hSuBgawrB", + "z4qsv7MF7QUM/g/2l9Dz2VIRsbzmw/5w1O2fdI8HHwaj88GguOZ4PAonw/GkezyGfnd0PBh2Z2fBoHsy", + "DCbHwcl4Mjud5Wue0ESA4oFSfGUH3knjCKoLHI/9/skZ7p7BDHdH4cmsOxmEo244DsPZ5Oz4dHLimy53", + "RBBGCZ1fSywVf+Q/QlDkNxYDFRL7WjX7EUvUOAGEOImkoov65RWjIZmr339dxP7qZ/X/i8u/vo/847//", + "bR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OsumVEs9r", + "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", + "dCnQkHHfKFQ7o47R1XZ6FzoFAv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+y00YVsIsaICjr6af6if4IuZTn0NkosoYvcCmVeUFCNPvbRT", + "liA89bTApIxoE4Zt6q5SAMvelP5jQSJAry6u3mnhIDS075Csg1MSClHYQUQin+NYIJZI1J1SrLPwUCIS", + "HKEuIqF5c0M/GcUomKrlCQ066J5j/zaTZ6pmpNOSdUWmRKB7QEKSSA1ppNNkrKkRdWBSiyqOkKDsPozw", + "7bZ84fTxsAplHiNq7+0q/bK+RvuIYIqZu75qW9rsBylt9myWT6pCDqaJzPuPDgX0yu7m9jXOrDrbpt1O", + "Z6hmdoAFbbSS0jiF8v5gc0mVZZDpuAMI7V/sdPaRVYvvj+uetPJzePnRj6ZuEB/9fR/pMYCbC88htrxL", + "M5m9Sgjqrq3stLJTIzvfdyJl43ube4mZI8fwUUfQ7aXLNoR2KO90l2PXTVKSNdpDOvITyf0iyq08tPKw", + "RR4eHv4nAAD//2QggfBT+QAA", } // 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 ad02e5b..433a9bf 100644 --- a/pkg/openapi/server.spec.yaml +++ b/pkg/openapi/server.spec.yaml @@ -491,6 +491,88 @@ 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}/servers: + description: |- + Manages servers. + parameters: + - $ref: '#/components/parameters/organizationIDParameter' + get: + description: List servers. + security: + - oauth2Authentication: [] + responses: + '200': + $ref: '#/components/responses/serversResponse' + '400': + $ref: 'https://raw.githubusercontent.com/unikorn-cloud/core/main/pkg/openapi/common.spec.yaml#/components/responses/badRequestResponse' + '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' + '500': + $ref: 'https://raw.githubusercontent.com/unikorn-cloud/core/main/pkg/openapi/common.spec.yaml#/components/responses/internalServerErrorResponse' + /api/v1/organizations/{organizationID}/projects/{projectID}/identities/{identityID}/servers: + description: |- + Manages servers. + parameters: + - $ref: '#/components/parameters/organizationIDParameter' + - $ref: '#/components/parameters/projectIDParameter' + - $ref: '#/components/parameters/identityIDParameter' + post: + description: Create a new server. + security: + - oauth2Authentication: [] + requestBody: + $ref: '#/components/requestBodies/serverRequest' + responses: + '201': + $ref: '#/components/responses/serverResponse' + '400': + $ref: 'https://raw.githubusercontent.com/unikorn-cloud/core/main/pkg/openapi/common.spec.yaml#/components/responses/badRequestResponse' + '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' + '500': + $ref: 'https://raw.githubusercontent.com/unikorn-cloud/core/main/pkg/openapi/common.spec.yaml#/components/responses/internalServerErrorResponse' + /api/v1/organizations/{organizationID}/projects/{projectID}/identities/{identityID}/servers/{serverID}: + description: |- + Manages servers. + parameters: + - $ref: '#/components/parameters/organizationIDParameter' + - $ref: '#/components/parameters/projectIDParameter' + - $ref: '#/components/parameters/identityIDParameter' + - $ref: '#/components/parameters/serverIDParameter' + get: + description: Get a server. + security: + - oauth2Authentication: [] + responses: + '200': + $ref: '#/components/responses/serverResponse' + '400': + $ref: 'https://raw.githubusercontent.com/unikorn-cloud/core/main/pkg/openapi/common.spec.yaml#/components/responses/badRequestResponse' + '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' + '500': + $ref: 'https://raw.githubusercontent.com/unikorn-cloud/core/main/pkg/openapi/common.spec.yaml#/components/responses/internalServerErrorResponse' + delete: + description: Delete a server. + security: + - oauth2Authentication: [] + responses: + '202': + $ref: 'https://raw.githubusercontent.com/unikorn-cloud/core/main/pkg/openapi/common.spec.yaml#/components/responses/acceptedResponse' + '400': + $ref: 'https://raw.githubusercontent.com/unikorn-cloud/core/main/pkg/openapi/common.spec.yaml#/components/responses/badRequestResponse' + '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' + '500': + $ref: 'https://raw.githubusercontent.com/unikorn-cloud/core/main/pkg/openapi/common.spec.yaml#/components/responses/internalServerErrorResponse' components: parameters: organizationIDParameter: @@ -550,6 +632,13 @@ components: required: true schema: $ref: '#/components/schemas/kubernetesNameParameter' + serverIDParameter: + name: serverID + in: path + description: The server identifier. + required: true + schema: + $ref: '#/components/schemas/kubernetesNameParameter' schemas: kubernetesNameParameter: description: A Kubernetes name. Must be a valid DNS containing only lower case characters, numbers or hyphens, start and end with a character or number, and be at most 63 characters in length. @@ -1103,6 +1192,154 @@ components: type: array items: $ref: '#/components/schemas/securityGroupRead' + serverReadSpec: + description: A server's specification. + type: object + required: + - flavorId + - image + - networks + properties: + tags: + $ref: '#/components/schemas/tagList' + flavorId: + description: The flavor of the server. + type: string + image: + $ref: '#/components/schemas/serverImage' + securityGroups: + $ref: '#/components/schemas/serverSecurityGroupList' + publicIPAllocation: + $ref: '#/components/schemas/serverPublicIPAllocation' + networks: + $ref: '#/components/schemas/serverNetworkList' + serverNetworkList: + description: A list of networks. + type: array + minItems: 1 + items: + $ref: '#/components/schemas/serverNetwork' + serverNetwork: + description: The server's network. + type: object + properties: + physicalNetwork: + $ref: '#/components/schemas/serverPhysicalNetwork' + serverPhysicalNetwork: + description: The server's physical network spec. + type: object + required: + - id + properties: + id: + description: The physical network ID. + type: string + serverPublicIPAllocation: + description: The server's public IP allocation. + type: object + required: + - enabled + properties: + enabled: + description: Whether to allocate a public IP. + type: boolean + serverSecurityGroupList: + description: A list of security groups. + type: array + items: + $ref: '#/components/schemas/serverSecurityGroup' + serverSecurityGroup: + description: A security group. + type: object + required: + - id + properties: + id: + description: The security group ID. + type: string + serverImage: + description: The image to use for the server. + type: object + properties: + id: + description: The image ID. + type: string + selector: + $ref: '#/components/schemas/serverImageSelector' + serverImageSelector: + description: A selector for an image. + type: object + required: + - os + - version + properties: + os: + description: The OS to match. + type: string + version: + description: The version to match. + type: string + serverReadStatus: + description: A server's status. + type: object + properties: + privateIP: + description: The private IP address of the server. + type: string + publicIP: + description: The public IP address of the server. + type: string + serverWriteSpec: + description: A server's specification. + type: object + required: + - flavorId + - image + - networks + properties: + tags: + $ref: '#/components/schemas/tagList' + flavorId: + description: The flavor of the server. + type: string + image: + $ref: '#/components/schemas/serverImage' + securityGroups: + $ref: '#/components/schemas/serverSecurityGroupList' + publicIPAllocation: + $ref: '#/components/schemas/serverPublicIPAllocation' + networks: + $ref: '#/components/schemas/serverNetworkList' + serverWrite: + description: A server request. + type: object + required: + - metadata + - spec + properties: + metadata: + $ref: 'https://raw.githubusercontent.com/unikorn-cloud/core/main/pkg/openapi/common.spec.yaml#/components/schemas/resourceWriteMetadata' + spec: + $ref: '#/components/schemas/serverWriteSpec' + serverRead: + description: A server. + type: object + required: + - metadata + - spec + - status + properties: + metadata: + $ref: 'https://raw.githubusercontent.com/unikorn-cloud/core/main/pkg/openapi/common.spec.yaml#/components/schemas/projectScopedResourceReadMetadata' + spec: + $ref: '#/components/schemas/serverReadSpec' + status: + $ref: '#/components/schemas/serverReadStatus' + serversRead: + description: A list of servers. + type: array + items: + $ref: '#/components/schemas/serverRead' requestBodies: identityRequest: description: A request for an identity. @@ -1177,6 +1414,31 @@ components: port: number: 80 cidr: 172.16.0.0/12 + serverRequest: + description: A request for a server. + content: + application/json: + schema: + $ref: '#/components/schemas/serverWrite' + example: + metadata: + name: server-name + description: A verbose description + spec: + flavorId: 9a8c6370-4065-4d4a-9da0-7678df40cd9d + image: + id: 9a8c6370-4065-4d4a-9da0-7678df40cd9d + securityGroups: + - id: 9a8c6370-4065-4d4a-9da0-7678df40cd9d + - id: 9a8c6370-4065-4d4a-9da0-7678df40cd9e + publicIPAllocation: + enabled: true + networks: + - physicalNetwork: + id: 9a8c6370-4065-4d4a-9da0-7678df40cd9d + tags: + - name: tag-name + value: tag-value responses: regionsResponse: description: A list of regions. @@ -1448,6 +1710,72 @@ components: port: number: 80 cidr: 0.0.0.0/0 + serverResponse: + description: A server. + content: + application/json: + schema: + $ref: '#/components/schemas/serverRead' + example: + metadata: + id: a64f9269-36e0-4312-b8d1-52d93d569b7b + name: server-name + organizationId: 9a8c6370-4065-4d4a-9da0-7678df40cd9d + projectId: e36c058a-8eba-4f5b-91f4-f6ffb983795c + creationTime: 2024-05-31T14:11:00Z + createdBy: john.doe@acme.com + provisioningStatus: provisioned + spec: + flavorId: 9a8c6370-4065-4d4a-9da0-7678df40cd9d + image: + id: 9a8c6370-4065-4d4a-9da0-7678df40cd9d + securityGroups: + - id: 9a8c6370-4065-4d4a-9da0-7678df40cd9d + - id: 9a8c6370-4065-4d4a-9da0-7678df40cd9e + publicIPAllocation: + enabled: true + networks: + - physicalNetwork: + id: 9a8c6370-4065-4d4a-9da0-7678df40cd9d + tags: + - name: tag-name + value: tag-value + status: + privateIP: 192.168.1.50 + publicIP: 142.250.66.196 + serversResponse: + description: A list of servers. + content: + application/json: + schema: + $ref: '#/components/schemas/serversRead' + example: + - metadata: + id: a64f9269-36e0-4312-b8d1-52d93d569b7b + name: server-name + organizationId: 9a8c6370-4065-4d4a-9da0-7678df40cd9d + projectId: e36c058a-8eba-4f5b-91f4-f6ffb983795c + creationTime: 2024-05-31T14:11:00Z + createdBy: john.doe@acme.com + provisioningStatus: provisioned + spec: + flavorId: 9a8c6370-4065-4d4a-9da0-7678df40cd9d + image: + id: 9a8c6370-4065-4d4a-9da0-7678df40cd9d + securityGroups: + - id: 9a8c6370-4065-4d4a-9da0-7678df40cd9d + - id: 9a8c6370-4065-4d4a-9da0-7678df40cd9e + publicIPAllocation: + enabled: true + networks: + - physicalNetwork: + id: 9a8c6370-4065-4d4a-9da0-7678df40cd9d + tags: + - name: tag-name + value: tag-value + status: + privateIP: 192.168.1.50 + publicIP: 142.250.66.196 securitySchemes: oauth2Authentication: description: Operation requires OAuth2 bearer token authentication. diff --git a/pkg/openapi/types.go b/pkg/openapi/types.go index 1147854..b2dca23 100644 --- a/pkg/openapi/types.go +++ b/pkg/openapi/types.go @@ -480,6 +480,128 @@ type SecurityGroupWriteSpec struct { // SecurityGroupsRead A list of security groups. type SecurityGroupsRead = []SecurityGroupRead +// ServerImage The image to use for the server. +type ServerImage struct { + // Id The image ID. + Id *string `json:"id,omitempty"` + + // Selector A selector for an image. + Selector *ServerImageSelector `json:"selector,omitempty"` +} + +// ServerImageSelector A selector for an image. +type ServerImageSelector struct { + // Os The OS to match. + Os string `json:"os"` + + // Version The version to match. + Version string `json:"version"` +} + +// ServerNetwork The server's network. +type ServerNetwork struct { + // PhysicalNetwork The server's physical network spec. + PhysicalNetwork *ServerPhysicalNetwork `json:"physicalNetwork,omitempty"` +} + +// ServerNetworkList A list of networks. +type ServerNetworkList = []ServerNetwork + +// ServerPhysicalNetwork The server's physical network spec. +type ServerPhysicalNetwork struct { + // Id The physical network ID. + Id string `json:"id"` +} + +// ServerPublicIPAllocation The server's public IP allocation. +type ServerPublicIPAllocation struct { + // Enabled Whether to allocate a public IP. + Enabled bool `json:"enabled"` +} + +// ServerRead A server. +type ServerRead struct { + Metadata externalRef0.ProjectScopedResourceReadMetadata `json:"metadata"` + + // Spec A server's specification. + Spec ServerReadSpec `json:"spec"` + + // Status A server's status. + Status ServerReadStatus `json:"status"` +} + +// ServerReadSpec A server's specification. +type ServerReadSpec struct { + // FlavorId The flavor of the server. + FlavorId string `json:"flavorId"` + + // Image The image to use for the server. + Image ServerImage `json:"image"` + + // Networks A list of networks. + Networks ServerNetworkList `json:"networks"` + + // PublicIPAllocation The server's public IP allocation. + PublicIPAllocation *ServerPublicIPAllocation `json:"publicIPAllocation,omitempty"` + + // SecurityGroups A list of security groups. + SecurityGroups *ServerSecurityGroupList `json:"securityGroups,omitempty"` + + // Tags A list of tags. + Tags *TagList `json:"tags,omitempty"` +} + +// ServerReadStatus A server's status. +type ServerReadStatus struct { + // PrivateIP The private IP address of the server. + PrivateIP *string `json:"privateIP,omitempty"` + + // PublicIP The public IP address of the server. + PublicIP *string `json:"publicIP,omitempty"` +} + +// ServerSecurityGroup A security group. +type ServerSecurityGroup struct { + // Id The security group ID. + Id string `json:"id"` +} + +// ServerSecurityGroupList A list of security groups. +type ServerSecurityGroupList = []ServerSecurityGroup + +// ServerWrite A server request. +type ServerWrite struct { + // Metadata Resource metadata valid for all API resource reads and writes. + Metadata externalRef0.ResourceWriteMetadata `json:"metadata"` + + // Spec A server's specification. + Spec ServerWriteSpec `json:"spec"` +} + +// ServerWriteSpec A server's specification. +type ServerWriteSpec struct { + // FlavorId The flavor of the server. + FlavorId string `json:"flavorId"` + + // Image The image to use for the server. + Image ServerImage `json:"image"` + + // Networks A list of networks. + Networks ServerNetworkList `json:"networks"` + + // PublicIPAllocation The server's public IP allocation. + PublicIPAllocation *ServerPublicIPAllocation `json:"publicIPAllocation,omitempty"` + + // SecurityGroups A list of security groups. + SecurityGroups *ServerSecurityGroupList `json:"securityGroups,omitempty"` + + // Tags A list of tags. + Tags *TagList `json:"tags,omitempty"` +} + +// ServersRead A list of servers. +type ServersRead = []ServerRead + // SoftwareVersions Image preinstalled version version metadata. type SoftwareVersions struct { // Kubernetes A semantic version. @@ -519,6 +641,9 @@ type RuleIDParameter = KubernetesNameParameter // SecurityGroupIDParameter A Kubernetes name. Must be a valid DNS containing only lower case characters, numbers or hyphens, start and end with a character or number, and be at most 63 characters in length. type SecurityGroupIDParameter = KubernetesNameParameter +// ServerIDParameter A Kubernetes name. Must be a valid DNS containing only lower case characters, numbers or hyphens, start and end with a character or number, and be at most 63 characters in length. +type ServerIDParameter = KubernetesNameParameter + // ExternalNetworksResponse A list of openstack external networks. type ExternalNetworksResponse = ExternalNetworks @@ -558,6 +683,12 @@ type SecurityGroupRulesResponse = SecurityGroupRulesRead // SecurityGroupsResponse A list of security groups. type SecurityGroupsResponse = SecurityGroupsRead +// ServerResponse A server. +type ServerResponse = ServerRead + +// ServersResponse A list of servers. +type ServersResponse = ServersRead + // IdentityRequest An identity request. type IdentityRequest = IdentityWrite @@ -573,6 +704,9 @@ type SecurityGroupRequest = SecurityGroupWrite // SecurityGroupRuleRequest A security group rule request. type SecurityGroupRuleRequest = SecurityGroupRuleWrite +// ServerRequest A server request. +type ServerRequest = ServerWrite + // PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesJSONRequestBody defines body for PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentities for application/json ContentType. type PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesJSONRequestBody = IdentityWrite @@ -590,3 +724,6 @@ type PutApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDSec // PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDSecuritygroupsSecurityGroupIDRulesJSONRequestBody defines body for PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDSecuritygroupsSecurityGroupIDRules for application/json ContentType. type PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDSecuritygroupsSecurityGroupIDRulesJSONRequestBody = SecurityGroupRuleWrite + +// PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersJSONRequestBody defines body for PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServers for application/json ContentType. +type PostApiV1OrganizationsOrganizationIDProjectsProjectIDIdentitiesIdentityIDServersJSONRequestBody = ServerWrite