Skip to content

Commit

Permalink
Passing security groups by filter instead of ID on ports
Browse files Browse the repository at this point in the history
  • Loading branch information
Anwar Hassen committed May 21, 2022
1 parent 85acc2a commit e422860
Show file tree
Hide file tree
Showing 8 changed files with 358 additions and 6 deletions.
13 changes: 8 additions & 5 deletions api/v1alpha5/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,14 @@ type PortOpts struct {
AdminStateUp *bool `json:"adminStateUp,omitempty"`
MACAddress string `json:"macAddress,omitempty"`
// Specify pairs of subnet and/or IP address. These should be subnets of the network with the given NetworkID.
FixedIPs []FixedIP `json:"fixedIPs,omitempty"`
TenantID string `json:"tenantId,omitempty"`
ProjectID string `json:"projectId,omitempty"`
SecurityGroups *[]string `json:"securityGroups,omitempty"`
AllowedAddressPairs []AddressPair `json:"allowedAddressPairs,omitempty"`
FixedIPs []FixedIP `json:"fixedIPs,omitempty"`
TenantID string `json:"tenantId,omitempty"`
ProjectID string `json:"projectId,omitempty"`
// The uuids of the security groups to assign to the instance
SecurityGroups *[]string `json:"securityGroups,omitempty"`
// The names, uuids, filters or any combination these of the security groups to assign to the instance
SecurityGroupFilters []SecurityGroupParam `json:"securityGroupFilters,omitempty"`
AllowedAddressPairs []AddressPair `json:"allowedAddressPairs,omitempty"`
// Enables and disables trunk at port level. If not provided, openStackMachine.Spec.Trunk is inherited.
Trunk *bool `json:"trunk,omitempty"`

Expand Down
5 changes: 5 additions & 0 deletions api/v1alpha5/zz_generated.deepcopy.go

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

Original file line number Diff line number Diff line change
Expand Up @@ -2779,7 +2779,53 @@ spec:
type: object
projectId:
type: string
securityGroupFilters:
description: The names, uuids, filters or any combination
these of the security groups to assign to the instance
items:
properties:
filter:
description: Filters used to query security groups
in openstack
properties:
description:
type: string
id:
type: string
limit:
type: integer
marker:
type: string
name:
type: string
notTags:
type: string
notTagsAny:
type: string
projectId:
type: string
sortDir:
type: string
sortKey:
type: string
tags:
type: string
tagsAny:
type: string
tenantId:
type: string
type: object
name:
description: Security Group name
type: string
uuid:
description: Security Group UID
type: string
type: object
type: array
securityGroups:
description: The uuids of the security groups to assign
to the instance
items:
type: string
type: array
Expand Down Expand Up @@ -3252,7 +3298,53 @@ spec:
type: object
projectId:
type: string
securityGroupFilters:
description: The names, uuids, filters or any combination
these of the security groups to assign to the instance
items:
properties:
filter:
description: Filters used to query security groups
in openstack
properties:
description:
type: string
id:
type: string
limit:
type: integer
marker:
type: string
name:
type: string
notTags:
type: string
notTagsAny:
type: string
projectId:
type: string
sortDir:
type: string
sortKey:
type: string
tags:
type: string
tagsAny:
type: string
tenantId:
type: string
type: object
name:
description: Security Group name
type: string
uuid:
description: Security Group UID
type: string
type: object
type: array
securityGroups:
description: The uuids of the security groups to assign
to the instance
items:
type: string
type: array
Expand Down Expand Up @@ -3586,7 +3678,53 @@ spec:
type: object
projectId:
type: string
securityGroupFilters:
description: The names, uuids, filters or any combination
these of the security groups to assign to the instance
items:
properties:
filter:
description: Filters used to query security groups in
openstack
properties:
description:
type: string
id:
type: string
limit:
type: integer
marker:
type: string
name:
type: string
notTags:
type: string
notTagsAny:
type: string
projectId:
type: string
sortDir:
type: string
sortKey:
type: string
tags:
type: string
tagsAny:
type: string
tenantId:
type: string
type: object
name:
description: Security Group name
type: string
uuid:
description: Security Group UID
type: string
type: object
type: array
securityGroups:
description: The uuids of the security groups to assign to
the instance
items:
type: string
type: array
Expand Down Expand Up @@ -3834,7 +3972,53 @@ spec:
type: object
projectId:
type: string
securityGroupFilters:
description: The names, uuids, filters or any combination
these of the security groups to assign to the instance
items:
properties:
filter:
description: Filters used to query security groups in
openstack
properties:
description:
type: string
id:
type: string
limit:
type: integer
marker:
type: string
name:
type: string
notTags:
type: string
notTagsAny:
type: string
projectId:
type: string
sortDir:
type: string
sortKey:
type: string
tags:
type: string
tagsAny:
type: string
tenantId:
type: string
type: object
name:
description: Security Group name
type: string
uuid:
description: Security Group UID
type: string
type: object
type: array
securityGroups:
description: The uuids of the security groups to assign to
the instance
items:
type: string
type: array
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1049,7 +1049,54 @@ spec:
type: object
projectId:
type: string
securityGroupFilters:
description: The names, uuids, filters or any
combination these of the security groups to
assign to the instance
items:
properties:
filter:
description: Filters used to query security
groups in openstack
properties:
description:
type: string
id:
type: string
limit:
type: integer
marker:
type: string
name:
type: string
notTags:
type: string
notTagsAny:
type: string
projectId:
type: string
sortDir:
type: string
sortKey:
type: string
tags:
type: string
tagsAny:
type: string
tenantId:
type: string
type: object
name:
description: Security Group name
type: string
uuid:
description: Security Group UID
type: string
type: object
type: array
securityGroups:
description: The uuids of the security groups
to assign to the instance
items:
type: string
type: array
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1044,7 +1044,53 @@ spec:
type: object
projectId:
type: string
securityGroupFilters:
description: The names, uuids, filters or any combination these
of the security groups to assign to the instance
items:
properties:
filter:
description: Filters used to query security groups in
openstack
properties:
description:
type: string
id:
type: string
limit:
type: integer
marker:
type: string
name:
type: string
notTags:
type: string
notTagsAny:
type: string
projectId:
type: string
sortDir:
type: string
sortKey:
type: string
tags:
type: string
tagsAny:
type: string
tenantId:
type: string
type: object
name:
description: Security Group name
type: string
uuid:
description: Security Group UID
type: string
type: object
type: array
securityGroups:
description: The uuids of the security groups to assign to the
instance
items:
type: string
type: array
Expand Down
Loading

0 comments on commit e422860

Please sign in to comment.