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

Add NSX-T Firewall support #381

Merged
merged 8 commits into from
Jun 23, 2021
Merged

Conversation

Didainius
Copy link
Collaborator

@Didainius Didainius commented Jun 4, 2021

This PR adds support for NSX-T Firewall by adding new functions and types:
NsxtEdgeGateway.UpdateNsxtFirewall(), NsxtEdgeGateway.GetNsxtFirewall(), nsxtFirewall.DeleteAll(),
nsxtFirewall.DeleteById, types.NsxtFirewallRule, types.NsxtFirewallRuleContainer

It also fixes a few errors found by new staticheck:

## staticcheck 2021.1 (v0.2.0)

## Checking govcd
api.go:285:61: the argument's underlying type is a slice of bytes, should use a simple conversion instead of fmt.Sprintf (S1025)
api_vcd_test.go:762:3: this value of err is never used (SA4006)
entity_test.go:145:13: type assertion to the same type: ge already has type genericEntity (S1040)
entity_test.go:165:13: type assertion to the same type: ge already has type genericEntity (S1040)
entity_test.go:178:13: type assertion to the same type: ge already has type genericEntity (S1040)
entity_test.go:192:13: type assertion to the same type: ge already has type genericEntity (S1040)
filter_engine.go:253:25: type assertion to the same type: candidate already has type QueryItem (S1040)
filter_engine.go:284:27: type assertion to the same type: candidate already has type QueryItem (S1040)

@Didainius Didainius force-pushed the nsxt-firewall-rules-pr branch 2 times, most recently from b72bb9d to 9769fa8 Compare June 4, 2021 06:50
Signed-off-by: Dainius Serplis <dserplis@vmware.com>
@Didainius Didainius force-pushed the nsxt-firewall-rules-pr branch from 9769fa8 to 78b036b Compare June 4, 2021 07:18
@Didainius Didainius self-assigned this Jun 4, 2021
Copy link
Collaborator

@lvirbalas lvirbalas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! Only one question unrelated to this PR.


* Added methods `NsxtEdgeGateway.UpdateNsxtFirewall()`, `NsxtEdgeGateway.GetNsxtFirewall()`, `nsxtFirewall.DeleteAll()`,
`nsxtFirewall.DeleteById` [#381](https://github.com/vmware/go-vcloud-director/pull/381)

BREAKING CHANGES:
* Added parameter `description` to method `vdc.ComposeRawVapp` [#372](https://github.com/vmware/go-vcloud-director/pull/372)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Though unlrelated to this PR, I just noticed this line. Do we break the semver aspect of the govcd versioning here?

CC: @dataclouder

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep - this happened as part of #372

Signed-off-by: Dainius Serplis <dserplis@vmware.com>
Signed-off-by: Dainius Serplis <dserplis@vmware.com>
Signed-off-by: Dainius Serplis <dserplis@vmware.com>
Signed-off-by: Dainius Serplis <dserplis@vmware.com>
@Didainius Didainius marked this pull request as ready for review June 11, 2021 11:43
Signed-off-by: Dainius Serplis <dserplis@vmware.com>
Signed-off-by: Dainius Serplis <dserplis@vmware.com>
Signed-off-by: Dainius Serplis <dserplis@vmware.com>
@Didainius Didainius merged commit b35e4d5 into vmware:master Jun 23, 2021
@Didainius Didainius deleted the nsxt-firewall-rules-pr branch June 23, 2021 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants