MCPcopy Create free account
hub / github.com/ceph/ceph / _parse_method_list

Method _parse_method_list

src/auth/AuthRegistry.cc:62–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60
61
62void AuthRegistry::_parse_method_list(const string& s,
63 std::vector<uint32_t> *v)
64{
65 std::list<std::string> sup_list;
66 get_str_list(s, sup_list);
67 if (sup_list.empty()) {
68 lderr(cct) << "WARNING: empty auth protocol list" << dendl;
69 }
70 v->clear();
71 for (auto& i : sup_list) {
72 ldout(cct, 5) << "adding auth protocol: " << i << dendl;
73 if (i == "cephx") {
74 v->push_back(CEPH_AUTH_CEPHX);
75 } else if (i == "none") {
76 v->push_back(CEPH_AUTH_NONE);
77 } else if (i == "gss") {
78 v->push_back(CEPH_AUTH_GSS);
79 } else {
80 lderr(cct) << "WARNING: unknown auth protocol defined: " << i << dendl;
81 }
82 }
83 if (v->empty()) {
84 lderr(cct) << "WARNING: no auth protocol defined" << dendl;
85 }
86 ldout(cct,20) << __func__ << " " << s << " -> " << *v << dendl;
87}
88
89void AuthRegistry::_parse_mode_list(const string& s,
90 std::vector<uint32_t> *v)

Callers

nothing calls this directly

Calls 4

get_str_listFunction · 0.50
emptyMethod · 0.45
clearMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected