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

fix: missing vds info with r/cluster import #235

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

burnsjared0415
Copy link
Contributor

@burnsjared0415 burnsjared0415 commented Aug 22, 2024

In order to have a good experience with our community, we recommend that you read the contributing guidelines for making a pull request.

Summary of Pull Request

Updating Cluster import to solve issues where vds is blank on data source.

Type of Pull Request

  • This is a bug fix.
  • This is an enhancement or feature.
  • This is a code style/formatting update.
  • This is a documentation update.
  • This is a refactoring update.
  • This is a chore update
  • This is something else.
    Please describe:

Related to Existing Issues

Ref: #210

Test and Documentation Coverage

For bug fixes or features:

  • Tests have been completed.
  • Documentation has been added/updated.

Breaking Changes?

  • Yes, there are breaking changes.
  • No, there are no breaking changes.

@github-actions github-actions bot added needs-review Needs Review provider Provider labels Aug 22, 2024
@burnsjared0415 burnsjared0415 changed the title fix: missing vds info with r/cluster import 🚧fix: missing vds info with r/cluster import Aug 22, 2024
@tenthirtyam tenthirtyam changed the title 🚧fix: missing vds info with r/cluster import 🚧 fix: missing vds info with r/cluster import Aug 22, 2024
@tenthirtyam tenthirtyam added bug Bug and removed needs-review Needs Review labels Aug 22, 2024
@tenthirtyam tenthirtyam added this to the On Deck milestone Aug 22, 2024
@github-actions github-actions bot added the needs-review Needs Review label Aug 22, 2024
@tenthirtyam tenthirtyam removed the needs-review Needs Review label Aug 22, 2024
Copy link
Collaborator

@tenthirtyam tenthirtyam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CI caught that the err is assigned but not used.

getFlattenedVdsSpecsForRefs returns both a slice of maps and an error. So the err is necessary to handle potential errors from the apiClient.Clusters.GetVdses.

@tenthirtyam tenthirtyam linked an issue Aug 23, 2024 that may be closed by this pull request
4 tasks
@github-actions github-actions bot added the needs-review Needs Review label Aug 23, 2024
@tenthirtyam tenthirtyam modified the milestones: On Deck, v0.11.0 Aug 23, 2024
@burnsjared0415
Copy link
Contributor Author

here is what the results are now:

 "is_used_by_nsx": true,
                "name": "xxx-vds01",
                "nioc_bandwidth_allocations": [
                  {
                    "limit": 0,
                    "reservation": 0,
                    "shares": 100,
                    "shares_level": "high",
                    "type": "vsan"
                  },
                  {
                    "limit": 0,
                    "reservation": 0,
                    "shares": 25,
                    "shares_level": "low",
                    "type": "vmotion"
                  },
                  {
                    "limit": 0,
                    "reservation": 0,
                    "shares": 25,
                    "shares_level": "low",
                    "type": "vdp"
                  },
                  {
                    "limit": 0,
                    "reservation": 0,
                    "shares": 25,
                    "shares_level": "low",
                    "type": "nfs"
                  },
                  {
                    "limit": 0,
                    "reservation": 0,
                    "shares": 25,
                    "shares_level": "low",
                    "type": "hbr"
                  },
                  {
                    "limit": 0,
                    "reservation": 0,
                    "shares": 25,
                    "shares_level": "low",
                    "type": "iSCSI"
                  },
                  {
                    "limit": 0,
                    "reservation": 0,
                    "shares": 100,
                    "shares_level": "high",
                    "type": "virtualMachine"
                  },
                  {
                    "limit": 0,
                    "reservation": 0,
                    "shares": 50,
                    "shares_level": "normal",
                    "type": "management"
                  },
                  {
                    "limit": 0,
                    "reservation": 0,
                    "shares": 25,
                    "shares_level": "low",
                    "type": "faultTolerance"
                  }
                ],
                "portgroup": [
                  {
                    "active_uplinks": [
                      "uplink1",
                      "uplink2"
                    ],
                    "name": "xxx-pg-mgmt",
                    "transport_type": "MANAGEMENT"
                  },
                  {
                    "active_uplinks": [
                      "uplink1",
                      "uplink2"
                    ],
                    "name": "xxxx-pg-vmotion",
                    "transport_type": "VMOTION"
                  }
                ]
              }
            ]
          },
          "sensitive_attributes": []
        }
      ]
    }
  ],
  "check_results": null
}

@tenthirtyam tenthirtyam self-requested a review September 3, 2024 21:30
@tenthirtyam tenthirtyam changed the title 🚧 fix: missing vds info with r/cluster import fix: missing vds info with r/cluster import Sep 3, 2024
@tenthirtyam tenthirtyam modified the milestones: v0.11.0, On Deck Sep 25, 2024
Copy link
Collaborator

@tenthirtyam tenthirtyam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@burnsjared0415 could you address the following issues failing during the linkting?

  Error: internal/cluster/cluster_operations.go:376:21: ineffectual assignment to err (ineffassign)
  	flattenedVdsSpecs, err := getFlattenedVdsSpecsForRefs(ctx, clusterObj.ID, apiClient)
  	                   ^
  Error: internal/cluster/cluster_operations.go:406:21: ineffectual assignment to err (ineffassign)
  	flattenedVdsSpecs, err := getFlattenedVdsSpecsForRefs(ctx, clusterId, apiClient)

@tenthirtyam tenthirtyam marked this pull request as ready for review October 11, 2024 19:52
Updating Cluster import to solve issues where vds is blank on data source.

Signed-off-by: Jared Burns <jared.burns@broadcom.com>
@tenthirtyam
Copy link
Collaborator

Rebased based on the changes to main recently. Will need updates given the SDK changes.

@tenthirtyam tenthirtyam marked this pull request as draft November 13, 2024 14:53
@tenthirtyam tenthirtyam self-requested a review November 13, 2024 14:54
@tenthirtyam tenthirtyam modified the milestones: On Deck, v.0.14.0 Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug needs-review Needs Review provider Provider
Projects
None yet
Development

Successfully merging this pull request may close these issues.

r/cluster: import does not include vmnic and vds
2 participants