fog / fog-softlayer

MIT License
1 stars 3 forks source link

Fail for authenticating to the Object Storage. #5

Open YunSangJun opened 7 years ago

YunSangJun commented 7 years ago

Hello.

I fail for authenticating to the Object Storage using fog-softlayer library.

The following is fog conncetion setup.

      fog_connection: &fog_connection
        provider: 'softlayer'
        softlayer_username: IBM1365xxx
        softlayer_api_key: xxx
        softlayer_storage_account: IBMOS1365xxx-2
        softlayer_bluemix_objstor_auth_url: https://seo01.objectstorage.service.networklayer.com/auth/v1.0
        softlayer_cluster: seo01
        softlayer_temp_url_key: xxx

I success to authenticate by REST API via curl. https://sldn.softlayer.com/blog/waelriac/managing-softlayer-object-storage-through-rest-apis

curl -i -H "X-Auth-User: IBMOS1365xxx-2 " -H "X-Auth-Key: xxx " https://seo01.objectstorage.service.networklayer.com/auth/v1.0

I debugged the following file and changed "unless" to "if" in line 147. Current code : https://github.com/fog/fog-softlayer/blob/master/lib/fog/softlayer/storage.rb

Finally, i success to authenticate using fixed fog-softlayer library. Fixed code : https://github.com/YunSangJun/fog-softlayer/blob/master/lib/fog/softlayer/storage.rb