kyon2 / laravel5-conoha-api
API for ConoHa on Laravel 5.
v1.0.0
2018-02-26 05:16 UTC
Requires
- php: >=7.0.0
- guzzlehttp/guzzle: ~6.0
- illuminate/support: ~5.0
Requires (Dev)
- mockery/mockery: dev-master
- orchestra/testbench: ~3.0
- phpunit/phpunit: ~5.0
This package is auto-updated.
Last update: 2025-01-16 22:19:24 UTC
README
Installation
To install the PHP client library using Composer
composer require kyon2/laravel5-conoha-api
To use the package, register the service provider in config/app.php
.
'providers' => [
// ...
Kyon2\Conoha\Providers\ConohaServiceProvider::class,
]
Configuration
To configure your connection settings, execute the following command.
php artisan vendor:publish --provider="Kyon2\Conoha\Providers\ConohaServiceProvider"
Then set the following environment variables in .env
file.
CONOHA_TENANT_ID
CONOHA_USERNAME
CONOHA_PASSWORD
Features
# Block Storage API v2
GET /v2/{tenant_id}/types
GET /v2/{tenant_id}/types/{volume_type_id}
GET /v2/{tenant_id}/volumes
GET /v2/{tenant_id}/volumes/{volume_id}
# Compute API v2
GET /v2/{tenant_id}/flavors
GET /v2/{tenant_id}/flavors/detail
GET /v2/{tenant_id}/flavors/{flavor_id}
GET /v2/{tenant_id}/servers
GET /v2/{tenant_id}/servers/detail
GET /v2/{tenant_id}/servers/{server_id}
# ObjectStorage API v1
GET /v1/nc_{account}/{container}
GET /v1/nc_{account}/{container}/{object}
have only one thing one can do "reference-related".
Usage
Create the Instance
To use the ConohaAPI First of all you have to create the ConohaAPI instance.
Example
use Conoha;
public function __construct()
{
$this->blockStorage = Conoha::driver('BlockStorage');
}
Get a list of Volume Types.
Example
$results = $this->blockStorage->getTypes();