Skip to content

Commit

Permalink
PCCM-28439 Metal Client changes to support PCE HA Zones (#141)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
1 parent 59b232f commit bc66873
Show file tree
Hide file tree
Showing 11 changed files with 53 additions and 11 deletions.
6 changes: 5 additions & 1 deletion v1/api/swagger/components/parameters/SiteID.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
9 changes: 9 additions & 0 deletions v1/api/swagger/components/schemas/UpdateProject.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
9 changes: 5 additions & 4 deletions v1/html/index.html

Large diffs are not rendered by default.

15 changes: 14 additions & 1 deletion v1/pkg/client/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -478,11 +478,15 @@ paths:
type: string
- description: GreenLake site ID
example: 95688cf9-82ff-4e32-80fc-2b0b41648dab
explode: true
in: query
name: siteid
required: false
schema:
type: string
items:
type: string
type: array
style: form
- description: GreenLake Platform role name
example: metal-infra-admin
in: header
Expand Down Expand Up @@ -6942,6 +6946,15 @@ components:
format: uuid
type: string
type: array
PermittedSites:
description: Array listing the permitted site IDs
example:
- 046b6c7f-0b8a-43b9-b35d-6489e6daee91
- 91eec8b5-6460-4532-aad1-47b983edb63c
items:
format: uuid
type: string
type: array
required:
- Limits
- PermittedOSImages
Expand Down
15 changes: 12 additions & 3 deletions v1/pkg/client/api_projects_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
_nethttp "net/http"
_neturl "net/url"
"github.com/antihax/optional"
"reflect"
)

// Linger please
Expand All @@ -31,7 +32,7 @@ type ProjectsInfoApiService service
type ProjectsInfoApiListOpts struct {
Space optional.String
Spaceid optional.String
Siteid optional.String
Siteid optional.Interface
XRole optional.String
XWorkspaceid optional.String
}
Expand All @@ -43,7 +44,7 @@ Returns an object with information on projects, machine sizes, and volume flavor
* @param optional nil or *ProjectsInfoApiListOpts - Optional Parameters:
* @param "Space" (optional.String) - GreenLake Cloud Services space name
* @param "Spaceid" (optional.String) - GreenLake Cloud Services space ID
* @param "Siteid" (optional.String) - GreenLake site ID
* @param "Siteid" (optional.Interface of []string) - GreenLake site ID
* @param "XRole" (optional.String) - GreenLake Platform role name
* @param "XWorkspaceid" (optional.String) - GreenLake Platform workspace ID
@return ProjectsInfo
Expand All @@ -65,7 +66,15 @@ func (a *ProjectsInfoApiService) List(ctx _context.Context, localVarOptionals *P
localVarFormParams := _neturl.Values{}

if localVarOptionals != nil && localVarOptionals.Siteid.IsSet() {
localVarQueryParams.Add("siteid", parameterToString(localVarOptionals.Siteid.Value(), ""))
t:=localVarOptionals.Siteid.Value()
if reflect.TypeOf(t).Kind() == reflect.Slice {
s := reflect.ValueOf(t)
for i := 0; i < s.Len(); i++ {
localVarQueryParams.Add("siteid", parameterToString(s.Index(i), "multi"))
}
} else {
localVarQueryParams.Add("siteid", parameterToString(t, "multi"))
}
}
// to determine the Content-Type header
localVarHTTPContentTypes := []string{}
Expand Down
2 changes: 1 addition & 1 deletion v1/pkg/client/docs/ProjectsInfoApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**space** | **optional.String**| GreenLake Cloud Services space name |
**spaceid** | **optional.String**| GreenLake Cloud Services space ID |
**siteid** | **optional.String**| GreenLake site ID |
**siteid** | [**optional.Interface of []string**](string.md)| GreenLake site ID |
**xRole** | **optional.String**| GreenLake Platform role name |
**xWorkspaceid** | **optional.String**| GreenLake Platform workspace ID |

Expand Down
1 change: 1 addition & 0 deletions v1/pkg/client/docs/UpdateProject.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Name | Type | Description | Notes
**Profile** | [**UpdateProfile**](UpdateProfile.md) | |
**Limits** | [**UpdateLimits**](UpdateLimits.md) | |
**PermittedOSImages** | **[]string** | Array listing the permitted OS service images. |
**PermittedSites** | **[]string** | Array listing the permitted site IDs | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
1 change: 1 addition & 0 deletions v1/pkg/client/docs/UpdateProjectAllOf.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Name | Type | Description | Notes
**Profile** | [**UpdateProfile**](UpdateProfile.md) | |
**Limits** | [**UpdateLimits**](UpdateLimits.md) | |
**PermittedOSImages** | **[]string** | Array listing the permitted OS service images. |
**PermittedSites** | **[]string** | Array listing the permitted site IDs | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
2 changes: 1 addition & 1 deletion v1/pkg/client/interface_projects_info.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions v1/pkg/client/model_update_project.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,6 @@ type UpdateProject struct {
Limits UpdateLimits `json:"Limits"`
// Array listing the permitted OS service images.
PermittedOSImages []string `json:"PermittedOSImages"`
// Array listing the permitted site IDs
PermittedSites []string `json:"PermittedSites,omitempty"`
}
2 changes: 2 additions & 0 deletions v1/pkg/client/model_update_project_all_of.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ type UpdateProjectAllOf struct {
Limits UpdateLimits `json:"Limits"`
// Array listing the permitted OS service images.
PermittedOSImages []string `json:"PermittedOSImages"`
// Array listing the permitted site IDs
PermittedSites []string `json:"PermittedSites,omitempty"`
}

0 comments on commit bc66873

Please sign in to comment.