Ejemplo n.º 1
0
def _create_keypair_response(response):
    if 'errortext' in response:
        errors.duplicate_keypair_name()
    else:
        response = response['keypair']
        return {
            'template_name_or_list': 'create_keypair.xml',
            'response_type': 'CreateKeyPairResponse',
            'response': response
        }
Ejemplo n.º 2
0
def _create_keypair_response(response):
    if 'errortext' in response:
        errors.duplicate_keypair_name()
    else:
        response = response['keypair']
        return {
            'template_name_or_list': 'create_keypair.xml',
            'response_type': 'CreateKeyPairResponse',
            'response': response
        }
Ejemplo n.º 3
0
def _create_keypair_response(response):
    """
    Generates a response for create keypair request.

    @param response: Response from Cloudstack.
    @return: Response.
    """
    if "errortext" in response:
        errors.duplicate_keypair_name()
    else:
        response = response["keypair"]
        return {
            "template_name_or_list": "create_keypair.xml",
            "response_type": "CreateKeyPairResponse",
            "response": response,
        }
Ejemplo n.º 4
0
def _create_keypair_response(response):
    """
    Generates a response for create keypair request.

    @param response: Response from Cloudstack.
    @return: Response.
    """
    if 'errortext' in response:
        errors.duplicate_keypair_name()
    else:
        response = response['keypair']
        return {
            'template_name_or_list': 'create_keypair.xml',
            'response_type': 'CreateKeyPairResponse',
            'response': response
        }