Beispiel #1
0
def describe_security_groups():
    args = {'command': 'listSecurityGroups'}

    response = cloudstack.describe_item(args, 'securitygroup',
                                        errors.invalid_security_group, 'Group')

    return _describe_security_groups_response(response)
Beispiel #2
0
def describe_instances():
    args = {'command': 'listVirtualMachines'}
    response = cloudstack.describe_item(
        args, 'virtualmachine', errors.invalid_instance_id, 'InstanceId'
    )

    return _describe_instances_response(
        response
    )
Beispiel #3
0
def describe_keypairs():
    args = {'command': 'listSSHKeyPairs'}
    response = cloudstack.describe_item(
        args, 'sshkeypair', errors.invalid_keypair_name, 'KeyName'
    )

    return _describe_keypair_response(
        response
    )
Beispiel #4
0
def describe_zones():
    args = {'command': 'listZones'}
    response = cloudstack.describe_item(
        args, 'zone', errors.invalid_zone, 'ZoneName'
    )

    return _describe_zones_response(
        response
    )
Beispiel #5
0
def describe_images():
    args = {'templatefilter': 'executable', 'command': 'listTemplates'}
    response = cloudstack.describe_item(
        args, 'template', errors.invalid_image_id, 'ImageId'
    )

    return _describe_images_response(
        response
    )
Beispiel #6
0
def describe_volumes():
    args = {'command': 'listVolumes'}
    response = cloudstack.describe_item(
        args, 'volume', errors.invalid_volume_id, 'VolumeId'
    )

    return _describe_volumes_response(
        response
    )
Beispiel #7
0
def describe_keypairs():
    """
    Describes a specific keypair or all keypairs.

    @return: Response.
    """
    args = {"command": "listSSHKeyPairs"}
    response = cloudstack.describe_item(args, "sshkeypair", errors.invalid_keypair_name, "KeyName")

    return _describe_keypair_response(response)
Beispiel #8
0
def describe_images():
    """
    Describe a specific image or all images.

    @return: Response.
    """
    args = {'templatefilter': 'executable', 'command': 'listTemplates'}
    response = cloudstack.describe_item(args, 'template',
                                        errors.invalid_image_id, 'ImageId')

    return _describe_images_response(response)
def describe_volumes():
    """
    Describes a specific volume or all volumes.

    @return: Response.
    """
    args = {'command': 'listVolumes'}
    response = cloudstack.describe_item(args, 'volume',
                                        errors.invalid_volume_id, 'VolumeId')

    return _describe_volumes_response(response)
Beispiel #10
0
def describe_zones():
    """
    Describe a specific zone or all zones.

    @return: Response.
    """
    args = {'command': 'listZones'}
    response = cloudstack.describe_item(args, 'zone', errors.invalid_zone,
                                        'ZoneName')

    return _describe_zones_response(response)
Beispiel #11
0
def describe_vpcs():
    """
    Describes a specific vpc or all vpcs.

    @return: Response.
    """
    args = {'command': 'listVPCs'}
    response = cloudstack.describe_item(args, 'vpc', errors.invalid_vpc_id,
                                        'VpcId')

    return _describe_vpc_response(response)
def describe_snapshots():
    """
    Describes a specific snapshot or all snapshots.

    @return: Response.
    """
    args = {'command': 'listSnapshots'}
    response = cloudstack.describe_item(args, 'snapshot',
                                        errors.invalid_snapshot_id,
                                        'SnapshotId')

    return _describe_snapshot_response(response)
def describe_instances():
    """
    Describe a specific instance or all instances.

    @return: Response.
    """
    args = {'command': 'listVirtualMachines'}
    response = cloudstack.describe_item(args, 'virtualmachine',
                                        errors.invalid_instance_id,
                                        'InstanceId')

    return _describe_instances_response(response)
Beispiel #14
0
def describe_instances():
    """
    Describe a specific instance or all instances.

    @return: Response.
    """
    args = {'command': 'listVirtualMachines'}
    response = cloudstack.describe_item(
        args, 'virtualmachine', errors.invalid_instance_id, 'InstanceId'
    )

    return _describe_instances_response(
        response
    )
Beispiel #15
0
def describe_zones():
    """
    Describe a specific zone or all zones.

    @return: Response.
    """
    args = {'command': 'listZones'}
    response = cloudstack.describe_item(
        args, 'zone', errors.invalid_zone, 'ZoneName'
    )

    return _describe_zones_response(
        response
    )
def describe_vpcs():
    """
    Describes a specific vpc or all vpcs.

    @return: Response.
    """
    args = {'command': 'listVPCs'}
    response = cloudstack.describe_item(
        args, 'vpc', errors.invalid_vpc_id, 'VpcId'
    )

    return _describe_vpc_response(
        response
    )
Beispiel #17
0
def describe_volumes():
    """
    Describes a specific volume or all volumes.

    @return: Response.
    """
    args = {'command': 'listVolumes'}
    response = cloudstack.describe_item(
        args, 'volume', errors.invalid_volume_id, 'VolumeId'
    )

    return _describe_volumes_response(
        response
    )
def describe_snapshots():
    """
    Describes a specific snapshot or all snapshots.

    @return: Response.
    """
    args = {'command': 'listSnapshots'}
    response = cloudstack.describe_item(
        args, 'snapshot', errors.invalid_snapshot_id, 'SnapshotId'
    )

    return _describe_snapshot_response(
        response
    )
Beispiel #19
0
def describe_keypairs():
    """
    Describes a specific keypair or all keypairs.

    @return: Response.
    """
    args = {'command': 'listSSHKeyPairs'}
    response = cloudstack.describe_item(
        args, 'sshkeypair', errors.invalid_keypair_name, 'KeyName'
    )

    return _describe_keypair_response(
        response
    )
Beispiel #20
0
def describe_images():
    """
    Describe a specific image or all images.

    @return: Response.
    """
    args = {'templatefilter': 'executable', 'command': 'listTemplates'}
    response = cloudstack.describe_item(
        args, 'template', errors.invalid_image_id, 'ImageId'
    )

    return _describe_images_response(
        response
    )
Beispiel #21
0
def describe_security_groups():
    """
    Describe one or more security groups.

    @return: Response
    """
    args = {'command': 'listSecurityGroups'}

    response = cloudstack.describe_item(
        args, 'securitygroup', errors.invalid_security_group, 'Group'
    )

    return _describe_security_groups_response(
        response
    )
Beispiel #22
0
def describe_security_groups():
    args = {"command": "listSecurityGroups"}

    response = cloudstack.describe_item(args, "securitygroup", errors.invalid_security_group, "Group")

    return _describe_security_groups_response(response)
Beispiel #23
0
def describe_keypairs():
    args = {'command': 'listSSHKeyPairs'}
    response = cloudstack.describe_item(args, 'sshkeypair',
                                        errors.invalid_keypair_name, 'KeyName')

    return _describe_keypair_response(response)
Beispiel #24
0
def describe_volumes():
    args = {"command": "listVolumes"}
    response = cloudstack.describe_item(args, "volume", errors.invalid_volume_id, "VolumeId")

    return _describe_volumes_response(response)