{"action":"created","comment":{"url":"https://api.github.com/repos/krux/hyperion/pulls/comments/47732137","id":47732137,"diff_hunk":"@@ -84,26 +64,25 @@ case class Ec2Resource private (\n object Ec2Resource {\n \n   def apply()(implicit hc: HyperionContext) = new Ec2Resource(\n-    id = PipelineObjectId(Ec2Resource.getClass),\n+    baseFields = BaseFields(PipelineObjectId(Ec2Resource.getClass)),\n+    resourceFields = defaultResourceFields(hc),\n     instanceType = hc.ec2InstanceType,\n     imageId = Option(hc.ec2ImageId: HString),\n+    runAsUser = None,\n+    associatePublicIpAddress = HBoolean.False,\n+    securityGroups = Seq(hc.ec2SecurityGroup),\n+    securityGroupIds = Seq.empty,\n+    spotBidPrice = None\n+  )\n+\n+  def defaultResourceFields(hc: HyperionContext) = ResourceFields(\n     role = Option(hc.ec2Role: HString),\n     resourceRole = Option(hc.ec2ResourceRole: HString),\n-    runAsUser = None,\n     keyPair = hc.ec2KeyPair.map(x => x: HString),\n     region = Option(hc.ec2Region: HString),\n     availabilityZone = hc.ec2AvailabilityZone.map(x => x: HString),\n     subnetId = hc.ec2SubnetId.map(x => x: HString),\n-    associatePublicIpAddress = HBoolean.False,\n-    securityGroups = Seq(hc.ec2SecurityGroup),\n-    securityGroupIds = Seq.empty,\n-    spotBidPrice = None,\n-    useOnDemandOnLastAttempt = None,\n-    initTimeout = None,\n-    terminateAfter = hc.ec2TerminateAfter.map(duration2HDuration),\n-    actionOnResourceFailure = None,\n-    actionOnTaskFailure = None,\n-    httpProxy = None\n+    terminateAfter = hc.ec2TerminateAfter.map(x => x: HDuration)","path":"core/src/main/scala/com/krux/hyperion/resource/Ec2Resource.scala","position":103,"original_position":103,"commit_id":"ade788d1685a662706aae8b740f2e92557b08090","original_commit_id":"ade788d1685a662706aae8b740f2e92557b08090","user":{"login":"sethyates","id":29878,"avatar_url":"https://avatars.githubusercontent.com/u/29878?v=3","gravatar_id":"","url":"https://api.github.com/users/sethyates","html_url":"https://github.com/sethyates","followers_url":"https://api.github.com/users/sethyates/followers","following_url":"https://api.github.com/users/sethyates/following{/other_user}","gists_url":"https://api.github.com/users/sethyates/gists{/gist_id}","starred_url":"https://api.github.com/users/sethyates/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sethyates/subscriptions","organizations_url":"https://api.github.com/users/sethyates/orgs","repos_url":"https://api.github.com/users/sethyates/repos","events_url":"https://api.github.com/users/sethyates/events{/privacy}","received_events_url":"https://api.github.com/users/sethyates/received_events","type":"User","site_admin":false},"body":"Guess `.map(_: HDuration)` doesn't work?","created_at":"2015-12-16T03:05:46Z","updated_at":"2015-12-16T03:05:46Z","html_url":"https://github.com/krux/hyperion/pull/279#discussion_r47732137","pull_request_url":"https://api.github.com/repos/krux/hyperion/pulls/279","_links":{"self":{"href":"https://api.github.com/repos/krux/hyperion/pulls/comments/47732137"},"html":{"href":"https://github.com/krux/hyperion/pull/279#discussion_r47732137"},"pull_request":{"href":"https://api.github.com/repos/krux/hyperion/pulls/279"}}},"pull_request":{"url":"https://api.github.com/repos/krux/hyperion/pulls/279","id":53756113,"html_url":"https://github.com/krux/hyperion/pull/279","diff_url":"https://github.com/krux/hyperion/pull/279.diff","patch_url":"https://github.com/krux/hyperion/pull/279.patch","issue_url":"https://api.github.com/repos/krux/hyperion/issues/279","number":279,"state":"open","locked":false,"title":"(fixes #243) big refactor organize methods and fields and avoid duplicated code","user":{"login":"realstraw","id":406633,"avatar_url":"https://avatars.githubusercontent.com/u/406633?v=3","gravatar_id":"","url":"https://api.github.com/users/realstraw","html_url":"https://github.com/realstraw","followers_url":"https://api.github.com/users/realstraw/followers","following_url":"https://api.github.com/users/realstraw/following{/other_user}","gists_url":"https://api.github.com/users/realstraw/gists{/gist_id}","starred_url":"https://api.github.com/users/realstraw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/realstraw/subscriptions","organizations_url":"https://api.github.com/users/realstraw/orgs","repos_url":"https://api.github.com/users/realstraw/repos","events_url":"https://api.github.com/users/realstraw/events{/privacy}","received_events_url":"https://api.github.com/users/realstraw/received_events","type":"User","site_admin":false},"body":"more can be done, but I think this is a good place to stop.","created_at":"2015-12-15T20:16:36Z","updated_at":"2015-12-16T03:05:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a4d92e88b0eaeb43bf5373ecf1efa805b08439b8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/krux/hyperion/pulls/279/commits","review_comments_url":"https://api.github.com/repos/krux/hyperion/pulls/279/comments","review_comment_url":"https://api.github.com/repos/krux/hyperion/pulls/comments{/number}","comments_url":"https://api.github.com/repos/krux/hyperion/issues/279/comments","statuses_url":"https://api.github.com/repos/krux/hyperion/statuses/ade788d1685a662706aae8b740f2e92557b08090","head":{"label":"realstraw:issue243-shapless-refactor","ref":"issue243-shapless-refactor","sha":"ade788d1685a662706aae8b740f2e92557b08090","user":{"login":"realstraw","id":406633,"avatar_url":"https://avatars.githubusercontent.com/u/406633?v=3","gravatar_id":"","url":"https://api.github.com/users/realstraw","html_url":"https://github.com/realstraw","followers_url":"https://api.github.com/users/realstraw/followers","following_url":"https://api.github.com/users/realstraw/following{/other_user}","gists_url":"https://api.github.com/users/realstraw/gists{/gist_id}","starred_url":"https://api.github.com/users/realstraw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/realstraw/subscriptions","organizations_url":"https://api.github.com/users/realstraw/orgs","repos_url":"https://api.github.com/users/realstraw/repos","events_url":"https://api.github.com/users/realstraw/events{/privacy}","received_events_url":"https://api.github.com/users/realstraw/received_events","type":"User","site_admin":false},"repo":{"id":32900260,"name":"hyperion","full_name":"realstraw/hyperion","owner":{"login":"realstraw","id":406633,"avatar_url":"https://avatars.githubusercontent.com/u/406633?v=3","gravatar_id":"","url":"https://api.github.com/users/realstraw","html_url":"https://github.com/realstraw","followers_url":"https://api.github.com/users/realstraw/followers","following_url":"https://api.github.com/users/realstraw/following{/other_user}","gists_url":"https://api.github.com/users/realstraw/gists{/gist_id}","starred_url":"https://api.github.com/users/realstraw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/realstraw/subscriptions","organizations_url":"https://api.github.com/users/realstraw/orgs","repos_url":"https://api.github.com/users/realstraw/repos","events_url":"https://api.github.com/users/realstraw/events{/privacy}","received_events_url":"https://api.github.com/users/realstraw/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/realstraw/hyperion","description":"Scala library and abstractions for AWS DataPipeline","fork":true,"url":"https://api.github.com/repos/realstraw/hyperion","forks_url":"https://api.github.com/repos/realstraw/hyperion/forks","keys_url":"https://api.github.com/repos/realstraw/hyperion/keys{/key_id}","collaborators_url":"https://api.github.com/repos/realstraw/hyperion/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/realstraw/hyperion/teams","hooks_url":"https://api.github.com/repos/realstraw/hyperion/hooks","issue_events_url":"https://api.github.com/repos/realstraw/hyperion/issues/events{/number}","events_url":"https://api.github.com/repos/realstraw/hyperion/events","assignees_url":"https://api.github.com/repos/realstraw/hyperion/assignees{/user}","branches_url":"https://api.github.com/repos/realstraw/hyperion/branches{/branch}","tags_url":"https://api.github.com/repos/realstraw/hyperion/tags","blobs_url":"https://api.github.com/repos/realstraw/hyperion/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/realstraw/hyperion/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/realstraw/hyperion/git/refs{/sha}","trees_url":"https://api.github.com/repos/realstraw/hyperion/git/trees{/sha}","statuses_url":"https://api.github.com/repos/realstraw/hyperion/statuses/{sha}","languages_url":"https://api.github.com/repos/realstraw/hyperion/languages","stargazers_url":"https://api.github.com/repos/realstraw/hyperion/stargazers","contributors_url":"https://api.github.com/repos/realstraw/hyperion/contributors","subscribers_url":"https://api.github.com/repos/realstraw/hyperion/subscribers","subscription_url":"https://api.github.com/repos/realstraw/hyperion/subscription","commits_url":"https://api.github.com/repos/realstraw/hyperion/commits{/sha}","git_commits_url":"https://api.github.com/repos/realstraw/hyperion/git/commits{/sha}","comments_url":"https://api.github.com/repos/realstraw/hyperion/comments{/number}","issue_comment_url":"https://api.github.com/repos/realstraw/hyperion/issues/comments{/number}","contents_url":"https://api.github.com/repos/realstraw/hyperion/contents/{+path}","compare_url":"https://api.github.com/repos/realstraw/hyperion/compare/{base}...{head}","merges_url":"https://api.github.com/repos/realstraw/hyperion/merges","archive_url":"https://api.github.com/repos/realstraw/hyperion/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/realstraw/hyperion/downloads","issues_url":"https://api.github.com/repos/realstraw/hyperion/issues{/number}","pulls_url":"https://api.github.com/repos/realstraw/hyperion/pulls{/number}","milestones_url":"https://api.github.com/repos/realstraw/hyperion/milestones{/number}","notifications_url":"https://api.github.com/repos/realstraw/hyperion/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/realstraw/hyperion/labels{/name}","releases_url":"https://api.github.com/repos/realstraw/hyperion/releases{/id}","created_at":"2015-03-26T01:13:35Z","updated_at":"2015-04-26T02:46:23Z","pushed_at":"2015-12-15T20:20:43Z","git_url":"git://github.com/realstraw/hyperion.git","ssh_url":"git@github.com:realstraw/hyperion.git","clone_url":"https://github.com/realstraw/hyperion.git","svn_url":"https://github.com/realstraw/hyperion","homepage":"","size":1309,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"krux:3.0","ref":"3.0","sha":"27b798782f61a9f766c6a4ea4e94c19a7ba7ad07","user":{"login":"krux","id":72871,"avatar_url":"https://avatars.githubusercontent.com/u/72871?v=3","gravatar_id":"","url":"https://api.github.com/users/krux","html_url":"https://github.com/krux","followers_url":"https://api.github.com/users/krux/followers","following_url":"https://api.github.com/users/krux/following{/other_user}","gists_url":"https://api.github.com/users/krux/gists{/gist_id}","starred_url":"https://api.github.com/users/krux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krux/subscriptions","organizations_url":"https://api.github.com/users/krux/orgs","repos_url":"https://api.github.com/users/krux/repos","events_url":"https://api.github.com/users/krux/events{/privacy}","received_events_url":"https://api.github.com/users/krux/received_events","type":"Organization","site_admin":false},"repo":{"id":32839544,"name":"hyperion","full_name":"krux/hyperion","owner":{"login":"krux","id":72871,"avatar_url":"https://avatars.githubusercontent.com/u/72871?v=3","gravatar_id":"","url":"https://api.github.com/users/krux","html_url":"https://github.com/krux","followers_url":"https://api.github.com/users/krux/followers","following_url":"https://api.github.com/users/krux/following{/other_user}","gists_url":"https://api.github.com/users/krux/gists{/gist_id}","starred_url":"https://api.github.com/users/krux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krux/subscriptions","organizations_url":"https://api.github.com/users/krux/orgs","repos_url":"https://api.github.com/users/krux/repos","events_url":"https://api.github.com/users/krux/events{/privacy}","received_events_url":"https://api.github.com/users/krux/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/krux/hyperion","description":"Scala library and abstractions for AWS DataPipeline","fork":false,"url":"https://api.github.com/repos/krux/hyperion","forks_url":"https://api.github.com/repos/krux/hyperion/forks","keys_url":"https://api.github.com/repos/krux/hyperion/keys{/key_id}","collaborators_url":"https://api.github.com/repos/krux/hyperion/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/krux/hyperion/teams","hooks_url":"https://api.github.com/repos/krux/hyperion/hooks","issue_events_url":"https://api.github.com/repos/krux/hyperion/issues/events{/number}","events_url":"https://api.github.com/repos/krux/hyperion/events","assignees_url":"https://api.github.com/repos/krux/hyperion/assignees{/user}","branches_url":"https://api.github.com/repos/krux/hyperion/branches{/branch}","tags_url":"https://api.github.com/repos/krux/hyperion/tags","blobs_url":"https://api.github.com/repos/krux/hyperion/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/krux/hyperion/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/krux/hyperion/git/refs{/sha}","trees_url":"https://api.github.com/repos/krux/hyperion/git/trees{/sha}","statuses_url":"https://api.github.com/repos/krux/hyperion/statuses/{sha}","languages_url":"https://api.github.com/repos/krux/hyperion/languages","stargazers_url":"https://api.github.com/repos/krux/hyperion/stargazers","contributors_url":"https://api.github.com/repos/krux/hyperion/contributors","subscribers_url":"https://api.github.com/repos/krux/hyperion/subscribers","subscription_url":"https://api.github.com/repos/krux/hyperion/subscription","commits_url":"https://api.github.com/repos/krux/hyperion/commits{/sha}","git_commits_url":"https://api.github.com/repos/krux/hyperion/git/commits{/sha}","comments_url":"https://api.github.com/repos/krux/hyperion/comments{/number}","issue_comment_url":"https://api.github.com/repos/krux/hyperion/issues/comments{/number}","contents_url":"https://api.github.com/repos/krux/hyperion/contents/{+path}","compare_url":"https://api.github.com/repos/krux/hyperion/compare/{base}...{head}","merges_url":"https://api.github.com/repos/krux/hyperion/merges","archive_url":"https://api.github.com/repos/krux/hyperion/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/krux/hyperion/downloads","issues_url":"https://api.github.com/repos/krux/hyperion/issues{/number}","pulls_url":"https://api.github.com/repos/krux/hyperion/pulls{/number}","milestones_url":"https://api.github.com/repos/krux/hyperion/milestones{/number}","notifications_url":"https://api.github.com/repos/krux/hyperion/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/krux/hyperion/labels{/name}","releases_url":"https://api.github.com/repos/krux/hyperion/releases{/id}","created_at":"2015-03-25T03:07:31Z","updated_at":"2015-11-19T18:50:46Z","pushed_at":"2015-12-15T20:20:43Z","git_url":"git://github.com/krux/hyperion.git","ssh_url":"git@github.com:krux/hyperion.git","clone_url":"https://github.com/krux/hyperion.git","svn_url":"https://github.com/krux/hyperion","homepage":"","size":2124,"stargazers_count":11,"watchers_count":11,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"open_issues_count":15,"forks":2,"open_issues":15,"watchers":11,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/krux/hyperion/pulls/279"},"html":{"href":"https://github.com/krux/hyperion/pull/279"},"issue":{"href":"https://api.github.com/repos/krux/hyperion/issues/279"},"comments":{"href":"https://api.github.com/repos/krux/hyperion/issues/279/comments"},"review_comments":{"href":"https://api.github.com/repos/krux/hyperion/pulls/279/comments"},"review_comment":{"href":"https://api.github.com/repos/krux/hyperion/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/krux/hyperion/pulls/279/commits"},"statuses":{"href":"https://api.github.com/repos/krux/hyperion/statuses/ade788d1685a662706aae8b740f2e92557b08090"}}}}