Description
It makes more sense to return port resource for a given role, rather than all ports in Resources.
In mesos/resource.hpp:
Option<Value::Ranges> Resources::ports(const string& role = "*");
// Check whether Resources have the given number (num_port) of ports, and return the begin number of the port range.
Option<long> Resources::getPorts(long num_port, const string& role = "*");