Skip to content

Commit

Permalink
Update preconfiguredNSG to networkSecurityGroupID
Browse files Browse the repository at this point in the history
  • Loading branch information
bennerv committed May 8, 2024
1 parent c5afbfa commit c2a0ac8
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 21 deletions.
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

0 comments on commit c2a0ac8

Please sign in to comment.