Skip to content
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

Make r/generic_system less likely to destroy/create on link change #1038

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

chrismarget-j
Copy link
Collaborator

@chrismarget-j chrismarget-j commented Feb 14, 2025

This PR introduces resourceDatacenterGenericSystem.ModifyPlan(). It exists to trigger replacement of the generic system if the user has replaced or changed the speed of every link. A single surviving link will allow the system to be updated in place.

Changes in this PR:

  • rename DatacenterGenericSystem.links() -> DatacenterGenericSystem.GetLinks() (make public)
  • rename DatacenterGenericSystemLink.digest()-> DatacenterGenericSystemLink.Digest() (make public)
  • change of transform ID no longer automatically triggers replacement
  • DatacenterGenericSystem.UpdateLinkSet() now collects links with transform ID changes and replaces them one-at-a-time
  • DatacenterGenericSystem.UpdateLinkSet() now invokes deleteLinksFromSystem() before addLinksToSystem() (order swapped)
  • The genericSystemLinkSetValidator now checks for unknown values - minor change but looks like a big diff because large chunks of code "bumped" to the right because they're within the unknown check.
  • Detection of the "all links replaced" condition is handled by a plan new resource modifier: resourceDatacenterGenericSystem.ModifyPlan()

@chrismarget-j chrismarget-j linked an issue Feb 14, 2025 that may be closed by this pull request
@chrismarget-j chrismarget-j marked this pull request as draft February 14, 2025 22:38
@chrismarget-j chrismarget-j changed the title WIP: Make r/generic_system less likely to destroy/create on link change Make r/generic_system less likely to destroy/create on link change Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Require generic system replacement when all links are replaced
1 participant