tpcarman / As-Built-Report

A collection of PowerShell scripts to generate as built reports on the configuration of datacentre infrastucture in Text, XML, HTML & MS Word formats.
MIT License
88 stars 28 forks source link

NSX NAT output shows no content. #28

Closed mhadfield-au closed 6 years ago

mhadfield-au commented 6 years ago

Describe the bug vSphere.json has "NSX": 5 defined. Same effect with "NSX": 3 Output is defined to be a Word document.

When running the report against a vSphere with NSX deployment that has lots of ESGWs configured, the NSX report does not correctly list the NAT configurations. Instead it produces a 2 column table with a single entry of "natRules" in it.

Other NSX configuration information is being collected and is correct.

To Reproduce Steps to reproduce the behavior:

  1. Configure the vSphere.json file to report on NSX objects.
  2. Configure at least one ESGW with NAT rules.
  3. Run the report with output set to Word
  4. Error appears in the tables in the "NAT Settings" table produced for each ESGW.

Expected behavior I have 7 NAT rules listed in my ESGW (With many other ESGWS). I can clearly see them in vCenter and they are functioning. I would expect that the NAT Settings table would have a list of NATs that are defined on each ESGW.

Screenshots If applicable, add screenshots to help explain your problem.

Word document output. image

This is what is seen in the ESGW configuration. image

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

mattallford commented 6 years ago

Hi there,

Thanks for raising this issue, I actually knew about it but hadn't got around to submitting the PR to fix it. I've tweaked the script to get the NAT rules, here is an example of a SNAT and DNAT rule on an ESG being captured in the report:

image

I'll tidy up the code and headings a bit hopefully this evening and submit a PR to the project to resolve.

Cheers, Matt.

ryan-jan commented 6 years ago

Closed by PR #31