Giter Club home page Giter Club logo

asbuiltreport.nutanix.prismelement's People

Contributors

tpcarman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

asbuiltreport.nutanix.prismelement's Issues

IP address Report

Is your feature request related to a problem? Please describe.
It is always important to know the current usage of IP addressing in subnets. Collecting information can be difficult.

Describe the solution you'd like
It would be really useful to have an IP address Report as part of the export. This would allow for easy input into a IPAM, spread sheet, DB, etc. The idea would be to have this in a list of individual IPs. So each IP address would be on a line/row of its own.
Maybe the columns would be something like below.
IP(v4/v6),VMName,vNIC,VLAN#,SubnetName,IPAMMethod,vSwitch,Node/Host,Cluster,Location

Describe alternatives you've considered
Writing my own script to do the same thing but this is a nice solution and would benefit others so coding in a vacuum is not ideal.

Additional context
None

New-AsBuiltReport : The remote server returned an error: (412) Precondition Failed

*** Bug Description ***
Receiving the following error when trying to run New-AsBuiltReport against a Nutanix cluster:

New-AsBuiltReport : The remote server returned an error: (412) Precondition Failed.
At line:1 char:1
+ New-AsBuiltReport -Report Nutanix.PrismElement -Target 10.118.17.30 - ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,New-AsBuiltReport

*** To Reproduce (Method 1) ***
Steps to reproduce the behavior:

  1. Open PowerShell (standard user or Administrator)
  2. Run: $nxUser = "<Nutanix Username>"
  3. Run: $nxPassword = ConvertTo-SecureString "<Nutanix Password>" -AsPlainText -Force
  4. Run: $nxCredentials = New-Object System.Management.Automation.PSCredential ( $nxUser, $nxPassword )
  5. Run: New-AsBuiltReport -Report Nutanix.PrismElement -Target <Nutanix Prism Element Cluster VIP> -Credential $nxCredentials -Format Word -Orientation Portrait -OutputPath 'C:\!Incoming\'
  6. Process requested information prompts
  7. See error

*** To Reproduce (Method 2) ***
Steps to reproduce the behavior:

  1. Open PowerShell (standard user or Administrator)
  2. Run: New-AsBuiltReport -Report Nutanix.PrismElement -Target <Nutanix Prism Element Cluster VIP> -Username '<Nutanix Username>' -Password '<Nutanix Password>' -Format Word -Orientation Portrait -OutputPath 'C:\!Incoming\'
  3. Process requested information prompts
  4. See error

Expected behavior
Expecting As Built Report to be generated at 'C:!Incoming'

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

*** Environment Information ***

  • OS Version(s): Windows 10 Enterprise 1909, Windows Server 2016 Standard
  • PowerShell Version(s): 5.1.18362.628, 5.1.14393.3471
  • Nutanix Cmdlets Version: 2.1.2
  • Nutanix AOS Version: 5.10.9.1 LTS
  • Browser Version: N/A
  • Module Version (AsBuiltReport.Core): 1.0.3
  • Module Version (AsBuiltReport.Nutanix.PrismElement): 0.1.0
  • PSSnapin Version (NutanixCmdletsPSSnapin): 5.1

*** Additional Context ***

  • Nutanix Prism Element user is 'admin', with full cluster and user rights to target cluster
  • Nutanix Prism Element login has been tested successfully with the standard Nutanix Cmdlets PSSnapin, running Connect-NTNXCluster -Server 10.118.17.30 -Password $nxPassword -UserName admin -AcceptInvalidSSLCerts
  • The above issue has been reproduced over VPN and on local server via RDP

You cannot call a method on a null-valued expression

Describe the bug
VERBOSE: [ 09:29:39:222 ] [ Document ] - Processing section 'Licensing' started.
New-AsBuiltReport: You cannot call a method on a null-valued expression.

Expected behavior
when i launch the script, with admin right on Prism Element, Ip and user admin - password correct.. always this error message.. when the script Process the section 'Licensing' apparently
always at this moment, at this check

Screenshots
Untitled

Desktop (please complete the following information):

  • OS: AOS 6.0.7.6 STS - PC 2023.4 - ahv 8-20230302
  • Powershell :
    PSVersion 7.4.2
    PSEdition Core
    GitCommitId 7.4.2
    OS Microsoft Windows 10.0.19045
    Platform Win32NT
    PSCompatibleVersions {1.0, 2.0, 3.0, 4.0โ€ฆ}
    PSRemotingProtocolVersion 2.3
    SerializationVersion 1.1.0.1
    WSManStackVersion 3.0

Nutanix Licensing API Bug with AOS 6.5.3 causes script to fail

Describe the bug
In certain conditions on AOS 6.5.3, Licensing in the API reflects starter and not fully licensed.
This causes the script to fail with error "You cannot call a method on a none valued expression" when processing Licensing region beginning at line 425 of Invoke-AsBuiltRreport.Nutanix.PrismElement.ps1.

The specific failure is when ($NtnxLicense.category).Replace('_',' ') is called on line 433 as the object is null and has no methods

To Reproduce
Steps to reproduce the behavior:

  1. Validate AOS version is 6.5.3
  2. In Prism check licensing, if starter license is installed even if Pro is also installed this will trigger the API bug
  3. Run New-AsBuiltReport for Nutanix with -Verbose
  4. See error

Expected behavior
The script looks for information in the object retrieved from the API called licenseDTO. In the fault condition this is null and information is in a different object called licenseInfoDTO which has a different structure.

Screenshots!
image

Desktop (please complete the following information):

  • OS: Windows Server 2019
  • Powershell
  • Version 5.1 and 7

Additional context
This was tested against AOS 6.5.7 on another cluster and the script ran without issue.
Commenting out lines 425 to 483 in Invoke-AsBuiltRreport.Nutanix.PrismElement.ps1. is a work around to let the script continue to run.

Nutanix report errors with word or html

Describe the bug
I ran the Nutanix as build report for the first time on two different clusters and got the exact error.
New-AsBuiltReport : Cannot bind argument to parameter 'Name' because it is an empty string.
At line:1 char:1

  • New-AsBuiltReport -Report Nutanix.PrismElement -Target '10.11.65.10' ...

Screenshot
Nutanix error

Desktop (please complete the following information):

  • OS: [Windows 2016]
  • Browser [e.g. chrome, safari]
  • powershell Version [5.1.14393.4583]
  • AOS 5.20.1.1 and 5.15.6

Issues with script

Describe the bug
While attempting to run the Nutanix Element script, against a single or multiple PEs, with either admin creds, or AD creds, I get the following error without any files being created:

New-AsBuiltReport : Cannot bind argument to parameter 'Rows' because it is an empty collection.
At line:1 char:1

  • New-AsBuiltReport -Report Nutanix.PrismElement -Target 10.11.6.10 -Cr ...
  •   + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
      + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,New-AsBuiltRepor
    
    

To Reproduce
I'm using the following to run the script: New-AsBuiltReport -Report Nutanix.PrismElement -Target 10.11.6.10 -Credential (Get-Credential) -Format HTML,Word -OutputPath 'd:\scripts\asbuilt' -TimeStamp -Verbose

Expected behavior
expect it to finish the run without errors and produce the files.

Screenshots
Screenshot attached
image

Desktop (please complete the following information):

  • OS: Windows 10, Powershell as admin
  • Nutanix AOS 5.15.5.1 LTS

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.