[Fiware-tech-help] Object Storage documentation

Alex Glikson GLIKSON at il.ibm.com
Mon Mar 16 14:55:30 CET 2015


Thanks, we will fix it.

Regards,
Alex





From:   Andrés Macías <amacias at usheru.com>
To:     fiware-tech-help at lists.fi-ware.org, Thomas Winkler 
<thomas.winkler at iais.fraunhofer.de>
Date:   16/03/2015 03:07 PM
Subject:        [Fiware-tech-help] Object Storage documentation
Sent by:        fiware-tech-help-bounces at lists.fi-ware.org



Hi,

I'm not sure where I should be reporting this. I have found a couple of 
errors in the Object Storage notification:

https://forge.fiware.org/plugins/mediawiki/wiki/fiware/index.php/Object_Storage_-_User_and_Programmers_Guide#3._Authenticate_tenant_to_get_token_for_Object_Storage


First of all, cloud.lab.fi-ware.org is not the correct host, it should be 
cloud.lab.fiware.org (without the dash)

Then, the following script will not properly parse auth value:

curl -v \
    -d '{ "auth" : 
          { "passwordCredentials" : 
            { "username" : "'$username'" , "password" : "'$password'" },
          "tenantName" : "'$tenantName'" } 
        }' \
    -H "Content-Type: application/json" \
     http://cloud.lab.fiware.org:4730/v2.0/tokens \
     > auth_token2.dat
token=$(awk -F"[,:]" '{for(i=1;i<=NF;i++)
                       {if($i~/id\042/)
                         {print $(i+1)} 
                       }
                     }' auth_token2.dat | awk -F'"' '{print $2; exit}')
auth=$(awk -F"[,:]" '{for(i=1;i<=NF;i++)
                      {if($i~/publicURL\042/)
                        {print $(i+3)}
                      }
                    }' auth_token2.dat | \
  grep  "v1/AUTH" | awk -F'"}]' '{print $1;}' | awk -F"/" '{print $3;}' )


Executing this will return something like the following:

root at ubuntu1404:~# echo $auth
AUTH_00000000000000000000000000009866"} 
AUTH_00000000000000000000000000009866"} 
AUTH_00000000000000000000000000009866"} 
AUTH_00000000000000000000000000009866"} 
AUTH_00000000000000000000000000009866"} 
AUTH_00000000000000000000000000009866"} 
AUTH_00000000000000000000000000009866"} 
AUTH_00000000000000000000000000009866


Instead, the last part of the previous script should look something like 
the following:

auth=$(awk -F"[,:]" '{for(i=1;i<=NF;i++)
                      {if($i~/publicURL\042/)
                        {print $(i+3)}
                      }
                    }' auth_token2.dat | \
  grep  "v1/AUTH" | head -n 1 | awk -F'"}' '{print $1;}' | awk -F"/" 
'{print $3;}' )


So the value is parsed properly:

root at ubuntu1404:~# echo $auth
AUTH_00000000000000000000000000009866


Best regards,
Andrés




WWW.USHERU.COM | @USHERUHQ | LINKEDIN | ANGELLIST

This message is confidential. It may also be privileged or otherwise 
protected by work product immunity or other legal rules. If you have 
received it by mistake, please let us know by e-mail reply and delete it 
from your system; you may not copy this message or disclose its contents 
to anyone. Please send us by fax any message containing deadlines as 
incoming e-mails are not screened for response deadlines. The integrity 
and security of this message cannot be guaranteed on the Internet.

usherU is a trading name of We Love Cinema Ltd registered in Ireland no. 
547302 having its registered office at Saint Martins House, Waterloo Road, 
Ballsbridge, Dublin 4._______________________________________________
Fiware-tech-help mailing list
Fiware-tech-help at lists.fi-ware.org
https://lists.fi-ware.org/listinfo/fiware-tech-help

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.fiware.org/private/fiware-tech-help/attachments/20150316/83f045da/attachment.html>


More information about the Fiware-tech-help mailing list

You can get more information about our cookies and privacy policies clicking on the following links: Privacy policy   Cookies policy