{"action":"created","issue":{"url":"https://api.github.com/repos/joyent/conch/issues/355","repository_url":"https://api.github.com/repos/joyent/conch","labels_url":"https://api.github.com/repos/joyent/conch/issues/355/labels{/name}","comments_url":"https://api.github.com/repos/joyent/conch/issues/355/comments","events_url":"https://api.github.com/repos/joyent/conch/issues/355/events","html_url":"https://github.com/joyent/conch/issues/355","id":353909613,"node_id":"MDU6SXNzdWUzNTM5MDk2MTM=","number":355,"title":"Want to store and search for device hostnames","user":{"login":"bdha","id":52308,"node_id":"MDQ6VXNlcjUyMzA4","avatar_url":"https://avatars0.githubusercontent.com/u/52308?v=4","gravatar_id":"","url":"https://api.github.com/users/bdha","html_url":"https://github.com/bdha","followers_url":"https://api.github.com/users/bdha/followers","following_url":"https://api.github.com/users/bdha/following{/other_user}","gists_url":"https://api.github.com/users/bdha/gists{/gist_id}","starred_url":"https://api.github.com/users/bdha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdha/subscriptions","organizations_url":"https://api.github.com/users/bdha/orgs","repos_url":"https://api.github.com/users/bdha/repos","events_url":"https://api.github.com/users/bdha/events{/privacy}","received_events_url":"https://api.github.com/users/bdha/received_events","type":"User","site_admin":false},"labels":[{"id":1034653756,"node_id":"MDU6TGFiZWwxMDM0NjUzNzU2","url":"https://api.github.com/repos/joyent/conch/labels/dcim","name":"dcim","color":"d4c5f9","default":false},{"id":1034672299,"node_id":"MDU6TGFiZWwxMDM0NjcyMjk5","url":"https://api.github.com/repos/joyent/conch/labels/high%20priority","name":"high priority","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":{"login":"karenetheridge","id":303051,"node_id":"MDQ6VXNlcjMwMzA1MQ==","avatar_url":"https://avatars0.githubusercontent.com/u/303051?v=4","gravatar_id":"","url":"https://api.github.com/users/karenetheridge","html_url":"https://github.com/karenetheridge","followers_url":"https://api.github.com/users/karenetheridge/followers","following_url":"https://api.github.com/users/karenetheridge/following{/other_user}","gists_url":"https://api.github.com/users/karenetheridge/gists{/gist_id}","starred_url":"https://api.github.com/users/karenetheridge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karenetheridge/subscriptions","organizations_url":"https://api.github.com/users/karenetheridge/orgs","repos_url":"https://api.github.com/users/karenetheridge/repos","events_url":"https://api.github.com/users/karenetheridge/events{/privacy}","received_events_url":"https://api.github.com/users/karenetheridge/received_events","type":"User","site_admin":false},"assignees":[{"login":"karenetheridge","id":303051,"node_id":"MDQ6VXNlcjMwMzA1MQ==","avatar_url":"https://avatars0.githubusercontent.com/u/303051?v=4","gravatar_id":"","url":"https://api.github.com/users/karenetheridge","html_url":"https://github.com/karenetheridge","followers_url":"https://api.github.com/users/karenetheridge/followers","following_url":"https://api.github.com/users/karenetheridge/following{/other_user}","gists_url":"https://api.github.com/users/karenetheridge/gists{/gist_id}","starred_url":"https://api.github.com/users/karenetheridge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karenetheridge/subscriptions","organizations_url":"https://api.github.com/users/karenetheridge/orgs","repos_url":"https://api.github.com/users/karenetheridge/repos","events_url":"https://api.github.com/users/karenetheridge/events{/privacy}","received_events_url":"https://api.github.com/users/karenetheridge/received_events","type":"User","site_admin":false}],"milestone":null,"comments":11,"created_at":"2018-08-24T20:00:01Z","updated_at":"2018-08-31T17:53:36Z","closed_at":null,"author_association":"COLLABORATOR","body":"We currently only provide the ability to search for devices by serial number.\r\n\r\nThere is existing ops tooling that relies on the system hostname for lookups. We need to add another device field for the hostname, and make it queryable.\r\n\r\nThe new conch-reporter-smartos report (version:2) already includes the hostname parameter:\r\n\r\n```\r\n[root@east1a-admin01 (us-east-1a) /var/tmp/conch-reporter-smartos]# ./bin/conch -c /var/tmp/.conch.json api get /device/$( sysinfo | json 'Serial Number' ) | json id latest_report.os.hostname\r\n8SCLRD2\r\neast1a-admin01\r\n```\r\nFurther, the shell should have a flag for `conch device :id --type` or similar that defines what `:id` is."},"comment":{"url":"https://api.github.com/repos/joyent/conch/issues/comments/417742645","html_url":"https://github.com/joyent/conch/issues/355#issuecomment-417742645","issue_url":"https://api.github.com/repos/joyent/conch/issues/355","id":417742645,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNzc0MjY0NQ==","user":{"login":"bdha","id":52308,"node_id":"MDQ6VXNlcjUyMzA4","avatar_url":"https://avatars0.githubusercontent.com/u/52308?v=4","gravatar_id":"","url":"https://api.github.com/users/bdha","html_url":"https://github.com/bdha","followers_url":"https://api.github.com/users/bdha/followers","following_url":"https://api.github.com/users/bdha/following{/other_user}","gists_url":"https://api.github.com/users/bdha/gists{/gist_id}","starred_url":"https://api.github.com/users/bdha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdha/subscriptions","organizations_url":"https://api.github.com/users/bdha/orgs","repos_url":"https://api.github.com/users/bdha/repos","events_url":"https://api.github.com/users/bdha/events{/privacy}","received_events_url":"https://api.github.com/users/bdha/received_events","type":"User","site_admin":false},"created_at":"2018-08-31T17:53:36Z","updated_at":"2018-08-31T17:53:36Z","author_association":"COLLABORATOR","body":"Historically the API will accept any data -- if it's defined in the JSON struct, it validates the input. But it doesn't know about the fields, it ignores them and stores it in the reports table raw.\r\n\r\nIt's quite obvious now that we can't do this anymore and the JSON struct should be the source of truth. If it's not in the struct, we should reject the report. (This is problematic for velocity reasons, but it's YOLO reporting is causing a lot of tooling problems.)"}}
{"actor":{"display_login":"bdha"}}