-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[PLINT-524] Sending data from vSAN using Resource Metadata #19070
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
@@ -439,9 +440,12 @@ def get_vsan_metrics(self, cluster_nested_elts, entity_ref_ids, id_to_tags, star | |||
) | |||
health_metrics.append(processed_health_metrics) | |||
|
|||
redapl_cluster_data = {'name': cluster_reference.name, 'vcenter_server': self.config.hostname} | |||
vsan_perf_query_spec = [] | |||
for nested_id in nested_ids: | |||
for entity_type in entity_ref_ids[id_to_tags[nested_id][0]]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... entity_ref_ids[id_to_tags[nested_id][0]]:
is this access completely safe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I create all of these dictionaries: entity_ref_ids
,id_to_tags
,nested_id
in this method. I define that every collected resource be included in id_to_tags
by their id, and I define that their "0" value be the type of the resource. Basically, I just want to see, for each resource within a given cluster, what type of resource it is (either a host or the cluster itself, for now), and then depending on the type of the resource, choose the entities (list of metrics) that are appropriate to find for it.
…into rahul/vsphere-to-evp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor feedback to comply with our style guide.
Co-authored-by: Rosa Trieu <107086888+rtrieu@users.noreply.github.com>
What does this PR do?
This PR enables sending vSAN cluster data using Resource Metadata, so that vSAN clusters can be viewed in the Resource Catalog. Changes to the backend had to be enabled in order for this new data to be written to the correct table, so that the Resource Catalog can pick it up correctly.
Motivation
Review checklist (to be filled by reviewers)
qa/skip-qa
label if the PR doesn't need to be tested during QA.backport/<branch-name>
label to the PR and it will automatically open a backport PR once this one is merged