From 5ae38121a6444245d0afb3e6e0d76ab99b25da8c Mon Sep 17 00:00:00 2001 From: Mike Chuang Date: Wed, 26 Jun 2024 14:21:18 -0500 Subject: [PATCH] F9955 - DPCE support for BYOI imaging services (#118) * Include ProjectID for Project API Services object CRUD API calls. This is needed to support DPCE GLP IAM Service creation (BYOI) at Project scope as well (i.e. BMaaS tenant owner & contributor). * [auto generated] Checking in generated offline HTML doc --- v1/api/swagger/paths/services.yaml | 4 --- .../swagger/paths/services@{serviceId}.yaml | 8 ----- v1/html/index.html | 8 ++--- v1/pkg/client/api/openapi.yaml | 12 ------- v1/pkg/client/api_services.go | 36 +++++++++++++++++++ v1/pkg/client/docs/ServicesApi.md | 6 ++-- 6 files changed, 43 insertions(+), 31 deletions(-) diff --git a/v1/api/swagger/paths/services.yaml b/v1/api/swagger/paths/services.yaml index b0069f0e..cb5646f3 100644 --- a/v1/api/swagger/paths/services.yaml +++ b/v1/api/swagger/paths/services.yaml @@ -40,10 +40,6 @@ post: 'X-Role' and 'X-Workspaceid' headers. Note that Hoster or BMaaS Access Owner role is required for this operation. operationId: Service_add - security: - - BearerAuth: [] - Membership: [] - - BearerAuth: [] parameters: - $ref: ../components/parameters/SpaceID.yaml - $ref: ../components/parameters/Space.yaml diff --git a/v1/api/swagger/paths/services@{serviceId}.yaml b/v1/api/swagger/paths/services@{serviceId}.yaml index 1306c431..c747a39e 100644 --- a/v1/api/swagger/paths/services@{serviceId}.yaml +++ b/v1/api/swagger/paths/services@{serviceId}.yaml @@ -41,10 +41,6 @@ put: If GreenLake Platform IAM issued token is used for authentication, then it is required to pass 'X-Role' and 'X-Workspaceid' headers. operationId: Service_update - security: - - BearerAuth: [] - Membership: [] - - BearerAuth: [] parameters: - name: serviceId in: path @@ -90,10 +86,6 @@ delete: If GreenLake Platform IAM issued token is used for authentication, then it is required to pass 'X-Role' and 'X-Workspaceid' headers. operationId: Service_delete - security: - - BearerAuth: [] - Membership: [] - - BearerAuth: [] parameters: - name: serviceId in: path diff --git a/v1/html/index.html b/v1/html/index.html index 402b2462..1dfc21b6 100644 --- a/v1/html/index.html +++ b/v1/html/index.html @@ -3001,7 +3001,7 @@

Option 2: Getting the token directly from UI

Response samples

Content type
application/json
[
  • {
    }
]

Create a new OS service image

Adds a new OS service image that can be referenced during host creation. If GreenLake Cloud Services IAM issued token is used for authentication, then it is required to pass either 'spaceid' header or 'Space' header. If GreenLake Platform IAM issued token is used for authentication, then it is required to pass 'X-Role' and 'X-Workspaceid' headers. Note that Hoster or BMaaS Access Owner role is required for this operation.

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

GreenLake Cloud Services space ID

+
Authorizations:
(BearerAuthProject) (BearerAuthMembership)
header Parameters
spaceid
string
Example: 95688cf9-82ff-4e32-80fc-2b0b41648dab

GreenLake Cloud Services space ID

Space
string
Example: Default

GreenLake Cloud Services space name

X-Role
string
Example: metal-infra-admin

GreenLake Platform role name

X-Workspaceid
string
Example: 1a2ba81600dd11efa47076a3447ec4eb

GreenLake Platform workspace ID

@@ -3023,7 +3023,7 @@

Option 2: Getting the token directly from UI

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",
  • "Description": "Description of the image",
  • "Category": "linux",
  • "Flavor": "ubuntu",
  • "Version": "20.04.5",
  • "Origin": "Custom",
  • "Timeout": 1000,
  • "DeviceLayouts": [
    ],
  • "PermittedProjects": [
    ],
  • "Files": [
    ],
  • "Info": [
    ],
  • "Approach": "vmedia",
  • "AssumedBootMethod": "na",
  • "NoSwitchLAG": false,
  • "BondMode": "none",
  • "FWBaselineID": "046b6c7f-0b8a-43b9-b35d-6489e6daee92",
  • "UserDefinedSteps": {
    },
  • "Classifiers": [
    ]
}

Update an OS service image by its ID

Updates an OS service image with a matching ID. Note that Hoster or BMaaS Access Owner role is required for this operation under GreenLake Cloud Services. 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
path Parameters
serviceId
required
string

ID of OS service image to update

+
Authorizations:
(BearerAuthProject) (BearerAuthMembership)
path Parameters
serviceId
required
string

ID of OS service image to update

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

GreenLake Platform role name

X-Workspaceid
string
Example: 1a2ba81600dd11efa47076a3447ec4eb

GreenLake Platform workspace ID

Request Body schema: multipart/form-data

Yaml file describing the OS service image.

@@ -3036,7 +3036,7 @@

Option 2: Getting the token directly from UI

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",
  • "Description": "Description of the image",
  • "Category": "linux",
  • "Flavor": "ubuntu",
  • "Version": "20.04.5",
  • "Origin": "Custom",
  • "Timeout": 1000,
  • "DeviceLayouts": [
    ],
  • "PermittedProjects": [
    ],
  • "Files": [
    ],
  • "Info": [
    ],
  • "Approach": "vmedia",
  • "AssumedBootMethod": "na",
  • "NoSwitchLAG": false,
  • "BondMode": "none",
  • "FWBaselineID": "046b6c7f-0b8a-43b9-b35d-6489e6daee92",
  • "UserDefinedSteps": {
    },
  • "Classifiers": [
    ]
}

Delete an OS service image

Deletes the OS service image with the matching ID. Note that Hoster or BMaaS Access Owner role is required for this operation under GreenLake Cloud Services. 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
path Parameters
serviceId
required
string

ID of OS service image to delete

+
Authorizations:
(BearerAuthProject) (BearerAuthMembership)
path Parameters
serviceId
required
string

ID of OS service image to delete

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

GreenLake Platform role name

X-Workspaceid
string
Example: 1a2ba81600dd11efa47076a3447ec4eb

GreenLake Platform workspace ID

Responses

Response samples

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