mirror of
https://github.com/inspec/inspec
synced 2024-11-27 15:10:44 +00:00
Merge pull request #1833 from chef/adamleff/fix-interface-docs
Update interface resource docs
This commit is contained in:
commit
93f1c55782
2 changed files with 3 additions and 3 deletions
|
@ -4,7 +4,7 @@ title: About the interface Resource
|
|||
|
||||
# interface
|
||||
|
||||
Use the `interface` InSpec audit resource to test basic network adapter properties, such as name, status, state, address, and link speed (in MB/sec).
|
||||
Use the `interface` InSpec audit resource to test basic network adapter properties, such as name, status, and link speed (in MB/sec).
|
||||
|
||||
* On Linux platforms, `/sys/class/net/#{iface}` is used as source
|
||||
* On the Windows platform, the `Get-NetAdapter` cmdlet is used as source
|
||||
|
@ -13,7 +13,7 @@ Use the `interface` InSpec audit resource to test basic network adapter properti
|
|||
|
||||
An `interface` resource block declares network interface properties to be tested:
|
||||
|
||||
describe interface do
|
||||
describe interface('eth0') do
|
||||
it { should be_up }
|
||||
its('speed') { should eq 1000 }
|
||||
its('name') { should eq eth0 }
|
||||
|
|
|
@ -7,7 +7,7 @@ require 'utils/convert'
|
|||
module Inspec::Resources
|
||||
class NetworkInterface < Inspec.resource(1)
|
||||
name 'interface'
|
||||
desc 'Use the interface InSpec audit resource to test basic network adapter properties, such as name, status, state, address, and link speed (in MB/sec).'
|
||||
desc 'Use the interface InSpec audit resource to test basic network adapter properties, such as name, status, and link speed (in MB/sec).'
|
||||
example "
|
||||
describe interface('eth0') do
|
||||
it { should exist }
|
||||
|
|
Loading…
Reference in a new issue