OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
HealthCheckService Class Reference

#include <health_check.h>

Inheritance diagram for HealthCheckService:
Collaboration diagram for HealthCheckService:

Public Types

enum  HealthCheckType {
  PING, HTTP, BFD, SEGMENT,
  MAX_HEALTH_CHECK_SERVICES
}
 
typedef std::map
< boost::uuids::uuid,
HealthCheckInstanceBase * > 
InstanceList
 
typedef std::map< IpAddress,
HealthCheckInstanceBase * > 
IpInstanceList
 
- Public Types inherited from AgentDBEntry
typedef boost::intrusive_ptr
< AgentDBEntry
AgentDBEntyRef
 
- Public Types inherited from DBEntryBase
typedef DBTableBase::ListenerId ListenerId
 
typedef std::unique_ptr
< DBRequestKey
KeyPtr
 

Public Member Functions

 HealthCheckService (const HealthCheckTable *table, const boost::uuids::uuid &id)
 
 ~HealthCheckService ()
 
virtual bool IsLess (const DBEntry &rhs) const
 
virtual std::string ToString () const
 
virtual KeyPtr GetDBRequestKey () const
 
virtual void SetKey (const DBRequestKey *key)
 
uint32_t GetRefCount () const
 
bool DBEntrySandesh (Sandesh *resp, std::string &name) const
 
void PostAdd ()
 
bool Copy (HealthCheckTable *table, const HealthCheckServiceData *data)
 
HealthCheckInstanceBaseStartHealthCheckService (VmInterface *intrface, VmInterface *paired_vmi, const IpAddress &source_ip, const IpAddress &destination_ip, const MacAddress &destination_mac, bool ignore_status_event, bool multi_hop)
 
HealthCheckInstanceBaseStartHealthCheckService (VmInterface *intrface, const IpAddress &source_ip, const IpAddress &destination_ip, const MacAddress destination_mac=MacAddress())
 
void StopHealthCheckService (HealthCheckInstanceBase *instance)
 
void UpdateInstanceServiceReference ()
 
void ResyncHealthCheckInterface (const HealthCheckService *service, const VmInterface *intf)
 
void UpdateInterfaceInstanceServiceReference (const VmInterface *intf)
 
void DeleteInstances ()
 
const boost::uuids::uuid & uuid () const
 
const std::string & name () const
 
uint8_t ip_proto () const
 
uint16_t url_port () const
 
uint32_t delay () const
 
uint64_t delay_usecs () const
 
uint32_t timeout () const
 
uint64_t timeout_usecs () const
 
uint32_t max_retries () const
 
const std::string & url_path () const
 
const std::string & monitor_type () const
 
const HealthCheckTabletable () const
 
bool IsInstanceTaskBased () const
 
bool IsSegmentHealthCheckService () const
 
bool IsVnIpListHealthCheckService () const
 
HealthCheckType health_check_type () const
 
const std::set
< boost::uuids::uuid > & 
GetVnUuidList ()
 
const std::set< IpAddress > & GetTargetIpList ()
 
bool IsTargetIpPresent (IpAddress &ip)
 
IpAddress dest_ip () const
 
bool IsHcEnableAllTargetIp () const
 
- Public Member Functions inherited from AgentOperDBEntry
 AgentOperDBEntry ()
 
virtual ~AgentOperDBEntry ()
 
IFMapNodeifmap_node () const
 
void SetIFMapNodeState (IFMapDependencyManager::IFMapNodePtr sref)
 
- Public Member Functions inherited from AgentDBEntry
 AgentDBEntry ()
 
virtual ~AgentDBEntry ()
 
void SetRefState () const
 
void ClearRefState () const
 
bool IsActive () const
 
DBStateGetAgentDBEntryState (int listener_id)
 
const DBStateGetAgentDBEntryState (int listener_id) const
 
virtual void AllocateResources (ResourceManager *resource_manager)
 
virtual void FreeResources (ResourceManager *resource_manager)
 
- Public Member Functions inherited from DBEntry
 DBEntry ()
 
virtual ~DBEntry ()
 
bool operator< (const DBEntry &rhs) const
 
- Public Member Functions inherited from DBEntryBase
 DBEntryBase ()
 
virtual ~DBEntryBase ()
 
virtual bool IsMoreSpecific (const std::string &match) const
 
virtual bool IsLessSpecific (const std::string &match) const
 
void SetState (DBTableBase *tbl_base, ListenerId listener, DBState *state)
 
void ClearState (DBTableBase *tbl_base, ListenerId listener)
 
DBStateGetState (DBTableBase *tbl_base, ListenerId listener) const
 
const DBStateGetState (const DBTableBase *tbl_base, ListenerId listener) const
 
bool is_state_empty (DBTablePartBase *tpart)
 
bool is_state_empty_unlocked (DBTablePartBase *tpart)
 
void Delete ()
 
void MarkDelete ()
 
void ClearDelete ()
 
bool IsDeleted () const
 
void set_onlist ()
 
void clear_onlist ()
 
bool is_onlist ()
 
void SetOnRemoveQ ()
 
bool IsOnRemoveQ ()
 
void ClearOnRemoveQ ()
 
void set_last_change_at (uint64_t time)
 
void set_last_change_at_to_now ()
 
const uint64_t last_change_at () const
 
const std::string last_change_at_str () const
 
void set_last_update_at (uint64_t time)
 
void set_last_update_at_to_now ()
 
const uint64_t last_update_at () const
 
DBTablePartBaseget_table_partition () const
 
void set_table_partition (DBTablePartBase *tpart)
 
DBTableBaseget_table () const
 
void Notify ()
 

Private Member Functions

HealthCheckType GetHealthCheckType () const
 
 DISALLOW_COPY_AND_ASSIGN (HealthCheckService)
 
- Private Member Functions inherited from AgentRefCount< HealthCheckService >
uint32_t GetRefCount () const
 
 AgentRefCount ()
 
 AgentRefCount (const AgentRefCount &)
 
AgentRefCountoperator= (const AgentRefCount &)
 
virtual ~AgentRefCount ()
 
void swap (AgentRefCount &)
 

Private Attributes

const HealthCheckTabletable_
 
boost::uuids::uuid uuid_
 
IpAddress dest_ip_
 
std::string name_
 
std::string monitor_type_
 
std::string service_type_
 
uint8_t ip_proto_
 
std::string http_method_
 
std::string url_path_
 
uint16_t url_port_
 
std::string expected_codes_
 
uint32_t delay_
 
uint64_t delay_usecs_
 
uint32_t timeout_
 
uint64_t timeout_usecs_
 
uint32_t max_retries_
 
InstanceList intf_list_
 
HealthCheckType health_check_type_
 
std::set< boost::uuids::uuidvn_uuid_list_
 
std::set< IpAddresstarget_ip_list_
 
bool is_hc_enable_all_ip_
 
- Private Attributes inherited from AgentRefCount< HealthCheckService >
tbb::mutex back_ref_mutex_
 
std::set< IntrusiveReferrerback_ref_set_
 

Friends

struct HealthCheckInstanceEvent
 

Additional Inherited Members

- Public Attributes inherited from DBEntryBase
boost::intrusive::list_member_hook chg_list_
 

Detailed Description

Definition at line 271 of file health_check.h.

Member Typedef Documentation

Member Enumeration Documentation

Enumerator
PING 
HTTP 
BFD 
SEGMENT 
MAX_HEALTH_CHECK_SERVICES 

Definition at line 274 of file health_check.h.

Constructor & Destructor Documentation

HealthCheckService::HealthCheckService ( const HealthCheckTable table,
const boost::uuids::uuid id 
)

Definition at line 389 of file health_check.cc.

Here is the call graph for this function:

HealthCheckService::~HealthCheckService ( )

Definition at line 395 of file health_check.cc.

Here is the call graph for this function:

Member Function Documentation

bool HealthCheckService::Copy ( HealthCheckTable table,
const HealthCheckServiceData data 
)

Definition at line 540 of file health_check.cc.

Here is the call graph for this function:

bool HealthCheckService::DBEntrySandesh ( Sandesh resp,
std::string &  name 
) const
virtual

Implements AgentDBEntry.

Definition at line 426 of file health_check.cc.

Here is the call graph for this function:

uint32_t HealthCheckService::delay ( ) const
inline

Definition at line 330 of file health_check.h.

uint64_t HealthCheckService::delay_usecs ( ) const
inline

Definition at line 331 of file health_check.h.

void HealthCheckService::DeleteInstances ( )

Definition at line 775 of file health_check.cc.

Here is the call graph for this function:

IpAddress HealthCheckService::dest_ip ( ) const
inline

Definition at line 358 of file health_check.h.

HealthCheckService::DISALLOW_COPY_AND_ASSIGN ( HealthCheckService  )
private
DBEntryBase::KeyPtr HealthCheckService::GetDBRequestKey ( ) const
virtual

Implements DBEntryBase.

Definition at line 415 of file health_check.cc.

HealthCheckService::HealthCheckType HealthCheckService::GetHealthCheckType ( ) const
private

Definition at line 530 of file health_check.cc.

Here is the call graph for this function:

uint32_t HealthCheckService::GetRefCount ( ) const
inlinevirtual

Implements AgentDBEntry.

Definition at line 292 of file health_check.h.

Here is the call graph for this function:

const std::set<IpAddress>& HealthCheckService::GetTargetIpList ( )
inline

Definition at line 347 of file health_check.h.

const std::set<boost::uuids::uuid>& HealthCheckService::GetVnUuidList ( )
inline

Definition at line 344 of file health_check.h.

HealthCheckType HealthCheckService::health_check_type ( ) const
inline

Definition at line 341 of file health_check.h.

uint8_t HealthCheckService::ip_proto ( ) const
inline

Definition at line 328 of file health_check.h.

bool HealthCheckService::IsHcEnableAllTargetIp ( ) const
inline

Definition at line 359 of file health_check.h.

bool HealthCheckService::IsInstanceTaskBased ( ) const

Definition at line 476 of file health_check.cc.

Here is the call graph for this function:

bool HealthCheckService::IsLess ( const DBEntry rhs) const
virtual

Implements DBEntry.

Definition at line 405 of file health_check.cc.

bool HealthCheckService::IsSegmentHealthCheckService ( ) const

Definition at line 472 of file health_check.cc.

bool HealthCheckService::IsTargetIpPresent ( IpAddress ip)
inline

Definition at line 350 of file health_check.h.

bool HealthCheckService::IsVnIpListHealthCheckService ( ) const

Definition at line 481 of file health_check.cc.

uint32_t HealthCheckService::max_retries ( ) const
inline

Definition at line 334 of file health_check.h.

const std::string& HealthCheckService::monitor_type ( ) const
inline

Definition at line 336 of file health_check.h.

const std::string& HealthCheckService::name ( ) const
inline

Definition at line 326 of file health_check.h.

void HealthCheckService::PostAdd ( )
virtual

Reimplemented from AgentDBEntry.

Definition at line 468 of file health_check.cc.

Here is the call graph for this function:

void HealthCheckService::ResyncHealthCheckInterface ( const HealthCheckService service,
const VmInterface intf 
)

Definition at line 749 of file health_check.cc.

Here is the call graph for this function:

void HealthCheckService::SetKey ( const DBRequestKey key)
virtual

Implements DBEntry.

Definition at line 420 of file health_check.cc.

HealthCheckInstanceBase * HealthCheckService::StartHealthCheckService ( VmInterface intrface,
VmInterface paired_vmi,
const IpAddress source_ip,
const IpAddress destination_ip,
const MacAddress destination_mac,
bool  ignore_status_event,
bool  multi_hop 
)

Definition at line 486 of file health_check.cc.

Here is the call graph for this function:

HealthCheckInstanceBase* HealthCheckService::StartHealthCheckService ( VmInterface intrface,
const IpAddress source_ip,
const IpAddress destination_ip,
const MacAddress  destination_mac = MacAddress() 
)
inline

Definition at line 308 of file health_check.h.

Here is the call graph for this function:

void HealthCheckService::StopHealthCheckService ( HealthCheckInstanceBase instance)

Definition at line 518 of file health_check.cc.

Here is the call graph for this function:

const HealthCheckTable* HealthCheckService::table ( ) const
inline

Definition at line 337 of file health_check.h.

uint32_t HealthCheckService::timeout ( ) const
inline

Definition at line 332 of file health_check.h.

uint64_t HealthCheckService::timeout_usecs ( ) const
inline

Definition at line 333 of file health_check.h.

std::string HealthCheckService::ToString ( ) const
virtual

Implements DBEntryBase.

Definition at line 411 of file health_check.cc.

Here is the call graph for this function:

void HealthCheckService::UpdateInstanceServiceReference ( )

Definition at line 731 of file health_check.cc.

void HealthCheckService::UpdateInterfaceInstanceServiceReference ( const VmInterface intf)

Definition at line 763 of file health_check.cc.

Here is the call graph for this function:

const std::string& HealthCheckService::url_path ( ) const
inline

Definition at line 335 of file health_check.h.

uint16_t HealthCheckService::url_port ( ) const
inline

Definition at line 329 of file health_check.h.

const boost::uuids::uuid& HealthCheckService::uuid ( ) const
inline

Definition at line 325 of file health_check.h.

Friends And Related Function Documentation

friend struct HealthCheckInstanceEvent
friend

Definition at line 362 of file health_check.h.

Member Data Documentation

uint32_t HealthCheckService::delay_
private

Definition at line 381 of file health_check.h.

uint64_t HealthCheckService::delay_usecs_
private

Definition at line 382 of file health_check.h.

IpAddress HealthCheckService::dest_ip_
private

Definition at line 368 of file health_check.h.

std::string HealthCheckService::expected_codes_
private

Definition at line 380 of file health_check.h.

HealthCheckType HealthCheckService::health_check_type_
private

Definition at line 388 of file health_check.h.

std::string HealthCheckService::http_method_
private

Definition at line 376 of file health_check.h.

InstanceList HealthCheckService::intf_list_
private

Definition at line 387 of file health_check.h.

uint8_t HealthCheckService::ip_proto_
private

Definition at line 375 of file health_check.h.

bool HealthCheckService::is_hc_enable_all_ip_
private

Definition at line 392 of file health_check.h.

uint32_t HealthCheckService::max_retries_
private

Definition at line 385 of file health_check.h.

std::string HealthCheckService::monitor_type_
private

Definition at line 371 of file health_check.h.

std::string HealthCheckService::name_
private

Definition at line 369 of file health_check.h.

std::string HealthCheckService::service_type_
private

Definition at line 373 of file health_check.h.

const HealthCheckTable* HealthCheckService::table_
private

Definition at line 366 of file health_check.h.

std::set<IpAddress> HealthCheckService::target_ip_list_
private

Definition at line 391 of file health_check.h.

uint32_t HealthCheckService::timeout_
private

Definition at line 383 of file health_check.h.

uint64_t HealthCheckService::timeout_usecs_
private

Definition at line 384 of file health_check.h.

std::string HealthCheckService::url_path_
private

Definition at line 377 of file health_check.h.

uint16_t HealthCheckService::url_port_
private

Definition at line 379 of file health_check.h.

boost::uuids::uuid HealthCheckService::uuid_
private

Definition at line 367 of file health_check.h.

std::set<boost::uuids::uuid> HealthCheckService::vn_uuid_list_
private

Definition at line 390 of file health_check.h.


The documentation for this class was generated from the following files: