nutanix / calm-dsl

Keep Calm and DSL On!

Home Page:https://nutanix.github.io/calm-dsl/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Provide support for guest tools through AhvVmResources in addition to spec.

glover-chris opened this issue · comments

Describe the request
Provide support for guest tools through AhvVmResources
Current behaviour
guest tools are only supported in DSL using a spec file (yaml).
Expected behaviour
Within the AhvVmResources function in blueprints, we should be able to add guest tools specifications. Something like:

class AhvVmResources_Default(AhvVmResources):

    memory = 8
    vCPUs = 1
    cores_per_vCPU = 2
    disks = [AhvVmDisk.Disk.Scsi.cloneFromVMDiskPackage(disk_package, bootable=True,),
             AhvVmDisk.Disk.Scsi.allocateOnStorageContainer(20),AhvVmDisk.CdRom.Ide.emptyCdRom()]
    nics = [AhvVmNic.NormalNic.ingress("@@{subnet_prod.uuid}@@", vpc="@@{tenant_vpc_uuid}@@",ip_endpoints=['@@{prod_ip}@@']),
            AhvVmNic.NormalNic.ingress("@@{subnet_admin.uuid}@@", vpc="@@{tenant_vpc_uuid}@@",ip_endpoints=['@@{admin_ip}@@'])]
    boot_type = "UEFI"
    guest_customization = AhvVmGC.Sysprep.PreparedScript.withoutDomain(filename=os.path.join("specs", "hostname_sysprep_unattend_xml.xml"))
guest_tools = {
            "nutanix_guest_tools": {
                "iso_mount_state": "MOUNTED",
                "state": "ENABLED",
                "enabled_capability_list": ngt_capabilities_list
            }
        }

This would greatly decrease build times versus currently running scripts during the package install section.