def get_public_key(nova_client, keypair_name):
    """Return public key from OpenStack.

    :param nova_client: Authenticated nova client
    :type nova_client: novaclient.v2.client.Client
    :param keypair_name: Label of keypair in OpenStack.
    :type keypair_name: str
    :returns: OpenSSH Encoded Public Key
    :rtype: str or None
    """
    keys = nova_client.keypairs.findall(name=keypair_name)
    if keys:
        return keys[0].public_key
    else:
        return None