-
Notifications
You must be signed in to change notification settings - Fork 243
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3718 from nickzhq/support_vdpa_device
[VT] Support vdpa device
- Loading branch information
Showing
6 changed files
with
66 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
""" | ||
This module provides interfaces about vdpa storage backend. | ||
Available functions: | ||
- get_image_filename: Get the device path from vdpa. | ||
""" | ||
from virttest import utils_vdpa | ||
|
||
|
||
def get_image_filename(name): | ||
""" | ||
Get the device path from vdpa. | ||
NOTE: the vdpa protocol is a customized-private protocol | ||
instead of a standard protocol. | ||
:param name: the name of device | ||
:type name: str | ||
:return: The path from vdpa in vpda protocol | ||
e.g: vdpa:///dev/vhost-vdpa | ||
:rtype: str | ||
""" | ||
path = utils_vdpa.get_vdpa_dev_file_by_name(name) | ||
return 'vdpa://%s' % path |