mirror of
https://github.com/inspec/inspec
synced 2024-11-27 07:00:39 +00:00
Refactors the bridge property (#2505)
Signed-off-by: kagarmoe <kgarmoe@chef.io>
This commit is contained in:
parent
c9a226c4ab
commit
16325b8a9b
1 changed files with 17 additions and 10 deletions
|
@ -6,9 +6,6 @@ title: About the bridge Resource
|
|||
|
||||
Use the `bridge` InSpec audit resource to test basic network bridge properties, such as name, if an interface is defined, and the associations for any defined interface.
|
||||
|
||||
* On Linux platforms, any value in the `/sys/class/net/{interface}/bridge` directory may be tested
|
||||
* On the Windows platform, the `Get-NetAdapter` cmdlet is associated with the `Get-NetAdapterBinding` cmdlet and returns the `ComponentID ms_bridge` value as a JSON object
|
||||
|
||||
<br>
|
||||
|
||||
## Syntax
|
||||
|
@ -22,6 +19,23 @@ A `bridge` resource block declares the bridge to be tested and what interface it
|
|||
|
||||
<br>
|
||||
|
||||
## Supported Properties
|
||||
|
||||
* On Linux platforms, any value in the `/sys/class/net/{interface}/bridge` directory may be tested
|
||||
* On the Windows platform, the `Get-NetAdapter` cmdlet is associated with the `Get-NetAdapterBinding` cmdlet and returns the `ComponentID ms_bridge` value as a JSON object
|
||||
|
||||
<br>
|
||||
|
||||
## Property Examples
|
||||
|
||||
### interfaces
|
||||
|
||||
The `interfaces` property tests if the named interface is present:
|
||||
|
||||
its('interfaces') { should eq 'foo' }
|
||||
its('interfaces') { should eq 'bar' }
|
||||
its('interfaces') { should include('foo') }
|
||||
|
||||
## Matchers
|
||||
|
||||
For a full list of available matchers please visit our [matchers page](https://www.inspec.io/docs/reference/matchers/).
|
||||
|
@ -38,10 +52,3 @@ The `have_interface` matcher tests if the named interface is defined for the net
|
|||
|
||||
it { should have_interface 'eth0' }
|
||||
|
||||
### interfaces
|
||||
|
||||
The `interfaces` matcher tests if the named interface is present:
|
||||
|
||||
its('interfaces') { should eq 'foo' }
|
||||
its('interfaces') { should eq 'bar' }
|
||||
its('interfaces') { should include('foo') }
|
||||
|
|
Loading…
Reference in a new issue