2017 © Pedro PelĂĄez
 

library storageconnect-ovh

Librairie pour interagir avec un object storage. Utilise l'api swift avec authentification v2 pour fonctionner avec OVH

image

glibe/storageconnect-ovh

Librairie pour interagir avec un object storage. Utilise l'api swift avec authentification v2 pour fonctionner avec OVH

  • Sunday, July 15, 2018
  • by tpin85
  • Repository
  • 0 Watchers
  • 0 Stars
  • 77 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 13 Versions
  • 0 % Grown

The README.md

Connecteur PHP - Object Storage OVH

Install

composer require glibe/storageconnect-ovh

Utilisation

Les éléments de connexion à openstack sont obligatoires. Les élÚments de connexion à l'API d'OVH sont optionnels. Ils sont utilisés uniquement dans le cas d'une création de container., (*1)

La création des credentials pour utiliser l'api d'ovh se fait à cette url : https://api.ovh.com/createToken/index.cgi?GET=/&PUT=/&POST=/&DELETE=/, (*2)

La librairie utilise l'authentification v3 d'openstack., (*3)

$credentials = [
    'authUrl'         => "https://auth.cloud.ovh.net/v3",
    'region'          => "GRA",
    'username'        => "your-username",
    'password'        => "your-password",
    'tenantName'      => "your-tenant-name",
];

$ovhCredentials = [
    'application_key' => "XXXXXXXX",
    'application_secret' => "XXXXXXXX",
    'api_endpoint' => "XXXXXXXX", // ovh-eu for europe
    'consumer_key' => "XXXXXXXX"
];

$obj = new Glibe\StorageConnetOvh($credentials,$ovhCredentials);

Récupération infos d'une ressource

$obj->getObject('<container-name>','<object-name>');

Création d'une ressource

$obj->createObject('<container-name>','<object-name>','<path-to-the-new-file>','<folder-base>);
Exemple

Pour créer un fichier qui aura pour référence /img/png/hello.png dans le container "cdn", la commande de création sera la suivante :, (*4)

$obj->createObject('cdn','hello.png','<path-to-the-new-file>','img/png');

Création d'une container

# Statut possible : public / private

En public cela fait container un hébergement statique. Les ressources seront alors accessiblent par une url publique. (Voir site ovh pour plus d'explication.) Par défaut le statut est à private., (*5)

# Ovh project ID

L'identifiant unique de votre projet public cloud chez OVH. Disponible sous le nom de votre proejt dans votre interface client. Si non définit, le premier projet disponible sera utilisé., (*6)

$obj->createContainer('<container-name>','<statut> (default: private)','<ovh_project_id> (default: first available)');
Exemple
$obj->createContainer('testContainer','public','90b0b09604e74e4e8ade65xxxxxxxxx');

AccĂšs Ă  un container

Renvoie une instance du container souhaité, (*7)

$obj->getContainer('<container-name>');

Supprimer un objet

$obj->deleteObject('<container-name>','<filename>');
Exemple

Pour supprimer le fichier /img/png/hello.png dans le container "cdn", la commande de suppression sera la suivante :, (*8)

$obj->deleteObject('cdn','/img/png/hello.png');

The Versions

15/07 2018

dev-master

9999999-dev

Librairie pour interagir avec un object storage. Utilise l'api swift avec authentification v2 pour fonctionner avec OVH

  Sources   Download

MIT

The Requires

 

by tpin

ovh openstack swift object storage

15/07 2018

v1.0.11

1.0.11.0

Librairie pour interagir avec un object storage. Utilise l'api swift avec authentification v2 pour fonctionner avec OVH

  Sources   Download

MIT

The Requires

 

by tpin

ovh openstack swift object storage

15/07 2018

v1.0.10

1.0.10.0

Librairie pour interagir avec un object storage. Utilise l'api swift avec authentification v2 pour fonctionner avec OVH

  Sources   Download

MIT

The Requires

 

by tpin

ovh openstack swift object storage

15/07 2018

v1.0.9

1.0.9.0

Librairie pour interagir avec un object storage. Utilise l'api swift avec authentification v2 pour fonctionner avec OVH

  Sources   Download

MIT

The Requires

 

by tpin

ovh openstack swift object storage

14/07 2018

v1.0.8

1.0.8.0

Librairie pour interagir avec un object storage. Utilise l'api swift avec authentification v2 pour fonctionner avec OVH

  Sources   Download

MIT

The Requires

 

by tpin

ovh openstack swift object storage

14/07 2018

v1.0.7

1.0.7.0

Librairie pour interagir avec un object storage. Utilise l'api swift avec authentification v2 pour fonctionner avec OVH

  Sources   Download

MIT

The Requires

 

by tpin

ovh openstack swift object storage

14/07 2018

v1.0.6

1.0.6.0

Librairie pour interagir avec un object storage. Utilise l'api swift avec authentification v2 pour fonctionner avec OVH

  Sources   Download

MIT

The Requires

 

by tpin

ovh openstack swift object storage

14/07 2018

v1.0.5

1.0.5.0

Librairie pour interagir avec un object storage. Utilise l'api swift avec authentification v2 pour fonctionner avec OVH

  Sources   Download

MIT

The Requires

 

by tpin

ovh openstack swift object storage

04/07 2018

v1.0.4

1.0.4.0

Librairie pour interagir avec un object storage. Utilise l'api swift avec authentification v2 pour fonctionner avec OVH

  Sources   Download

MIT

The Requires

 

by tpin

ovh openstack swift object storage

04/07 2018

v1.0.3

1.0.3.0

Librairie pour interagir avec un object storage. Utilise l'api swift avec authentification v2 pour fonctionner avec OVH

  Sources   Download

MIT

The Requires

 

by tpin

ovh openstack swift object storage

19/06 2018

v1.0.2

1.0.2.0

Librairie pour interagir avec un object storage. Utilise l'api swift avec authentification v2 pour fonctionner avec OVH

  Sources   Download

MIT

The Requires

 

by tpin

ovh openstack swift object storage

13/06 2018

v1.0.1

1.0.1.0

Librairie pour interagir avec un object storage. Utilise l'api swift avec authentification v2 pour fonctionner avec OVH

  Sources   Download

MIT

The Requires

 

by tpin

ovh openstack swift object storage

13/06 2018

v1.0.0

1.0.0.0

Librairie pour interagir avec un object storage. Utilise l'api swift avec authentification v2 pour fonctionner avec OVH

  Sources   Download

The Requires

 

by PIN

ovh openstack swift object storage