{"id":18722411,"url":"https://github.com/nleiva/oc-coverage","last_synced_at":"2025-08-31T20:31:15.534Z","repository":{"id":87031012,"uuid":"139641845","full_name":"nleiva/oc-coverage","owner":"nleiva","description":null,"archived":false,"fork":false,"pushed_at":"2023-03-07T00:39:20.000Z","size":56,"stargazers_count":4,"open_issues_count":2,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-07T13:52:20.680Z","etag":null,"topics":["cisco","cisco-ios-xr","grpc","grpc-go","openconfig","yang"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nleiva.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-07-03T22:11:24.000Z","updated_at":"2024-08-29T11:18:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"f0d67087-b08a-4771-913e-1e377ff27e65","html_url":"https://github.com/nleiva/oc-coverage","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nleiva%2Foc-coverage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nleiva%2Foc-coverage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nleiva%2Foc-coverage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nleiva%2Foc-coverage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nleiva","download_url":"https://codeload.github.com/nleiva/oc-coverage/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231622025,"owners_count":18401831,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cisco","cisco-ios-xr","grpc","grpc-go","openconfig","yang"],"created_at":"2024-11-07T13:41:20.749Z","updated_at":"2024-12-28T12:15:53.194Z","avatar_url":"https://github.com/nleiva.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenConfig coverage\n\n[![published](https://static.production.devnetcloud.com/codeexchange/assets/images/devnet-published.svg)](https://developer.cisco.com/codeexchange/github/repo/nleiva/oc-coverage)\n\nA simple example to understand OpenConfig coverage of your IOS XR router config. It will retrieve the original config of a device, then pull the OpenConfig version of it. The target device config will be replaced by a minimum setup to allow remote access, and then the OpenConfig config will be applied on top of it. The result will be compared to the initial state to determine the coverage gap.\n\n![coverage](static/oc-diff.svg)\n\n## Requirements to run\n\n### Enviroment variables\n\nTarget device details:\n\n- USER (E.g. root)\n- PASSWORD (E.g. mypassword)\n- ADDRESS (E.g. [2001:420:2cff:1204::5501:3]:57344)\n\nYou can setup this as follows:\n\n```console\nexport USER=root\nexport PASSWORD=mypassword\nexport ADDRESS='[2001:420:2cff:1204::5501:3]:57344'\n```\n\n### gRPC config\n\nThe target device needs to have gRPC enabled.\n\n```console\ngrpc\n port 57344\n address-family ipv6\n```\n\n### Router's base config\n\nThis is the config that will provide minimun settings to allow a remote gRPC connection; IP addressing, username/password, and gRPC setup. See the example at [base.cfg](input/base.cfg).\n\n### Router's TLS Certificate\n\nIn order to secure the connection, a certificate file will need to be retrieved from the device.\n\n```console\nRP/0/RP0/CPU0:mrstn-5501-3.cisco.com# bash cat /misc/config/grpc/ems.pem\nTue Jul  3 14:43:05.712 UTC\n-----BEGIN CERTIFICATE-----\nMIIEEDCCAvigAwIBAgICFJgwDQYJKoZIhvcNAQENBQAwgbAxCzAJBgNVBAYTAlVT\nMQswCQYDVQQIEwJDQTERMA8GA1UEBxMIU2FuIEpvc2UxFzAVBgNVBAkTDjM3MDAg\n...\n-----END CERTIFICATE-----\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnleiva%2Foc-coverage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnleiva%2Foc-coverage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnleiva%2Foc-coverage/lists"}