Skip to content

Commit

Permalink
grextras: rename stats server to query
Browse files Browse the repository at this point in the history
  • Loading branch information
guruofquality committed Mar 26, 2013
1 parent d791143 commit a3b79c7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion grc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ list(APPEND grc_sources
extras_packet_framer.xml
extras_packet_deframer.xml

extras_stats_server.xml
extras_query_server.xml
)

install(
Expand Down
2 changes: 1 addition & 1 deletion grc/extras_block_tree.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@
<block>extras_tuntap</block>
<block>extras_packet_framer</block>
<block>extras_packet_deframer</block>
<block>extras_stats_server</block>
<block>extras_query_server</block>
</cat>
</cat>
20 changes: 13 additions & 7 deletions grc/extras_stats_server.xml → grc/extras_query_server.xml
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
<?xml version="1.0"?>
<!--
###################################################
##Simple HTTP Stats Server
##Simple HTTP Query Server for TopBlock
###################################################
-->
<block>
<name>Ex: Stats Server</name>
<key>extras_stats_server</key>
<import>import gras.stats</import>
<name>Ex: Query Server</name>
<key>extras_query_server</key>
<import>import gras.query</import>
<import>import threading</import>
<make>self.$(id) = gras.stats.http_server(($addr, $port), self)
<make>self.$(id) = gras.query.http_server(($addr, $port), top_block=self, name=$name)
thread = threading.Thread(target=self.$(id).serve_forever)
thread.daemon = True
thread.start()</make>
<param>
<name>Name</name>
<key>name</key>
<value>top_block</value>
<type>string</type>
</param>
<param>
<name>Address</name>
<key>addr</key>
<value>localhost</value>
<value>0.0.0.0</value>
<type>string</type>
</param>
<param>
Expand All @@ -26,6 +32,6 @@ thread.start()</make>
<type>int</type>
</param>
<doc>
This block will start a simple HTTP server for querying the top block stats.
This block will start a simple HTTP server for querying flow graph information.
</doc>
</block>

0 comments on commit a3b79c7

Please sign in to comment.