Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.

vCenter $Object.Name does not exist #116

Closed
jpsider opened this issue Apr 9, 2017 · 4 comments
Closed

vCenter $Object.Name does not exist #116

jpsider opened this issue Apr 9, 2017 · 4 comments
Assignees
Labels

Comments

@jpsider
Copy link
Contributor

jpsider commented Apr 9, 2017

This does not prevent tests from running, its simply a reporting bug.

It could be resolved by replacing '$cfg.vcenter.vc' with '$global:DefaultVIServer' in 'VesterTemplate.Tests.ps1' where the '$InventoryList' is created.

Would this cause problems for the future if you allow multiple vcenter connections?

@jpsider
Copy link
Contributor Author

jpsider commented Apr 9, 2017

Console output Before:
Describing vCenter Configuration: NFC-UseSSL.Vester.ps1
Describing vCenter Configuration: SMTP-Port.Vester.ps1
[+] vCenter - SMTP Port 758ms

Console output after change:
Describing vCenter Configuration: NFC-UseSSL.Vester.ps1
Describing vCenter Configuration: SMTP-Port.Vester.ps1
[+] vCenter 192.168.10.220 - SMTP Port 501ms

Same problem with the XML that is created, which I parse for XesterUI.

@jpsider
Copy link
Contributor Author

jpsider commented Apr 9, 2017

I'm happy to submit a PR, but might want to wait until #114 is completed.

@brianbunke
Copy link
Contributor

This will be fixed in #129, once merged.

We talked about this briefly in chat, and @jpsider pointed out that it's not working because VesterTemplate.Tests.ps1 assumes an $Object.Name property on all inventory objects, but the vCenter server itself is just a string.

Personally, I would like to solve this by still referencing $cfg.vcenter.vc. Right now, it's possible for you to be connected to multiple vCenters, and then Invoke-Vester against a different server than the current $global:DefaultVIServer.

@brianbunke brianbunke added the bug label Apr 28, 2017
brianbunke pushed a commit that referenced this issue May 17, 2017
Add `Name` property to `$InventoryList` object on `vCenter` switch
@brianbunke
Copy link
Contributor

#129 has merged into master. 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants