Fix some bugs when testing opensds ansible
[stor4nfv.git] / src / ceph / src / mgr / MgrSession.h
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
3
4 #ifndef CEPH_MGR_MGRSESSION_H
5 #define CEPH_MGR_MGRSESSION_H
6
7 #include "common/RefCountedObj.h"
8 #include "common/entity_name.h"
9 #include "msg/msg_types.h"
10 #include "mon/MonCap.h"
11
12
13 /**
14  * Session state associated with the Connection.
15  */
16 struct MgrSession : public RefCountedObject {
17   uint64_t global_id = 0;
18   EntityName entity_name;
19   entity_inst_t inst;
20
21   int osd_id = -1;  ///< osd id (if an osd)
22
23   // mon caps are suitably generic for mgr
24   MonCap caps;
25
26   std::set<std::string> declared_types;
27
28   MgrSession(CephContext *cct) : RefCountedObject(cct, 0) {}
29   ~MgrSession() override {}
30 };
31
32 typedef boost::intrusive_ptr<MgrSession> MgrSessionRef;
33
34
35 #endif