(self, name: str, project: str, commit: bool = True)
| 1216 | self.commit() |
| 1217 | |
| 1218 | def delete_entity(self, name: str, project: str, commit: bool = True): |
| 1219 | self._prepare_registry_for_changes(project) |
| 1220 | assert self.cached_registry_proto |
| 1221 | |
| 1222 | for idx, existing_entity_proto in enumerate( |
| 1223 | self.cached_registry_proto.entities |
| 1224 | ): |
| 1225 | if ( |
| 1226 | existing_entity_proto.spec.name == name |
| 1227 | and existing_entity_proto.spec.project == project |
| 1228 | ): |
| 1229 | del self.cached_registry_proto.entities[idx] |
| 1230 | if commit: |
| 1231 | self.commit() |
| 1232 | return |
| 1233 | |
| 1234 | raise EntityNotFoundException(name, project) |
| 1235 | |
| 1236 | def apply_saved_dataset( |
| 1237 | self, |
no test coverage detected