OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ifmap_client.cc
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
3  */
4 
5 #include "ifmap/ifmap_client.h"
6 
7 #include "base/bitset.h"
8 #include "base/time_util.h"
9 #include "ifmap/ifmap_exporter.h"
10 #include "ifmap/ifmap_update.h"
11 
13  : index_(kIndexInvalid), exporter_(NULL), msgs_sent_(0), msgs_blocked_(0),
14  bytes_sent_(0), update_nodes_sent_(0), delete_nodes_sent_(0),
15  update_links_sent_(0), delete_links_sent_(0), send_is_blocked_(false),
16  created_at_(UTCTimestampUsec()) {
17 }
18 
20 }
21 
22 void IFMapClient::Initialize(IFMapExporter *exporter, int index) {
23  index_ = index;
24  exporter_ = exporter;
25 }
26 
27 std::vector<std::string> IFMapClient::vm_list() const {
28  std::vector<std::string> vm_list;
29 
30  vm_list.reserve(vm_map_.size());
31  for (VmMap::const_iterator iter = vm_map_.begin(); iter != vm_map_.end();
32  ++iter) {
33  vm_list.push_back(iter->first);
34  }
35  return vm_list;
36 }
37 
std::vector< std::string > vm_list() const
Definition: ifmap_client.cc:27
int index() const
Definition: ifmap_client.h:31
void Initialize(IFMapExporter *exporter, int index)
Definition: ifmap_client.cc:22
IFMapExporter * exporter_
Definition: ifmap_client.h:79
virtual ~IFMapClient()
Definition: ifmap_client.cc:19
VmMap vm_map_
Definition: ifmap_client.h:88
static uint64_t UTCTimestampUsec()
Definition: time_util.h:13