5 #ifndef __IFMAP_UUID_MAPPER_H__
6 #define __IFMAP_UUID_MAPPER_H__
8 #include <boost/bind/bind.hpp>
9 #include <boost/uuid/uuid.hpp>
10 #include <boost/uuid/uuid_io.hpp>
18 using namespace boost::placeholders;
29 typedef UuidNodeMap::size_type
Sz_t;
31 std::string Add(uint64_t ms_long, uint64_t ls_long,
IFMapNode *node);
32 void Delete(
const std::string &uuid_str);
33 IFMapNode *Find(
const std::string &uuid_str);
34 bool Exists(
const std::string &uuid_str);
35 void PrintAllMappedEntries();
64 return uuid_mapper_.Size();
73 IFMapNode *GetVmNodeByUuid(
const std::string &vm_uuid);
74 bool VmNodeExists(
const std::string &vm_uuid);
75 void PrintAllUuidMapperEntries();
77 void ProcessVmRegAsPending(std::string vm_uuid, std::string vr_name,
79 bool PendingVmRegExists(
const std::string &vm_uuid, std::string *vr_name);
81 return pending_vmreg_map_.size();
84 pending_vmreg_map_.erase(vm_uuid);
86 void PrintAllPendingVmRegEntries();
88 bool NodeToUuid(
IFMapNode *vm_node, std::string *vm_uuid);
91 return node_uuid_map_.size();
93 void PrintAllNodeUuidMappedEntries();
96 friend class IFMapVmUuidMapperTest;
UuidNodeMap::size_type Sz_t
std::map< std::string, IFMapNode * > UuidNodeMap
UuidNodeMap uuid_node_map_
std::map< IFMapNode *, std::string > NodeUuidMap
IFMapUuidMapper uuid_mapper_
PendingVmRegMap pending_vmreg_map_
PendingVmRegMap::size_type PendingVmRegCount()
DBTable::ListenerId vm_lid_
void CleanupPendingVmRegEntry(const std::string &vm_uuid)
std::map< std::string, std::string > PendingVmRegMap
NodeUuidMap::size_type NodeUuidMapCount()
IFMapUuidMapper::Sz_t UuidMapperCount()
IFMapServer * ifmap_server_
DBTable::ListenerId vm_listener_id()
IFMapServerTable * vm_table_
NodeUuidMap node_uuid_map_
static std::string UuidToString(const boost::uuids::uuid &id)