return ret;
}
-const std::string& DaosZoneGroup::get_endpoint() const {
- if (!group.endpoints.empty()) {
- return group.endpoints.front();
- } else {
- // use zonegroup's master zone endpoints
- auto z = group.zones.find(group.master_zone);
- if (z != group.zones.end() && !z->second.endpoints.empty()) {
- return z->second.endpoints.front();
- }
- }
- return empty;
-}
-
bool DaosZoneGroup::placement_target_exists(std::string& target) const {
return !!group.placement_targets.count(target);
}
virtual int equals(const std::string& other_zonegroup) const override {
return group.equals(other_zonegroup);
};
- /** Get the endpoint from zonegroup, or from master zone if not set */
- virtual const std::string& get_endpoint() const override;
virtual bool placement_target_exists(std::string& target) const override;
virtual bool is_master_zonegroup() const override {
return group.is_master_zonegroup();
m0_client_fini(this->instance, true);
}
-const std::string& MotrZoneGroup::get_endpoint() const
-{
- if (!group.endpoints.empty()) {
- return group.endpoints.front();
- } else {
- // use zonegroup's master zone endpoints
- auto z = group.zones.find(group.master_zone);
- if (z != group.zones.end() && !z->second.endpoints.empty()) {
- return z->second.endpoints.front();
- }
- }
- return empty;
-}
-
bool MotrZoneGroup::placement_target_exists(std::string& target) const
{
return !!group.placement_targets.count(target);
virtual int equals(const std::string& other_zonegroup) const override {
return group.equals(other_zonegroup);
};
- /** Get the endpoint from zonegroup, or from master zone if not set */
- virtual const std::string& get_endpoint() const override;
virtual bool placement_target_exists(std::string& target) const override;
virtual bool is_master_zonegroup() const override {
return group.is_master_zonegroup();
if_match, if_nomatch, user_data, zones_trace, canceled, rctx);
}
-const std::string& RadosZoneGroup::get_endpoint() const
-{
- if (!group.endpoints.empty()) {
- return group.endpoints.front();
- } else {
- // use zonegroup's master zone endpoints
- auto z = group.zones.find(group.master_zone);
- if (z != group.zones.end() && !z->second.endpoints.empty()) {
- return z->second.endpoints.front();
- }
- }
- return empty;
-}
-
bool RadosZoneGroup::placement_target_exists(std::string& target) const
{
return !!group.placement_targets.count(target);
virtual int equals(const std::string& other_zonegroup) const override {
return group.equals(other_zonegroup);
};
- /** Get the endpoint from zonegroup, or from master zone if not set */
- virtual const std::string& get_endpoint() const override;
virtual bool placement_target_exists(std::string& target) const override;
virtual bool is_master_zonegroup() const override {
return group.is_master_zonegroup();
virtual const std::string& get_name() const = 0;
/** Determine if two zonegroups are the same */
virtual int equals(const std::string& other_zonegroup) const = 0;
- /** Get the endpoint from zonegroup, or from master zone if not set */
- virtual const std::string& get_endpoint() const = 0;
/** Check if a placement target (by name) exists in this zonegroup */
virtual bool placement_target_exists(std::string& target) const = 0;
/** Check if this is the master zonegroup */
dbsm->destroyAllHandles();
}
- const std::string& DBZoneGroup::get_endpoint() const {
- if (!group->endpoints.empty()) {
- return group->endpoints.front();
- } else {
- // use zonegroup's master zone endpoints
- auto z = group->zones.find(group->master_zone);
- if (z != group->zones.end() && !z->second.endpoints.empty()) {
- return z->second.endpoints.front();
- }
- }
- return empty;
- }
-
bool DBZoneGroup::placement_target_exists(std::string& target) const {
return !!group->placement_targets.count(target);
}
virtual int equals(const std::string& other_zonegroup) const override {
return group->equals(other_zonegroup);
};
- /** Get the endpoint from zonegroup, or from master zone if not set */
- virtual const std::string& get_endpoint() const override;
virtual bool placement_target_exists(std::string& target) const override;
virtual bool is_master_zonegroup() const override {
return group->is_master_zonegroup();
{ return next->get_name(); }
virtual int equals(const std::string& other_zonegroup) const override
{ return next->equals(other_zonegroup); }
- virtual const std::string& get_endpoint() const override
- { return next->get_endpoint(); }
virtual bool placement_target_exists(std::string& target) const override
{ return next->placement_target_exists(target); }
virtual bool is_master_zonegroup() const override