-
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.
Add storage and image management support
Added pool_selectors and image_pool_name Signed-off-by: Zhenchao Liu <[email protected]>
- Loading branch information
Showing
58 changed files
with
3,979 additions
and
36 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 |
---|---|---|
@@ -1,5 +1,9 @@ | ||
from .connect import ConnectManager | ||
from .console import ConsoleManager | ||
from .image import ImageHandlerManager | ||
from .resource_backing import ResourceBackingManager | ||
|
||
connect_mgr = ConnectManager() | ||
console_mgr = ConsoleManager() | ||
resbacking_mgr = ResourceBackingManager() | ||
image_handler_mgr = ImageHandlerManager() |
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,26 @@ | ||
import logging | ||
|
||
from .images import get_image_handler | ||
|
||
|
||
LOG = logging.getLogger("avocado.agents." + __name__) | ||
|
||
|
||
class ImageHandlerManager(object): | ||
|
||
def __init__(self): | ||
pass | ||
|
||
def handle_image(self, image_config, config): | ||
r, o = 0, dict() | ||
try: | ||
cmd, arguments = config.popitem() | ||
image_type = image_config["meta"]["type"] | ||
handler = get_image_handler(image_type, cmd) | ||
ret = handler(image_config, arguments) | ||
if ret: | ||
o["out"] = ret | ||
except Exception as e: | ||
r, o["out"] = 1, str(e) | ||
LOG.debug("Failed to handle image(%s): %s", str(e)) | ||
return r, o |
Oops, something went wrong.