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

CA-397268: vbd.create failed: The device name is invalid #5936

Merged
merged 2 commits into from
Aug 14, 2024

Conversation

minglumlu
Copy link
Member

In the commit 62db5cb, the device name validation was consolidated with
the function which converts name to device number. Particularly, the
function "Device_number.of_string" is used for both the validation and
the conversion.

But one issue was introduced in the validation is that the "None" value
returned from "Device_number.of_string" is considered as valid. This
causes the error "the device name is invalid".

This PR just fixes this issue. And meanwhile, a unit test is also added.

In the commit 62db5cb, the device name validation was consolidated with
the function which converts name to device number. Particularly, the
function "Device_number.of_string" is used for both the validation and
the conversion.

But one issue was introduced in the validation is that the "None" value
returned from "Device_number.of_string" is considered as valid. This
causes the error "the device name is invalid".

This commit just fixes this issue.

Signed-off-by: Ming Lu <ming.lu@cloud.com>
Signed-off-by: Ming Lu <ming.lu@cloud.com>
Copy link
Contributor

@lindig lindig left a comment

Choose a reason for hiding this comment

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

Great work to get this fixed.

@lindig lindig merged commit d04ba27 into xapi-project:master Aug 14, 2024
15 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.

3 participants