Skip to content

Commit

Permalink
Merge pull request #178 from harness/SPG-508-adding-service-overrides
Browse files Browse the repository at this point in the history
[SPG-508]: adding service overrides
  • Loading branch information
RajBaviskar authored Oct 20, 2022
2 parents 0785b5e + a30a0b8 commit c0b7452
Show file tree
Hide file tree
Showing 12 changed files with 721 additions and 21 deletions.
423 changes: 420 additions & 3 deletions harness/nextgen/api_environments.go

Large diffs are not rendered by default.

155 changes: 137 additions & 18 deletions harness/nextgen/docs/EnvironmentsApi.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
# {{classname}}
# nextgen{{classname}}

All URIs are relative to *https://app.harness.io/gateway*

Method | HTTP request | Description
------------- | ------------- | -------------
[**CreateEnvironmentV2**](EnvironmentsApi.md#CreateEnvironmentV2) | **Post** /ng/api/environmentsV2 | Create an Environment
[**DeleteEnvironmentV2**](EnvironmentsApi.md#DeleteEnvironmentV2) | **Delete** /ng/api/environmentsV2/{environmentIdentifier} | Delete an Environment by identifier
[**DeleteServiceOverride**](EnvironmentsApi.md#DeleteServiceOverride) | **Delete** /ng/api/environmentsV2/serviceOverrides | Delete a ServiceOverride entity
[**GetEnvironmentAccessList**](EnvironmentsApi.md#GetEnvironmentAccessList) | **Get** /ng/api/environmentsV2/list/access | Gets Environment Access list
[**GetEnvironmentList**](EnvironmentsApi.md#GetEnvironmentList) | **Get** /ng/api/environmentsV2 | Gets Environment list for a project
[**GetEnvironmentV2**](EnvironmentsApi.md#GetEnvironmentV2) | **Get** /ng/api/environmentsV2/{environmentIdentifier} | Gets an Environment by identifier
[**GetServiceOverridesList**](EnvironmentsApi.md#GetServiceOverridesList) | **Get** /ng/api/environmentsV2/serviceOverrides | Gets Service Overrides list
[**UpdateEnvironmentV2**](EnvironmentsApi.md#UpdateEnvironmentV2) | **Put** /ng/api/environmentsV2 | Update an Environment by identifier
[**UpsertEnvironmentV2**](EnvironmentsApi.md#UpsertEnvironmentV2) | **Put** /ng/api/environmentsV2/upsert | Upsert an Environment by identifier
[**UpsertServiceOverride**](EnvironmentsApi.md#UpsertServiceOverride) | **Post** /ng/api/environmentsV2/serviceOverrides | Upsert

# **CreateEnvironmentV2**
> ResponseDtoEnvironmentResponse CreateEnvironmentV2(ctx, accountIdentifier, optional)
Expand All @@ -21,7 +24,7 @@ Create an Environment
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**accountIdentifier** | **string**| Account Identifier for the Entity |
**accountIdentifier** | **string**| Account Identifier for the Entity. |
**optional** | ***EnvironmentsApiCreateEnvironmentV2Opts** | optional parameters | nil if no parameters

### Optional Parameters
Expand Down Expand Up @@ -56,7 +59,7 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**environmentIdentifier** | **string**| Environment Identifier for the entity |
**accountIdentifier** | **string**| Account Identifier for the Entity |
**accountIdentifier** | **string**| Account Identifier for the Entity. |
**optional** | ***EnvironmentsApiDeleteEnvironmentV2Opts** | optional parameters | nil if no parameters

### Optional Parameters
Expand All @@ -66,8 +69,47 @@ Name | Type | Description | Notes


**ifMatch** | **optional.String**| |
**orgIdentifier** | **optional.String**| Organization Identifier for the Entity |
**projectIdentifier** | **optional.String**| Project Identifier for the Entity |
**orgIdentifier** | **optional.String**| Organization Identifier for the Entity. |
**projectIdentifier** | **optional.String**| Project Identifier for the Entity. |

### Return type

[**ResponseDtoBoolean**](ResponseDTOBoolean.md)

### Authorization

[ApiKey](../README.md#ApiKey)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json, application/yaml

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

# **DeleteServiceOverride**
> ResponseDtoBoolean DeleteServiceOverride(ctx, accountIdentifier, orgIdentifier, projectIdentifier, optional)
Delete a ServiceOverride entity

### Required Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**accountIdentifier** | **string**| Account Identifier for the Entity. |
**orgIdentifier** | **string**| Organization Identifier for the Entity. |
**projectIdentifier** | **string**| Project Identifier for the Entity. |
**optional** | ***EnvironmentsApiDeleteServiceOverrideOpts** | optional parameters | nil if no parameters

### Optional Parameters
Optional parameters are passed through a pointer to a EnvironmentsApiDeleteServiceOverrideOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------



**environmentIdentifier** | **optional.String**| Environment Identifier for the Entity. |
**serviceIdentifier** | **optional.String**| Service Identifier for the Entity. |

### Return type

Expand All @@ -93,7 +135,7 @@ Gets Environment Access list
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**accountIdentifier** | **string**| Account Identifier for the Entity |
**accountIdentifier** | **string**| Account Identifier for the Entity. |
**optional** | ***EnvironmentsApiGetEnvironmentAccessListOpts** | optional parameters | nil if no parameters

### Optional Parameters
Expand All @@ -103,8 +145,8 @@ Name | Type | Description | Notes

**page** | **optional.Int32**| page | [default to 0]
**size** | **optional.Int32**| size | [default to 100]
**orgIdentifier** | **optional.String**| Organization Identifier for the Entity |
**projectIdentifier** | **optional.String**| Project Identifier for the Entity |
**orgIdentifier** | **optional.String**| Organization Identifier for the Entity. |
**projectIdentifier** | **optional.String**| Project Identifier for the Entity. |
**searchTerm** | **optional.String**| The word to be searched and included in the list response |
**envIdentifiers** | [**optional.Interface of []string**](string.md)| List of EnvironmentIds |
**sort** | [**optional.Interface of []string**](string.md)| Specifies sorting criteria of the list. Like sorting based on the last updated entity, alphabetical sorting in an ascending or descending order |
Expand Down Expand Up @@ -133,18 +175,18 @@ Gets Environment list for a project
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**accountIdentifier** | **string**| Account Identifier for the Entity |
**accountIdentifier** | **string**| Account Identifier for the Entity. |
**optional** | ***EnvironmentsApiGetEnvironmentListOpts** | optional parameters | nil if no parameters

### Optional Parameters
Optional parameters are passed through a pointer to a EnvironmentsApiGetEnvironmentListOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------

**page** | **optional.Int32**| Indicates the number of pages. Results for these pages will be retrieved. | [default to 0]
**size** | **optional.Int32**| The number of the elements to fetch | [default to 100]
**orgIdentifier** | **optional.String**| Organization Identifier for the Entity |
**projectIdentifier** | **optional.String**| Project Identifier for the Entity |
**page** | **optional.Int32**| Page Index of the results to fetch.Default Value: 0 | [default to 0]
**size** | **optional.Int32**| Results per page | [default to 100]
**orgIdentifier** | **optional.String**| Organization Identifier for the Entity. |
**projectIdentifier** | **optional.String**| Project Identifier for the Entity. |
**searchTerm** | **optional.String**| The word to be searched and included in the list response |
**envIdentifiers** | [**optional.Interface of []string**](string.md)| List of EnvironmentIds |
**sort** | [**optional.Interface of []string**](string.md)| Specifies sorting criteria of the list. Like sorting based on the last updated entity, alphabetical sorting in an ascending or descending order |
Expand Down Expand Up @@ -174,7 +216,7 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**environmentIdentifier** | **string**| Environment Identifier for the entity |
**accountIdentifier** | **string**| Account Identifier for the Entity |
**accountIdentifier** | **string**| Account Identifier for the Entity. |
**optional** | ***EnvironmentsApiGetEnvironmentV2Opts** | optional parameters | nil if no parameters

### Optional Parameters
Expand All @@ -183,8 +225,8 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------


**orgIdentifier** | **optional.String**| Organization Identifier for the Entity |
**projectIdentifier** | **optional.String**| Project Identifier for the Entity |
**orgIdentifier** | **optional.String**| Organization Identifier for the Entity. |
**projectIdentifier** | **optional.String**| Project Identifier for the Entity. |
**deleted** | **optional.Bool**| Specify whether Environment is deleted or not | [default to false]

### Return type
Expand All @@ -202,6 +244,49 @@ Name | Type | Description | Notes

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

# **GetServiceOverridesList**
> ResponseDtoPageResponseServiceOverrideResponse GetServiceOverridesList(ctx, accountIdentifier, orgIdentifier, projectIdentifier, environmentIdentifier, optional)
Gets Service Overrides list

### Required Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**accountIdentifier** | **string**| Account Identifier for the Entity. |
**orgIdentifier** | **string**| Organization Identifier for the Entity. |
**projectIdentifier** | **string**| Project Identifier for the Entity. |
**environmentIdentifier** | **string**| Environment Identifier for the Entity. |
**optional** | ***EnvironmentsApiGetServiceOverridesListOpts** | optional parameters | nil if no parameters

### Optional Parameters
Optional parameters are passed through a pointer to a EnvironmentsApiGetServiceOverridesListOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------




**page** | **optional.Int32**| Page Index of the results to fetch.Default Value: 0 | [default to 0]
**size** | **optional.Int32**| Results per page | [default to 100]
**serviceIdentifier** | **optional.String**| Service Identifier for the Entity. |
**sort** | [**optional.Interface of []string**](string.md)| Specifies the sorting criteria of the list. Like sorting based on the last updated entity, alphabetical sorting in an ascending or descending order |

### Return type

[**ResponseDtoPageResponseServiceOverrideResponse**](ResponseDTOPageResponseServiceOverrideResponse.md)

### Authorization

[ApiKey](../README.md#ApiKey)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json, application/yaml

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

# **UpdateEnvironmentV2**
> ResponseDtoEnvironmentResponse UpdateEnvironmentV2(ctx, accountIdentifier, optional)
Update an Environment by identifier
Expand All @@ -211,7 +296,7 @@ Update an Environment by identifier
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**accountIdentifier** | **string**| Account Identifier for the Entity |
**accountIdentifier** | **string**| Account Identifier for the Entity. |
**optional** | ***EnvironmentsApiUpdateEnvironmentV2Opts** | optional parameters | nil if no parameters

### Optional Parameters
Expand Down Expand Up @@ -246,7 +331,7 @@ Upsert an Environment by identifier
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**accountIdentifier** | **string**| Account Identifier for the Entity |
**accountIdentifier** | **string**| Account Identifier for the Entity. |
**optional** | ***EnvironmentsApiUpsertEnvironmentV2Opts** | optional parameters | nil if no parameters

### Optional Parameters
Expand All @@ -272,3 +357,37 @@ Name | Type | Description | Notes

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

# **UpsertServiceOverride**
> ResponseDtoServiceOverrideResponse UpsertServiceOverride(ctx, accountIdentifier, optional)
Upsert

### Required Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**accountIdentifier** | **string**| Account Identifier for the Entity. |
**optional** | ***EnvironmentsApiUpsertServiceOverrideOpts** | optional parameters | nil if no parameters

### Optional Parameters
Optional parameters are passed through a pointer to a EnvironmentsApiUpsertServiceOverrideOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------

**body** | [**optional.Interface of ServiceOverrideRequest**](ServiceOverrideRequest.md)| Details of the Service Override to be upserted |

### Return type

[**ResponseDtoServiceOverrideResponse**](ResponseDTOServiceOverrideResponse.md)

### Authorization

[ApiKey](../README.md#ApiKey)

### HTTP request headers

- **Content-Type**: application/json, application/yaml
- **Accept**: application/json, application/yaml

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

15 changes: 15 additions & 0 deletions harness/nextgen/docs/PageResponseServiceOverrideResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# PageResponseServiceOverrideResponse

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**TotalPages** | **int64** | | [optional] [default to null]
**TotalItems** | **int64** | | [optional] [default to null]
**PageItemCount** | **int64** | | [optional] [default to null]
**PageSize** | **int64** | | [optional] [default to null]
**Content** | [**[]ServiceOverrideResponse**](ServiceOverrideResponse.md) | | [optional] [default to null]
**PageIndex** | **int64** | | [optional] [default to null]
**Empty** | **bool** | | [optional] [default to null]

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

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# ResponseDtoPageResponseServiceOverrideResponse

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Status** | **string** | | [optional] [default to null]
**Data** | [***PageResponseServiceOverrideResponse**](PageResponseServiceOverrideResponse.md) | | [optional] [default to null]
**MetaData** | [***interface{}**](interface{}.md) | | [optional] [default to null]
**CorrelationId** | **string** | | [optional] [default to null]

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

12 changes: 12 additions & 0 deletions harness/nextgen/docs/ResponseDtoServiceOverrideResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# ResponseDtoServiceOverrideResponse

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Status** | **string** | | [optional] [default to null]
**Data** | [***ServiceOverrideResponse**](ServiceOverrideResponse.md) | | [optional] [default to null]
**MetaData** | [***interface{}**](interface{}.md) | | [optional] [default to null]
**CorrelationId** | **string** | | [optional] [default to null]

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

13 changes: 13 additions & 0 deletions harness/nextgen/docs/ServiceOverrideRequest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# ServiceOverrideRequest

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**OrgIdentifier** | **string** | Organization Identifier for the Entity. | [optional] [default to null]
**ProjectIdentifier** | **string** | Project Identifier for the Entity. | [optional] [default to null]
**EnvironmentIdentifier** | **string** | Environment Identifier for the Entity. | [optional] [default to null]
**ServiceIdentifier** | **string** | Service Identifier for the Entity. | [optional] [default to null]
**Yaml** | **string** | Yaml for the Service Override entity | [optional] [default to null]

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

14 changes: 14 additions & 0 deletions harness/nextgen/docs/ServiceOverrideResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# ServiceOverrideResponse

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**AccountId** | **string** | | [optional] [default to null]
**OrgIdentifier** | **string** | | [optional] [default to null]
**ProjectIdentifier** | **string** | | [optional] [default to null]
**EnvironmentRef** | **string** | | [optional] [default to null]
**ServiceRef** | **string** | | [optional] [default to null]
**Yaml** | **string** | | [optional] [default to null]

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

20 changes: 20 additions & 0 deletions harness/nextgen/model_page_response_service_override_response.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* Harness NextGen Software Delivery Platform API Reference
*
* This is the Open Api Spec 3 for the NextGen Manager. This is under active development. Beware of the breaking change with respect to the generated code stub
*
* API version: 3.0
* Contact: [email protected]
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package nextgen

type PageResponseServiceOverrideResponse struct {
TotalPages int64 `json:"totalPages,omitempty"`
TotalItems int64 `json:"totalItems,omitempty"`
PageItemCount int64 `json:"pageItemCount,omitempty"`
PageSize int64 `json:"pageSize,omitempty"`
Content []ServiceOverrideResponse `json:"content,omitempty"`
PageIndex int64 `json:"pageIndex,omitempty"`
Empty bool `json:"empty,omitempty"`
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* Harness NextGen Software Delivery Platform API Reference
*
* This is the Open Api Spec 3 for the NextGen Manager. This is under active development. Beware of the breaking change with respect to the generated code stub
*
* API version: 3.0
* Contact: [email protected]
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package nextgen

type ResponseDtoPageResponseServiceOverrideResponse struct {
Status string `json:"status,omitempty"`
Data *PageResponseServiceOverrideResponse `json:"data,omitempty"`
MetaData *interface{} `json:"metaData,omitempty"`
CorrelationId string `json:"correlationId,omitempty"`
}
Loading

0 comments on commit c0b7452

Please sign in to comment.