[英]Connecting to softlayer object storage using openstack API library php-opencloud
Is there someone tried to connect to softlayer object storage using the php-opencloud library? 是否有人尝试使用php-opencloud库连接到softlayer对象存储?
I got 400 bad response when the library trying to make authentication. 当库尝试进行身份验证时,我得到400错误的响应。
From what I see inside the php-opencloud library, It use authentication method described here , it uses v2/token and softlayer object storage using v1. 从我在php-opencloud库内部看到的内容来看,它使用此处所述的身份验证方法,它使用v2 / token和使用v1的软层对象存储。
Does softlayer object storage that based on the same openstack doesn't support the authentication v2? 基于同一OpenStack的软层对象存储是否不支持身份验证v2?
I can connect to the object storage using sdk(softlayer-object-storage-php) they provided, it seems use the authentication v1, the problem is that I'm using laravel 5.1 which has the built in filesystem using flysystem(thephpleague/flysystem) that have openstack adapter using php-ocencloud. 我可以使用他们提供的sdk(softlayer-object-storage-php)连接到对象存储,似乎使用了身份验证v1,问题是我使用的是laravel 5.1,它具有使用flysystem(thephpleague / flysystem)内置的文件系统)具有使用php-ocencloud的openstack适配器。
It will be very nice and will saving my time to just use the driver rather than I have to build custom driver using softlayer sdk and make me reinvent the wheel. 这将非常好,它将节省我仅使用驱动程序的时间,而不是我必须使用softlayer sdk构建自定义驱动程序并使我重新发明轮子的时间。
My Config in the config/filesystems.php 我的配置在config / filesystems.php中
'rackspace' => [
'driver' => 'rackspace',
'username' => '***username from softlayer***',
'key' => '***api key from softlayer**',
'container' => '***my test container***',
'endpoint' => 'https://sng01.objectstorage.softlayer.net/auth/v1',
'region' => 'sng01',
'url_type' => 'publicURL',
],
And I try connect like this : 我尝试这样连接:
Storage::disk('rackspace')->exists('test');
And the error is : 错误是:
ClientErrorResponseException in BadResponseException.php line 43:
Client error response
[status code] 400
[reason phrase] Bad Request
[url] https://sng01.objectstorage.softlayer.net/auth/v1/tokens
Currenlty softlayer only has endpoints for authentication v1, you can see the valid endpoints in the portal (click view credentials http://knowledgelayer.softlayer.com/procedure/how-do-i-access-object-storage-command-line ). Currenlty软层仅具有用于身份验证v1的端点,您可以在门户网站中看到有效的端点(单击查看凭据http://knowledgelayer.softlayer.com/procedure/how-do-i-access-object-storage-command-line ) 。
Regards 问候
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.