| 115 | } |
| 116 | |
| 117 | void DeviceMgr::ClearContainers(gtl::ArraySlice<string> containers) const { |
| 118 | Status s; |
| 119 | for (const auto& dev : devices_) { |
| 120 | if (containers.empty()) { |
| 121 | s.Update(dev->resource_manager()->Cleanup( |
| 122 | dev->resource_manager()->default_container())); |
| 123 | } else { |
| 124 | for (const string& c : containers) { |
| 125 | s.Update(dev->resource_manager()->Cleanup(c)); |
| 126 | } |
| 127 | } |
| 128 | if (!s.ok()) { |
| 129 | LOG(WARNING) << s; |
| 130 | } |
| 131 | } |
| 132 | } |
| 133 | |
| 134 | int DeviceMgr::NumDeviceType(const string& type) const { |
| 135 | auto iter = device_type_counts_.find(type); |
no test coverage detected