Github user aledsage commented on a diff in the pull request:
https://github.com/apache/incubator-brooklyn/pull/47#discussion_r14718543
--- Diff:
usage/rest-server/src/main/java/brooklyn/rest/resources/CatalogResource.java ---
@@ -98,6 +100,20 @@ public Response create(String yaml) {
}
}
+ public Response resetXml(String xml) {
+
((BasicBrooklynCatalog)mgmt().getCatalog()).reset(CatalogDto.newDtoFromXmlContents(xml,
"REST reset"));
--- End diff --
It feels confusing when code like this, which is using the Catalog API,
should use methods on `CatalogDto` versus on the catalog directly. For example,
the `BasicBrooklynCatalog.toXmlString` is how I'd generate the XML, but I'd
need to call `CatalogDto.newDtoFromXmlContents` to convert the XML back to a
DTO (which is in the internal package name).
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---