-
Notifications
You must be signed in to change notification settings - Fork 0
Complete internal models with host resources and VM extended properties #235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Complete internal models with host resources and VM extended properties #235
Conversation
- Add StorageClass model for mapping storage class names to filesystem paths - Add Network and VlanConfiguration models for mapping network names to VLAN IDs and virtual switches - Add HostResources model to aggregate storage classes, networks, and VM paths - Expand Host model to include optional resources field - Add storage_class field to VMDisk model - Add vlan_id field to VMNetworkAdapter model (keeping legacy vlan field for backward compatibility) - Add NetworkModel enum for network types (currently only VLAN) - All changes maintain backward compatibility - Comprehensive test suite added in test_host_resources_models.py Co-authored-by: charlespick <17918019+charlespick@users.noreply.github.com>
- Add comprehensive documentation in server/docs/host_resources_models.md - Update vm properties checklist to mark storage_class and vlan_id as implemented in Python model and APIs - Documentation covers all new models, usage examples, and API compatibility Co-authored-by: charlespick <17918019+charlespick@users.noreply.github.com>
|
@copilot review the remaining missing properties in Terraform/vm properties and add them as optional to the existing models to complete the internal models so we can extend the inventory collection system next |
- Add cluster field to VM model for cluster membership - Add dynamic_memory_buffer for memory buffer percentage configuration - Add security settings (secure_boot_enabled, secure_boot_template, trusted_platform_module_enabled, tpm_key_protector) - Add primary_boot_device for boot configuration - Add HostRecoveryAction and HostStopAction enums - Add host_recovery_action and host_stop_action fields for host action configuration - Add integration services fields (shutdown, time, data_exchange, heartbeat, vss_backup, guest_services) - Add VMNetworkAdapter security settings (dhcp_guard, router_guard, mac_spoof_guard) - Add VMNetworkAdapter bandwidth settings (min_bandwidth_mbps, max_bandwidth_mbps) - Add mac_address_config field for MAC address configuration mode - Update vm properties checklist to mark all new properties as implemented - Add comprehensive test suite with 23 tests (all passing) - Add documentation for all extended properties - All changes maintain backward compatibility (all new fields are optional) Co-authored-by: charlespick <17918019+charlespick@users.noreply.github.com>
Completed in commit badd05c. Added all remaining properties from the vm properties checklist: VM Model (15 new properties):
VMNetworkAdapter (6 new properties):
All properties are optional for backward compatibility. 23 new tests added (63 total passing). Documentation in |
* Checklist * Filled out and planned * Complete internal models with host resources and VM extended properties (#235) * Initial plan * Expand host models with resource information - Add StorageClass model for mapping storage class names to filesystem paths - Add Network and VlanConfiguration models for mapping network names to VLAN IDs and virtual switches - Add HostResources model to aggregate storage classes, networks, and VM paths - Expand Host model to include optional resources field - Add storage_class field to VMDisk model - Add vlan_id field to VMNetworkAdapter model (keeping legacy vlan field for backward compatibility) - Add NetworkModel enum for network types (currently only VLAN) - All changes maintain backward compatibility - Comprehensive test suite added in test_host_resources_models.py Co-authored-by: charlespick <17918019+charlespick@users.noreply.github.com> * Add documentation and update vm properties checklist - Add comprehensive documentation in server/docs/host_resources_models.md - Update vm properties checklist to mark storage_class and vlan_id as implemented in Python model and APIs - Documentation covers all new models, usage examples, and API compatibility Co-authored-by: charlespick <17918019+charlespick@users.noreply.github.com> * Add extended properties to VM and VMNetworkAdapter models - Add cluster field to VM model for cluster membership - Add dynamic_memory_buffer for memory buffer percentage configuration - Add security settings (secure_boot_enabled, secure_boot_template, trusted_platform_module_enabled, tpm_key_protector) - Add primary_boot_device for boot configuration - Add HostRecoveryAction and HostStopAction enums - Add host_recovery_action and host_stop_action fields for host action configuration - Add integration services fields (shutdown, time, data_exchange, heartbeat, vss_backup, guest_services) - Add VMNetworkAdapter security settings (dhcp_guard, router_guard, mac_spoof_guard) - Add VMNetworkAdapter bandwidth settings (min_bandwidth_mbps, max_bandwidth_mbps) - Add mac_address_config field for MAC address configuration mode - Update vm properties checklist to mark all new properties as implemented - Add comprehensive test suite with 23 tests (all passing) - Add documentation for all extended properties - All changes maintain backward compatibility (all new fields are optional) Co-authored-by: charlespick <17918019+charlespick@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: charlespick <17918019+charlespick@users.noreply.github.com> * Clean up models * fix mypy errors --------- Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Completes the internal Python models by adding host resource configuration and all remaining VM properties from the vm properties checklist, enabling comprehensive inventory collection and authoritative API representation of resource state.
Phase 1: Host Resource Models
New Models
StorageClass- Maps storage class name to filesystem pathNetwork/VlanConfiguration- Maps network name to VLAN ID and virtual switchHostResources- Aggregates storage classes, networks, and VM paths (matchesSchemas/hostresources.jsonschema)NetworkModel- Enum for network types (currentlyVLANonly)Enhanced Models (Phase 1)
Host.resources(Optional[HostResources]) - Carries host resource configurationVMDisk.storage_class(Optional[str]) - References storage class from host resourcesVMNetworkAdapter.vlan_id(Optional[int]) - VLAN ID from network configuration (legacyvlanstring field maintained for compatibility)Phase 2: VM Extended Properties
New Enums
HostRecoveryAction- VM automatic start action after host recovery (none, resume, always-start)HostStopAction- VM action when host stops (save, stop, shut-down)Enhanced VM Model (15 new properties)
cluster- Cluster membership for failover configurationdynamic_memory_buffer- Memory buffer percentage for dynamic memorysecure_boot_enabled,secure_boot_template,trusted_platform_module_enabled,tpm_key_protectorprimary_boot_device- Boot device configurationhost_recovery_action,host_stop_action- Automatic VM actions on host eventsintegration_services_shutdown,integration_services_time,integration_services_data_exchange,integration_services_heartbeat,integration_services_vss_backup,integration_services_guest_servicesEnhanced VMNetworkAdapter Model (6 new properties)
mac_address_config- MAC address configuration mode ("Dynamic" or "Static")dhcp_guard,router_guard,mac_spoof_guardmin_bandwidth_mbps,max_bandwidth_mbpsUsage
All fields are optional and maintain backward compatibility. Models support automatic Pydantic serialization for API use. Existing
HostResourcesServicehandles loading configuration from hosts atC:\ProgramData\Aether-V\hostresources.{json,yaml}.Testing
Documentation
server/docs/host_resources_models.md- Host resource configuration modelsserver/docs/vm_extended_properties.md- VM extended properties documentationTerraform/vm propertieschecklist - All properties now implemented in Python ModelThe internal models are now complete and ready for inventory collection system extension.
Original prompt
please get started with the implementation. the key considerations will be keeping it compatible with the easy api via automatic model serialization and continueing to support incremental expansion. start with just expanding the models. do NOT move on to api, ui, or inventory yet. expand host models to store information about host resources. this will allow the model to match vlan ids to network names and storage paths to storage classes, etc. the point of this is to provide an authoritative api representing the state of resources and their configuration. Keep backend logic minimal, use enums where reasonable, referance #file:resource schema for information about how this will translate to terraform usage for hints as to model design. refer to #file:vm properties for tracking progress.
The user has attached the following file paths as relevant context:
- Terraform/vm properties
- Terraform/resource schema
[Chronological Review: The conversation began with the user requesting a review of internal Python models for VMs, NICs, and disks, specifically focusing on the properties and their alignment with the intended data model. The user emphasized the need for a well-planned model to support relationships among hosts, clusters, NICs, disks, and VMs. Following this, the user requested the implementation of model expansions, prioritizing compatibility with an easy API and incremental expansion, specifically starting with host models.][Intent Mapping:
[Technical Inventory:
[Code Archaeology:
[Progress Assessment:
[Context Validation: All critical information for continuation is captured, including the need to expand models and maintain compatibility with the API.]
[Recent Commands Analysis:
1. Conversation Overview: - Primary Objectives: - "can you review the internal python models for vms, nics. and disks..." - Review models and properties for alignment with intended data model. - "please get started with the implementation..." - Begin implementation focusing on model expansion. - Session Context: The conversation transitioned from a review of existing models to a directive for implementation, emphasizing incremental expansion. - User Intent Evolution: The user shifted from seeking a review to requesting actionable steps for model expansion.- Technical Foundation:
- Python Models: Internal models for VMs, NICs, and disks.
- Terraform Object Model: Interface for the Terraform provider, distinct from internal models.
- Codebase Status:
- File Name 1: /workspaces/Aether-V/Terraform/vm properties
- Purpose: Guide development of UI, API, and internal model.
- Current State: Checklist for properties filled in by the user.
- File Name 2: /workspaces/Aether-V/Terraform/resource schema
- Purpose: Define Terraform object model for virtual machines.
- Current State: Not explicitly modified in the conversation.
- Problem Resolution:
- Issues Encountered: None explicitly stated, but the need for a well-structured model was highlighted.
- Solutions Implemented: User provided a clear directive for model expansion.
- Debugging Context: No ongoing troubleshooting mentioned.
- Lessons Learned: Importance of aligning internal models with intended data relationships.
- Progress Tracking:
- Completed Tasks: User filled in API properties.
- Partially Complete Work: Expansion of host models is pending.
- Validated Outcomes: None confirmed yet.
- Active Work State:
- Current Focus: Expanding host models to store information ...
Created from VS Code.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.