{"action":"opened","number":54,"pull_request":{"url":"https://api.github.com/repos/salt-formulas/reclass/pulls/54","id":200946572,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAwOTQ2NTcy","html_url":"https://github.com/salt-formulas/reclass/pull/54","diff_url":"https://github.com/salt-formulas/reclass/pull/54.diff","patch_url":"https://github.com/salt-formulas/reclass/pull/54.patch","issue_url":"https://api.github.com/repos/salt-formulas/reclass/issues/54","number":54,"state":"open","locked":false,"title":"add fixed/immutable parameter prefix","user":{"login":"AndrewPickford","id":9655547,"node_id":"MDQ6VXNlcjk2NTU1NDc=","avatar_url":"https://avatars3.githubusercontent.com/u/9655547?v=4","gravatar_id":"","url":"https://api.github.com/users/AndrewPickford","html_url":"https://github.com/AndrewPickford","followers_url":"https://api.github.com/users/AndrewPickford/followers","following_url":"https://api.github.com/users/AndrewPickford/following{/other_user}","gists_url":"https://api.github.com/users/AndrewPickford/gists{/gist_id}","starred_url":"https://api.github.com/users/AndrewPickford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndrewPickford/subscriptions","organizations_url":"https://api.github.com/users/AndrewPickford/orgs","repos_url":"https://api.github.com/users/AndrewPickford/repos","events_url":"https://api.github.com/users/AndrewPickford/events{/privacy}","received_events_url":"https://api.github.com/users/AndrewPickford/received_events","type":"User","site_admin":false},"body":"This adds a parameter prefix ('=') that makes a parameter fixed or immutable, ie later merges on top of this parameter either generate an error or do not change the parameter (depending on an option setting [_ignore_merging_onto_fixed_]).\r\n\r\nFor example with:\r\n```yaml\r\n# nodes/node1.yml\r\nclasses:\r\n- first\r\n- second\r\n\r\n# classes/first.yml\r\nparameters:\r\n =A: 1\r\n\r\n# classes/second.yml\r\nparameters:\r\n A: 2\r\n```\r\n\r\nreclass would if _ignore_merging_onto_fixed_ was false raise an error on the attempt to change the value of A in second.yml or if _ignore_merging_onto_fixed_ was true the parameter A would be evaluated to 1 and the attempt to change A in second.yml would be ignored.\r\n\r\nThis is an alternative way of fixing a parameter value rather than repeatedly loading a class (#34).\r\n\r\nOne downside is that when a parameter is fixed and _ignore_merging_onto_fixed_ is true then the non change of the parameter is silent and makes understanding how a parameter gets it's final value more difficult. So this is a use only were necessary option.\r\n\r\nThere's also a change to the _wrap_dict, _wrap_list and _wrap_value methods in parameters.py that got convoluted with the fixed parameters. The patch removes the need to pass DictPath objects into the _wrap_dict, _wrap_list and _wrap_value methods. The DictPath objects were mostly redundant only being used if there was an error, instead try/except blocks are used to build DictPath objects only when an error occurs. This gets rid of about half of the calls to DictPath.\\_\\_init\\_\\_, giving a small speed up of a few percent.","created_at":"2018-07-12T09:51:43Z","updated_at":"2018-07-12T09:51:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/salt-formulas/reclass/pulls/54/commits","review_comments_url":"https://api.github.com/repos/salt-formulas/reclass/pulls/54/comments","review_comment_url":"https://api.github.com/repos/salt-formulas/reclass/pulls/comments{/number}","comments_url":"https://api.github.com/repos/salt-formulas/reclass/issues/54/comments","statuses_url":"https://api.github.com/repos/salt-formulas/reclass/statuses/9229823dd88096f1ba1cede9ff3d55df2b88b5bb","head":{"label":"salt-formulas:andrewp-fixed-parameters","ref":"andrewp-fixed-parameters","sha":"9229823dd88096f1ba1cede9ff3d55df2b88b5bb","user":{"login":"salt-formulas","id":20041042,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwMDQxMDQy","avatar_url":"https://avatars3.githubusercontent.com/u/20041042?v=4","gravatar_id":"","url":"https://api.github.com/users/salt-formulas","html_url":"https://github.com/salt-formulas","followers_url":"https://api.github.com/users/salt-formulas/followers","following_url":"https://api.github.com/users/salt-formulas/following{/other_user}","gists_url":"https://api.github.com/users/salt-formulas/gists{/gist_id}","starred_url":"https://api.github.com/users/salt-formulas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/salt-formulas/subscriptions","organizations_url":"https://api.github.com/users/salt-formulas/orgs","repos_url":"https://api.github.com/users/salt-formulas/repos","events_url":"https://api.github.com/users/salt-formulas/events{/privacy}","received_events_url":"https://api.github.com/users/salt-formulas/received_events","type":"Organization","site_admin":false},"repo":{"id":100495625,"node_id":"MDEwOlJlcG9zaXRvcnkxMDA0OTU2MjU=","name":"reclass","full_name":"salt-formulas/reclass","owner":{"login":"salt-formulas","id":20041042,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwMDQxMDQy","avatar_url":"https://avatars3.githubusercontent.com/u/20041042?v=4","gravatar_id":"","url":"https://api.github.com/users/salt-formulas","html_url":"https://github.com/salt-formulas","followers_url":"https://api.github.com/users/salt-formulas/followers","following_url":"https://api.github.com/users/salt-formulas/following{/other_user}","gists_url":"https://api.github.com/users/salt-formulas/gists{/gist_id}","starred_url":"https://api.github.com/users/salt-formulas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/salt-formulas/subscriptions","organizations_url":"https://api.github.com/users/salt-formulas/orgs","repos_url":"https://api.github.com/users/salt-formulas/repos","events_url":"https://api.github.com/users/salt-formulas/events{/privacy}","received_events_url":"https://api.github.com/users/salt-formulas/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/salt-formulas/reclass","description":"A recursive external node classifier for automation tools like Ansible, Puppet, and Salt","fork":true,"url":"https://api.github.com/repos/salt-formulas/reclass","forks_url":"https://api.github.com/repos/salt-formulas/reclass/forks","keys_url":"https://api.github.com/repos/salt-formulas/reclass/keys{/key_id}","collaborators_url":"https://api.github.com/repos/salt-formulas/reclass/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/salt-formulas/reclass/teams","hooks_url":"https://api.github.com/repos/salt-formulas/reclass/hooks","issue_events_url":"https://api.github.com/repos/salt-formulas/reclass/issues/events{/number}","events_url":"https://api.github.com/repos/salt-formulas/reclass/events","assignees_url":"https://api.github.com/repos/salt-formulas/reclass/assignees{/user}","branches_url":"https://api.github.com/repos/salt-formulas/reclass/branches{/branch}","tags_url":"https://api.github.com/repos/salt-formulas/reclass/tags","blobs_url":"https://api.github.com/repos/salt-formulas/reclass/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/salt-formulas/reclass/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/salt-formulas/reclass/git/refs{/sha}","trees_url":"https://api.github.com/repos/salt-formulas/reclass/git/trees{/sha}","statuses_url":"https://api.github.com/repos/salt-formulas/reclass/statuses/{sha}","languages_url":"https://api.github.com/repos/salt-formulas/reclass/languages","stargazers_url":"https://api.github.com/repos/salt-formulas/reclass/stargazers","contributors_url":"https://api.github.com/repos/salt-formulas/reclass/contributors","subscribers_url":"https://api.github.com/repos/salt-formulas/reclass/subscribers","subscription_url":"https://api.github.com/repos/salt-formulas/reclass/subscription","commits_url":"https://api.github.com/repos/salt-formulas/reclass/commits{/sha}","git_commits_url":"https://api.github.com/repos/salt-formulas/reclass/git/commits{/sha}","comments_url":"https://api.github.com/repos/salt-formulas/reclass/comments{/number}","issue_comment_url":"https://api.github.com/repos/salt-formulas/reclass/issues/comments{/number}","contents_url":"https://api.github.com/repos/salt-formulas/reclass/contents/{+path}","compare_url":"https://api.github.com/repos/salt-formulas/reclass/compare/{base}...{head}","merges_url":"https://api.github.com/repos/salt-formulas/reclass/merges","archive_url":"https://api.github.com/repos/salt-formulas/reclass/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/salt-formulas/reclass/downloads","issues_url":"https://api.github.com/repos/salt-formulas/reclass/issues{/number}","pulls_url":"https://api.github.com/repos/salt-formulas/reclass/pulls{/number}","milestones_url":"https://api.github.com/repos/salt-formulas/reclass/milestones{/number}","notifications_url":"https://api.github.com/repos/salt-formulas/reclass/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/salt-formulas/reclass/labels{/name}","releases_url":"https://api.github.com/repos/salt-formulas/reclass/releases{/id}","deployments_url":"https://api.github.com/repos/salt-formulas/reclass/deployments","created_at":"2017-08-16T14:01:03Z","updated_at":"2018-07-09T14:00:42Z","pushed_at":"2018-07-10T08:38:27Z","git_url":"git://github.com/salt-formulas/reclass.git","ssh_url":"git@github.com:salt-formulas/reclass.git","clone_url":"https://github.com/salt-formulas/reclass.git","svn_url":"https://github.com/salt-formulas/reclass","homepage":null,"size":916,"stargazers_count":12,"watchers_count":12,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":6,"mirror_url":null,"archived":false,"open_issues_count":6,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":6,"open_issues":6,"watchers":12,"default_branch":"develop"}},"base":{"label":"salt-formulas:develop","ref":"develop","sha":"581860fd8007138f7cdd359da68411d10573a8fe","user":{"login":"salt-formulas","id":20041042,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwMDQxMDQy","avatar_url":"https://avatars3.githubusercontent.com/u/20041042?v=4","gravatar_id":"","url":"https://api.github.com/users/salt-formulas","html_url":"https://github.com/salt-formulas","followers_url":"https://api.github.com/users/salt-formulas/followers","following_url":"https://api.github.com/users/salt-formulas/following{/other_user}","gists_url":"https://api.github.com/users/salt-formulas/gists{/gist_id}","starred_url":"https://api.github.com/users/salt-formulas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/salt-formulas/subscriptions","organizations_url":"https://api.github.com/users/salt-formulas/orgs","repos_url":"https://api.github.com/users/salt-formulas/repos","events_url":"https://api.github.com/users/salt-formulas/events{/privacy}","received_events_url":"https://api.github.com/users/salt-formulas/received_events","type":"Organization","site_admin":false},"repo":{"id":100495625,"node_id":"MDEwOlJlcG9zaXRvcnkxMDA0OTU2MjU=","name":"reclass","full_name":"salt-formulas/reclass","owner":{"login":"salt-formulas","id":20041042,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwMDQxMDQy","avatar_url":"https://avatars3.githubusercontent.com/u/20041042?v=4","gravatar_id":"","url":"https://api.github.com/users/salt-formulas","html_url":"https://github.com/salt-formulas","followers_url":"https://api.github.com/users/salt-formulas/followers","following_url":"https://api.github.com/users/salt-formulas/following{/other_user}","gists_url":"https://api.github.com/users/salt-formulas/gists{/gist_id}","starred_url":"https://api.github.com/users/salt-formulas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/salt-formulas/subscriptions","organizations_url":"https://api.github.com/users/salt-formulas/orgs","repos_url":"https://api.github.com/users/salt-formulas/repos","events_url":"https://api.github.com/users/salt-formulas/events{/privacy}","received_events_url":"https://api.github.com/users/salt-formulas/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/salt-formulas/reclass","description":"A recursive external node classifier for automation tools like Ansible, Puppet, and Salt","fork":true,"url":"https://api.github.com/repos/salt-formulas/reclass","forks_url":"https://api.github.com/repos/salt-formulas/reclass/forks","keys_url":"https://api.github.com/repos/salt-formulas/reclass/keys{/key_id}","collaborators_url":"https://api.github.com/repos/salt-formulas/reclass/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/salt-formulas/reclass/teams","hooks_url":"https://api.github.com/repos/salt-formulas/reclass/hooks","issue_events_url":"https://api.github.com/repos/salt-formulas/reclass/issues/events{/number}","events_url":"https://api.github.com/repos/salt-formulas/reclass/events","assignees_url":"https://api.github.com/repos/salt-formulas/reclass/assignees{/user}","branches_url":"https://api.github.com/repos/salt-formulas/reclass/branches{/branch}","tags_url":"https://api.github.com/repos/salt-formulas/reclass/tags","blobs_url":"https://api.github.com/repos/salt-formulas/reclass/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/salt-formulas/reclass/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/salt-formulas/reclass/git/refs{/sha}","trees_url":"https://api.github.com/repos/salt-formulas/reclass/git/trees{/sha}","statuses_url":"https://api.github.com/repos/salt-formulas/reclass/statuses/{sha}","languages_url":"https://api.github.com/repos/salt-formulas/reclass/languages","stargazers_url":"https://api.github.com/repos/salt-formulas/reclass/stargazers","contributors_url":"https://api.github.com/repos/salt-formulas/reclass/contributors","subscribers_url":"https://api.github.com/repos/salt-formulas/reclass/subscribers","subscription_url":"https://api.github.com/repos/salt-formulas/reclass/subscription","commits_url":"https://api.github.com/repos/salt-formulas/reclass/commits{/sha}","git_commits_url":"https://api.github.com/repos/salt-formulas/reclass/git/commits{/sha}","comments_url":"https://api.github.com/repos/salt-formulas/reclass/comments{/number}","issue_comment_url":"https://api.github.com/repos/salt-formulas/reclass/issues/comments{/number}","contents_url":"https://api.github.com/repos/salt-formulas/reclass/contents/{+path}","compare_url":"https://api.github.com/repos/salt-formulas/reclass/compare/{base}...{head}","merges_url":"https://api.github.com/repos/salt-formulas/reclass/merges","archive_url":"https://api.github.com/repos/salt-formulas/reclass/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/salt-formulas/reclass/downloads","issues_url":"https://api.github.com/repos/salt-formulas/reclass/issues{/number}","pulls_url":"https://api.github.com/repos/salt-formulas/reclass/pulls{/number}","milestones_url":"https://api.github.com/repos/salt-formulas/reclass/milestones{/number}","notifications_url":"https://api.github.com/repos/salt-formulas/reclass/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/salt-formulas/reclass/labels{/name}","releases_url":"https://api.github.com/repos/salt-formulas/reclass/releases{/id}","deployments_url":"https://api.github.com/repos/salt-formulas/reclass/deployments","created_at":"2017-08-16T14:01:03Z","updated_at":"2018-07-09T14:00:42Z","pushed_at":"2018-07-10T08:38:27Z","git_url":"git://github.com/salt-formulas/reclass.git","ssh_url":"git@github.com:salt-formulas/reclass.git","clone_url":"https://github.com/salt-formulas/reclass.git","svn_url":"https://github.com/salt-formulas/reclass","homepage":null,"size":916,"stargazers_count":12,"watchers_count":12,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":6,"mirror_url":null,"archived":false,"open_issues_count":6,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":6,"open_issues":6,"watchers":12,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/salt-formulas/reclass/pulls/54"},"html":{"href":"https://github.com/salt-formulas/reclass/pull/54"},"issue":{"href":"https://api.github.com/repos/salt-formulas/reclass/issues/54"},"comments":{"href":"https://api.github.com/repos/salt-formulas/reclass/issues/54/comments"},"review_comments":{"href":"https://api.github.com/repos/salt-formulas/reclass/pulls/54/comments"},"review_comment":{"href":"https://api.github.com/repos/salt-formulas/reclass/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/salt-formulas/reclass/pulls/54/commits"},"statuses":{"href":"https://api.github.com/repos/salt-formulas/reclass/statuses/9229823dd88096f1ba1cede9ff3d55df2b88b5bb"}},"author_association":"COLLABORATOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":4,"additions":248,"deletions":95,"changed_files":12}}
{"actor":{"display_login":"AndrewPickford"}}