Skip to content

Developer mode does not work with vCenter as target #78

@Vinc3nt178

Description

@Vinc3nt178

Describe the bug

In developer mode, some $env variables are not correctly processed.

For example, this part:
#get user input for selected cluster
if($DeveloperMode){
$cluster = $cluster_report | Where-Object {$.Clustername -eq $env:cluster_name}
$data_center = $cluster_report | Where-Object {$
.DCname -eq $env:dc_name}

Does not work because the reference is to the row, and not to the property
The cluster is:
$cluster = $cluster_report | Where-Object {$_.Clustername -eq $env:cluster_name}.Clustername

The datacenter is:
$data_center = $cluster_report | Where-Object {$_.DCname -eq $env:dc_name}.dcname

After fixing this I run into a similar issue with datastore selection, that was not easy to fix.

In general, please look at the developermode.

Reproduction steps

1.Fill $env variables as documented in the manual
2.Run new-holodeckconfig
3.Run new-holodeckinstance with -DeveloperMode param
4.Errors occur Cannot convert the "" value of type "System.Management.Automation.PSCustomObject" to type "VMware.VimAutomation.ViCore.Types.V1.Inventory.VIContainer".

Expected behavior

Developer mode should work with documented environment variables

Additional context

No response

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions