You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Every advanced setting in vCenter for an ESX host contains a period. That means every key in the @params hash of vmhost_advancedsetting.rb contains a period and cannot be read:
[~/chef/inspec-vmware (master *)]$ cat controls/advanced_settings.rb
dc = 'redacted'
esx_host = 'redacted'
describe vmhost_advancedsetting(datacenter: dc, host: esx_host) do
its('Config.HostAgent.log.level') { should eq 'verbose' }
end
[~/chef/inspec-vmware (master *)]$ INSPEC_ESX_CONN='redacted' inspec exec .
Profile: VMware vSphere/ESXi Resource Pack (vsphere)
Version: 0.1.0
Target: local://
vmhost_advancedsetting Config.HostAgent.log.level
∅ undefined method `HostAgent' for nil:NilClass
Test Summary: 0 successful, 1 failure, 0 skipped
Thank you @LandonThomas As you've seen the old way had a lot of issues. Therefore we completely reworked our approach and base on powercli now. Please see inspec/inspec#3133 for further details.
Every advanced setting in vCenter for an ESX host contains a period. That means every key in the @params hash of vmhost_advancedsetting.rb contains a period and cannot be read:
I think this is the same rspec-its issue as inspec/inspec#875. I can apply the fix from inspec/inspec#2160:
and bracket the key:
and it works:
The text was updated successfully, but these errors were encountered: