Validates that revocable and non-revocable resources of the same name do not exist. TODO(vinod): Is this the right place to do this?
| 940 | // |
| 941 | // TODO(vinod): Is this the right place to do this? |
| 942 | Option<Error> validateRevocableAndNonRevocableResources( |
| 943 | const Resources& _resources) |
| 944 | { |
| 945 | foreach (const string& name, _resources.names()) { |
| 946 | Resources resources = _resources.get(name); |
| 947 | if (!resources.revocable().empty() && resources != resources.revocable()) { |
| 948 | return Error("Cannot use both revocable and non-revocable '" + name + |
| 949 | "' at the same time"); |
| 950 | } |
| 951 | } |
| 952 | |
| 953 | return None(); |
| 954 | } |
| 955 | |
| 956 | |
| 957 | // Validates that all the given resources are persistent volumes. |
no test coverage detected