Skip to content

Conversation

@chunjiez
Copy link
Collaborator

exception, if one driver has no selected variant, and we want to
select a variant for this driver

we cannot pass OpaqueRef:NULL to XenAPI get_record function

  exception, if one driver has no selected variant, and we want to
  select a variant for this driver

Signed-off-by: Chunjie Zhu <[email protected]>
@chunjiez
Copy link
Collaborator Author

@stephenchengCloud @liulinC @rosslagerwall

Could you please review the change?

@classmethod
def GetSelectedDriverVariantUUID(cls, driver):
variantRef = driver.selected_variant(None)
if variantRef is None:
Copy link
Contributor

Choose a reason for hiding this comment

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

We can merge these 2 if conditions as they are the same None case.

@BengangY BengangY merged commit 6461c6b into xapi-project:master Jul 15, 2025
0 of 2 checks passed
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.

5 participants