mirror of
https://github.com/inspec/inspec
synced 2025-02-25 11:57:17 +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
|
# 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 Linux platforms, `/sys/class/net/#{iface}` is used as source
|
||||||
* On the Windows platform, the `Get-NetAdapter` cmdlet 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:
|
An `interface` resource block declares network interface properties to be tested:
|
||||||
|
|
||||||
describe interface do
|
describe interface('eth0') do
|
||||||
it { should be_up }
|
it { should be_up }
|
||||||
its('speed') { should eq 1000 }
|
its('speed') { should eq 1000 }
|
||||||
its('name') { should eq eth0 }
|
its('name') { should eq eth0 }
|
||||||
|
|
|
@ -7,7 +7,7 @@ require 'utils/convert'
|
||||||
module Inspec::Resources
|
module Inspec::Resources
|
||||||
class NetworkInterface < Inspec.resource(1)
|
class NetworkInterface < Inspec.resource(1)
|
||||||
name 'interface'
|
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 "
|
example "
|
||||||
describe interface('eth0') do
|
describe interface('eth0') do
|
||||||
it { should exist }
|
it { should exist }
|
||||||
|
|
Loading…
Add table
Reference in a new issue