From bc66873c14536e8d5f4bf38b1dd89e471b831d92 Mon Sep 17 00:00:00 2001 From: Patricia DiBenedetto Date: Wed, 8 Jan 2025 09:44:41 -0600 Subject: [PATCH] PCCM-28439 Metal Client changes to support PCE HA Zones (#141) * initial code * [auto generated] Checking in generated offline HTML doc * Redocly * [auto generated] Checking in generated offline HTML doc * make serialization style of query parameters explicit * [auto generated] Checking in generated offline HTML doc * add newline --------- Co-authored-by: patricia-dibenedetto --- v1/api/swagger/components/parameters/SiteID.yaml | 6 +++++- .../swagger/components/schemas/UpdateProject.yaml | 9 +++++++++ v1/html/index.html | 9 +++++---- v1/pkg/client/api/openapi.yaml | 15 ++++++++++++++- v1/pkg/client/api_projects_info.go | 15 ++++++++++++--- v1/pkg/client/docs/ProjectsInfoApi.md | 2 +- v1/pkg/client/docs/UpdateProject.md | 1 + v1/pkg/client/docs/UpdateProjectAllOf.md | 1 + v1/pkg/client/interface_projects_info.go | 2 +- v1/pkg/client/model_update_project.go | 2 ++ v1/pkg/client/model_update_project_all_of.go | 2 ++ 11 files changed, 53 insertions(+), 11 deletions(-) diff --git a/v1/api/swagger/components/parameters/SiteID.yaml b/v1/api/swagger/components/parameters/SiteID.yaml index 35a88da3..4623a00a 100644 --- a/v1/api/swagger/components/parameters/SiteID.yaml +++ b/v1/api/swagger/components/parameters/SiteID.yaml @@ -3,5 +3,9 @@ in: query description: GreenLake site ID required: false schema: - type: string + type: array + items: + type: string +style: form +explode: true example: 95688cf9-82ff-4e32-80fc-2b0b41648dab diff --git a/v1/api/swagger/components/schemas/UpdateProject.yaml b/v1/api/swagger/components/schemas/UpdateProject.yaml index c1025775..7d6c750e 100644 --- a/v1/api/swagger/components/schemas/UpdateProject.yaml +++ b/v1/api/swagger/components/schemas/UpdateProject.yaml @@ -23,3 +23,12 @@ allOf: example: - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - 91eec8b5-6460-4532-aad1-47b983edb63c + PermittedSites: + description: Array listing the permitted site IDs + type: array + items: + type: string + format: uuid + example: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 91eec8b5-6460-4532-aad1-47b983edb63c diff --git a/v1/html/index.html b/v1/html/index.html index 9cd33fbe..ca67b324 100644 --- a/v1/html/index.html +++ b/v1/html/index.html @@ -2413,7 +2413,8 @@

Option 2: Getting the token directly from UI

ID
required
string <uuid>

Unique ID for the resource instance as generated by the Metal service

ETag
required
string <uuid>

Used to determine whether the DB entry has changed since it was last read. This value is updated each time the resource is updated. Client must send this value unchanged for any update operation.

Name
required
string

Common name for the resource instance. Must be 128 or fewer printable characters

-
required
object (UpdateProfile)
required
object (UpdateLimits)
PermittedOSImages
required
Array of strings <uuid>

Array listing the permitted OS service images.

+
required
object (UpdateProfile)
required
object (UpdateLimits)
PermittedOSImages
required
Array of strings <uuid>

Array listing the permitted OS service images.

+
PermittedSites
Array of strings <uuid>

Array listing the permitted site IDs

Responses

Request samples

Content type
application/json
{
  • "ID": "3892eb50-4697-4c72-aadc-32b766bce3c0",
  • "ETag": "a8a0a8d9-d35b-45c6-840f-2b3694efc394",
  • "Name": "My Object Name",
  • "Profile": {
    },
  • "Limits": {
    },
  • "PermittedOSImages": [
    ]
}

Response samples

Content type
application/json
{
  • "ID": "3892eb50-4697-4c72-aadc-32b766bce3c0",
  • "ETag": "a8a0a8d9-d35b-45c6-840f-2b3694efc394",
  • "Name": "My Object Name",
  • "Created": "2019-06-27T22:59:01.661Z",
  • "Modified": "2020-02-27T18:28:02.863Z",
  • "Profile": {
    },
  • "Limits": {
    },
  • "Resources": {
    },
  • "PermittedSites": [
    ],
  • "PermittedOSImages": [
    ],
  • "VolumeReplicationEnabled": true,
  • "ParentID": "string"
}

Delete a Project

Deletes the Project with the matching ID. Note that a Hoster or BMaaS Access Owner (under GreenLake Cloud Services), or BMaaS Tenant Owner or Service Platform Owner role (under GreenLake Platform) is required for this operation. If GreenLake Platform IAM issued token is used for authentication, then it is required to pass 'X-Role' and 'X-Workspaceid' headers.

+
https://client.greenlake.hpe.com{basePath}/projects/{projectId}

Request samples

Content type
application/json
{
  • "ID": "3892eb50-4697-4c72-aadc-32b766bce3c0",
  • "ETag": "a8a0a8d9-d35b-45c6-840f-2b3694efc394",
  • "Name": "My Object Name",
  • "Profile": {
    },
  • "Limits": {
    },
  • "PermittedOSImages": [
    ],
  • "PermittedSites": [
    ]
}

Response samples

Content type
application/json
{
  • "ID": "3892eb50-4697-4c72-aadc-32b766bce3c0",
  • "ETag": "a8a0a8d9-d35b-45c6-840f-2b3694efc394",
  • "Name": "My Object Name",
  • "Created": "2019-06-27T22:59:01.661Z",
  • "Modified": "2020-02-27T18:28:02.863Z",
  • "Profile": {
    },
  • "Limits": {
    },
  • "Resources": {
    },
  • "PermittedSites": [
    ],
  • "PermittedOSImages": [
    ],
  • "VolumeReplicationEnabled": true,
  • "ParentID": "string"
}

Delete a Project

Deletes the Project with the matching ID. Note that a Hoster or BMaaS Access Owner (under GreenLake Cloud Services), or BMaaS Tenant Owner or Service Platform Owner role (under GreenLake Platform) is required for this operation. If GreenLake Platform IAM issued token is used for authentication, then it is required to pass 'X-Role' and 'X-Workspaceid' headers.

Authorizations:
(BearerAuthMembership) (BearerAuthProject)
path Parameters
projectId
required
string

ID of project to delete

header Parameters
X-Role
string
Example: metal-infra-admin

GreenLake Platform role name

X-Workspaceid
string
Example: 1a2ba81600dd11efa47076a3447ec4eb

GreenLake Platform workspace ID

@@ -2892,7 +2893,7 @@

Option 2: Getting the token directly from UI

List of all projects info within an organization or cluster for which user is authorized.

Returns an object with information on projects, machine sizes, and volume flavors. The 'Projects' list includes projects authorized for a user, and the 'MachineSizes' and 'VolumeFlavors' list include only those machine sizes and volume flavors permitted for projects. When GreenLake Cloud Services IAM issued token is used for authentication, it is required to pass either 'Space' or 'spaceid' header. When both are set, 'Space' header is ignored. If GreenLake Platform IAM issued token is used for authentication, then it is required to pass 'X-Role' and 'X-Workspaceid' headers.

-
Authorizations:
(BearerAuthMembership) BearerAuth
query Parameters
siteid
string
Example: siteid=95688cf9-82ff-4e32-80fc-2b0b41648dab

GreenLake site ID

+
Authorizations:
(BearerAuthMembership) BearerAuth
query Parameters
siteid
Array of strings
Example: siteid=95688cf9-82ff-4e32-80fc-2b0b41648dab

GreenLake site ID

header Parameters
Space
string
Example: Default

GreenLake Cloud Services space name

spaceid
string
Example: 95688cf9-82ff-4e32-80fc-2b0b41648dab

GreenLake Cloud Services space ID

X-Role
string
Example: metal-infra-admin

GreenLake Platform role name

@@ -3057,7 +3058,7 @@

Option 2: Getting the token directly from UI

Response samples

Content type
application/json
{
  • "message": "string",
  • "details": "string"
}