{"id":16139455,"url":"https://github.com/networkop/cvp-netsim","last_synced_at":"2025-10-05T17:11:16.087Z","repository":{"id":44960137,"uuid":"175591223","full_name":"networkop/cvp-netsim","owner":"networkop","description":null,"archived":false,"fork":false,"pushed_at":"2022-01-15T16:48:27.000Z","size":284,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-20T00:51:25.530Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/networkop.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-03-14T09:37:41.000Z","updated_at":"2023-06-03T16:38:06.000Z","dependencies_parsed_at":"2022-09-11T14:11:33.263Z","dependency_job_id":null,"html_url":"https://github.com/networkop/cvp-netsim","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/networkop/cvp-netsim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/networkop%2Fcvp-netsim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/networkop%2Fcvp-netsim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/networkop%2Fcvp-netsim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/networkop%2Fcvp-netsim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/networkop","download_url":"https://codeload.github.com/networkop/cvp-netsim/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/networkop%2Fcvp-netsim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278486308,"owners_count":25994945,"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","status":"online","status_checked_at":"2025-10-05T02:00:06.059Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-10-09T23:49:07.120Z","updated_at":"2025-10-05T17:11:16.068Z","avatar_url":"https://github.com/networkop.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cvp-netsim\nA script that creates [k8s-topo][k8s-topo] (and [docker-topo][docker-topo]) compliant topology and configuration files (artefacts) based on the information extracted from Arista CloudVision Portal (CVP)\n\n![](cvp-netsim.png)\n\n## Installation\n\nNo installation needed, just clone this repository\n\n```bash\ngit clone https://github.com/networkop/cvp-netsim.git \u0026\u0026 cd cvp-netsim\n```\n\n## Usage\n\n```\n./ingest.py -h\nusage: ingest.py [-h] [-d] [-i] [-f FILTER] [-v] cvp user pwd\n\nTool to ingest topology information from CVP\n\npositional arguments:\n  cvp                   CVP address\n  user                  CVP username\n  pwd                   CVP password\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -d, --debug           Enable Debug\n  -i, --ignore          Ignore 3rd party devices\n  -f FILTER, --filter FILTER\n                        Match specified string in hostnames\n  -v, --veos            Produce artefacts for vEOS\n```\n\n## Example 1\n\nCreate artefacts for cEOS-based topology\n\n```\n/ingest.py localhost:9443 cvpadmin cvpadmin1\n```\n\n## Example 2\n\nCreate artefacts for containerised vEOS topology only for devices that have \"dc1\" in their hostname\n\n```\n./ingest.py -f dc1 -v localhost:9443 cvpadmin cvpadmin1\n```\n\n## How to use with k8s-topo\n\n\u003e Assuming that the kubernetes cluster already has [meshnet-cni][meshnet-cni] and [k8s-topo][k8s-topo] installed\n\nCopy the archived artefacts to the machine with k8s cluster credentials\n\n```\nscp cvp_topology.tar.gz k8s-lab-node-1:/home/core\n```\n\nFrom that machine, copy the artefacts into the `k8s-topo` pod\n\n```\nkubectl cp /home/core/cvp_topology.tar.gz k8s-topo:/\n```\n\nFrom inside the `k8s-topo` pod, extract the artefacts into a dedicated directory\n\n```\nrm -rf ./lab \u0026\u0026 mkdir -p ./lab\ntar zxvf /cvp_topology.tar.gz -C lab\n```\n\nAssuming the required docker image is already [uploaded to docker registry][veos-image], update the custom image mapping to chose the correct docker image based on a common string in devices hostnames\n\n```\ngrep -A 1 custom_image lab/cvp_topology.yml \ncustom_image:\n  dc1: \"10.1.1.1:5000/veos:latest\"\n```\n\nOtherwise, to use cEOS, set the `CEOS_IMAGE` environment variable (also assuming the image has been [pre-uploaded][ceos-image]):\n\n```\nexport CEOS_IMAGE=$(kubectl get service docker-registry -o json | jq -r '.spec.clusterIP'):5000/ceos:4.21.5F\n```\n\nCreate the topology with `k8s-topo`\n\n```\n./bin/k8s-topo --create lab/cvp_topology.yml \nINFO:__main__:All data has been uploaded to etcd\nINFO:__main__:All pods have been created successfully\n```\n\nCheck that devices have been created\n\n```\nkubectl get pods\nNAME                                      READY   STATUS    RESTARTS   AGE\netcd0                                     1/1     Running   0          2d12h\netcd1                                     1/1     Running   0          2d12h\netcd2                                     1/1     Running   0          2d12h\ninternal-docker-registry-7999859b-fm22v   1/1     Running   0          2d12h\nk8s-topo                                  1/1     Running   0          2d12h\nacme-dc1b2001-a                           1/1     Running   0          3m27s\nacme-dc1b2001-b                           1/1     Running   0          3m27s\nacme-dc1l3001-a                           1/1     Running   0          3m29s\nacme-dc1l3001-b                           1/1     Running   0          3m28s\nacme-dc1l3002-a                           1/1     Running   0          3m31s\nacme-dc1l3002-b                           1/1     Running   0          3m27s\nacme-dc1l3003-a                           1/1     Running   0          3m31s\nacme-dc1l3003-b                           1/1     Running   0          3m27s\nacme-dc1l3004-a                           1/1     Running   0          3m30s\nacme-dc1l3004-b                           1/1     Running   0          3m29s\nacme-dc1l3005-a                           1/1     Running   0          3m31s\nacme-dc1l3005-b                           1/1     Running   0          3m30s\nacme-dc1l3006-a                           1/1     Running   0          3m30s\nacme-dc1l3006-b                           1/1     Running   0          3m31s\nacme-dc1l3007-a                           1/1     Running   0          3m28s\nacme-dc1l3007-b                           1/1     Running   0          3m31s\nacme-dc1l3008-a                           1/1     Running   0          3m31s\nacme-dc1l3008-b                           1/1     Running   0          3m30s\nacme-dc1l3009-a                           1/1     Running   0          3m29s\nacme-dc1l3009-b                           1/1     Running   0          3m30s\nacme-dc1l3010-a                           1/1     Running   0          3m31s\nacme-dc1l3010-b                           1/1     Running   0          3m30s\nacme-dc1l3011-a                           1/1     Running   0          3m27s\nacme-dc1l3011-b                           1/1     Running   0          3m29s\nacme-dc1l3012-a                           1/1     Running   0          3m31s\nacme-dc1l3012-b                           1/1     Running   0          3m31s\nacme-dc1l3013-a                           1/1     Running   0          3m30s\nacme-dc1l3013-b                           1/1     Running   0          3m31s\nacme-dc1l3014-a                           1/1     Running   0          3m30s\nacme-dc1l3014-b                           1/1     Running   0          3m28s\nacme-dc1l3015-a                           1/1     Running   0          3m31s\nacme-dc1l3015-b                           1/1     Running   0          3m28s\nacme-dc1l3016-a                           1/1     Running   0          3m30s\nacme-dc1l3016-b                           1/1     Running   0          3m29s\nacme-dc1l3017-a                           1/1     Running   0          3m31s\nacme-dc1l3017-b                           1/1     Running   0          3m29s\nacme-dc1l3018-a                           1/1     Running   0          3m30s\nacme-dc1l3018-b                           1/1     Running   0          3m29s\nacme-dc1l3019-a                           1/1     Running   0          3m31s\nacme-dc1l3019-b                           1/1     Running   0          3m31s\nacme-dc1l3020-a                           1/1     Running   0          3m30s\nacme-dc1l3020-b                           1/1     Running   0          3m28s\nacme-dc1l3021-a                           1/1     Running   0          3m27s\nacme-dc1l3021-b                           1/1     Running   0          3m30s\nacme-dc1l3022-a                           1/1     Running   0          3m31s\nacme-dc1l3022-b                           1/1     Running   0          3m27s\nacme-dc1l3023-a                           1/1     Running   0          3m31s\nacme-dc1l3023-b                           1/1     Running   0          3m28s\nacme-dc1l3024-a                           1/1     Running   0          3m31s\nacme-dc1l3024-b                           1/1     Running   0          3m31s\nacme-dc1l3025-a                           1/1     Running   0          3m28s\nacme-dc1l3025-b                           1/1     Running   0          3m27s\nacme-dc1l3026-a                           1/1     Running   0          3m27s\nacme-dc1l3026-b                           1/1     Running   0          3m31s\nacme-dc1l3027-a                           1/1     Running   0          3m31s\nacme-dc1l3028-a                           1/1     Running   0          3m31s\nacme-dc1s1001-a                           1/1     Running   0          3m27s\nacme-dc1s1001-b                           1/1     Running   0          3m31s\n```\n\nConnect to a device:\n\n```\nkubectl exec -it acme-dc1s1001-a bash\nsh-4.2# telnet localhost 23\nTrying 127.0.0.1...\nConnected to localhost.\nEscape character is '^]'.\n\nacme-dc1s1001-a login: \n```\n\n\n[meshnet-cni]: https://github.com/networkop/meshnet-cni\n[k8s-topo]: https://github.com/networkop/k8s-topo\n[docker-topo]: https://github.com/networkop/docker-topo\n[veos-image]: https://github.com/networkop/docker-topo/tree/master/topo-extra-files/veos#uploading-to-docker-registry\n[ceos-image]: https://github.com/networkop/k8s-topo#private-docker-registry-setup","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetworkop%2Fcvp-netsim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnetworkop%2Fcvp-netsim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetworkop%2Fcvp-netsim/lists"}