Skip to content

Commit

Permalink
Misc issues (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
chaitra-mylarappachar authored Sep 23, 2022
1 parent 5e826ef commit 196c3be
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 22 deletions.
4 changes: 2 additions & 2 deletions v1/api/swagger/components/schemas/ProjectInfo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ properties:
Status:
type: string
enum:
- Enable
- Disable
- Enabled
- Disabled
NumNetworks:
type: integer
description: Number of project networks
Expand Down
2 changes: 1 addition & 1 deletion v1/api/swagger/paths/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ get:
operationId: allocation_getBySite
parameters:
- name: siteID
in: path
in: query
description: site ID
required: false
schema:
Expand Down
12 changes: 6 additions & 6 deletions v1/pkg/client/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2290,7 +2290,7 @@ paths:
operationId: allocation_getBySite
parameters:
- description: site ID
in: path
in: query
name: siteID
required: false
schema:
Expand Down Expand Up @@ -2446,7 +2446,7 @@ components:
OtherUsed: 3
Name: Name
Projects:
- Status: Enable
- Status: Enabled
NumVolumes: 6
Description: Description
TotalStorageGB: 1
Expand All @@ -2461,7 +2461,7 @@ components:
ID: ID
NumNetworks: 5
Name: Name
- Status: Enable
- Status: Enabled
NumVolumes: 6
Description: Description
TotalStorageGB: 1
Expand Down Expand Up @@ -3294,7 +3294,7 @@ components:
type: object
ProjectInfo:
example:
Status: Enable
Status: Enabled
NumVolumes: 6
Description: Description
TotalStorageGB: 1
Expand Down Expand Up @@ -3324,8 +3324,8 @@ components:
type: integer
Status:
enum:
- Enable
- Disable
- Enabled
- Disabled
type: string
NumNetworks:
description: Number of project networks
Expand Down
16 changes: 11 additions & 5 deletions v1/pkg/client/api_allocation.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (
_ioutil "io/ioutil"
_nethttp "net/http"
_neturl "net/url"
"strings"
"github.com/antihax/optional"
)

Expand All @@ -29,14 +28,20 @@ var (
// AllocationApiService AllocationApi service
type AllocationApiService service

// AllocationApiGetBySiteOpts Optional parameters for the method 'GetBySite'
type AllocationApiGetBySiteOpts struct {
SiteID optional.String
}

/*
GetBySite Get servers allocation
Returns allocation information for each server instance type used by each PCE service. If siteID is present, the information returned is specific to that site ID, otherwise the allocation information for all sites is returned.
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param siteID site ID
* @param optional nil or *AllocationApiGetBySiteOpts - Optional Parameters:
* @param "SiteID" (optional.String) - site ID
@return Allocation
*/
func (a *AllocationApiService) GetBySite(ctx _context.Context, siteID string) (Allocation, *_nethttp.Response, error) {
func (a *AllocationApiService) GetBySite(ctx _context.Context, localVarOptionals *AllocationApiGetBySiteOpts) (Allocation, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
Expand All @@ -48,12 +53,13 @@ func (a *AllocationApiService) GetBySite(ctx _context.Context, siteID string) (A

// create path and map variables
localVarPath := a.client.cfg.BasePath + "/allocation/servers"
localVarPath = strings.Replace(localVarPath, "{"+"siteID"+"}", _neturl.QueryEscape(parameterToString(siteID, "")) , -1)

localVarHeaderParams := make(map[string]string)
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
13 changes: 11 additions & 2 deletions v1/pkg/client/docs/AllocationApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Method | HTTP request | Description

## GetBySite

> Allocation GetBySite(ctx, siteID)
> Allocation GetBySite(ctx, optional)
Get servers allocation

Expand All @@ -23,7 +23,16 @@ Returns allocation information for each server instance type used by each PCE se
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**siteID** | **string**| site ID |
**optional** | ***GetBySiteOpts** | optional parameters | nil if no parameters

### Optional Parameters

Optional parameters are passed through a pointer to a GetBySiteOpts struct


Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**siteID** | **optional.String**| site ID |

### Return type

Expand Down
5 changes: 3 additions & 2 deletions v1/pkg/client/interface_allocation.go

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

8 changes: 4 additions & 4 deletions v1/pkg/mockquakeclient/mock_allocation.go

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

0 comments on commit 196c3be

Please sign in to comment.