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 documentation #125

Merged
merged 5 commits into from
Jan 13, 2025
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: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ $ nsxanalyzer --resource-input-file pkg/collector/data/json/Example2.json --outp
```
![graph](pkg/collector/data/expected_output/ex2Filter1.svg)


## NSX Supported API versions and resources
See documentation [here](docs/nsx_support.md).

## Build the project

Make sure you have golang 1.23+ on your platform
Expand Down
37 changes: 37 additions & 0 deletions docs/nsx_support.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# NSX supported resources


### API Version

See [NSX REST API](https://developer.broadcom.com/xapis/nsx-t-data-center-rest-api/latest/).


### DFW supported fields

Features not yet supported:

* Category of type `Ethernet`
* Supported protocols: `TCP`, `UDP`, `ICMP`
* Rules fields `SourcesExcluded`, `DestinationsExcluded`
* Rules fields `DestinationGroups`, `SourceGroups` with IP Addresses.



### Topology resources

Following resources are considered for the analysis:
* VMs
* Segments
* T1 Gateway
* T0 Gateway


### Endpoints

The analysis endpoints are the VMs retrieved from `GET api/v1/fabric/virtual-machines`.


### More limitations and assumptions

* Currently IPv6 protocols and addresses are not supported.
* Assuming single NSX domain.
5 changes: 4 additions & 1 deletion pkg/collector/data_model.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ type ICMPTypeServiceEntry struct {
}

func (e *ICMPTypeServiceEntry) ToConnection() (*netset.TransportSet, error) {
if e.Protocol == nil || *e.Protocol == nsx.ICMPTypeServiceEntryProtocolICMPv6 {
if e.Protocol != nil && *e.Protocol == nsx.ICMPTypeServiceEntryProtocolICMPv6 {
return nil, fmt.Errorf("protocol %s of ICMPTypeServiceEntry \"%s\" is not supported", *e.Protocol, *e.DisplayName)
}
var tMin, tMax int64 = 0, int64(netp.MaxICMPType)
Expand Down Expand Up @@ -146,6 +146,9 @@ type L4PortSetServiceEntry struct {
}

func (e *L4PortSetServiceEntry) ToConnection() (*netset.TransportSet, error) {
if e.L4Protocol == nil {
return nil, fmt.Errorf("L4PortSetServiceEntry object has nil L4Protocol")
}
res := netset.NoTransports()
protocol := netp.ProtocolString(*e.L4Protocol)
srcPorts, err := parsePorts(e.SourcePorts)
Expand Down
Loading