{"action":"created","comment":{"url":"https://api.github.com/repos/Normation/rudder/pulls/comments/43110860","id":43110860,"diff_hunk":"@@ -32,76 +32,115 @@\n *************************************************************************************\n */\n \n-package com.normation.cfclerk.services.impl\n-\n-import com.normation.cfclerk.services._\n-import com.normation.cfclerk.domain._\n-import com.normation.cfclerk.exceptions._\n-import com.normation.stringtemplate.language._\n-import com.normation.stringtemplate.language.formatter._\n-import java.io._\n-import net.liftweb.common._\n-import org.antlr.stringtemplate._\n-import org.antlr.stringtemplate.language._\n-import org.apache.commons.io.{IOUtils,FileUtils}\n-import org.joda.time._\n-import org.xml.sax.SAXParseException\n-import scala.io.Source\n-import scala.xml._\n-\n-import com.normation.utils.Control.sequence\n+package com.normation.rudder.services.policies.write\n+\n+import com.normation.cfclerk.domain.Bundle\n+import com.normation.cfclerk.domain.Cf3PromisesFileTemplateId\n+import com.normation.cfclerk.domain.PARAMETER_VARIABLE\n+import com.normation.cfclerk.domain.SectionVariableSpec\n+import com.normation.cfclerk.domain.SystemVariable\n+import com.normation.cfclerk.domain.SystemVariableSpec\n+import com.normation.cfclerk.domain.Technique\n+import com.normation.cfclerk.domain.TechniqueId\n+import com.normation.cfclerk.domain.TrackerVariable\n+import com.normation.cfclerk.domain.TrackerVariableSpec\n+import com.normation.cfclerk.domain.Variable\n+import com.normation.cfclerk.exceptions.VariableException\n+import com.normation.cfclerk.services.SystemVariableSpecService\n+import com.normation.cfclerk.services.TechniqueRepository\n+import com.normation.inventory.domain.COMMUNITY_AGENT\n+import com.normation.inventory.domain.NOVA_AGENT\n+import com.normation.inventory.domain.NodeId\n+import com.normation.rudder.domain.reports.NodeConfigId\n+import com.normation.rudder.services.policies.BundleOrder\n+import com.normation.rudder.services.policies.nodeconfig.NodeConfiguration\n+import org.joda.time.DateTime\n+import net.liftweb.common.Box\n+import net.liftweb.common.EmptyBox\n+import net.liftweb.common.Full\n+import net.liftweb.common.Loggable\n+\n+\n+trait PrepareTemplateVariables {","path":"rudder-core/src/main/scala/com/normation/rudder/services/policies/write/PrepareTemplateVariables.scala","position":51,"original_position":51,"commit_id":"8f0cdb70b396e332c8a744510d6ef17c4f0fa231","original_commit_id":"8f0cdb70b396e332c8a744510d6ef17c4f0fa231","user":{"login":"fanf","id":44649,"avatar_url":"https://avatars.githubusercontent.com/u/44649?v=3","gravatar_id":"","url":"https://api.github.com/users/fanf","html_url":"https://github.com/fanf","followers_url":"https://api.github.com/users/fanf/followers","following_url":"https://api.github.com/users/fanf/following{/other_user}","gists_url":"https://api.github.com/users/fanf/gists{/gist_id}","starred_url":"https://api.github.com/users/fanf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fanf/subscriptions","organizations_url":"https://api.github.com/users/fanf/orgs","repos_url":"https://api.github.com/users/fanf/repos","events_url":"https://api.github.com/users/fanf/events{/privacy}","received_events_url":"https://api.github.com/users/fanf/received_events","type":"User","site_admin":false},"body":"Well, it allows to see with one eyedrop what is the only public interface. And it's on the same file, so I think it's not a big deal. ","created_at":"2015-10-27T11:42:29Z","updated_at":"2015-10-27T11:42:29Z","html_url":"https://github.com/Normation/rudder/pull/921#discussion_r43110860","pull_request_url":"https://api.github.com/repos/Normation/rudder/pulls/921","_links":{"self":{"href":"https://api.github.com/repos/Normation/rudder/pulls/comments/43110860"},"html":{"href":"https://github.com/Normation/rudder/pull/921#discussion_r43110860"},"pull_request":{"href":"https://api.github.com/repos/Normation/rudder/pulls/921"}}},"pull_request":{"url":"https://api.github.com/repos/Normation/rudder/pulls/921","id":44128320,"html_url":"https://github.com/Normation/rudder/pull/921","diff_url":"https://github.com/Normation/rudder/pull/921.diff","patch_url":"https://github.com/Normation/rudder/pull/921.patch","issue_url":"https://api.github.com/repos/Normation/rudder/issues/921","number":921,"state":"open","locked":false,"title":"WIP - Don't merge - Refactoring and cleaning things thanks to cfclerk merge","user":{"login":"fanf","id":44649,"avatar_url":"https://avatars.githubusercontent.com/u/44649?v=3","gravatar_id":"","url":"https://api.github.com/users/fanf","html_url":"https://github.com/fanf","followers_url":"https://api.github.com/users/fanf/followers","following_url":"https://api.github.com/users/fanf/following{/other_user}","gists_url":"https://api.github.com/users/fanf/gists{/gist_id}","starred_url":"https://api.github.com/users/fanf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fanf/subscriptions","organizations_url":"https://api.github.com/users/fanf/orgs","repos_url":"https://api.github.com/users/fanf/repos","events_url":"https://api.github.com/users/fanf/events{/privacy}","received_events_url":"https://api.github.com/users/fanf/received_events","type":"User","site_admin":false},"body":"Main things are:\r\n- cleanly separate and enumarate in a for loop the different steps\r\n  of the \"write promises\" part\r\n- remove the different *CF3FilePromiseWriterService\r\n- merge RudderCf3PolicyDraft and Cf3PolicyDraft\r\n- put everyting dealing with removing technique from node in nodeConfigurationServie.sanitize\r\n- clean a lot Cf3PromisesFileWriterService\r\n- simplify and make immutable Cf3PromiseContainer\r\n- remove some unused tests\r\n- Put eventlogrepos with eventlogs (just a move)\r\n\r\nThis is just WIP, don't merge. ","created_at":"2015-09-03T16:29:06Z","updated_at":"2015-10-27T11:42:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1346dd6ec0a041e5434af7a11eb8d127eae18373","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Normation/rudder/pulls/921/commits","review_comments_url":"https://api.github.com/repos/Normation/rudder/pulls/921/comments","review_comment_url":"https://api.github.com/repos/Normation/rudder/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Normation/rudder/issues/921/comments","statuses_url":"https://api.github.com/repos/Normation/rudder/statuses/8f0cdb70b396e332c8a744510d6ef17c4f0fa231","head":{"label":"fanf:ust_6823/generate_promise_directive_by_directive","ref":"ust_6823/generate_promise_directive_by_directive","sha":"8f0cdb70b396e332c8a744510d6ef17c4f0fa231","user":{"login":"fanf","id":44649,"avatar_url":"https://avatars.githubusercontent.com/u/44649?v=3","gravatar_id":"","url":"https://api.github.com/users/fanf","html_url":"https://github.com/fanf","followers_url":"https://api.github.com/users/fanf/followers","following_url":"https://api.github.com/users/fanf/following{/other_user}","gists_url":"https://api.github.com/users/fanf/gists{/gist_id}","starred_url":"https://api.github.com/users/fanf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fanf/subscriptions","organizations_url":"https://api.github.com/users/fanf/orgs","repos_url":"https://api.github.com/users/fanf/repos","events_url":"https://api.github.com/users/fanf/events{/privacy}","received_events_url":"https://api.github.com/users/fanf/received_events","type":"User","site_admin":false},"repo":{"id":6705258,"name":"rudder","full_name":"fanf/rudder","owner":{"login":"fanf","id":44649,"avatar_url":"https://avatars.githubusercontent.com/u/44649?v=3","gravatar_id":"","url":"https://api.github.com/users/fanf","html_url":"https://github.com/fanf","followers_url":"https://api.github.com/users/fanf/followers","following_url":"https://api.github.com/users/fanf/following{/other_user}","gists_url":"https://api.github.com/users/fanf/gists{/gist_id}","starred_url":"https://api.github.com/users/fanf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fanf/subscriptions","organizations_url":"https://api.github.com/users/fanf/orgs","repos_url":"https://api.github.com/users/fanf/repos","events_url":"https://api.github.com/users/fanf/events{/privacy}","received_events_url":"https://api.github.com/users/fanf/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fanf/rudder","description":"","fork":true,"url":"https://api.github.com/repos/fanf/rudder","forks_url":"https://api.github.com/repos/fanf/rudder/forks","keys_url":"https://api.github.com/repos/fanf/rudder/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fanf/rudder/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fanf/rudder/teams","hooks_url":"https://api.github.com/repos/fanf/rudder/hooks","issue_events_url":"https://api.github.com/repos/fanf/rudder/issues/events{/number}","events_url":"https://api.github.com/repos/fanf/rudder/events","assignees_url":"https://api.github.com/repos/fanf/rudder/assignees{/user}","branches_url":"https://api.github.com/repos/fanf/rudder/branches{/branch}","tags_url":"https://api.github.com/repos/fanf/rudder/tags","blobs_url":"https://api.github.com/repos/fanf/rudder/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fanf/rudder/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fanf/rudder/git/refs{/sha}","trees_url":"https://api.github.com/repos/fanf/rudder/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fanf/rudder/statuses/{sha}","languages_url":"https://api.github.com/repos/fanf/rudder/languages","stargazers_url":"https://api.github.com/repos/fanf/rudder/stargazers","contributors_url":"https://api.github.com/repos/fanf/rudder/contributors","subscribers_url":"https://api.github.com/repos/fanf/rudder/subscribers","subscription_url":"https://api.github.com/repos/fanf/rudder/subscription","commits_url":"https://api.github.com/repos/fanf/rudder/commits{/sha}","git_commits_url":"https://api.github.com/repos/fanf/rudder/git/commits{/sha}","comments_url":"https://api.github.com/repos/fanf/rudder/comments{/number}","issue_comment_url":"https://api.github.com/repos/fanf/rudder/issues/comments{/number}","contents_url":"https://api.github.com/repos/fanf/rudder/contents/{+path}","compare_url":"https://api.github.com/repos/fanf/rudder/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fanf/rudder/merges","archive_url":"https://api.github.com/repos/fanf/rudder/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fanf/rudder/downloads","issues_url":"https://api.github.com/repos/fanf/rudder/issues{/number}","pulls_url":"https://api.github.com/repos/fanf/rudder/pulls{/number}","milestones_url":"https://api.github.com/repos/fanf/rudder/milestones{/number}","notifications_url":"https://api.github.com/repos/fanf/rudder/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fanf/rudder/labels{/name}","releases_url":"https://api.github.com/repos/fanf/rudder/releases{/id}","created_at":"2012-11-15T13:39:53Z","updated_at":"2014-06-06T15:06:41Z","pushed_at":"2015-10-27T10:29:54Z","git_url":"git://github.com/fanf/rudder.git","ssh_url":"git@github.com:fanf/rudder.git","clone_url":"https://github.com/fanf/rudder.git","svn_url":"https://github.com/fanf/rudder","homepage":"http://www.rudder-project.org/","size":19666,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Normation:master","ref":"master","sha":"e78a38edf83f3efe6fc9b302e10bdb0b6721fdac","user":{"login":"Normation","id":695105,"avatar_url":"https://avatars.githubusercontent.com/u/695105?v=3","gravatar_id":"","url":"https://api.github.com/users/Normation","html_url":"https://github.com/Normation","followers_url":"https://api.github.com/users/Normation/followers","following_url":"https://api.github.com/users/Normation/following{/other_user}","gists_url":"https://api.github.com/users/Normation/gists{/gist_id}","starred_url":"https://api.github.com/users/Normation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Normation/subscriptions","organizations_url":"https://api.github.com/users/Normation/orgs","repos_url":"https://api.github.com/users/Normation/repos","events_url":"https://api.github.com/users/Normation/events{/privacy}","received_events_url":"https://api.github.com/users/Normation/received_events","type":"Organization","site_admin":false},"repo":{"id":2528254,"name":"rudder","full_name":"Normation/rudder","owner":{"login":"Normation","id":695105,"avatar_url":"https://avatars.githubusercontent.com/u/695105?v=3","gravatar_id":"","url":"https://api.github.com/users/Normation","html_url":"https://github.com/Normation","followers_url":"https://api.github.com/users/Normation/followers","following_url":"https://api.github.com/users/Normation/following{/other_user}","gists_url":"https://api.github.com/users/Normation/gists{/gist_id}","starred_url":"https://api.github.com/users/Normation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Normation/subscriptions","organizations_url":"https://api.github.com/users/Normation/orgs","repos_url":"https://api.github.com/users/Normation/repos","events_url":"https://api.github.com/users/Normation/events{/privacy}","received_events_url":"https://api.github.com/users/Normation/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Normation/rudder","description":"","fork":false,"url":"https://api.github.com/repos/Normation/rudder","forks_url":"https://api.github.com/repos/Normation/rudder/forks","keys_url":"https://api.github.com/repos/Normation/rudder/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Normation/rudder/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Normation/rudder/teams","hooks_url":"https://api.github.com/repos/Normation/rudder/hooks","issue_events_url":"https://api.github.com/repos/Normation/rudder/issues/events{/number}","events_url":"https://api.github.com/repos/Normation/rudder/events","assignees_url":"https://api.github.com/repos/Normation/rudder/assignees{/user}","branches_url":"https://api.github.com/repos/Normation/rudder/branches{/branch}","tags_url":"https://api.github.com/repos/Normation/rudder/tags","blobs_url":"https://api.github.com/repos/Normation/rudder/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Normation/rudder/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Normation/rudder/git/refs{/sha}","trees_url":"https://api.github.com/repos/Normation/rudder/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Normation/rudder/statuses/{sha}","languages_url":"https://api.github.com/repos/Normation/rudder/languages","stargazers_url":"https://api.github.com/repos/Normation/rudder/stargazers","contributors_url":"https://api.github.com/repos/Normation/rudder/contributors","subscribers_url":"https://api.github.com/repos/Normation/rudder/subscribers","subscription_url":"https://api.github.com/repos/Normation/rudder/subscription","commits_url":"https://api.github.com/repos/Normation/rudder/commits{/sha}","git_commits_url":"https://api.github.com/repos/Normation/rudder/git/commits{/sha}","comments_url":"https://api.github.com/repos/Normation/rudder/comments{/number}","issue_comment_url":"https://api.github.com/repos/Normation/rudder/issues/comments{/number}","contents_url":"https://api.github.com/repos/Normation/rudder/contents/{+path}","compare_url":"https://api.github.com/repos/Normation/rudder/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Normation/rudder/merges","archive_url":"https://api.github.com/repos/Normation/rudder/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Normation/rudder/downloads","issues_url":"https://api.github.com/repos/Normation/rudder/issues{/number}","pulls_url":"https://api.github.com/repos/Normation/rudder/pulls{/number}","milestones_url":"https://api.github.com/repos/Normation/rudder/milestones{/number}","notifications_url":"https://api.github.com/repos/Normation/rudder/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Normation/rudder/labels{/name}","releases_url":"https://api.github.com/repos/Normation/rudder/releases{/id}","created_at":"2011-10-06T19:27:50Z","updated_at":"2015-10-09T08:25:15Z","pushed_at":"2015-10-27T10:29:55Z","git_url":"git://github.com/Normation/rudder.git","ssh_url":"git@github.com:Normation/rudder.git","clone_url":"https://github.com/Normation/rudder.git","svn_url":"https://github.com/Normation/rudder","homepage":"http://www.rudder-project.org/","size":21664,"stargazers_count":47,"watchers_count":47,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":14,"mirror_url":null,"open_issues_count":4,"forks":14,"open_issues":4,"watchers":47,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Normation/rudder/pulls/921"},"html":{"href":"https://github.com/Normation/rudder/pull/921"},"issue":{"href":"https://api.github.com/repos/Normation/rudder/issues/921"},"comments":{"href":"https://api.github.com/repos/Normation/rudder/issues/921/comments"},"review_comments":{"href":"https://api.github.com/repos/Normation/rudder/pulls/921/comments"},"review_comment":{"href":"https://api.github.com/repos/Normation/rudder/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Normation/rudder/pulls/921/commits"},"statuses":{"href":"https://api.github.com/repos/Normation/rudder/statuses/8f0cdb70b396e332c8a744510d6ef17c4f0fa231"}}}}