Skip to content

Commit 0d2b88a

Browse files
authored
Merge pull request #87 from redBorder/development
Release 4.1.8
2 parents 31900f8 + 070c522 commit 0d2b88a

File tree

5 files changed

+25
-2
lines changed

5 files changed

+25
-2
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
cookbook-rb-proxy CHANGELOG
22
===============
33

4+
## 4.1.8
5+
6+
- ljblancoredborder
7+
- [8abdcab] fix passing params to new resource for proxy to cookbook monitor
8+
- [ec30d64] adaptation of get_nodes function, explaining current data strcuture
9+
- [12766df] adding alternative funtion for monitor
10+
- [6140d36] retrieving monitor categories from node info instead of role info
11+
412
## 4.1.7
513

614
- jnavarrorb

resources/libraries/get_nodes.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
module RbProxy
2+
module Helpers
3+
# Format of nodes differs from roles, in this case, we extract the info in node format
4+
def get_nodes(sensor_types = ['flow-sensor'])
5+
proxy_id = node['redborder']['sensor_id']
6+
sensor_types.each_with_object({}) do |s_type, sensors_info|
7+
sensors = search(:node, "role:#{s_type} AND redborder_parent_id:#{proxy_id}").sort
8+
sensors_info[s_type] = sensors
9+
end
10+
end
11+
end
12+
end

resources/metadata.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
maintainer_email '[email protected]'
66
license 'AGPL-3.0'
77
description 'Installs/Configures redborder proxy'
8-
version '4.1.7'
8+
version '4.1.8'
99

1010
depends 'rb-common'
1111
depends 'rb-selinux'

resources/recipes/configure.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
rbmonitor_config 'Configure redborder-monitor' do
8181
name node['hostname']
8282
device_nodes node.run_state['sensors_info_all']['device-sensor']
83-
flow_nodes node.run_state['sensors_info_all']['flow-sensor']
83+
proxy_flow_nodes node.run_state['proxy_flow_nodes']
8484
if proxy_services['redborder-monitor']
8585
action :add
8686
else

resources/recipes/prepare_system.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@
5656
# get flow sensors in proxy info
5757
node.run_state['sensors_info_all']['flow-sensor'] = get_flow_sensors_info('flow')
5858

59+
# Custom node extration for monitor
60+
node.run_state['proxy_flow_nodes'] = get_nodes()['flow-sensor']
61+
5962
# get namespaces
6063
node.run_state['namespaces'] = get_namespaces
6164

0 commit comments

Comments
 (0)