Skip to content

Commit

Permalink
Add optional siteid query parameter to v1 projects-info API (#13)
Browse files Browse the repository at this point in the history
* Add optional siteid query parameter to v1 projects-info API

Rally: US35938

* fix no newline
  • Loading branch information
patricia-dibenedetto authored May 17, 2022
1 parent d67a073 commit 75bc140
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 0 deletions.
7 changes: 7 additions & 0 deletions v1/api/swagger/components/parameters/SiteID.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: siteid
in: query
description: GreenLake site ID
required: false
schema:
type: string
example: 95688cf9-82ff-4e32-80fc-2b0b41648dab
1 change: 1 addition & 0 deletions v1/api/swagger/paths/projects-info.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ get:
parameters:
- $ref: ../components/parameters/Space.yaml
- $ref: ../components/parameters/SpaceID.yaml
- $ref: ../components/parameters/SiteID.yaml
responses:
'200':
description: success
Expand Down
7 changes: 7 additions & 0 deletions v1/pkg/client/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,13 @@ paths:
name: spaceid
schema:
type: string
- description: GreenLake site ID
example: 95688cf9-82ff-4e32-80fc-2b0b41648dab
in: query
name: siteid
required: false
schema:
type: string
responses:
"200":
content:
Expand Down
5 changes: 5 additions & 0 deletions v1/pkg/client/api_projects_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ type ProjectsInfoApiService service
type ProjectsInfoApiListOpts struct {
Space optional.String
Spaceid optional.String
Siteid optional.String
}

/*
Expand All @@ -41,6 +42,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 space name
* @param "Spaceid" (optional.String) - GreenLake space ID
* @param "Siteid" (optional.String) - GreenLake site ID
@return ProjectsInfo
*/
func (a *ProjectsInfoApiService) List(ctx _context.Context, localVarOptionals *ProjectsInfoApiListOpts) (ProjectsInfo, *_nethttp.Response, error) {
Expand All @@ -59,6 +61,9 @@ func (a *ProjectsInfoApiService) List(ctx _context.Context, localVarOptionals *P
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}

if localVarOptionals != nil && localVarOptionals.Siteid.IsSet() {
localVarQueryParams.Add("siteid", parameterToString(localVarOptionals.Siteid.Value(), ""))
}
// to determine the Content-Type header
localVarHTTPContentTypes := []string{}

Expand Down
1 change: 1 addition & 0 deletions v1/pkg/client/docs/ProjectsInfoApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**space** | **optional.String**| GreenLake space name |
**spaceid** | **optional.String**| GreenLake space ID |
**siteid** | **optional.String**| GreenLake site ID |

### Return type

Expand Down
1 change: 1 addition & 0 deletions v1/pkg/client/interface_projects_info.go

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

0 comments on commit 75bc140

Please sign in to comment.