From 9182ba8574d5d6d71efbe3911203fb248afa7f19 Mon Sep 17 00:00:00 2001 From: Adam Leff Date: Thu, 18 May 2017 15:25:16 -0400 Subject: [PATCH 1/2] Update interface resource docs The `interface` resource currently refers to methods that don't yet exist. Fixing the docs for now and will add the features later. Signed-off-by: Adam Leff --- docs/resources/interface.md.erb | 2 +- lib/resources/interface.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/resources/interface.md.erb b/docs/resources/interface.md.erb index bbf346b49..d468be1c6 100644 --- a/docs/resources/interface.md.erb +++ b/docs/resources/interface.md.erb @@ -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 diff --git a/lib/resources/interface.rb b/lib/resources/interface.rb index c6a21f04c..8a47fb4e0 100644 --- a/lib/resources/interface.rb +++ b/lib/resources/interface.rb @@ -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 } From 333c7f15aa52c4d2834b4daaca5b6b088c8cc7a4 Mon Sep 17 00:00:00 2001 From: Adam Leff Date: Thu, 18 May 2017 15:28:19 -0400 Subject: [PATCH 2/2] Updating docs to show the interface name is required Signed-off-by: Adam Leff --- docs/resources/interface.md.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/resources/interface.md.erb b/docs/resources/interface.md.erb index d468be1c6..fc93d874a 100644 --- a/docs/resources/interface.md.erb +++ b/docs/resources/interface.md.erb @@ -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 }