{"action":"created","comment":{"url":"https://api.github.com/repos/cisco/cisco-network-node-utils/pulls/comments/66357924","id":66357924,"diff_hunk":"@@ -0,0 +1,285 @@\n+#\n+# NXAPI implementation of Router OSPF Area class\n+#\n+# June 2016, Sai Chintalapudi\n+#\n+# Copyright (c) 2016 Cisco and/or its affiliates.\n+#\n+# Licensed under the Apache License, Version 2.0 (the \"License\");\n+# you may not use this file except in compliance with the License.\n+# You may obtain a copy of the License at\n+#\n+#     http://www.apache.org/licenses/LICENSE-2.0\n+#\n+# Unless required by applicable law or agreed to in writing, software\n+# distributed under the License is distributed on an \"AS IS\" BASIS,\n+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+# See the License for the specific language governing permissions and\n+# limitations under the License.\n+\n+require 'ipaddr'\n+require_relative 'node_util'\n+require_relative 'router_ospf'\n+require_relative 'router_ospf_vrf'\n+\n+module Cisco\n+  # node_utils class for ospf_area\n+  class RouterOspfArea < NodeUtil\n+    attr_reader :router, :vrf, :area_id\n+\n+    def initialize(ospf_router, vrf_name, area_id)\n+      fail TypeError unless ospf_router.is_a?(String)\n+      fail TypeError unless vrf_name.is_a?(String)\n+      fail TypeError unless area_id.is_a?(String)\n+      fail ArgumentError unless ospf_router.length > 0\n+      fail ArgumentError unless vrf_name.length > 0\n+      fail ArgumentError unless area_id.length > 0\n+\n+      # check the area_id is a proper ipv4 address\n+      fail ArgumentError if (begin\n+                               IPAddr.new(area_id)\n+                             rescue\n+                               nil\n+                             end).nil?\n+      fail ArgumentError unless IPAddr.new(area_id).ipv4?\n+\n+      @router = ospf_router\n+      @vrf = vrf_name\n+      @area_id = area_id\n+\n+      set_args_keys_default\n+    end\n+\n+    def self.areas","path":"lib/cisco_node_utils/router_ospf_area.rb","position":53,"original_position":53,"commit_id":"f65107fe580f6df5fa90a4127655fe34143fc16e","original_commit_id":"1f1924938a7d3d799ff75bc2896bc187e7614510","user":{"login":"saichint","id":15788941,"avatar_url":"https://avatars.githubusercontent.com/u/15788941?v=3","gravatar_id":"","url":"https://api.github.com/users/saichint","html_url":"https://github.com/saichint","followers_url":"https://api.github.com/users/saichint/followers","following_url":"https://api.github.com/users/saichint/following{/other_user}","gists_url":"https://api.github.com/users/saichint/gists{/gist_id}","starred_url":"https://api.github.com/users/saichint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saichint/subscriptions","organizations_url":"https://api.github.com/users/saichint/orgs","repos_url":"https://api.github.com/users/saichint/repos","events_url":"https://api.github.com/users/saichint/events{/privacy}","received_events_url":"https://api.github.com/users/saichint/received_events","type":"User","site_admin":false},"body":"Done","created_at":"2016-06-08T23:18:19Z","updated_at":"2016-06-08T23:18:19Z","html_url":"https://github.com/cisco/cisco-network-node-utils/pull/422#discussion_r66357924","pull_request_url":"https://api.github.com/repos/cisco/cisco-network-node-utils/pulls/422","_links":{"self":{"href":"https://api.github.com/repos/cisco/cisco-network-node-utils/pulls/comments/66357924"},"html":{"href":"https://github.com/cisco/cisco-network-node-utils/pull/422#discussion_r66357924"},"pull_request":{"href":"https://api.github.com/repos/cisco/cisco-network-node-utils/pulls/422"}}},"pull_request":{"url":"https://api.github.com/repos/cisco/cisco-network-node-utils/pulls/422","id":72964279,"html_url":"https://github.com/cisco/cisco-network-node-utils/pull/422","diff_url":"https://github.com/cisco/cisco-network-node-utils/pull/422.diff","patch_url":"https://github.com/cisco/cisco-network-node-utils/pull/422.patch","issue_url":"https://api.github.com/repos/cisco/cisco-network-node-utils/issues/422","number":422,"state":"open","locked":false,"title":"Ospf Area","user":{"login":"saichint","id":15788941,"avatar_url":"https://avatars.githubusercontent.com/u/15788941?v=3","gravatar_id":"","url":"https://api.github.com/users/saichint","html_url":"https://github.com/saichint","followers_url":"https://api.github.com/users/saichint/followers","following_url":"https://api.github.com/users/saichint/following{/other_user}","gists_url":"https://api.github.com/users/saichint/gists{/gist_id}","starred_url":"https://api.github.com/users/saichint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saichint/subscriptions","organizations_url":"https://api.github.com/users/saichint/orgs","repos_url":"https://api.github.com/users/saichint/repos","events_url":"https://api.github.com/users/saichint/events{/privacy}","received_events_url":"https://api.github.com/users/saichint/received_events","type":"User","site_admin":false},"body":"This PR is for a new provider ospf_area. All properties except nssa based properties are implemented. virtual-link properties will be implemented in a separate provider.\r\n\r\nDue to some \"no\" cmd not working properly for area range based configs on the nx platforms, some workarounds are added.\r\n\r\nAll tests have passed on all nexus platforms.","created_at":"2016-06-07T23:18:16Z","updated_at":"2016-06-08T23:18:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"aff47b3e0d28f265b61834fd2454d409fefddff8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cisco/cisco-network-node-utils/pulls/422/commits","review_comments_url":"https://api.github.com/repos/cisco/cisco-network-node-utils/pulls/422/comments","review_comment_url":"https://api.github.com/repos/cisco/cisco-network-node-utils/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cisco/cisco-network-node-utils/issues/422/comments","statuses_url":"https://api.github.com/repos/cisco/cisco-network-node-utils/statuses/f65107fe580f6df5fa90a4127655fe34143fc16e","head":{"label":"saichint:ospf","ref":"ospf","sha":"f65107fe580f6df5fa90a4127655fe34143fc16e","user":{"login":"saichint","id":15788941,"avatar_url":"https://avatars.githubusercontent.com/u/15788941?v=3","gravatar_id":"","url":"https://api.github.com/users/saichint","html_url":"https://github.com/saichint","followers_url":"https://api.github.com/users/saichint/followers","following_url":"https://api.github.com/users/saichint/following{/other_user}","gists_url":"https://api.github.com/users/saichint/gists{/gist_id}","starred_url":"https://api.github.com/users/saichint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saichint/subscriptions","organizations_url":"https://api.github.com/users/saichint/orgs","repos_url":"https://api.github.com/users/saichint/repos","events_url":"https://api.github.com/users/saichint/events{/privacy}","received_events_url":"https://api.github.com/users/saichint/received_events","type":"User","site_admin":false},"repo":{"id":46826125,"name":"cisco-network-node-utils","full_name":"saichint/cisco-network-node-utils","owner":{"login":"saichint","id":15788941,"avatar_url":"https://avatars.githubusercontent.com/u/15788941?v=3","gravatar_id":"","url":"https://api.github.com/users/saichint","html_url":"https://github.com/saichint","followers_url":"https://api.github.com/users/saichint/followers","following_url":"https://api.github.com/users/saichint/following{/other_user}","gists_url":"https://api.github.com/users/saichint/gists{/gist_id}","starred_url":"https://api.github.com/users/saichint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saichint/subscriptions","organizations_url":"https://api.github.com/users/saichint/orgs","repos_url":"https://api.github.com/users/saichint/repos","events_url":"https://api.github.com/users/saichint/events{/privacy}","received_events_url":"https://api.github.com/users/saichint/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/saichint/cisco-network-node-utils","description":"","fork":true,"url":"https://api.github.com/repos/saichint/cisco-network-node-utils","forks_url":"https://api.github.com/repos/saichint/cisco-network-node-utils/forks","keys_url":"https://api.github.com/repos/saichint/cisco-network-node-utils/keys{/key_id}","collaborators_url":"https://api.github.com/repos/saichint/cisco-network-node-utils/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/saichint/cisco-network-node-utils/teams","hooks_url":"https://api.github.com/repos/saichint/cisco-network-node-utils/hooks","issue_events_url":"https://api.github.com/repos/saichint/cisco-network-node-utils/issues/events{/number}","events_url":"https://api.github.com/repos/saichint/cisco-network-node-utils/events","assignees_url":"https://api.github.com/repos/saichint/cisco-network-node-utils/assignees{/user}","branches_url":"https://api.github.com/repos/saichint/cisco-network-node-utils/branches{/branch}","tags_url":"https://api.github.com/repos/saichint/cisco-network-node-utils/tags","blobs_url":"https://api.github.com/repos/saichint/cisco-network-node-utils/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/saichint/cisco-network-node-utils/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/saichint/cisco-network-node-utils/git/refs{/sha}","trees_url":"https://api.github.com/repos/saichint/cisco-network-node-utils/git/trees{/sha}","statuses_url":"https://api.github.com/repos/saichint/cisco-network-node-utils/statuses/{sha}","languages_url":"https://api.github.com/repos/saichint/cisco-network-node-utils/languages","stargazers_url":"https://api.github.com/repos/saichint/cisco-network-node-utils/stargazers","contributors_url":"https://api.github.com/repos/saichint/cisco-network-node-utils/contributors","subscribers_url":"https://api.github.com/repos/saichint/cisco-network-node-utils/subscribers","subscription_url":"https://api.github.com/repos/saichint/cisco-network-node-utils/subscription","commits_url":"https://api.github.com/repos/saichint/cisco-network-node-utils/commits{/sha}","git_commits_url":"https://api.github.com/repos/saichint/cisco-network-node-utils/git/commits{/sha}","comments_url":"https://api.github.com/repos/saichint/cisco-network-node-utils/comments{/number}","issue_comment_url":"https://api.github.com/repos/saichint/cisco-network-node-utils/issues/comments{/number}","contents_url":"https://api.github.com/repos/saichint/cisco-network-node-utils/contents/{+path}","compare_url":"https://api.github.com/repos/saichint/cisco-network-node-utils/compare/{base}...{head}","merges_url":"https://api.github.com/repos/saichint/cisco-network-node-utils/merges","archive_url":"https://api.github.com/repos/saichint/cisco-network-node-utils/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/saichint/cisco-network-node-utils/downloads","issues_url":"https://api.github.com/repos/saichint/cisco-network-node-utils/issues{/number}","pulls_url":"https://api.github.com/repos/saichint/cisco-network-node-utils/pulls{/number}","milestones_url":"https://api.github.com/repos/saichint/cisco-network-node-utils/milestones{/number}","notifications_url":"https://api.github.com/repos/saichint/cisco-network-node-utils/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/saichint/cisco-network-node-utils/labels{/name}","releases_url":"https://api.github.com/repos/saichint/cisco-network-node-utils/releases{/id}","deployments_url":"https://api.github.com/repos/saichint/cisco-network-node-utils/deployments","created_at":"2015-11-24T23:57:18Z","updated_at":"2016-02-11T02:10:48Z","pushed_at":"2016-06-08T23:17:55Z","git_url":"git://github.com/saichint/cisco-network-node-utils.git","ssh_url":"git@github.com:saichint/cisco-network-node-utils.git","clone_url":"https://github.com/saichint/cisco-network-node-utils.git","svn_url":"https://github.com/saichint/cisco-network-node-utils","homepage":null,"size":3568,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"develop"}},"base":{"label":"cisco:develop","ref":"develop","sha":"a883090f53f7a347cd3c320e0d5c87ae4ede5297","user":{"login":"cisco","id":1376999,"avatar_url":"https://avatars.githubusercontent.com/u/1376999?v=3","gravatar_id":"","url":"https://api.github.com/users/cisco","html_url":"https://github.com/cisco","followers_url":"https://api.github.com/users/cisco/followers","following_url":"https://api.github.com/users/cisco/following{/other_user}","gists_url":"https://api.github.com/users/cisco/gists{/gist_id}","starred_url":"https://api.github.com/users/cisco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cisco/subscriptions","organizations_url":"https://api.github.com/users/cisco/orgs","repos_url":"https://api.github.com/users/cisco/repos","events_url":"https://api.github.com/users/cisco/events{/privacy}","received_events_url":"https://api.github.com/users/cisco/received_events","type":"Organization","site_admin":false},"repo":{"id":39565196,"name":"cisco-network-node-utils","full_name":"cisco/cisco-network-node-utils","owner":{"login":"cisco","id":1376999,"avatar_url":"https://avatars.githubusercontent.com/u/1376999?v=3","gravatar_id":"","url":"https://api.github.com/users/cisco","html_url":"https://github.com/cisco","followers_url":"https://api.github.com/users/cisco/followers","following_url":"https://api.github.com/users/cisco/following{/other_user}","gists_url":"https://api.github.com/users/cisco/gists{/gist_id}","starred_url":"https://api.github.com/users/cisco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cisco/subscriptions","organizations_url":"https://api.github.com/users/cisco/orgs","repos_url":"https://api.github.com/users/cisco/repos","events_url":"https://api.github.com/users/cisco/events{/privacy}","received_events_url":"https://api.github.com/users/cisco/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cisco/cisco-network-node-utils","description":"","fork":false,"url":"https://api.github.com/repos/cisco/cisco-network-node-utils","forks_url":"https://api.github.com/repos/cisco/cisco-network-node-utils/forks","keys_url":"https://api.github.com/repos/cisco/cisco-network-node-utils/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cisco/cisco-network-node-utils/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cisco/cisco-network-node-utils/teams","hooks_url":"https://api.github.com/repos/cisco/cisco-network-node-utils/hooks","issue_events_url":"https://api.github.com/repos/cisco/cisco-network-node-utils/issues/events{/number}","events_url":"https://api.github.com/repos/cisco/cisco-network-node-utils/events","assignees_url":"https://api.github.com/repos/cisco/cisco-network-node-utils/assignees{/user}","branches_url":"https://api.github.com/repos/cisco/cisco-network-node-utils/branches{/branch}","tags_url":"https://api.github.com/repos/cisco/cisco-network-node-utils/tags","blobs_url":"https://api.github.com/repos/cisco/cisco-network-node-utils/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cisco/cisco-network-node-utils/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cisco/cisco-network-node-utils/git/refs{/sha}","trees_url":"https://api.github.com/repos/cisco/cisco-network-node-utils/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cisco/cisco-network-node-utils/statuses/{sha}","languages_url":"https://api.github.com/repos/cisco/cisco-network-node-utils/languages","stargazers_url":"https://api.github.com/repos/cisco/cisco-network-node-utils/stargazers","contributors_url":"https://api.github.com/repos/cisco/cisco-network-node-utils/contributors","subscribers_url":"https://api.github.com/repos/cisco/cisco-network-node-utils/subscribers","subscription_url":"https://api.github.com/repos/cisco/cisco-network-node-utils/subscription","commits_url":"https://api.github.com/repos/cisco/cisco-network-node-utils/commits{/sha}","git_commits_url":"https://api.github.com/repos/cisco/cisco-network-node-utils/git/commits{/sha}","comments_url":"https://api.github.com/repos/cisco/cisco-network-node-utils/comments{/number}","issue_comment_url":"https://api.github.com/repos/cisco/cisco-network-node-utils/issues/comments{/number}","contents_url":"https://api.github.com/repos/cisco/cisco-network-node-utils/contents/{+path}","compare_url":"https://api.github.com/repos/cisco/cisco-network-node-utils/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cisco/cisco-network-node-utils/merges","archive_url":"https://api.github.com/repos/cisco/cisco-network-node-utils/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cisco/cisco-network-node-utils/downloads","issues_url":"https://api.github.com/repos/cisco/cisco-network-node-utils/issues{/number}","pulls_url":"https://api.github.com/repos/cisco/cisco-network-node-utils/pulls{/number}","milestones_url":"https://api.github.com/repos/cisco/cisco-network-node-utils/milestones{/number}","notifications_url":"https://api.github.com/repos/cisco/cisco-network-node-utils/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cisco/cisco-network-node-utils/labels{/name}","releases_url":"https://api.github.com/repos/cisco/cisco-network-node-utils/releases{/id}","deployments_url":"https://api.github.com/repos/cisco/cisco-network-node-utils/deployments","created_at":"2015-07-23T12:07:39Z","updated_at":"2016-05-23T07:33:11Z","pushed_at":"2016-06-08T23:17:56Z","git_url":"git://github.com/cisco/cisco-network-node-utils.git","ssh_url":"git@github.com:cisco/cisco-network-node-utils.git","clone_url":"https://github.com/cisco/cisco-network-node-utils.git","svn_url":"https://github.com/cisco/cisco-network-node-utils","homepage":null,"size":5425,"stargazers_count":14,"watchers_count":14,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":37,"mirror_url":null,"open_issues_count":4,"forks":37,"open_issues":4,"watchers":14,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/cisco/cisco-network-node-utils/pulls/422"},"html":{"href":"https://github.com/cisco/cisco-network-node-utils/pull/422"},"issue":{"href":"https://api.github.com/repos/cisco/cisco-network-node-utils/issues/422"},"comments":{"href":"https://api.github.com/repos/cisco/cisco-network-node-utils/issues/422/comments"},"review_comments":{"href":"https://api.github.com/repos/cisco/cisco-network-node-utils/pulls/422/comments"},"review_comment":{"href":"https://api.github.com/repos/cisco/cisco-network-node-utils/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cisco/cisco-network-node-utils/pulls/422/commits"},"statuses":{"href":"https://api.github.com/repos/cisco/cisco-network-node-utils/statuses/f65107fe580f6df5fa90a4127655fe34143fc16e"}}}}
{"actor":{"display_login":"saichint"}}