{"action":"created","comment":{"url":"https://api.github.com/repos/Juniper/py-junos-eznc/pulls/comments/106463841","pull_request_review_id":27387045,"id":106463841,"diff_hunk":"@@ -206,6 +206,119 @@ def port(self):\n         \"\"\"\n         return self._port\n \n+    # ------------------------------------------------------------------------\n+    # property: master\n+    # ------------------------------------------------------------------------\n+\n+    @property\n+    def master(self):\n+        \"\"\"\n+        The mastership state of the current Routing Engine.\n+\n+        The current Routing Engine is the RE to which the NETCONF session is\n+        connected.\n+\n+        Note: This property is based on new-style fact gathering and the\n+              value of currently cached facts. If there is a chance the\n+              mastership state may have changed since the facts were cached,\n+              then dev.facts_refresh() should be invoked prior to checking\n+              this property. If old-style fact gathering is in use,\n+              this property will return None.\n+\n+        :returns: True if the current RE is the master Routing Engine. False if\n+                  the current RE is not the master Routing Engine. None if\n+                  unable to determine the state of the current Routing Engine.\n+        \"\"\"\n+        master = None\n+\n+        try:\n+            # Make sure the 'current_re' fact has a value","path":"lib/jnpr/junos/device.py","position":30,"original_position":30,"commit_id":"aa0e0a6b26eccedcc0f6d1039407db0feef96f9b","original_commit_id":"aa0e0a6b26eccedcc0f6d1039407db0feef96f9b","user":{"login":"stacywsmith","id":12446307,"avatar_url":"https://avatars1.githubusercontent.com/u/12446307?v=3","gravatar_id":"","url":"https://api.github.com/users/stacywsmith","html_url":"https://github.com/stacywsmith","followers_url":"https://api.github.com/users/stacywsmith/followers","following_url":"https://api.github.com/users/stacywsmith/following{/other_user}","gists_url":"https://api.github.com/users/stacywsmith/gists{/gist_id}","starred_url":"https://api.github.com/users/stacywsmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stacywsmith/subscriptions","organizations_url":"https://api.github.com/users/stacywsmith/orgs","repos_url":"https://api.github.com/users/stacywsmith/repos","events_url":"https://api.github.com/users/stacywsmith/events{/privacy}","received_events_url":"https://api.github.com/users/stacywsmith/received_events","type":"User","site_admin":false},"body":"That was by design. As defined in the doc string, `None` is used to define that the mastership state could not be determined. I don't think we should default to assuming it is master if there's a problem determining the state.","created_at":"2017-03-16T16:21:19Z","updated_at":"2017-03-16T16:21:19Z","html_url":"https://github.com/Juniper/py-junos-eznc/pull/682#discussion_r106463841","pull_request_url":"https://api.github.com/repos/Juniper/py-junos-eznc/pulls/682","_links":{"self":{"href":"https://api.github.com/repos/Juniper/py-junos-eznc/pulls/comments/106463841"},"html":{"href":"https://github.com/Juniper/py-junos-eznc/pull/682#discussion_r106463841"},"pull_request":{"href":"https://api.github.com/repos/Juniper/py-junos-eznc/pulls/682"}}},"pull_request":{"url":"https://api.github.com/repos/Juniper/py-junos-eznc/pulls/682","id":110980354,"html_url":"https://github.com/Juniper/py-junos-eznc/pull/682","diff_url":"https://github.com/Juniper/py-junos-eznc/pull/682.diff","patch_url":"https://github.com/Juniper/py-junos-eznc/pull/682.patch","issue_url":"https://api.github.com/repos/Juniper/py-junos-eznc/issues/682","number":682,"state":"open","locked":false,"title":"Provide a master property and a re_name property for Device","user":{"login":"stacywsmith","id":12446307,"avatar_url":"https://avatars1.githubusercontent.com/u/12446307?v=3","gravatar_id":"","url":"https://api.github.com/users/stacywsmith","html_url":"https://github.com/stacywsmith","followers_url":"https://api.github.com/users/stacywsmith/followers","following_url":"https://api.github.com/users/stacywsmith/following{/other_user}","gists_url":"https://api.github.com/users/stacywsmith/gists{/gist_id}","starred_url":"https://api.github.com/users/stacywsmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stacywsmith/subscriptions","organizations_url":"https://api.github.com/users/stacywsmith/orgs","repos_url":"https://api.github.com/users/stacywsmith/repos","events_url":"https://api.github.com/users/stacywsmith/events{/privacy}","received_events_url":"https://api.github.com/users/stacywsmith/received_events","type":"User","site_admin":false},"body":"Provide a master property to indicate if the current Routing Engine is the master. Provide a re_name property to return the name of the current Routing Engine.","created_at":"2017-03-16T02:14:28Z","updated_at":"2017-03-16T16:21:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4c9640988b2d2eb717b23fb016747881bb8f0864","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Juniper/py-junos-eznc/pulls/682/commits","review_comments_url":"https://api.github.com/repos/Juniper/py-junos-eznc/pulls/682/comments","review_comment_url":"https://api.github.com/repos/Juniper/py-junos-eznc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Juniper/py-junos-eznc/issues/682/comments","statuses_url":"https://api.github.com/repos/Juniper/py-junos-eznc/statuses/aa0e0a6b26eccedcc0f6d1039407db0feef96f9b","head":{"label":"stacywsmith:is_master_method","ref":"is_master_method","sha":"aa0e0a6b26eccedcc0f6d1039407db0feef96f9b","user":{"login":"stacywsmith","id":12446307,"avatar_url":"https://avatars1.githubusercontent.com/u/12446307?v=3","gravatar_id":"","url":"https://api.github.com/users/stacywsmith","html_url":"https://github.com/stacywsmith","followers_url":"https://api.github.com/users/stacywsmith/followers","following_url":"https://api.github.com/users/stacywsmith/following{/other_user}","gists_url":"https://api.github.com/users/stacywsmith/gists{/gist_id}","starred_url":"https://api.github.com/users/stacywsmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stacywsmith/subscriptions","organizations_url":"https://api.github.com/users/stacywsmith/orgs","repos_url":"https://api.github.com/users/stacywsmith/repos","events_url":"https://api.github.com/users/stacywsmith/events{/privacy}","received_events_url":"https://api.github.com/users/stacywsmith/received_events","type":"User","site_admin":false},"repo":{"id":44268716,"name":"py-junos-eznc","full_name":"stacywsmith/py-junos-eznc","owner":{"login":"stacywsmith","id":12446307,"avatar_url":"https://avatars1.githubusercontent.com/u/12446307?v=3","gravatar_id":"","url":"https://api.github.com/users/stacywsmith","html_url":"https://github.com/stacywsmith","followers_url":"https://api.github.com/users/stacywsmith/followers","following_url":"https://api.github.com/users/stacywsmith/following{/other_user}","gists_url":"https://api.github.com/users/stacywsmith/gists{/gist_id}","starred_url":"https://api.github.com/users/stacywsmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stacywsmith/subscriptions","organizations_url":"https://api.github.com/users/stacywsmith/orgs","repos_url":"https://api.github.com/users/stacywsmith/repos","events_url":"https://api.github.com/users/stacywsmith/events{/privacy}","received_events_url":"https://api.github.com/users/stacywsmith/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/stacywsmith/py-junos-eznc","description":"Python library for Junos automation","fork":true,"url":"https://api.github.com/repos/stacywsmith/py-junos-eznc","forks_url":"https://api.github.com/repos/stacywsmith/py-junos-eznc/forks","keys_url":"https://api.github.com/repos/stacywsmith/py-junos-eznc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stacywsmith/py-junos-eznc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stacywsmith/py-junos-eznc/teams","hooks_url":"https://api.github.com/repos/stacywsmith/py-junos-eznc/hooks","issue_events_url":"https://api.github.com/repos/stacywsmith/py-junos-eznc/issues/events{/number}","events_url":"https://api.github.com/repos/stacywsmith/py-junos-eznc/events","assignees_url":"https://api.github.com/repos/stacywsmith/py-junos-eznc/assignees{/user}","branches_url":"https://api.github.com/repos/stacywsmith/py-junos-eznc/branches{/branch}","tags_url":"https://api.github.com/repos/stacywsmith/py-junos-eznc/tags","blobs_url":"https://api.github.com/repos/stacywsmith/py-junos-eznc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stacywsmith/py-junos-eznc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stacywsmith/py-junos-eznc/git/refs{/sha}","trees_url":"https://api.github.com/repos/stacywsmith/py-junos-eznc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stacywsmith/py-junos-eznc/statuses/{sha}","languages_url":"https://api.github.com/repos/stacywsmith/py-junos-eznc/languages","stargazers_url":"https://api.github.com/repos/stacywsmith/py-junos-eznc/stargazers","contributors_url":"https://api.github.com/repos/stacywsmith/py-junos-eznc/contributors","subscribers_url":"https://api.github.com/repos/stacywsmith/py-junos-eznc/subscribers","subscription_url":"https://api.github.com/repos/stacywsmith/py-junos-eznc/subscription","commits_url":"https://api.github.com/repos/stacywsmith/py-junos-eznc/commits{/sha}","git_commits_url":"https://api.github.com/repos/stacywsmith/py-junos-eznc/git/commits{/sha}","comments_url":"https://api.github.com/repos/stacywsmith/py-junos-eznc/comments{/number}","issue_comment_url":"https://api.github.com/repos/stacywsmith/py-junos-eznc/issues/comments{/number}","contents_url":"https://api.github.com/repos/stacywsmith/py-junos-eznc/contents/{+path}","compare_url":"https://api.github.com/repos/stacywsmith/py-junos-eznc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stacywsmith/py-junos-eznc/merges","archive_url":"https://api.github.com/repos/stacywsmith/py-junos-eznc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stacywsmith/py-junos-eznc/downloads","issues_url":"https://api.github.com/repos/stacywsmith/py-junos-eznc/issues{/number}","pulls_url":"https://api.github.com/repos/stacywsmith/py-junos-eznc/pulls{/number}","milestones_url":"https://api.github.com/repos/stacywsmith/py-junos-eznc/milestones{/number}","notifications_url":"https://api.github.com/repos/stacywsmith/py-junos-eznc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stacywsmith/py-junos-eznc/labels{/name}","releases_url":"https://api.github.com/repos/stacywsmith/py-junos-eznc/releases{/id}","deployments_url":"https://api.github.com/repos/stacywsmith/py-junos-eznc/deployments","created_at":"2015-10-14T18:42:57Z","updated_at":"2016-06-22T00:17:19Z","pushed_at":"2017-03-16T02:13:17Z","git_url":"git://github.com/stacywsmith/py-junos-eznc.git","ssh_url":"git@github.com:stacywsmith/py-junos-eznc.git","clone_url":"https://github.com/stacywsmith/py-junos-eznc.git","svn_url":"https://github.com/stacywsmith/py-junos-eznc","homepage":"","size":2118,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"Juniper:master","ref":"master","sha":"83891e0cbe0bd1207ec7627e35d464d032caf71a","user":{"login":"Juniper","id":3935164,"avatar_url":"https://avatars3.githubusercontent.com/u/3935164?v=3","gravatar_id":"","url":"https://api.github.com/users/Juniper","html_url":"https://github.com/Juniper","followers_url":"https://api.github.com/users/Juniper/followers","following_url":"https://api.github.com/users/Juniper/following{/other_user}","gists_url":"https://api.github.com/users/Juniper/gists{/gist_id}","starred_url":"https://api.github.com/users/Juniper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Juniper/subscriptions","organizations_url":"https://api.github.com/users/Juniper/orgs","repos_url":"https://api.github.com/users/Juniper/repos","events_url":"https://api.github.com/users/Juniper/events{/privacy}","received_events_url":"https://api.github.com/users/Juniper/received_events","type":"Organization","site_admin":false},"repo":{"id":13530047,"name":"py-junos-eznc","full_name":"Juniper/py-junos-eznc","owner":{"login":"Juniper","id":3935164,"avatar_url":"https://avatars3.githubusercontent.com/u/3935164?v=3","gravatar_id":"","url":"https://api.github.com/users/Juniper","html_url":"https://github.com/Juniper","followers_url":"https://api.github.com/users/Juniper/followers","following_url":"https://api.github.com/users/Juniper/following{/other_user}","gists_url":"https://api.github.com/users/Juniper/gists{/gist_id}","starred_url":"https://api.github.com/users/Juniper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Juniper/subscriptions","organizations_url":"https://api.github.com/users/Juniper/orgs","repos_url":"https://api.github.com/users/Juniper/repos","events_url":"https://api.github.com/users/Juniper/events{/privacy}","received_events_url":"https://api.github.com/users/Juniper/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Juniper/py-junos-eznc","description":"Python library for Junos automation","fork":false,"url":"https://api.github.com/repos/Juniper/py-junos-eznc","forks_url":"https://api.github.com/repos/Juniper/py-junos-eznc/forks","keys_url":"https://api.github.com/repos/Juniper/py-junos-eznc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Juniper/py-junos-eznc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Juniper/py-junos-eznc/teams","hooks_url":"https://api.github.com/repos/Juniper/py-junos-eznc/hooks","issue_events_url":"https://api.github.com/repos/Juniper/py-junos-eznc/issues/events{/number}","events_url":"https://api.github.com/repos/Juniper/py-junos-eznc/events","assignees_url":"https://api.github.com/repos/Juniper/py-junos-eznc/assignees{/user}","branches_url":"https://api.github.com/repos/Juniper/py-junos-eznc/branches{/branch}","tags_url":"https://api.github.com/repos/Juniper/py-junos-eznc/tags","blobs_url":"https://api.github.com/repos/Juniper/py-junos-eznc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Juniper/py-junos-eznc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Juniper/py-junos-eznc/git/refs{/sha}","trees_url":"https://api.github.com/repos/Juniper/py-junos-eznc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Juniper/py-junos-eznc/statuses/{sha}","languages_url":"https://api.github.com/repos/Juniper/py-junos-eznc/languages","stargazers_url":"https://api.github.com/repos/Juniper/py-junos-eznc/stargazers","contributors_url":"https://api.github.com/repos/Juniper/py-junos-eznc/contributors","subscribers_url":"https://api.github.com/repos/Juniper/py-junos-eznc/subscribers","subscription_url":"https://api.github.com/repos/Juniper/py-junos-eznc/subscription","commits_url":"https://api.github.com/repos/Juniper/py-junos-eznc/commits{/sha}","git_commits_url":"https://api.github.com/repos/Juniper/py-junos-eznc/git/commits{/sha}","comments_url":"https://api.github.com/repos/Juniper/py-junos-eznc/comments{/number}","issue_comment_url":"https://api.github.com/repos/Juniper/py-junos-eznc/issues/comments{/number}","contents_url":"https://api.github.com/repos/Juniper/py-junos-eznc/contents/{+path}","compare_url":"https://api.github.com/repos/Juniper/py-junos-eznc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Juniper/py-junos-eznc/merges","archive_url":"https://api.github.com/repos/Juniper/py-junos-eznc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Juniper/py-junos-eznc/downloads","issues_url":"https://api.github.com/repos/Juniper/py-junos-eznc/issues{/number}","pulls_url":"https://api.github.com/repos/Juniper/py-junos-eznc/pulls{/number}","milestones_url":"https://api.github.com/repos/Juniper/py-junos-eznc/milestones{/number}","notifications_url":"https://api.github.com/repos/Juniper/py-junos-eznc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Juniper/py-junos-eznc/labels{/name}","releases_url":"https://api.github.com/repos/Juniper/py-junos-eznc/releases{/id}","deployments_url":"https://api.github.com/repos/Juniper/py-junos-eznc/deployments","created_at":"2013-10-12T22:21:38Z","updated_at":"2017-03-16T00:23:47Z","pushed_at":"2017-03-16T07:29:22Z","git_url":"git://github.com/Juniper/py-junos-eznc.git","ssh_url":"git@github.com:Juniper/py-junos-eznc.git","clone_url":"https://github.com/Juniper/py-junos-eznc.git","svn_url":"https://github.com/Juniper/py-junos-eznc","homepage":"","size":2114,"stargazers_count":307,"watchers_count":307,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":181,"mirror_url":null,"open_issues_count":32,"forks":181,"open_issues":32,"watchers":307,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Juniper/py-junos-eznc/pulls/682"},"html":{"href":"https://github.com/Juniper/py-junos-eznc/pull/682"},"issue":{"href":"https://api.github.com/repos/Juniper/py-junos-eznc/issues/682"},"comments":{"href":"https://api.github.com/repos/Juniper/py-junos-eznc/issues/682/comments"},"review_comments":{"href":"https://api.github.com/repos/Juniper/py-junos-eznc/pulls/682/comments"},"review_comment":{"href":"https://api.github.com/repos/Juniper/py-junos-eznc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Juniper/py-junos-eznc/pulls/682/commits"},"statuses":{"href":"https://api.github.com/repos/Juniper/py-junos-eznc/statuses/aa0e0a6b26eccedcc0f6d1039407db0feef96f9b"}}}}
{"actor":{"display_login":"stacywsmith"}}