{"id":31786203,"url":"https://github.com/zpascal/bosh-libvirt-cpi-release","last_synced_at":"2025-10-10T12:49:36.197Z","repository":{"id":318426717,"uuid":"1063213408","full_name":"ZPascal/bosh-libvirt-cpi-release","owner":"ZPascal","description":"bosh-virtualbox-cpi-release","archived":false,"fork":false,"pushed_at":"2025-10-07T04:35:56.000Z","size":2387,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-07T06:26:00.505Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ZPascal.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-24T10:16:20.000Z","updated_at":"2025-10-07T04:36:00.000Z","dependencies_parsed_at":"2025-10-07T06:36:37.421Z","dependency_job_id":null,"html_url":"https://github.com/ZPascal/bosh-libvirt-cpi-release","commit_stats":null,"previous_names":["zpascal/bosh-libvirt-cpi-release"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/ZPascal/bosh-libvirt-cpi-release","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZPascal%2Fbosh-libvirt-cpi-release","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZPascal%2Fbosh-libvirt-cpi-release/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZPascal%2Fbosh-libvirt-cpi-release/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZPascal%2Fbosh-libvirt-cpi-release/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ZPascal","download_url":"https://codeload.github.com/ZPascal/bosh-libvirt-cpi-release/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZPascal%2Fbosh-libvirt-cpi-release/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279003891,"owners_count":26083641,"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-10T02:00:06.843Z","response_time":62,"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":"2025-10-10T12:49:35.328Z","updated_at":"2025-10-10T12:49:36.183Z","avatar_url":"https://github.com/ZPascal.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Roadmap: Replacing the VirtualBox CLI Wrapper with libvirt\n\nThis document outlines the steps required to replace the existing VirtualBox implementation with a `libvirt`-based implementation. The goal is to make the CPI more flexible and remove the dependency on the VirtualBox CLI.\n\n## Phase 1: Analysis and Design\n\n1.  **Analysis of the Existing Codebase:**\n    *   Investigate the `vm` and `driver` packages to understand the exact interaction with the VirtualBox CLI.\n    *   Identify the core functionalities that need to be replaced by `libvirt` (e.g., VM creation, status queries, network and storage management).\n    *   Analyze the test suites (`cpi_suite_test.go`, `vm_suite_test.go`) to understand the scope of test adjustments required for the migration.\n\n2.  **Design of an Abstraction Layer:**\n    *   Define a `Driver` interface that encapsulates interactions with the virtualization layer. This interface should include methods for all VM operations (create, delete, start, stop, etc.).\n    *   Adapt the `cpi.Factory` to choose different `Driver` implementations. This could be controlled via the `cpi.json` configuration file.\n\n## Phase 2: Implementation\n\n3.  **Implementation of the `libvirt` Driver:**\n    *   Create a new Go package for the `libvirt` driver (e.g., `driver/libvirt_driver`).\n    *   Implement the `Driver` interface defined in Phase 1 using the `go-libvirt` library.\n    *   Ensure that all functions required by the CPI (VM lifecycle, network and disk management) are covered.\n\n4.  **Integration and migration of the `libvirt` Driver:**\n    *   Adjust the factory code (`cpi/factory.go`) to instantiate the new `libvirt` driver based on the configuration.\n    *   Refactor/ migrate the existing CPI logic to use the new `Driver` interface instead of direct VirtualBox calls.\n\n## Phase 3: Testing\n\n5.  **Unit Tests:**\n    *   Create unit tests for the new `libvirt` driver. Mocks for the `go-libvirt` API can be helpful here.\n    *   Adapt existing unit tests to account for the new abstraction layer.\n\n6.  **Integration Tests:**\n    *   Adapt and extend the existing integration tests (`cpi_suite_test.go`) to fully test the `libvirt` implementation.\n    *   Perform end-to-end tests in a BOSH environment to ensure the CPI functions correctly with `libvirt`.\n\n## Phase 4: Documentation and Finalization\n\n7.  **Documentation:**\n    *   Update the `README.md` file with instructions on how to configure and use the `libvirt`-based CPI.\n    *   Document the new `Driver` architecture and how additional virtualization platforms can be added if needed.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzpascal%2Fbosh-libvirt-cpi-release","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzpascal%2Fbosh-libvirt-cpi-release","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzpascal%2Fbosh-libvirt-cpi-release/lists"}