简体   繁体   English

使用OpenStack API库php-opencloud连接到softlayer对象存储

[英]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.

相关问题 无法使用连接到另一个API的自定义身份验证登录 - Cannot login with custom authentication connecting to another api 如何在Laravel中添加普通的PHP库? - How to add plain PHP library into Laravel? 如何使用laravel 5中的输入名称创建存储文件夹和子文件夹 - How to create storage folder and sub folder using input names in laravel 5 Laravel 5.1使用存储将文件移动到公共文件夹 - Laravel 5.1 using storage to move the file to a public folder 单元测试Fungku的Hubspot API库。 Laravel 5 - Unit testing Fungku's Hubspot API Library. Laravel 5 Laravel与Linkedin API错误-ServiceFactory :: createService()必须是OAuth \\ Common \\ Storage \\ TokenStorageInterface的实例 - Laravel with Linkedin API error - ServiceFactory::createService() must be an instance of OAuth\Common\Storage\TokenStorageInterface 自定义字体在使用 WKHTMLTOPDF 库生成的 PDF 中不起作用 - Custom fonts not working in Generated PDF using WKHTMLTOPDF Library 使用laravel 5.1向Twitter API发出卷曲请求 - Curl request to twitter API using laravel 5.1 PHP-非法偏移量类型,在is_array和is_object之后 - PHP - Illegal offset type, after is_array and is_object Laravel Blade使用变量访问对象的属性 - Laravel Blade access object property using variable
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM