Skip to content

Commit

Permalink
upstreaming changes required by upstream CI
Browse files Browse the repository at this point in the history
  • Loading branch information
b-jhoreman committed Sep 18, 2023
1 parent 8ffcf69 commit 904e7d1
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 4 deletions.
2 changes: 2 additions & 0 deletions pkg/api/openshiftcluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,12 @@ type OpenShiftClusterProperties struct {
type ProvisioningState string

// ProvisioningState constants
// TODO: ProvisioningStateCancelled is included to pass upstream CI. It is currently unused in ARO.
const (
ProvisioningStateCreating ProvisioningState = "Creating"
ProvisioningStateUpdating ProvisioningState = "Updating"
ProvisioningStateAdminUpdating ProvisioningState = "AdminUpdating"
ProvisioningStateCancelled ProvisioningState = "Cancelled"
ProvisioningStateDeleting ProvisioningState = "Deleting"
ProvisioningStateSucceeded ProvisioningState = "Succeeded"
ProvisioningStateFailed ProvisioningState = "Failed"
Expand Down
5 changes: 4 additions & 1 deletion pkg/api/v20230701preview/openshiftcluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,11 @@ type OpenShiftClusterProperties struct {
type ProvisioningState string

// ProvisioningState constants.
// TODO: ProvisioningStateCancelled is included to pass upstream CI. It is currently unused in ARO.
const (
ProvisioningStateCreating ProvisioningState = "Creating"
ProvisioningStateUpdating ProvisioningState = "Updating"
ProvisioningStateCancelled ProvisioningState = "Cancelled"
ProvisioningStateAdminUpdating ProvisioningState = "AdminUpdating"
ProvisioningStateDeleting ProvisioningState = "Deleting"
ProvisioningStateSucceeded ProvisioningState = "Succeeded"
Expand Down Expand Up @@ -126,6 +128,7 @@ type ServicePrincipalProfile struct {
ClientSecret string `json:"clientSecret,omitempty" mutable:"true"`
}

// The outbound routing strategy used to provide your cluster egress to the internet.
type OutboundType string

const (
Expand All @@ -135,7 +138,7 @@ const (

// ResourceReference represents a reference to an Azure resource.
type ResourceReference struct {
// The fully qualified Azure resource id.
// The fully qualified Azure of an IP address resource.
ID string `json:"id,omitempty"`
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func (sv openShiftClusterStaticValidator) validateProperties(path string, p *Ope
switch p.ProvisioningState {
case ProvisioningStateCreating, ProvisioningStateUpdating,
ProvisioningStateAdminUpdating, ProvisioningStateDeleting,
ProvisioningStateSucceeded, ProvisioningStateFailed:
ProvisioningStateSucceeded, ProvisioningStateFailed, ProvisioningStateCancelled:
default:
return api.NewCloudError(http.StatusBadRequest, api.CloudErrorCodeInvalidParameter, path+".provisioningState", "The provided provisioning state '%s' is invalid.", p.ProvisioningState)
}
Expand Down

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

2 changes: 1 addition & 1 deletion pkg/swagger/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ var apis = map[string]*generator{
exampleOpenShiftVersionListResponse: v20230701preview.ExampleOpenShiftVersionListResponse,
exampleOperationListResponse: api.ExampleOperationListResponse,

xmsEnum: []string{"EncryptionAtHost", "FipsValidatedModules", "SoftwareDefinedNetwork", "Visibility"},
xmsEnum: []string{"EncryptionAtHost", "FipsValidatedModules", "SoftwareDefinedNetwork", "Visibility", "OutboundType"},
xmsSecretList: []string{"kubeconfig", "kubeadminPassword", "secretResources"},
xmsIdentifiers: []string{},
commonTypesVersion: "v3",
Expand Down
1 change: 1 addition & 0 deletions pkg/swagger/typewalker.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ func (tw *typeWalker) schemaFromType(t types.Type, deps map[*types.Named]struct{
s.Type = "boolean"
case types.Int:
s.Type = "integer"
s.Format = "int32"
case types.String:
s.Type = "string"
default:
Expand Down
9 changes: 9 additions & 0 deletions swagger/redhatopenshift/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,15 @@ input-file:
- Microsoft.RedHatOpenShift/preview/2021-09-01-preview/redhatopenshift.json
```

### Tag: package-2023-07-01-preview

These settings apply only when `--tag=package-2023-07-01-preview` is specified on the command line.

``` yaml $(tag) == 'package-2023-07-01-preview'
input-file:
- Microsoft.RedHatOpenShift/preview/2023-07-01-preview/redhatopenshift.json
```

### Tag: package-2022-04-01

These settings apply only when `--tag=package-2022-04-01` is specified on the command line.
Expand Down

0 comments on commit 904e7d1

Please sign in to comment.