{"action":"created","issue":{"url":"https://api.github.com/repos/m-lab/collectd-mlab/issues/43","repository_url":"https://api.github.com/repos/m-lab/collectd-mlab","labels_url":"https://api.github.com/repos/m-lab/collectd-mlab/issues/43/labels{/name}","comments_url":"https://api.github.com/repos/m-lab/collectd-mlab/issues/43/comments","events_url":"https://api.github.com/repos/m-lab/collectd-mlab/issues/43/events","html_url":"https://github.com/m-lab/collectd-mlab/pull/43","id":151432343,"number":43,"title":"Add module for loading model and OID configuration.","user":{"login":"stephen-soltesz","id":1085316,"avatar_url":"https://avatars.githubusercontent.com/u/1085316?v=3","gravatar_id":"","url":"https://api.github.com/users/stephen-soltesz","html_url":"https://github.com/stephen-soltesz","followers_url":"https://api.github.com/users/stephen-soltesz/followers","following_url":"https://api.github.com/users/stephen-soltesz/following{/other_user}","gists_url":"https://api.github.com/users/stephen-soltesz/gists{/gist_id}","starred_url":"https://api.github.com/users/stephen-soltesz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephen-soltesz/subscriptions","organizations_url":"https://api.github.com/users/stephen-soltesz/orgs","repos_url":"https://api.github.com/users/stephen-soltesz/repos","events_url":"https://api.github.com/users/stephen-soltesz/events{/privacy}","received_events_url":"https://api.github.com/users/stephen-soltesz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-04-27T16:40:54Z","updated_at":"2016-04-27T17:30:34Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/m-lab/collectd-mlab/pulls/43","html_url":"https://github.com/m-lab/collectd-mlab/pull/43","diff_url":"https://github.com/m-lab/collectd-mlab/pull/43.diff","patch_url":"https://github.com/m-lab/collectd-mlab/pull/43.patch"},"body":"This PR includes a configuration file for known switch models and a module for loading and interpreting the configuration.\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"35\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/m-lab/collectd-mlab/43)\n<!-- Reviewable:end -->\n"},"comment":{"url":"https://api.github.com/repos/m-lab/collectd-mlab/issues/comments/215161455","html_url":"https://github.com/m-lab/collectd-mlab/pull/43#issuecomment-215161455","issue_url":"https://api.github.com/repos/m-lab/collectd-mlab/issues/43","id":215161455,"user":{"login":"mtlynch","id":7783288,"avatar_url":"https://avatars.githubusercontent.com/u/7783288?v=3","gravatar_id":"","url":"https://api.github.com/users/mtlynch","html_url":"https://github.com/mtlynch","followers_url":"https://api.github.com/users/mtlynch/followers","following_url":"https://api.github.com/users/mtlynch/following{/other_user}","gists_url":"https://api.github.com/users/mtlynch/gists{/gist_id}","starred_url":"https://api.github.com/users/mtlynch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtlynch/subscriptions","organizations_url":"https://api.github.com/users/mtlynch/orgs","repos_url":"https://api.github.com/users/mtlynch/repos","events_url":"https://api.github.com/users/mtlynch/events{/privacy}","received_events_url":"https://api.github.com/users/mtlynch/received_events","type":"User","site_admin":false},"created_at":"2016-04-27T17:30:34Z","updated_at":"2016-04-27T17:30:34Z","body":"\n\n\n\nReview status: 0 of 2 files reviewed at latest revision, 2 unresolved discussions.\n\n---\n\n*[site-packages/mlab/disco/models.py, line 124 \\[r1\\]](https://reviewable.io:443/reviews/m-lab/collectd-mlab/43#-KGNc3QwSt3ZZ8MxDEnC:-KGNkioXlB0XhuPu9c3I:-1080489019) ([raw file](https://github.com/m-lab/collectd-mlab/blob/159c9a8197809d722730b57da407d3df80f1bd1b/site-packages/mlab/disco/models.py#L124)):*\nYeah, I don't have experience with PyYAML, but from a cursory look at the documentation, it seems like we can push the heavy lifting into `yaml.safe_load` instead of parsing into a dictionary and manually matching dicionary values to attributes in a `SwitchConfig` instance. It seems like if we inherit from `yaml.YAMLObject`and arrange the class attributes to match the YAML format, PyYAML will just populate the fields automatically for us, but I may be misunderstanding.\n\n---\n\n\n*Comments from [Reviewable](https://reviewable.io:443/reviews/m-lab/collectd-mlab/43)*\n<!-- Sent from Reviewable.io -->\n"}}