{"action":"created","issue":{"url":"https://api.github.com/repos/mpenning/ciscoconfparse/issues/17","labels_url":"https://api.github.com/repos/mpenning/ciscoconfparse/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/mpenning/ciscoconfparse/issues/17/comments","events_url":"https://api.github.com/repos/mpenning/ciscoconfparse/issues/17/events","html_url":"https://github.com/mpenning/ciscoconfparse/issues/17","id":55437060,"number":17,"title":"Make Junos-style configs searchable","user":{"login":"mpenning","id":36991,"avatar_url":"https://avatars.githubusercontent.com/u/36991?v=3","gravatar_id":"","url":"https://api.github.com/users/mpenning","html_url":"https://github.com/mpenning","followers_url":"https://api.github.com/users/mpenning/followers","following_url":"https://api.github.com/users/mpenning/following{/other_user}","gists_url":"https://api.github.com/users/mpenning/gists{/gist_id}","starred_url":"https://api.github.com/users/mpenning/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpenning/subscriptions","organizations_url":"https://api.github.com/users/mpenning/orgs","repos_url":"https://api.github.com/users/mpenning/repos","events_url":"https://api.github.com/users/mpenning/events{/privacy}","received_events_url":"https://api.github.com/users/mpenning/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mpenning/ciscoconfparse/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":{"login":"mpenning","id":36991,"avatar_url":"https://avatars.githubusercontent.com/u/36991?v=3","gravatar_id":"","url":"https://api.github.com/users/mpenning","html_url":"https://github.com/mpenning","followers_url":"https://api.github.com/users/mpenning/followers","following_url":"https://api.github.com/users/mpenning/following{/other_user}","gists_url":"https://api.github.com/users/mpenning/gists{/gist_id}","starred_url":"https://api.github.com/users/mpenning/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpenning/subscriptions","organizations_url":"https://api.github.com/users/mpenning/orgs","repos_url":"https://api.github.com/users/mpenning/repos","events_url":"https://api.github.com/users/mpenning/events{/privacy}","received_events_url":"https://api.github.com/users/mpenning/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-01-26T00:29:47Z","updated_at":"2015-01-26T02:02:17Z","closed_at":null,"body":"Some people want ciscoconfparse to search Junos configurations... this bug tracks implementation of the feature request."},"comment":{"url":"https://api.github.com/repos/mpenning/ciscoconfparse/issues/comments/71406338","html_url":"https://github.com/mpenning/ciscoconfparse/issues/17#issuecomment-71406338","issue_url":"https://api.github.com/repos/mpenning/ciscoconfparse/issues/17","id":71406338,"user":{"login":"mpenning","id":36991,"avatar_url":"https://avatars.githubusercontent.com/u/36991?v=3","gravatar_id":"","url":"https://api.github.com/users/mpenning","html_url":"https://github.com/mpenning","followers_url":"https://api.github.com/users/mpenning/followers","following_url":"https://api.github.com/users/mpenning/following{/other_user}","gists_url":"https://api.github.com/users/mpenning/gists{/gist_id}","starred_url":"https://api.github.com/users/mpenning/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpenning/subscriptions","organizations_url":"https://api.github.com/users/mpenning/orgs","repos_url":"https://api.github.com/users/mpenning/repos","events_url":"https://api.github.com/users/mpenning/events{/privacy}","received_events_url":"https://api.github.com/users/mpenning/received_events","type":"User","site_admin":false},"created_at":"2015-01-26T02:02:17Z","updated_at":"2015-01-26T02:02:17Z","body":"Note: Juniper configurations are quite hierarchical... tfinding an IOS interface object just requires `parse.find_objects('^interface\\sGigabitEthernet0/0/1')`.\r\n\r\nTo get the interface object for a Junos interface such as `ge-0/0/1`, you'd need to use something like `parse.find_objects_w_parents(r'^\\s*interface', r'^\\s+ge-0/0/1')`, which returns the object for `ge-0/0/1` in a list.  Then you can iterate through for children of `ge-0/0/1` as you like.\r\n\r\nHowever, if you don't require the interface object itself, you can still enforce Junos interface configuration policies via `parse.find_objects_w_child(r'^\\s+ge-0/0/1', r'port-mode\\saccess')`; that policy checks whether `ge-0/0/1` is `port-mode access`."}}