Skip to content
This repository has been archived by the owner on Feb 8, 2019. It is now read-only.

Conversation

fanf
Copy link
Member

@fanf fanf commented Sep 21, 2017


case Post( "reload" :: Nil, req) => {
implicit val prettify = extractor.extractPrettify(req.params)
implicit val action = "reloadAllDatasourcesAllNodes"
val actor = RestUtils.getActor(req)

apiService.reloadDataAllNodes(actor)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WHy do you remove it ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hum. No idea, it was not supposed to be done.

@@ -9,5 +9,6 @@ target*
.externalToolBuilders
datasources/
files.txz
scripts.txz
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you include scripts.txz ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because it was not included in the gitignore but is a side product of compilation. It must not be commited.

@VinceMacBuche
Copy link
Member

Two litle remarks that are not related with the fix

Nice fix though, Nice it can clean 'deleted' datasource!

Copy link
Member

@ncharles ncharles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some simple messages to change. The rest looks good to me, but Vincent should have a look


apiService.clearDataAllNodesFor(actor, DataSourceId(datasourceId)) match {
case Full(_) => toJsonResponse(None, JString(s"Data for all nodes, for data source '${datasourceId}', cleared"))
case eb:EmptyBox => toJsonError(None, JString((eb ?~! "Could not clear data source property").messageChain))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add the datasourceId in the message ?

@@ -130,7 +152,7 @@ class DataSourceApi9 (
}

case Delete(sourceId :: Nil, req) => {
response(apiService.deleteSource(DataSourceId(sourceId)), req, "Could not delete data sources", None)("getDataSource")
response(apiService.deleteSource(DataSourceId(sourceId)), req, "Could not delete data sources", None)("deteteDataSource")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add also here the data source id ?

@fanf
Copy link
Member Author

fanf commented Sep 22, 2017

PR rebased

@fanf fanf force-pushed the bug_11412/can_not_delete_a_node_property_set_by_datasources branch from 5721872 to bbf3034 Compare September 22, 2017 08:44
@Normation-Quality-Assistant

OK, merging this PR

@Normation-Quality-Assistant Normation-Quality-Assistant merged commit bbf3034 into Normation:branches/rudder/4.1 Sep 22, 2017
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants