Update core components including CLI, Nushell libraries, plugins system, and utility scripts for the provisioning system. CLI Updates: - Command implementations - CLI utilities and dispatching - Help system improvements - Command validation Library Updates: - Configuration management system - Infrastructure validation - Extension system improvements - Secrets management - Workspace operations - Cache management system Plugin System: - Interactive form plugin (inquire) - KCL integration plugin - Performance optimization plugins - Plugin registration system Utilities: - Build and distribution scripts - Installation procedures - Testing utilities - Development tools Documentation: - Library module documentation - Extension API guides - Plugin usage guides - Service management documentation All changes are backward compatible. No breaking changes.
164 lines
3.3 KiB
Plaintext
164 lines
3.3 KiB
Plaintext
# VM Management Module (Phase 0-1)
|
|
#
|
|
# Core VM functionality for Phase 0 (Detection) and Phase 1 (Lifecycle)
|
|
# Rule 8: Explicit exports
|
|
|
|
# Phase 0: Detection and Preparation
|
|
export use detector.nu {
|
|
"detect-hypervisors"
|
|
"get-primary-hypervisor"
|
|
"check-vm-capability"
|
|
}
|
|
|
|
export use preparer.nu {
|
|
"prepare-host-for-vms"
|
|
"get-host-hypervisor-status"
|
|
"list-vm-capable-hosts"
|
|
"ensure-vm-support"
|
|
}
|
|
|
|
# Phase 1: Backend Integration and Lifecycle
|
|
export use backend_libvirt.nu {
|
|
"libvirt-create-vm"
|
|
"libvirt-start-vm"
|
|
"libvirt-stop-vm"
|
|
"libvirt-delete-vm"
|
|
"libvirt-list-vms"
|
|
"libvirt-get-vm-info"
|
|
"libvirt-get-vm-ip"
|
|
"libvirt-create-disk"
|
|
}
|
|
|
|
export use persistence.nu {
|
|
"record-vm-creation"
|
|
"get-vm-state"
|
|
"update-vm-state"
|
|
"remove-vm-state"
|
|
"list-all-vms"
|
|
"get-vm-stats"
|
|
"cleanup-temporary-vms"
|
|
}
|
|
|
|
export use ssh_utils.nu {
|
|
"vm-ssh"
|
|
"vm-scp-to"
|
|
"vm-scp-from"
|
|
"vm-exec"
|
|
"vm-provision"
|
|
}
|
|
|
|
export use lifecycle.nu {
|
|
"vm-create"
|
|
"vm-start"
|
|
"vm-stop"
|
|
"vm-delete"
|
|
"vm-list"
|
|
"vm-info"
|
|
}
|
|
|
|
# Phase 2: Persistence and Lifecycle Management
|
|
export use vm_persistence.nu {
|
|
"register-permanent-vm"
|
|
"register-temporary-vm"
|
|
"get-vm-persistence-info"
|
|
"list-permanent-vms"
|
|
"list-temporary-vms"
|
|
"find-expired-vms"
|
|
"cleanup-expired-vms"
|
|
"get-vm-uptime"
|
|
"get-vm-time-to-cleanup"
|
|
"extend-vm-ttl"
|
|
"get-vm-persistence-stats"
|
|
}
|
|
|
|
export use cleanup_scheduler.nu {
|
|
"start-cleanup-scheduler"
|
|
"stop-cleanup-scheduler"
|
|
"get-cleanup-scheduler-status"
|
|
"schedule-vm-cleanup"
|
|
"cancel-vm-cleanup"
|
|
"get-cleanup-queue"
|
|
}
|
|
|
|
export use state_recovery.nu {
|
|
"recover-vms-on-boot"
|
|
"save-vm-state-snapshot"
|
|
"restore-vm-state-snapshot"
|
|
"register-vm-autostart"
|
|
"get-vms-pending-recovery"
|
|
"wait-for-vm-ssh"
|
|
"create-vm-recovery-script"
|
|
}
|
|
|
|
# Phase 3: Golden Images
|
|
export use golden_image_builder.nu {
|
|
"build-golden-image"
|
|
"list-golden-images"
|
|
"get-image-info"
|
|
"delete-golden-image"
|
|
"create-vm-from-golden-image"
|
|
"build-image-from-vm"
|
|
}
|
|
|
|
export use golden_image_cache.nu {
|
|
"cache-initialize"
|
|
"cache-add"
|
|
"cache-get"
|
|
"cache-list"
|
|
"cache-cleanup"
|
|
"cache-stats"
|
|
"version-create"
|
|
"version-list"
|
|
"version-get"
|
|
"version-deprecate"
|
|
"version-delete"
|
|
"version-rollback"
|
|
}
|
|
|
|
# Phase 4: Nested Provisioning, Volumes, Networking
|
|
export use volume_management.nu {
|
|
"volume-create"
|
|
"volume-list"
|
|
"volume-info"
|
|
"volume-attach"
|
|
"volume-detach"
|
|
"volume-snapshot"
|
|
"volume-restore"
|
|
"volume-delete"
|
|
"volume-stats"
|
|
}
|
|
|
|
export use network_management.nu {
|
|
"network-create"
|
|
"network-list"
|
|
"network-info"
|
|
"network-connect"
|
|
"network-disconnect"
|
|
"network-policy-create"
|
|
"network-policy-list"
|
|
"network-stats"
|
|
"vlan-create"
|
|
"vlan-list"
|
|
}
|
|
|
|
export use nested_provisioning.nu {
|
|
"nested-vm-create"
|
|
"nested-vm-list"
|
|
"nested-vm-info"
|
|
"nested-vm-delete"
|
|
"container-create"
|
|
"container-list"
|
|
"container-delete"
|
|
"nesting-stats"
|
|
}
|
|
|
|
export use multi_tier_deployment.nu {
|
|
"deployment-create"
|
|
"deployment-deploy"
|
|
"deployment-list"
|
|
"deployment-info"
|
|
"deployment-delete"
|
|
"deployment-scale"
|
|
"deployment-health"
|
|
}
|