Refactors the bond docs (#2504)

Signed-off-by: kagarmoe <kgarmoe@chef.io>
This commit is contained in:
Kimberly Garmoe 2018-02-07 06:17:59 -08:00 committed by Christoph Hartmann
parent ecf6900e9f
commit 16d4f71d2e

View file

@ -23,10 +23,34 @@ where
<br>
## Examples
## Property Examples
The following examples show how to use this InSpec audit resource.
### content
The `content` matcher tests if contents in the file that defines the bonded network interface match the value specified in the test. The values of the `content` matcher are arbitrary.
its('content') { should match('value') }
### interfaces
The `interfaces` matcher tests if the named secondary interfaces are available.
its('interfaces') { should eq ['eth0', 'eth1', ...] }
### mode
The `mode` matcher tests the Bonding Mode.
its('mode') { should eq 'IEEE 802.3ad Dynamic link aggregation' }
### params
The `params` matcher tests arbitrary parameters for the bonded network interface.
its('params') { should eq 'value' }
### Test if eth0 is a secondary interface for bond0
describe bond('bond0') do
@ -51,12 +75,6 @@ The following examples show how to use this InSpec audit resource.
For a full list of available matchers please visit our [matchers page](https://www.inspec.io/docs/reference/matchers/).
### content
The `content` matcher tests if contents in the file that defines the bonded network interface match the value specified in the test. The values of the `content` matcher are arbitrary:
its('content') { should match('value') }
### exist
The `exist` matcher tests if the bonded network interface is available:
@ -69,19 +87,3 @@ The `have_interface` matcher tests if the bonded network interface has one (or m
it { should have_interface }
### interfaces
The `interfaces` matcher tests if the named secondary interfaces are available:
its('interfaces') { should eq ['eth0', 'eth1', ...] }
### mode
The `mode` matcher tests the Bonding Mode:
its('mode') { should eq 'IEEE 802.3ad Dynamic link aggregation' }
### params
The `params` matcher tests arbitrary parameters for the bonded network interface:
its('params') { should eq 'value' }