Exemple #1
0
void handle_rc_list_zones(const std::string &method, const std::string &connection_id, const std::string &request_id, const std::vector<std::string> &params) {
	std::vector<uint32> zones;
	zoneserver_list.GetZoneIDList(zones);

	std::map<std::string, std::string> res;
	uint32 sz = (uint32)zones.size();
	for(uint32 i = 0; i < sz; ++i) {
		res[itoa(i)] = (itoa(zones[i]));
	}
	
	std::string error;
	RemoteCallResponse(connection_id, request_id, res, error);
}
Exemple #2
0
//returns an array of zone_refs (opaque)
vector<string> EQW::ListBootedZones() {
	vector<string> res;
	
	vector<int32> zones;
	zoneserver_list.GetZoneIDList(zones);
	
	vector<int32>::iterator cur, end;
	cur = zones.begin();
	end = zones.end();
	for(; cur != end; cur++) {
		res.push_back(itoa(*cur));
	}
	
	return(res);
}