Skip to content

Commit

Permalink
set readme
Browse files Browse the repository at this point in the history
  • Loading branch information
czPechy committed Feb 4, 2019
1 parent 09c2149 commit 36ab0a1
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,52 @@ $ composer require proficlos/openstack-nette
```

# How to use
Enable extension using neon
```yml
extensions:
openstack: ProfiCloS\OpenStack\OpenStackExtension
```

Configure credentials
```yml
openstack:
authVersion: v2.0
authUrl: https://auth.cloud.ovh.net/v2.0/
region: REGION
userId: userIdentificator
password: password
projectId: projectTenant
```

Inject in presenter
```php
/** @var \ProfiCloS\OpenStack @inject */
public $openStack;
```

Prepare and next usage is by [php-opencloud/openstack](https://github.com/php-opencloud/openstack/)
```php
/* object store */
$objectStorage = $this->openStack->objectStoreV1();

/* compute */
$compute = $this->openStack->computeV2();

/* networking */
$compute = $this->openStack->networkingV2();

/* images */
$compute = $this->openStack->imagesV2();

/*
and others ...
*/

/* or returns full php-opencloud/openstack */
$openStack = $this->openStack->getOpenStack();
```


# Buy us a coffee <3
[![Buy me a Coffee](https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=E8NK53NGKVDHS)

Expand Down

0 comments on commit 36ab0a1

Please sign in to comment.