Beispiel #1
0
def image(service: str) -> list:
    """
    Lists the images on teh cloud service

    :param service: The name of the service
    :return: the information in json format
    """
    provider = Provider(name=service)
    result = provider.images()
    if flat and result:
        result = provider.Prints(result, kind="vm", output="flat")
    return result
Beispiel #2
0
def boot(service: str) -> list:
    """
    Boots a VM on the cloud service

    :param service: The name of the service
    :return: the information in json format
    """
    # TODO: needs more work, read from yaml file defaults
    provider = Provider(name=service)
    result = provider.create()
    if flat and result:
        result = provider.Prints(result, kind="vm", output="flat")
    return result