fsid,
daemon_id,
image=DEFAULT_IMAGE):
- # type: (CephadmContext, str, Union[int, str], Dict, str) -> None
+ # type: (CephadmContext, str, Union[int, str], str) -> None
self.ctx = ctx
self.fsid = fsid
self.daemon_id = daemon_id
@classmethod
def init(cls, ctx, fsid, daemon_id):
- # type: (CephadmContext, str, Union[int, str]) -> CephIscsi
- return cls(ctx, fsid, daemon_id,
- get_parm(ctx.config_json), ctx.image)
+ # type: (CephadmContext, str, Union[int, str]) -> CephExporter
+ return cls(ctx, fsid, daemon_id, get_parm(ctx.config_json), ctx.image)
@staticmethod
def get_container_mounts():
config=config, keyring=keyring,
reconfig=ctx.reconfig,
ports=daemon_ports)
-
+
elif daemon_type == CephExporter.daemon_type:
if not ctx.reconfig and not redeploy and not daemon_ports:
daemon_ports = list(CephExporter.port_map.values())
using std::string;
-const std::array<EntityName::str_to_entity_type_t, 7> EntityName::STR_TO_ENTITY_TYPE = {{
+const std::array<EntityName::str_to_entity_type_t, 6> EntityName::STR_TO_ENTITY_TYPE = {{
{ CEPH_ENTITY_TYPE_AUTH, "auth" },
{ CEPH_ENTITY_TYPE_MON, "mon" },
{ CEPH_ENTITY_TYPE_OSD, "osd" },
{ CEPH_ENTITY_TYPE_MDS, "mds" },
{ CEPH_ENTITY_TYPE_MGR, "mgr" },
- { CEPH_ENTITY_TYPE_EXPORTER, "exporter" },
{ CEPH_ENTITY_TYPE_CLIENT, "client" },
}};
bool is_mds() const { return get_type() == CEPH_ENTITY_TYPE_MDS; }
bool is_client() const { return get_type() == CEPH_ENTITY_TYPE_CLIENT; }
bool is_mon() const { return get_type() == CEPH_ENTITY_TYPE_MON; }
- bool is_exporter() const { return get_type() == CEPH_ENTITY_TYPE_EXPORTER; }
std::string_view get_type_name() const;
const std::string &get_id() const;
uint32_t type;
const char *str;
};
- static const std::array<str_to_entity_type_t, 7> STR_TO_ENTITY_TYPE;
+ static const std::array<str_to_entity_type_t, 6> STR_TO_ENTITY_TYPE;
uint32_t type = 0;
std::string id;
#define CEPH_ENTITY_TYPE_CLIENT 0x08
#define CEPH_ENTITY_TYPE_MGR 0x10
#define CEPH_ENTITY_TYPE_AUTH 0x20
-#define CEPH_ENTITY_TYPE_EXPORTER 0x30
#define CEPH_ENTITY_TYPE_ANY 0xFF
} else if (s.find("mgr.") == 0) {
_type = TYPE_MGR;
start += 4;
- } else if (s.find("exporter.") == 0) {
- _type = TYPE_EXPORTER;
- start += 8;
} else {
return false;
}
static const int TYPE_OSD = CEPH_ENTITY_TYPE_OSD;
static const int TYPE_CLIENT = CEPH_ENTITY_TYPE_CLIENT;
static const int TYPE_MGR = CEPH_ENTITY_TYPE_MGR;
- static const int TYPE_EXPORTER = CEPH_ENTITY_TYPE_EXPORTER;
static const int64_t NEW = -1;
static entity_name_t OSD(int64_t i=NEW) { return entity_name_t(TYPE_OSD, i); }
static entity_name_t CLIENT(int64_t i=NEW) { return entity_name_t(TYPE_CLIENT, i); }
static entity_name_t MGR(int64_t i=NEW) { return entity_name_t(TYPE_MGR, i); }
- static entity_name_t EXPORTER(int64_t i=NEW) { return entity_name_t(TYPE_EXPORTER, i); }
int64_t num() const { return _num; }
int type() const { return _type; }
bool is_osd() const { return type() == TYPE_OSD; }
bool is_mon() const { return type() == TYPE_MON; }
bool is_mgr() const { return type() == TYPE_MGR; }
- bool is_exporter() const { return type() == TYPE_EXPORTER; }
operator ceph_entity_name() const {
ceph_entity_name n = { _type, ceph_le64(_num) };
'hostname': dd.hostname,
'url': build_url(host=addr, port=port).lstrip('/')
})
-
+
# scrape ceph exporters
for dd in self.mgr.cache.get_daemons_by_service('exporter'):
assert dd.hostname is not None