Skip to content

Commit 0c32cb9

Browse files
authored
Merge pull request #18 from laszlof/merge-latest
Merge in latest upstream
2 parents 8c12310 + 7ba159a commit 0c32cb9

156 files changed

Lines changed: 2240 additions & 1525 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.php_cs.dist

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
<?php
2+
23
if (!file_exists(__DIR__.'/src')) {
34
exit(0);
45
}
6+
57
return PhpCsFixer\Config::create()
68
->setRules(
79
[
8-
'@PSR2' => true,
9-
'array_syntax' => ['syntax' => 'short'],
10-
'protected_to_private' => false
10+
'@PSR2' => true,
11+
'@Symfony' => true,
12+
'array_syntax' => ['syntax' => 'short'],
13+
'binary_operator_spaces' => ['default' => 'align'],
14+
'protected_to_private' => false,
1115
]
1216
)
1317
->setUsingCache(false)

.travis.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ before_script:
3131
after_script:
3232
- php vendor/bin/coveralls -v
3333

34+
after_success:
35+
- travis_retry php vendor/bin/php-coveralls -v
36+
3437
notifications:
3538
email:
36-
- jamie.hannaford@rackspace.com
39+
- thanhha.work@gmail.com

README.md

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# PHP OpenStack SDK
22

33
[![Build Status](https://travis-ci.org/php-opencloud/openstack.svg?branch=master)](https://travis-ci.org/php-opencloud/openstack)
4-
[![Code Coverage](https://scrutinizer-ci.com/g/php-opencloud/openstack/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/php-opencloud/openstack/?branch=master)
4+
[![Coverage Status](https://coveralls.io/repos/github/php-opencloud/openstack/badge.svg?branch=master)](https://coveralls.io/github/php-opencloud/openstack?branch=master)
55
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/php-opencloud/openstack/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/php-opencloud/openstack/?branch=master)
66

77
`php-opencloud/openstack` is an SDK which allows PHP developers to easily connect to OpenStack APIs in a simple and
@@ -10,33 +10,36 @@ OpenStack services, and versions of services, are supported.
1010

1111
## Links
1212

13-
* [Official documentation](http://docs.os.php-opencloud.com/)
13+
* [Official documentation](https://php-openstack-sdk.readthedocs.io/en/latest/)
1414
* [Reference documentation](http://refdocs.os.php-opencloud.com)
1515
* [Contributing guide](/CONTRIBUTING.md)
1616
* [Code of Conduct](/CODE_OF_CONDUCT.md)
1717

18-
## Backward incompatibility
18+
## Getting help
19+
20+
- Meet us on Slack: https://phpopencloud.slack.com ([Get your invitation](https://launchpass.com/phpopencloud))
21+
- Report an issue: https://github.com/php-opencloud/openstack/issues
1922

20-
Due to new [object typehint](https://wiki.php.net/rfc/object-typehint) since PHP 7.2, `Object` is a reserved keyword
21-
thus class `OpenStack\ObjectStore\v1\Models\Object` had to be renamed to
22-
`OpenStack\ObjectStore\v1\Models\StorageObject`. See [#184](https://github.com/php-opencloud/openstack/pull/184) for
23-
details.
2423

25-
### Version Guidance
24+
## Version Guidance
2625

27-
| Version | Status | PHP Version | Life span |
26+
| Version | Status | PHP Version | End of life |
2827
| --------- | --------------------------- | ------------- | ----------------------- |
29-
| `^2.0` | Maintained (Bug fixes only) | `>=7.0,<7.2` | March 2016 - March 2018 |
30-
| `^3.0` | Latest | `^7.0` | March 2018 - March 2020 |
28+
| `^3.0` | Latest | `>=7.0` | March 2020 |
29+
| `^2.0` | Maintained (Bug fixes only) | `>=7.0,<7.2` | March 2018 |
3130

32-
## Getting help
33-
34-
- Meet us on Slack: https://phpopencloud.slack.com ([Get your invitation](https://launchpass.com/phpopencloud))
35-
- Report and issue: https://github.com/php-opencloud/openstack/issues
31+
## Upgrade from 2.x to 3.x
32+
33+
Due to new [object typehint](https://wiki.php.net/rfc/object-typehint) since PHP 7.2, `Object` is a reserved keyword
34+
thus class `OpenStack\ObjectStore\v1\Models\Object` had to be renamed to
35+
`OpenStack\ObjectStore\v1\Models\StorageObject`.
36+
37+
This change was introduced in [#184](https://github.com/php-opencloud/openstack/pull/184).
3638

3739
## Requirements
3840

3941
* PHP 7.0
42+
* `ext-curl`
4043

4144
## How to install
4245

@@ -51,4 +54,4 @@ taken the time to write a [contributing guide](CONTRIBUTING.md) for folks intere
5154
If you're not sure how you can get involved, feel free to
5255
[submit an issue](https://github.com/php-opencloud/openstack/issues/new) or
5356
[contact us](https://developer.rackspace.com/support/). You don't need to be a PHP expert - all members of the
54-
community are welcome!
57+
community are welcome!

composer.json

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,23 +32,21 @@
3232
"OpenStack\\Integration\\": "tests/integration/"
3333
}
3434
},
35-
"repositories": [
36-
{
37-
"type": "vcs",
38-
"url": "https://github.com/php-opencloud/Sami"
39-
}
40-
],
4135
"require": {
4236
"php": "~7.0",
43-
"guzzlehttp/guzzle": "~6.1",
44-
"justinrainbow/json-schema": "~5.2"
37+
"guzzlehttp/guzzle": "^6.1",
38+
"justinrainbow/json-schema": "^5.2"
4539
},
4640
"require-dev": {
4741
"phpunit/phpunit": "^6.5",
48-
"sami/sami": "dev-master",
49-
"psr/log": "~1.0",
50-
"satooshi/php-coveralls": "~1.0",
51-
"jakub-onderka/php-parallel-lint": "0.*",
52-
"friendsofphp/php-cs-fixer": "^2.9"
42+
"psr/log": "^1.0",
43+
"php-coveralls/php-coveralls": "^2.0",
44+
"jakub-onderka/php-parallel-lint": "^1.0",
45+
"friendsofphp/php-cs-fixer": "^2.13"
46+
},
47+
"extra": {
48+
"branch-alias": {
49+
"dev-master": "3.0-dev"
50+
}
5351
}
5452
}

doc/_exts/samples.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ def run(self):
3232
def visit_download_reference(self, node):
3333
self.context.append('<a href="javascript:void(0);" class="toggle btn">Show auth code</a>')
3434

35+
def depart_download_reference(self, node):
36+
self.body.append(self.context.pop())
37+
3538
def setup(app):
36-
app.add_node(download_reference, html=(visit_download_reference, HTMLTranslator.depart_download_reference))
39+
app.add_node(download_reference, html=(visit_download_reference, depart_download_reference))
3740
app.add_directive('sample', Sample)
3841
return {'version': '0.1'}

doc/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
lexers['php-annotations'] = PhpLexer(startinline=True, linenos=1)
2424
primary_domain = 'php'
2525

26-
extensions = ['sphinxcontrib.phpdomain', 'samples', 'refdoc']
26+
extensions = ['samples', 'refdoc', 'sphinx.ext.autodoc', 'sphinx.ext.autosummary', 'sphinxcontrib.phpdomain']
2727
source_suffix = '.rst'
2828
master_doc = 'index'
2929
project = u'php-opencloud'
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Authentication
2+
==============
3+
4+
Identity v2.0
5+
-------------
6+
7+
We recommend users to use identity v3 when possible.
8+
9+
RackSpace cloud and OVH cloud, however, are still using Keystone v2.0. This following code will work for such providers.
10+
11+
12+
.. sample:: identity/v2/authentication.php

doc/services/identity/v2/index.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Identity v2
2+
===========
3+
4+
.. toctree::
5+
:maxdepth: 3
6+
7+
authentication

doc/services/networking/v2/index.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,8 @@ Networking v2
66

77
networks
88
subnets
9-
ports
9+
ports
10+
loadbalancers
11+
loadbalancer-pools
12+
loadbalancer-listeners
13+
loadbalancer-healthmonitors
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
11
LoadBalancer HealthMonitors
2-
=====
2+
===========================
33

44
Create HealthMonitor
5-
-----------
5+
--------------------
66

77
.. sample:: networking/v2/lbaas/healthmonitors/create.php
88
.. refdoc:: OpenStack/Networking/v2/Service.html#method_createLoadBalancerHealthMonitor
99

1010
Get HealthMonitor
11-
-----------
11+
-----------------
1212

1313
.. sample:: networking/v2/lbaas/healthmonitors/get.php
1414
.. refdoc:: OpenStack/Networking/v2/Service.html#method_getLoadBalancerHealthMonitor
1515

1616
List HealthMonitors
17-
-----------
17+
-------------------
1818

1919
.. sample:: networking/v2/lbaas/healthmonitors/list.php
2020
.. refdoc:: OpenStack/Networking/v2/Service.html#method_listLoadBalancerHealthMonitors
2121

2222
Update HealthMonitor
23-
-----------
23+
--------------------
2424

2525
.. sample:: networking/v2/lbaas/healthmonitors/update.php
2626
.. refdoc:: OpenStack/Networking/v2/Models/LoadBalancerHealthMonitor.html#method_update
2727

2828
Delete HealthMonitor
29-
-----------
29+
--------------------
3030

3131
.. sample:: networking/v2/lbaas/healthmonitors/delete.php
3232
.. refdoc:: OpenStack/Networking/v2/Models/LoadBalancerHealthMonitor.html#method_delete

0 commit comments

Comments
 (0)