Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/go_modules/golang.org/x/oauth2-…
Browse files Browse the repository at this point in the history
…0.20.0
  • Loading branch information
neilgierman authored Jul 11, 2024
2 parents 00f559f + f90defe commit 7b23922
Show file tree
Hide file tree
Showing 225 changed files with 3,768 additions and 2,309 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Navigate to version-specific API Client directories (\<version\>/pkg/client) to
## Usage
The project API is intended for use by services and users accessing and provisioning project resources assigned specifically to a project. Projects are created and managed by a project administrator. Project resource limits for number of hosts and volumes and total storage capacity and project members are managed by the project administrator for the project. The scope of resource access and management by project members is limited to hosts and storage volumes created within the project limits by team members with project credentials. The project API provides access to available inventory which can be consumed for creating hosts, sshkeys, custom networks, and persistent storage volumes. Inventory usage is constrained by the project limits definitions.

The APIs use bearer authentication (also called token authentication) that requires the user to provide a bearer token in the authorization header. Two token methods are supported, the HPE GreenLake IAM token and Metal classic tokens.
The APIs use bearer authentication (also called token authentication) that requires the user to provide a bearer token in the authorization header. Three token methods are supported, the HPE GreenLake Cloud Services IAM token, HPE GreenLake Platform IAM token and Metal classic tokens.

## Code generation
Client code is generated from the OpenAPI files in \<version\>/api/swagger/ using openapi-generator. In order to generate go client source code from the OpenAPI files, clone the repository https://github.com/hewlettpackard/hpegl-metal-client.git and install openapi-generator. Development and build environment requires Ubuntu 18.04. It is recommended to use this for working with hpegl-metal-client source generation also. Instructions on installing the openapi-generator on Ubuntu are below.
Expand Down
6 changes: 6 additions & 0 deletions v1/api/swagger/components/parameters/Role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: X-Role
in: header
description: GreenLake Platform role name
schema:
type: string
example: metal-infra-admin
2 changes: 1 addition & 1 deletion v1/api/swagger/components/parameters/Space.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Space
in: header
description: GreenLake space name
description: GreenLake Cloud Services space name
schema:
type: string
example: Default
2 changes: 1 addition & 1 deletion v1/api/swagger/components/parameters/SpaceID.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: spaceid
in: header
description: GreenLake space ID
description: GreenLake Cloud Services space ID
schema:
type: string
example: 95688cf9-82ff-4e32-80fc-2b0b41648dab
6 changes: 6 additions & 0 deletions v1/api/swagger/components/parameters/WorkspaceID.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: X-Workspaceid
in: header
description: GreenLake Platform workspace ID
schema:
type: string
example: 1a2ba81600dd11efa47076a3447ec4eb
7 changes: 7 additions & 0 deletions v1/api/swagger/components/schemas/FileInfo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,10 @@ properties:
description: >-
URL of the file that should be kept secret.
If this field is set, it will be used for accessing the file and DisplayURL will be ignored.
SkipSslVerify:
type: boolean
description: >-
Indicates if the web server the file is being downloaded from should have
the SSL certificate validation bypassed. Useful for downloading from an
internal webserver with either self-signed or internal CA issued SSL certificate.
example: true
5 changes: 5 additions & 0 deletions v1/api/swagger/components/schemas/HostState.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
type: string
enum:
- ''
- New
- Deleting
- Deleted
Expand All @@ -16,5 +17,9 @@ enum:
- Releasing
- Allocating
- Maintenance
- Attaching
- Detaching
- ISCSI Attaching
- All Detaching
description: Overall host state
example: Ready
6 changes: 3 additions & 3 deletions v1/api/swagger/components/schemas/HostSubstate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ enum:
- ''
- Abort Deploy
- Allocate
- Attaching Volumes
- Attach Volumes
- Boot Service-OS
- Clear Log
- Complete
Expand All @@ -13,16 +13,16 @@ enum:
- Connect Provisioning
- DNS Add
- DNS Add Init
- DNS Delete Init
- DNS Delete
- Deploy
- Detach Volumes
- Error Recovery
- Fail Cleanup
- Failed
- In Maintenance
- In OS Prep
- Init
- Init Attach Volumes
- Init Detach Volumes
- Init Maintenance
- Init OS Prep
- Init Off
Expand Down
5 changes: 4 additions & 1 deletion v1/api/swagger/components/schemas/Project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,7 @@ allOf:
- 91eec8b5-6460-4532-aad1-47b983edb63c
VolumeReplicationEnabled:
type: boolean
description: Indicates whether volume replication is enabled for this Project.
description: Indicates whether volume replication is enabled for this Project.
ParentID:
type: string
description: ID of the Parent Project (optional). Applicable to GreenLake Platform (GLP) only.
9 changes: 8 additions & 1 deletion v1/api/swagger/components/schemas/VolumeAttachment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ allOf:
- State
- FSConfig
- AttachProtocol
- WWPNs
properties:
VolumeID:
type: string
Expand Down Expand Up @@ -65,4 +66,10 @@ allOf:
allOf:
- $ref: ./VAFSConfig.yaml
AttachProtocol:
$ref: ./ProtocolKind.yaml
$ref: ./ProtocolKind.yaml
WWPNs:
type: array
items:
type: string
example: 20:31:01:02:ad:f2:a8:e5
description: List of FC host port wwpns.
7 changes: 6 additions & 1 deletion v1/api/swagger/paths/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ get:
summary: Get servers allocation
description: |
Returns an array of allocation information for each server instance type. Each instance type's allocation information is further grouped by service type.
When using a Metal token, the value in the 'Membership' header determines the scope of the response, i.e., Project or Hoster. However, the default scope is Tenant/Hoster when using the GL IAM token. If the allocation data is needed for a specific project, then the 'Project' header must be present in the request.
When using a Metal token, the value in the 'Membership' header determines the scope of the response, i.e., Project or Hoster. However, the default scope is Tenant/Hoster when using the GL IAM token.
If the allocation data is needed for a specific project, then the 'Project' header must be present in the request.
If the 'siteID' query parameter is present, the information returned is specific to that site ID.
If GreenLake Platform IAM issued token is used for authentication, then it is required to pass
'X-Role' and 'X-Workspaceid' headers.
operationId: allocation_getBySite
parameters:
- name: siteID
Expand All @@ -14,6 +17,8 @@ get:
required: false
schema:
type: string
- $ref: ../components/parameters/Role.yaml
- $ref: ../components/parameters/WorkspaceID.yaml
responses:
'200':
description: success
Expand Down
7 changes: 6 additions & 1 deletion v1/api/swagger/paths/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ get:
summary: Get storage allocation
description: |
Returns an array of allocation information for each server instance type. Each instance type's allocation information is further grouped by service type.
When using a Metal token, the value in the 'Membership' header determines the scope of the response, i.e., Project or Hoster. However, the default scope is Tenant/Hoster when using the GL IAM token. If the allocation data is needed for a specific project, then the 'Project' header must be present in the request.
When using a Metal token, the value in the 'Membership' header determines the scope of the response, i.e., Project or Hoster. However, the default scope is Tenant/Hoster when using the GL IAM token.
If the allocation data is needed for a specific project, then the 'Project' header must be present in the request.
If the 'siteID' query parameter is present, the information returned is specific to that site ID.
If GreenLake Platform IAM issued token is used for authentication, then it is required to pass
'X-Role' and 'X-Workspaceid' headers.
operationId: allocation_storage_getBySite
parameters:
- name: siteID
Expand All @@ -14,6 +17,8 @@ get:
required: false
schema:
type: string
- $ref: ../components/parameters/Role.yaml
- $ref: ../components/parameters/WorkspaceID.yaml
responses:
'200':
description: success
Expand Down
6 changes: 6 additions & 0 deletions v1/api/swagger/paths/available-resources.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ get:
tags:
- available-resources
operationId: AvailableResources_list
parameters:
- $ref: ../components/parameters/Role.yaml
- $ref: ../components/parameters/WorkspaceID.yaml
summary: Get lists of available resources for creating hosts and volumes
description: >
Used to get lists of options that are used when creating hosts and volumes.
Expand Down Expand Up @@ -34,6 +37,9 @@ get:
* Volumes - A list of current, existing volumes. If the volume is in the
the right state, it could be attached to a new Host.
If GreenLake Platform IAM issued token is used for authentication, then it is required to pass
'X-Role' and 'X-Workspaceid' headers.
responses:
'200':
description: success
Expand Down
13 changes: 12 additions & 1 deletion v1/api/swagger/paths/hosts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ get:
tags:
- hosts
summary: List all Hosts in project
description: Returns an array of all Host objects defined within the project.
description: >-
Returns an array of all Host objects defined within the project.
If GreenLake Platform IAM issued token is used for authentication, then it is required to pass
'X-Role' and 'X-Workspaceid' headers.
operationId: Hosts_list
parameters:
- in: query
Expand All @@ -12,6 +15,8 @@ get:
type: string
enum: ["true"]
description: Includes deleted Host objects in the response when set to "true".
- $ref: ../components/parameters/Role.yaml
- $ref: ../components/parameters/WorkspaceID.yaml
responses:
'200':
description: success
Expand All @@ -37,6 +42,9 @@ post:
The SvcFlavor, SvcVersion, LocationID, SSHKeyIDs, and Network attribute must
all be set with appropriate ID values from the available-resources call.
If GreenLake Platform IAM issued token is used for authentication, then it is required to pass
'X-Role' and 'X-Workspaceid' headers.
operationId: Host_add
requestBody:
required: true
Expand All @@ -47,6 +55,9 @@ post:
application/json:
schema:
$ref: ../components/schemas/NewHost.yaml
parameters:
- $ref: ../components/parameters/Role.yaml
- $ref: ../components/parameters/WorkspaceID.yaml
responses:
'201':
description: created
Expand Down
21 changes: 18 additions & 3 deletions v1/api/swagger/paths/hosts@{hostId}.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ get:
tags:
- hosts
summary: Retrieve Host by ID
description: Returns a single Host with matching ID
description: >-
Returns a single Host with matching ID.
If GreenLake Platform IAM issued token is used for authentication, then it is required to pass
'X-Role' and 'X-Workspaceid' headers.
operationId: Host_getByID
parameters:
- name: hostId
Expand All @@ -12,6 +15,8 @@ get:
required: true
schema:
type: string
- $ref: ../components/parameters/Role.yaml
- $ref: ../components/parameters/WorkspaceID.yaml
responses:
'200':
description: success
Expand All @@ -37,6 +42,9 @@ put:
'Description', 'Networks', 'NetworkForDefaultRoute', 'NetworkUntagged' and 'ISCSIConfig:InitiatorName'
can be updated. 'ISCSIConfig:InitiatorName' can be updated only if the host has
no volumes attached.
If GreenLake Platform IAM issued token is used for authentication, then it is required to pass
'X-Role' and 'X-Workspaceid' headers.
operationId: Host_update
parameters:
- name: hostId
Expand All @@ -45,6 +53,8 @@ put:
required: true
schema:
type: string
- $ref: ../components/parameters/Role.yaml
- $ref: ../components/parameters/WorkspaceID.yaml
requestBody:
required: true
description: Updated Host
Expand Down Expand Up @@ -78,8 +88,11 @@ delete:
summary: Delete a Host
description: >-
Deletes the Host with the matching ID. A host in the 'Ready' state must
first be powered-off before a delete will be permitted. Deletes to hosts in
other states is permitted regardless of the power state
first be powered-off before a delete will be permitted. Deletes to hosts in
other states is permitted regardless of the power state.
If GreenLake Platform IAM issued token is used for authentication, then it is required to pass
'X-Role' and 'X-Workspaceid' headers.
operationId: Host_delete
parameters:
- name: hostId
Expand All @@ -88,6 +101,8 @@ delete:
required: true
schema:
type: string
- $ref: ../components/parameters/Role.yaml
- $ref: ../components/parameters/WorkspaceID.yaml
responses:
'200':
description: success
Expand Down
7 changes: 6 additions & 1 deletion v1/api/swagger/paths/hosts@{hostId}@boothdd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ post:
tags:
- hosts
summary: Set HDD boot order on Host by ID
description: Sets a single Host with matching ID to attempt HDD boot
description: >-
Sets a single Host with matching ID to attempt HDD booting.
If GreenLake Platform IAM issued token is used for authentication, then it is required to pass
'X-Role' and 'X-Workspaceid' headers.
operationId: bootHDD
parameters:
- name: hostId
Expand All @@ -12,6 +15,8 @@ post:
required: true
schema:
type: string
- $ref: ../components/parameters/Role.yaml
- $ref: ../components/parameters/WorkspaceID.yaml
responses:
'200':
description: success
Expand Down
7 changes: 6 additions & 1 deletion v1/api/swagger/paths/hosts@{hostId}@bootpxe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ post:
tags:
- hosts
summary: Set PXE boot order on Host by ID
description: Sets a single Host with matching ID to attempt PXE boot when next booting
description: >-
Sets a single Host with matching ID to attempt PXE boot when next booting.
If GreenLake Platform IAM issued token is used for authentication, then it is required to pass
'X-Role' and 'X-Workspaceid' headers.
operationId: bootPXE
parameters:
- name: hostId
Expand All @@ -12,6 +15,8 @@ post:
required: true
schema:
type: string
- $ref: ../components/parameters/Role.yaml
- $ref: ../components/parameters/WorkspaceID.yaml
responses:
'200':
description: success
Expand Down
7 changes: 6 additions & 1 deletion v1/api/swagger/paths/hosts@{hostId}@maintenance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ post:
summary: Do maintenance on a Host by ID
description: >-
Do maintenance on a host by executing pre-defined operations.
The host must be powered off. The host must also be in the Ready state or in
The host must be powered off. The host must also be in the Ready state or in
the Failed state and in the Maintenance workflow.
If GreenLake Platform IAM issued token is used for authentication, then it is required to pass
'X-Role' and 'X-Workspaceid' headers.
operationId: maintenance
parameters:
- name: hostId
Expand All @@ -15,6 +18,8 @@ post:
required: true
schema:
type: string
- $ref: ../components/parameters/Role.yaml
- $ref: ../components/parameters/WorkspaceID.yaml
responses:
'200':
description: success
Expand Down
7 changes: 6 additions & 1 deletion v1/api/swagger/paths/hosts@{hostId}@poweroff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ post:
tags:
- hosts
summary: Power off Host by ID
description: Powers off a single Host with matching ID
description: >-
Powers off a single Host with matching ID.
If GreenLake Platform IAM issued token is used for authentication, then it is required to pass
'X-Role' and 'X-Workspaceid' headers.
operationId: powerOff
parameters:
- name: hostId
Expand All @@ -12,6 +15,8 @@ post:
required: true
schema:
type: string
- $ref: ../components/parameters/Role.yaml
- $ref: ../components/parameters/WorkspaceID.yaml
responses:
'200':
description: success
Expand Down
Loading

0 comments on commit 7b23922

Please sign in to comment.