'Retrieve access key for VPSA connection.'

def ensure_connection(self, cmd=None):

    if (self.access_key or (cmd == 'login')):
        return
    cmd = 'login'
    xml_tree = self.send_cmd(cmd)
    user = xml_tree.find('user')
    if (user is None):
        raise exception.MalformedResponse(cmd=cmd, reason=_('no    "user"    field'))
    access_key = user.findtext('access-key')
    if (access_key is None):
        raise exception.MalformedResponse(cmd=cmd, reason=_('no    "access-key"    field'))
    self.access_key = access_key
