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 }
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, }
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 }