OpenSDN source code
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
vrf_stats_io_context.cc
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
3
*/
4
5
#include <
vrouter/stats_collector/vrf_stats_io_context.h
>
6
#include <
vrouter/stats_collector/agent_stats_collector.h
>
7
#include <
uve/agent_uve.h
>
8
#include <
uve/vn_uve_table.h
>
9
#include <ksync/ksync_types.h>
10
11
void
VrfStatsIoContext::Handler
() {
12
AgentStatsSandeshContext
*ctx =
13
static_cast<
AgentStatsSandeshContext
*
>
(
sandesh_context_
);
14
VnUveTable
*vt =
static_cast<
VnUveTable
*
>
15
(ctx->
agent
()->
uve
()->
vn_uve_table
());
16
vt->
SendVnStats
();
17
/* Reset the marker for query during next timer interval, if there is
18
* no additional records for the current query */
19
if
(!ctx->
MoreData
()) {
20
ctx->
set_marker_id
(-1);
21
}
22
}
23
24
void
VrfStatsIoContext::ErrorHandler
(
int
err) {
25
KSYNC_ERROR
(VRouterError,
"VRouter VRF stats query failed. Error <"
, err,
26
":"
,
KSyncEntry::VrouterErrorToString
(err),
27
">. Object <"
,
"N/A"
,
">. State <"
,
"N/A"
,
28
">. Message number :"
,
GetSeqno
());
29
LOG
(ERROR,
"Error reading Vrf Stats. Error <"
<< err <<
": "
30
<<
KSyncEntry::VrouterErrorToString
(err)
31
<<
": Sequence No : "
<<
GetSeqno
());
32
}
33
IoContext::GetSeqno
uint32_t GetSeqno() const
Definition:
ksync_sock.h:138
AgentUveBase::vn_uve_table
VnUveTableBase * vn_uve_table() const
Definition:
agent_uve_base.h:78
Agent::uve
AgentUveBase * uve() const
Definition:
agent.cc:909
AgentStatsSandeshContext::set_marker_id
void set_marker_id(int id)
Definition:
agent_stats_sandesh_context.h:32
AgentStatsSandeshContext::MoreData
bool MoreData() const
Definition:
agent_stats_sandesh_context.cc:23
KSYNC_ERROR
#define KSYNC_ERROR(obj,...)
Definition:
ksync_entry.h:16
VrfStatsIoContext::ErrorHandler
virtual void ErrorHandler(int err)
Definition:
vrf_stats_io_context.cc:24
VrfStatsIoContext::Handler
virtual void Handler()
Definition:
vrf_stats_io_context.cc:11
vn_uve_table.h
vrf_stats_io_context.h
agent_uve.h
AgentStatsSandeshContext::agent
Agent * agent() const
Definition:
agent_stats_sandesh_context.h:30
IoContext::sandesh_context_
AgentSandeshContext * sandesh_context_
Definition:
ksync_sock.h:150
VnUveTable
Definition:
vn_uve_table.h:25
agent_stats_collector.h
KSyncEntry::VrouterErrorToString
static std::string VrouterErrorToString(uint32_t error)
Definition:
ksync_object.cc:513
VnUveTable::SendVnStats
void SendVnStats()
Definition:
vn_uve_table.cc:50
AgentStatsSandeshContext
Definition:
agent_stats_sandesh_context.h:24
LOG
#define LOG(_Level, _Msg)
Definition:
logging.h:33
contrail
controller
src
vnsw
agent
vrouter
stats_collector
vrf_stats_io_context.cc
Generated by
1.8.5