Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update preconfiguredNSG to networkSecurityGroupID #111

Merged
merged 1 commit into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions api/redhatopenshift/HcpCluster/hcpCluster-models.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,8 @@ model PlatformProfile {
/** The core outgoing configuration */
outboundType?: OutboundType = OutboundType.loadBalancer;

/** Specifies whether subnets are pre-attached with an NSG */
preconfiguredNsgs: boolean;
/** ResourceId for the network security group attached to the cluster subnet */
networkSecurityGroupId: string;

/** The id of the disk encryption set to be used for etcd.
* Configure this when `etcdEncryption` is set to true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1984,9 +1984,9 @@
]
}
},
"preconfiguredNsgs": {
"type": "boolean",
"description": "Specifies whether subnets are pre-attached with an NSG"
"networkSecurityGroupId": {
"type": "string",
"description": "ResourceId for the network security group attached to the cluster subnet"
},
"etcdEncryptionSetId": {
"type": "string",
Expand All @@ -1996,7 +1996,7 @@
"required": [
"managedResourceGroup",
"subnetId",
"preconfiguredNsgs"
"networkSecurityGroupId"
]
},
"ProvisioningState": {
Expand Down
5 changes: 3 additions & 2 deletions internal/api/hcpopenshiftcluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,9 @@ type PlatformProfile struct {
ManagedResourceGroup string `json:"managedResourceGroup,omitempty" validate:"required_for_put"`
SubnetID string `json:"subnetId,omitempty" validate:"required_for_put"`
OutboundType OutboundType `json:"outboundType,omitempty" validate:"omitempty,enum_outboundtype"`
PreconfiguredNSGs bool `json:"preconfiguredNsgs,omitempty"`
EtcdEncryptionSetID string `json:"etcdEncryptionSetId,omitempty"`
//TODO: Is nsg required for PUT, or will we create if not specified?
NetworkSecurityGroupID string `json:"networkSecurityGroupId,omitempty" validate:"required_for_put"`
EtcdEncryptionSetID string `json:"etcdEncryptionSetId,omitempty"`
}

// ExternalAuthConfigProfile represents the external authentication configuration.
Expand Down
4 changes: 2 additions & 2 deletions internal/api/v20240610preview/generated_models.go

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

8 changes: 4 additions & 4 deletions internal/api/v20240610preview/generated_models_serde.go

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

14 changes: 7 additions & 7 deletions internal/api/v20240610preview/hcpopenshiftclusters_methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ func newProxyProfile(from *api.ProxyProfile) *ProxyProfile {

func newPlatformProfile(from *api.PlatformProfile) *PlatformProfile {
return &PlatformProfile{
ManagedResourceGroup: api.Ptr(from.ManagedResourceGroup),
SubnetID: api.Ptr(from.SubnetID),
OutboundType: api.Ptr(OutboundType(from.OutboundType)),
PreconfiguredNsgs: api.Ptr(from.PreconfiguredNSGs),
EtcdEncryptionSetID: api.Ptr(from.EtcdEncryptionSetID),
ManagedResourceGroup: api.Ptr(from.ManagedResourceGroup),
SubnetID: api.Ptr(from.SubnetID),
OutboundType: api.Ptr(OutboundType(from.OutboundType)),
NetworkSecurityGroupID: api.Ptr(from.NetworkSecurityGroupID),
EtcdEncryptionSetID: api.Ptr(from.EtcdEncryptionSetID),
}
}

Expand Down Expand Up @@ -407,8 +407,8 @@ func (p *PlatformProfile) Normalize(out *api.PlatformProfile) {
if p.OutboundType != nil {
out.OutboundType = api.OutboundType(*p.OutboundType)
}
if p.PreconfiguredNsgs != nil {
out.PreconfiguredNSGs = *p.PreconfiguredNsgs
if p.NetworkSecurityGroupID != nil {
out.NetworkSecurityGroupID = *p.NetworkSecurityGroupID
}
if p.EtcdEncryptionSetID != nil {
out.EtcdEncryptionSetID = *p.EtcdEncryptionSetID
Expand Down
Loading