| 163 | } |
| 164 | |
| 165 | Status ComputePolicy(const string& attr_container, |
| 166 | const string& attr_shared_name, |
| 167 | bool use_node_name_as_default, string* result) { |
| 168 | ContainerInfo cinfo; |
| 169 | ResourceMgr rmgr; |
| 170 | NodeDef ndef; |
| 171 | ndef.set_name("foo"); |
| 172 | if (attr_container != "none") { |
| 173 | AddNodeAttr("container", attr_container, &ndef); |
| 174 | } |
| 175 | if (attr_shared_name != "none") { |
| 176 | AddNodeAttr("shared_name", attr_shared_name, &ndef); |
| 177 | } |
| 178 | TF_RETURN_IF_ERROR(cinfo.Init(&rmgr, ndef, use_node_name_as_default)); |
| 179 | *result = cinfo.DebugString(); |
| 180 | return Status::OK(); |
| 181 | } |
| 182 | |
| 183 | string Policy(const string& attr_container, const string& attr_shared_name, |
| 184 | bool use_node_name_as_default) { |
no test coverage detected