{"action":"created","comment":{"url":"https://api.github.com/repos/crowbar/barclamp-crowbar/pulls/comments/24821204","id":24821204,"diff_hunk":"@@ -563,7 +563,12 @@ def asset_tag\n     if virtual?\n       \"vm-#{mac.gsub(':',\"-\")}\"\n     else\n-      @node[:dmi][\"chassis\"][\"serial_number\"] rescue nil\n+      asset = @node[:dmi][\"chassis\"][\"serial_number\"] rescue nil\n+      if @node[:dmi][\"chassis\"].has_key?(\"asset_tag\") && !@node[:dmi][\"chassis\"][\"asset_tag\"].empty?\n+        \"#{asset} (#{@node[:dmi][\"chassis\"][\"asset_tag\"]})\"\n+      else\n+        asset\n+      end","path":"crowbar_framework/app/models/node_object.rb","position":10,"original_position":10,"commit_id":"a341d68754e64b182c14fcd793eb7c6556800aa8","original_commit_id":"a341d68754e64b182c14fcd793eb7c6556800aa8","user":{"login":"bkutil","id":696026,"avatar_url":"https://avatars.githubusercontent.com/u/696026?v=3","gravatar_id":"","url":"https://api.github.com/users/bkutil","html_url":"https://github.com/bkutil","followers_url":"https://api.github.com/users/bkutil/followers","following_url":"https://api.github.com/users/bkutil/following{/other_user}","gists_url":"https://api.github.com/users/bkutil/gists{/gist_id}","starred_url":"https://api.github.com/users/bkutil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bkutil/subscriptions","organizations_url":"https://api.github.com/users/bkutil/orgs","repos_url":"https://api.github.com/users/bkutil/repos","events_url":"https://api.github.com/users/bkutil/events{/privacy}","received_events_url":"https://api.github.com/users/bkutil/received_events","type":"User","site_admin":false},"body":"@tboerger what bothers me more is `a[\"foo\"][\"bar\"][\"baz\"] rescue nil` sprinkled around *Objects. \r\n\r\nWouldn't hashie's DeepFind help us here? We could have a static, declared map of \"method_name\" => [lookup, default value]\", then loop over them and use define method? And/or use Mash + bang! methods for the setters?\r\n\r\nOr at least we might want to split the accessors to individual 'theme' related modules (i.e RaidAttributes, NetworkAttributes).","created_at":"2015-02-17T15:05:35Z","updated_at":"2015-02-17T15:05:35Z","html_url":"https://github.com/crowbar/barclamp-crowbar/pull/1231#discussion_r24821204","pull_request_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/pulls/1231","_links":{"self":{"href":"https://api.github.com/repos/crowbar/barclamp-crowbar/pulls/comments/24821204"},"html":{"href":"https://github.com/crowbar/barclamp-crowbar/pull/1231#discussion_r24821204"},"pull_request":{"href":"https://api.github.com/repos/crowbar/barclamp-crowbar/pulls/1231"}}},"pull_request":{"url":"https://api.github.com/repos/crowbar/barclamp-crowbar/pulls/1231","id":29384919,"html_url":"https://github.com/crowbar/barclamp-crowbar/pull/1231","diff_url":"https://github.com/crowbar/barclamp-crowbar/pull/1231.diff","patch_url":"https://github.com/crowbar/barclamp-crowbar/pull/1231.patch","issue_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/issues/1231","number":1231,"state":"open","locked":false,"title":"Show asset tag if set on the node","user":{"login":"dirkmueller","id":1029152,"avatar_url":"https://avatars.githubusercontent.com/u/1029152?v=3","gravatar_id":"","url":"https://api.github.com/users/dirkmueller","html_url":"https://github.com/dirkmueller","followers_url":"https://api.github.com/users/dirkmueller/followers","following_url":"https://api.github.com/users/dirkmueller/following{/other_user}","gists_url":"https://api.github.com/users/dirkmueller/gists{/gist_id}","starred_url":"https://api.github.com/users/dirkmueller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dirkmueller/subscriptions","organizations_url":"https://api.github.com/users/dirkmueller/orgs","repos_url":"https://api.github.com/users/dirkmueller/repos","events_url":"https://api.github.com/users/dirkmueller/events{/privacy}","received_events_url":"https://api.github.com/users/dirkmueller/received_events","type":"User","site_admin":false},"body":"The asset tag is a manually configurable label for the node and\r\ncan be helpful in identifying the particular machine that\r\nwe're looking for.","created_at":"2015-02-16T16:26:00Z","updated_at":"2015-02-17T15:05:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"57d9919fefeb12da46d7a108dd605c2703bd34aa","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/pulls/1231/commits","review_comments_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/pulls/1231/comments","review_comment_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/pulls/comments/{number}","comments_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/issues/1231/comments","statuses_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/statuses/a341d68754e64b182c14fcd793eb7c6556800aa8","head":{"label":"dirkmueller:master","ref":"master","sha":"a341d68754e64b182c14fcd793eb7c6556800aa8","user":{"login":"dirkmueller","id":1029152,"avatar_url":"https://avatars.githubusercontent.com/u/1029152?v=3","gravatar_id":"","url":"https://api.github.com/users/dirkmueller","html_url":"https://github.com/dirkmueller","followers_url":"https://api.github.com/users/dirkmueller/followers","following_url":"https://api.github.com/users/dirkmueller/following{/other_user}","gists_url":"https://api.github.com/users/dirkmueller/gists{/gist_id}","starred_url":"https://api.github.com/users/dirkmueller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dirkmueller/subscriptions","organizations_url":"https://api.github.com/users/dirkmueller/orgs","repos_url":"https://api.github.com/users/dirkmueller/repos","events_url":"https://api.github.com/users/dirkmueller/events{/privacy}","received_events_url":"https://api.github.com/users/dirkmueller/received_events","type":"User","site_admin":false},"repo":{"id":11172538,"name":"barclamp-crowbar","full_name":"dirkmueller/barclamp-crowbar","owner":{"login":"dirkmueller","id":1029152,"avatar_url":"https://avatars.githubusercontent.com/u/1029152?v=3","gravatar_id":"","url":"https://api.github.com/users/dirkmueller","html_url":"https://github.com/dirkmueller","followers_url":"https://api.github.com/users/dirkmueller/followers","following_url":"https://api.github.com/users/dirkmueller/following{/other_user}","gists_url":"https://api.github.com/users/dirkmueller/gists{/gist_id}","starred_url":"https://api.github.com/users/dirkmueller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dirkmueller/subscriptions","organizations_url":"https://api.github.com/users/dirkmueller/orgs","repos_url":"https://api.github.com/users/dirkmueller/repos","events_url":"https://api.github.com/users/dirkmueller/events{/privacy}","received_events_url":"https://api.github.com/users/dirkmueller/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dirkmueller/barclamp-crowbar","description":"Crowbar Core Barclamp","fork":true,"url":"https://api.github.com/repos/dirkmueller/barclamp-crowbar","forks_url":"https://api.github.com/repos/dirkmueller/barclamp-crowbar/forks","keys_url":"https://api.github.com/repos/dirkmueller/barclamp-crowbar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dirkmueller/barclamp-crowbar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dirkmueller/barclamp-crowbar/teams","hooks_url":"https://api.github.com/repos/dirkmueller/barclamp-crowbar/hooks","issue_events_url":"https://api.github.com/repos/dirkmueller/barclamp-crowbar/issues/events{/number}","events_url":"https://api.github.com/repos/dirkmueller/barclamp-crowbar/events","assignees_url":"https://api.github.com/repos/dirkmueller/barclamp-crowbar/assignees{/user}","branches_url":"https://api.github.com/repos/dirkmueller/barclamp-crowbar/branches{/branch}","tags_url":"https://api.github.com/repos/dirkmueller/barclamp-crowbar/tags","blobs_url":"https://api.github.com/repos/dirkmueller/barclamp-crowbar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dirkmueller/barclamp-crowbar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dirkmueller/barclamp-crowbar/git/refs{/sha}","trees_url":"https://api.github.com/repos/dirkmueller/barclamp-crowbar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dirkmueller/barclamp-crowbar/statuses/{sha}","languages_url":"https://api.github.com/repos/dirkmueller/barclamp-crowbar/languages","stargazers_url":"https://api.github.com/repos/dirkmueller/barclamp-crowbar/stargazers","contributors_url":"https://api.github.com/repos/dirkmueller/barclamp-crowbar/contributors","subscribers_url":"https://api.github.com/repos/dirkmueller/barclamp-crowbar/subscribers","subscription_url":"https://api.github.com/repos/dirkmueller/barclamp-crowbar/subscription","commits_url":"https://api.github.com/repos/dirkmueller/barclamp-crowbar/commits{/sha}","git_commits_url":"https://api.github.com/repos/dirkmueller/barclamp-crowbar/git/commits{/sha}","comments_url":"https://api.github.com/repos/dirkmueller/barclamp-crowbar/comments{/number}","issue_comment_url":"https://api.github.com/repos/dirkmueller/barclamp-crowbar/issues/comments/{number}","contents_url":"https://api.github.com/repos/dirkmueller/barclamp-crowbar/contents/{+path}","compare_url":"https://api.github.com/repos/dirkmueller/barclamp-crowbar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dirkmueller/barclamp-crowbar/merges","archive_url":"https://api.github.com/repos/dirkmueller/barclamp-crowbar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dirkmueller/barclamp-crowbar/downloads","issues_url":"https://api.github.com/repos/dirkmueller/barclamp-crowbar/issues{/number}","pulls_url":"https://api.github.com/repos/dirkmueller/barclamp-crowbar/pulls{/number}","milestones_url":"https://api.github.com/repos/dirkmueller/barclamp-crowbar/milestones{/number}","notifications_url":"https://api.github.com/repos/dirkmueller/barclamp-crowbar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dirkmueller/barclamp-crowbar/labels{/name}","releases_url":"https://api.github.com/repos/dirkmueller/barclamp-crowbar/releases{/id}","created_at":"2013-07-04T09:30:51Z","updated_at":"2015-02-16T16:25:35Z","pushed_at":"2015-02-16T16:25:35Z","git_url":"git://github.com/dirkmueller/barclamp-crowbar.git","ssh_url":"git@github.com:dirkmueller/barclamp-crowbar.git","clone_url":"https://github.com/dirkmueller/barclamp-crowbar.git","svn_url":"https://github.com/dirkmueller/barclamp-crowbar","homepage":"https://github.com/crowbar/crowbar","size":37019,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"crowbar:master","ref":"master","sha":"c9bd561556832dd143b92154b872e420fa208d7f","user":{"login":"crowbar","id":2910205,"avatar_url":"https://avatars.githubusercontent.com/u/2910205?v=3","gravatar_id":"","url":"https://api.github.com/users/crowbar","html_url":"https://github.com/crowbar","followers_url":"https://api.github.com/users/crowbar/followers","following_url":"https://api.github.com/users/crowbar/following{/other_user}","gists_url":"https://api.github.com/users/crowbar/gists{/gist_id}","starred_url":"https://api.github.com/users/crowbar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crowbar/subscriptions","organizations_url":"https://api.github.com/users/crowbar/orgs","repos_url":"https://api.github.com/users/crowbar/repos","events_url":"https://api.github.com/users/crowbar/events{/privacy}","received_events_url":"https://api.github.com/users/crowbar/received_events","type":"Organization","site_admin":false},"repo":{"id":2351384,"name":"barclamp-crowbar","full_name":"crowbar/barclamp-crowbar","owner":{"login":"crowbar","id":2910205,"avatar_url":"https://avatars.githubusercontent.com/u/2910205?v=3","gravatar_id":"","url":"https://api.github.com/users/crowbar","html_url":"https://github.com/crowbar","followers_url":"https://api.github.com/users/crowbar/followers","following_url":"https://api.github.com/users/crowbar/following{/other_user}","gists_url":"https://api.github.com/users/crowbar/gists{/gist_id}","starred_url":"https://api.github.com/users/crowbar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crowbar/subscriptions","organizations_url":"https://api.github.com/users/crowbar/orgs","repos_url":"https://api.github.com/users/crowbar/repos","events_url":"https://api.github.com/users/crowbar/events{/privacy}","received_events_url":"https://api.github.com/users/crowbar/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/crowbar/barclamp-crowbar","description":"Crowbar Core: Core Application","fork":false,"url":"https://api.github.com/repos/crowbar/barclamp-crowbar","forks_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/forks","keys_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/teams","hooks_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/hooks","issue_events_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/issues/events{/number}","events_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/events","assignees_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/assignees{/user}","branches_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/branches{/branch}","tags_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/tags","blobs_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/git/refs{/sha}","trees_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/statuses/{sha}","languages_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/languages","stargazers_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/stargazers","contributors_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/contributors","subscribers_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/subscribers","subscription_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/subscription","commits_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/commits{/sha}","git_commits_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/git/commits{/sha}","comments_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/comments{/number}","issue_comment_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/issues/comments/{number}","contents_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/contents/{+path}","compare_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/merges","archive_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/downloads","issues_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/issues{/number}","pulls_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/pulls{/number}","milestones_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/milestones{/number}","notifications_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/labels{/name}","releases_url":"https://api.github.com/repos/crowbar/barclamp-crowbar/releases{/id}","created_at":"2011-09-08T20:47:56Z","updated_at":"2015-02-17T14:34:15Z","pushed_at":"2015-02-17T14:34:15Z","git_url":"git://github.com/crowbar/barclamp-crowbar.git","ssh_url":"git@github.com:crowbar/barclamp-crowbar.git","clone_url":"https://github.com/crowbar/barclamp-crowbar.git","svn_url":"https://github.com/crowbar/barclamp-crowbar","homepage":"https://github.com/crowbar/crowbar","size":40334,"stargazers_count":73,"watchers_count":73,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":196,"mirror_url":null,"open_issues_count":21,"forks":196,"open_issues":21,"watchers":73,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/crowbar/barclamp-crowbar/pulls/1231"},"html":{"href":"https://github.com/crowbar/barclamp-crowbar/pull/1231"},"issue":{"href":"https://api.github.com/repos/crowbar/barclamp-crowbar/issues/1231"},"comments":{"href":"https://api.github.com/repos/crowbar/barclamp-crowbar/issues/1231/comments"},"review_comments":{"href":"https://api.github.com/repos/crowbar/barclamp-crowbar/pulls/1231/comments"},"review_comment":{"href":"https://api.github.com/repos/crowbar/barclamp-crowbar/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/crowbar/barclamp-crowbar/pulls/1231/commits"},"statuses":{"href":"https://api.github.com/repos/crowbar/barclamp-crowbar/statuses/a341d68754e64b182c14fcd793eb7c6556800aa8"}}}}