{"action":"created","issue":{"url":"https://api.github.com/repos/Juniper/ruby-junos-ez-stdlib/issues/58","repository_url":"https://api.github.com/repos/Juniper/ruby-junos-ez-stdlib","labels_url":"https://api.github.com/repos/Juniper/ruby-junos-ez-stdlib/issues/58/labels{/name}","comments_url":"https://api.github.com/repos/Juniper/ruby-junos-ez-stdlib/issues/58/comments","events_url":"https://api.github.com/repos/Juniper/ruby-junos-ez-stdlib/issues/58/events","html_url":"https://github.com/Juniper/ruby-junos-ez-stdlib/pull/58","id":311742896,"number":58,"title":"Fix diff? method for newer JunOS versions","user":{"login":"lucasmpb","id":713024,"avatar_url":"https://avatars1.githubusercontent.com/u/713024?v=4","gravatar_id":"","url":"https://api.github.com/users/lucasmpb","html_url":"https://github.com/lucasmpb","followers_url":"https://api.github.com/users/lucasmpb/followers","following_url":"https://api.github.com/users/lucasmpb/following{/other_user}","gists_url":"https://api.github.com/users/lucasmpb/gists{/gist_id}","starred_url":"https://api.github.com/users/lucasmpb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucasmpb/subscriptions","organizations_url":"https://api.github.com/users/lucasmpb/orgs","repos_url":"https://api.github.com/users/lucasmpb/repos","events_url":"https://api.github.com/users/lucasmpb/events{/privacy}","received_events_url":"https://api.github.com/users/lucasmpb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-05T19:39:52Z","updated_at":"2018-04-13T09:34:18Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/Juniper/ruby-junos-ez-stdlib/pulls/58","html_url":"https://github.com/Juniper/ruby-junos-ez-stdlib/pull/58","diff_url":"https://github.com/Juniper/ruby-junos-ez-stdlib/pull/58.diff","patch_url":"https://github.com/Juniper/ruby-junos-ez-stdlib/pull/58.patch"},"body":"There is an issue getting the `diff?` from a switch when there are no changes to be commited.\r\nOn JunOS ~14, `ndev.rpc.get_configuration( :compare=>'rollback', :rollback=> rollback_id.to_s )`returns an xml response:\r\n```\r\n<configuration-information>\r\n<configuration-output>\r\n</configuration-output>\r\n</configuration-information>\r\n```\r\nBut on JunOS ~17, the same method call, returns `nil` making the subsequent line to fail with `undefined method 'xpath' for nil:NilClass`\r\n\r\nAdding `:format => 'text'` to the call seems to make the behavior consistent across different JunOS versions\r\n\r\n\r\nPS: I took the idea from the more up to date python library https://github.com/Juniper/py-junos-eznc/blob/ce914d19030f51067b0c02c72fd69557f26c49e9/lib/jnpr/junos/utils/config.py#L225"},"comment":{"url":"https://api.github.com/repos/Juniper/ruby-junos-ez-stdlib/issues/comments/381081285","html_url":"https://github.com/Juniper/ruby-junos-ez-stdlib/pull/58#issuecomment-381081285","issue_url":"https://api.github.com/repos/Juniper/ruby-junos-ez-stdlib/issues/58","id":381081285,"user":{"login":"vnitinv","id":767016,"avatar_url":"https://avatars0.githubusercontent.com/u/767016?v=4","gravatar_id":"","url":"https://api.github.com/users/vnitinv","html_url":"https://github.com/vnitinv","followers_url":"https://api.github.com/users/vnitinv/followers","following_url":"https://api.github.com/users/vnitinv/following{/other_user}","gists_url":"https://api.github.com/users/vnitinv/gists{/gist_id}","starred_url":"https://api.github.com/users/vnitinv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vnitinv/subscriptions","organizations_url":"https://api.github.com/users/vnitinv/orgs","repos_url":"https://api.github.com/users/vnitinv/repos","events_url":"https://api.github.com/users/vnitinv/events{/privacy}","received_events_url":"https://api.github.com/users/vnitinv/received_events","type":"User","site_admin":false},"created_at":"2018-04-13T09:34:17Z","updated_at":"2018-04-13T09:34:17Z","author_association":"CONTRIBUTOR","body":"@lucasmpb I agree here it should be format text only. But scared if this change will break any existing user code. Will discuss with team. \r\n\r\n@ydnath Can you review this. I think this change should go in."}}
{"actor":{"display_login":"vnitinv"}}