Skip to content

Commit

Permalink
Merge pull request #3 from F5SolutionsEngineering/fast
Browse files Browse the repository at this point in the history
add FAST extension tests
  • Loading branch information
mjmenger authored May 21, 2020
2 parents 4318745 + c47d154 commit 09e8b36
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 32 deletions.
35 changes: 27 additions & 8 deletions controls/bigip.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
DO_VERSION = input('do_version')
AS3_VERSION = input('as3_version')
TS_VERSION = input('ts_version')
FAST_VERSION = input('fast_version')

control "bigip-connectivity" do
impact 1.0
Expand All @@ -24,7 +25,6 @@
# is the declarative onboarding end point available?
describe http("https://#{BIGIP_HOST}:#{BIGIP_PORT}/mgmt/shared/declarative-onboarding/info",
auth: {user: BIGIP_USER, pass: BIGIP_PASSWORD},
params: {format: 'html'},
method: 'GET',
ssl_verify: false) do
its('status') { should cmp 200 }
Expand All @@ -37,7 +37,6 @@
title "BIG-IP has specified version of Declarative Onboarding"
describe json(content: http("https://#{BIGIP_HOST}:#{BIGIP_PORT}/mgmt/shared/declarative-onboarding/info",
auth: {user: BIGIP_USER, pass: BIGIP_PASSWORD},
params: {format: 'html'},
method: 'GET',
ssl_verify: false).body) do
its([0,'version']) { should eq DO_VERSION }
Expand All @@ -50,7 +49,6 @@
# is the declarative onboarding end point available?
describe http("https://#{BIGIP_HOST}:#{BIGIP_PORT}/mgmt/shared/appsvcs/info",
auth: {user: BIGIP_USER, pass: BIGIP_PASSWORD},
params: {format: 'html'},
method: 'GET',
ssl_verify: false) do
its('status') { should cmp 200 }
Expand All @@ -63,7 +61,6 @@
title "BIG-IP has specified version of Application Services"
describe json(content: http("https://#{BIGIP_HOST}:#{BIGIP_PORT}/mgmt/shared/appsvcs/info",
auth: {user: BIGIP_USER, pass: BIGIP_PASSWORD},
params: {format: 'html'},
method: 'GET',
ssl_verify: false).body) do
its('version') { should eq AS3_VERSION }
Expand All @@ -72,11 +69,10 @@

control "bigip-telemetry-streaming" do
impact 1.0
title "BIG-IP has Application Services"
title "BIG-IP has Telemetry Streaming"
# is the declarative onboarding end point available?
describe http("https://#{BIGIP_HOST}:#{BIGIP_PORT}/mgmt/shared/telemetry/info",
auth: {user: BIGIP_USER, pass: BIGIP_PASSWORD},
params: {format: 'html'},
method: 'GET',
ssl_verify: false) do
its('status') { should cmp 200 }
Expand All @@ -86,17 +82,40 @@

control "bigip-telemetry-streaming-version" do
impact 1.0
title "BIG-IP has specified version of Application Services"
title "BIG-IP has specified version of Telemetry Streaming"
describe json(content: http("https://#{BIGIP_HOST}:#{BIGIP_PORT}/mgmt/shared/telemetry/info",
auth: {user: BIGIP_USER, pass: BIGIP_PASSWORD},
params: {format: 'html'},
method: 'GET',
ssl_verify: false).body) do
its('version') { should eq TS_VERSION }

end
end

control "bigip-fast" do
impact 1.0
title "BIG-IP has F5 Application Service Templates"
# is the declarative onboarding end point available?
describe http("https://#{BIGIP_HOST}:#{BIGIP_PORT}/mgmt/shared/fast/info",
auth: {user: BIGIP_USER, pass: BIGIP_PASSWORD},
method: 'GET',
ssl_verify: false) do
its('status') { should cmp 200 }
its('headers.Content-Type') { should match 'application/json' }
end
end

control "bigip-fast-version" do
impact 1.0
title "BIG-IP has specified version of F5 Application Service Templates"
describe json(content: http("https://#{BIGIP_HOST}:#{BIGIP_PORT}/mgmt/shared/fast/info",
auth: {user: BIGIP_USER, pass: BIGIP_PASSWORD},
method: 'GET',
ssl_verify: false).body) do
its('version') { should eq FAST_VERSION }
end
end

control "bigip-licensed" do
impact 1.0
title "BIG-IP has an active license"
Expand Down
50 changes: 26 additions & 24 deletions inspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,29 @@ version: 0.1.0
supports:
platform: os
inputs:
- name: bigip_address
description: ip address of the BIG-IP to test
required: true
- name: bigip_port
description: management port on the BIG-IP
value: 443
required: false
- name: user
description: user to connect to the BIG-IP as
value: admin
required: false
- name: password
description: password to connect to the BIG-IP with
required: true
- name: do_version
description: required version of declarative onboarding
required: false
- name: as3_version
description: required version of application services (AS3)
required: false
- name: ts_version
description: required version of telemetry streaming
required: false

- name: bigip_address
description: ip address of the BIG-IP to test
required: true
- name: bigip_port
description: management port on the BIG-IP
value: 443
required: false
- name: user
description: user to connect to the BIG-IP as
value: admin
required: false
- name: password
description: password to connect to the BIG-IP with
required: true
- name: do_version
description: required version of declarative onboarding
required: false
- name: as3_version
description: required version of application services (AS3)
required: false
- name: ts_version
description: required version of telemetry streaming
required: false
- name: fast_version
description: required version of F5 application services templates
required: false

0 comments on commit 09e8b36

Please sign in to comment.