Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
187 commits
Select commit Hold shift + click to select a range
e959b01
Allow using PUT (default) or PATCH as update method depending on prop…
ycombinator Dec 18, 2014
87d3116
Setting memory limit needed for code coverage generation.
ycombinator Dec 19, 2014
601e18c
Parameterize type of service in catalog so it can be specified when b…
ycombinator Dec 19, 2014
733ddd6
Adding tests and implementation for the CDN service.
ycombinator Dec 19, 2014
f156f47
Whitespace fixes.
ycombinator Dec 19, 2014
bde9c66
Fixing docblock for Flavor class.
ycombinator Dec 19, 2014
95eada8
Looping over object properties while changing them is a bad idea!
ycombinator Dec 23, 2014
6d65fca
Use the maximum pagination limit supported by the API, unless client …
ycombinator Dec 23, 2014
f963aef
Do not use the top-level property in the create JSON.
ycombinator Dec 23, 2014
020f7b3
Adding smoke tests for CDN.
ycombinator Dec 23, 2014
1b0eef9
Adding code samples.
ycombinator Dec 23, 2014
07d62a0
Adding Getting Started Guide for CDN service.
ycombinator Dec 25, 2014
8f54c4e
Adding another property alias.
ycombinator Dec 25, 2014
260f68f
Clarifying definition.
ycombinator Dec 25, 2014
038e2da
Disambiguating "service" by providing additional context.
ycombinator Dec 25, 2014
f525941
Fixing link.
ycombinator Dec 25, 2014
157ea27
Adding Complete User Guide for CDN service.
ycombinator Dec 25, 2014
ad71565
Whitespace lint fixes.
ycombinator Dec 25, 2014
1c59c45
Removing limits.
ycombinator Dec 25, 2014
ffb915d
Fixing formatting.
ycombinator Dec 26, 2014
92cbf98
Fixing typo.
ycombinator Dec 26, 2014
ee47135
Changing syntax to be PHP5.3-compliant.
ycombinator Dec 26, 2014
5804006
Fixing link.
ycombinator Dec 26, 2014
72182f3
Adding section on service assets.
ycombinator Dec 26, 2014
8b179f6
Fixing typo in variable name.
ycombinator Dec 26, 2014
5f4976e
Fixing case in variable names.
ycombinator Dec 26, 2014
f45dc27
Fixing method name.
ycombinator Dec 26, 2014
36336cb
Adding support for GET / and GET /ping APIs.
ycombinator Dec 30, 2014
f2fe5ab
Adding errors property to Service resource.
ycombinator Dec 30, 2014
138e096
Remove Accept request header for APIs that don't return responses.
ycombinator Dec 30, 2014
cae80de
Force addition of trailing slash to URL in order to make GET / work.
ycombinator Dec 30, 2014
97f8037
Adding smoke tests for GET / and GET /ping APIs.
ycombinator Dec 30, 2014
9686882
Wait for service to return to a status where further changes can be m…
ycombinator Dec 30, 2014
a9de5fc
Removing trailing space to make the linter happy.
ycombinator Dec 30, 2014
3386d76
Adding ID property (primary key; generated) to Service resource.
ycombinator Dec 31, 2014
67da4ed
Expanding on arguments.
ycombinator Jan 2, 2015
e29681e
Moving @see annotations to new line.
ycombinator Jan 2, 2015
b7b020e
Doing the same things with fewer lines of code.
ycombinator Jan 2, 2015
70be88b
Refactoring to remove single-use local variable.
ycombinator Jan 2, 2015
5dc7b41
Condensing single-element array literals to single line.
ycombinator Jan 2, 2015
8908d8a
Fixing typo in method names.
ycombinator Jan 2, 2015
9acbae5
Using better ID placeholder names.
ycombinator Jan 2, 2015
e16e9a0
Fixing formatting issues due to missing backticks.
ycombinator Jan 2, 2015
7f1b971
Trimming whitespace.
ycombinator Jan 2, 2015
c908eb9
Standardizing placeholders to use camelCase.
ycombinator Jan 2, 2015
959a489
Fixing parameter paths.
ycombinator Jan 3, 2015
6d0a4e0
Aliasing requestUrl -> request_url.
ycombinator Jan 3, 2015
7a7ff51
Clarifying parameter descriptions.
ycombinator Jan 3, 2015
5f550f9
Fixing typos.
ycombinator Jan 3, 2015
013d768
Clarifying parameter description.
ycombinator Jan 3, 2015
a0671b8
Adding helper methods to generate JSON Patch representation for resou…
ycombinator Jan 5, 2015
703941c
Refactoring PATCH headers to Base.
ycombinator Jan 5, 2015
4d86881
Overriding update() for Service resource; getting rid of update logic…
ycombinator Jan 5, 2015
650e80d
Removing newline to trigger build.
ycombinator Jan 6, 2015
b610917
Removing docs for administrative operations.
ycombinator Jan 6, 2015
2377b06
Fixing ``` alignment.
ycombinator Jan 6, 2015
49d5ed8
Using $this->updateKeys to determine the current values of updateable…
ycombinator Jan 6, 2015
28a4234
Using property aliases when generating JSON Patch representation.
ycombinator Jan 6, 2015
8257700
Accessing static method... statically.
ycombinator Jan 6, 2015
74a900a
Trying GC disabling to kill the segfault.
ycombinator Jan 6, 2015
859c725
Increasing memory limit further to try and kill the segfault.
ycombinator Jan 6, 2015
2747cf8
Merge pull request #515 from ycombinator/cdn
ycombinator Jan 6, 2015
1b9f7de
Setting version for release.
ycombinator Jan 7, 2015
d3eebb9
Merge pull request #517 from ycombinator/alpha
ycombinator Jan 7, 2015
a6217b8
Using a stable version of the json-patch-php package.
ycombinator Jan 7, 2015
bd97dfa
Merge pull request #520 from ycombinator/alpha
ycombinator Jan 7, 2015
5b2a951
Use correct link
Apr 3, 2015
74dbce4
Merge pull request #584 from jamiehannaford/link-fix
Apr 3, 2015
5122339
Guzzle Backoff Correction
AdamMerrifield Apr 6, 2015
baeaf15
Fix method in documentation of Object->getContent
AdamMerrifield Apr 6, 2015
355d84c
Merge pull request #585 from AdamMerrifield/working
Apr 7, 2015
d16851c
replace Logger::deprecated with PRS-3 Logger::warning
rvanlaak Jan 6, 2015
fd9fcef
move deprecation message to static function
rvanlaak Jan 6, 2015
5b5fc0f
+ inject Logger in service when available in Client
rvanlaak Jan 7, 2015
208a9b7
Update getting-started.md
rvanlaak Jan 7, 2015
7f04cf2
Update Clients.md
rvanlaak Jan 7, 2015
5cb4ac7
Link getting-started.md to the clients userguide
rvanlaak Jan 7, 2015
b153504
Add mock HTTP responses
Jan 8, 2015
4380e4e
Decouple the process of retrieving last element from setting marker
Jan 8, 2015
d4fa195
Add new iterator to handle differences
Jan 8, 2015
f9dda99
Implement into service and refactor tests
Jan 8, 2015
5473f31
Appease PSR-2 gods
Jan 9, 2015
7a5efc4
Attempt to fix 5.3 segfault
Jan 9, 2015
d2cce75
Tweaks based on code review
Jan 13, 2015
25bd5e7
Add comment to clarify intent of code.
ycombinator Jan 14, 2015
a379aed
Clarifying where to place autoloader require statement.
ycombinator Jan 14, 2015
fd0b51e
Fix CDN container population when iterating
Jan 15, 2015
45302cf
Minor fixes
Jan 15, 2015
d691948
[ci skip] Adding better documentation
Jan 15, 2015
5cb0fd8
Generate and publish SDK API reference from Travis builds of master b…
ycombinator Jan 21, 2015
9f47ec5
Using an older version of apigen that works with PHP 5.3.
ycombinator Jan 21, 2015
ebcec94
Making generation+publish script executable.
ycombinator Jan 21, 2015
2464ef7
Pull in latest changes before making more changes.
ycombinator Jan 22, 2015
772998e
Adding error checking if the pull/merge failed.
ycombinator Jan 22, 2015
886a958
Attempt merge commit if necessary.
ycombinator Jan 22, 2015
6f23936
Removing unnecessary line.
ycombinator Jan 23, 2015
df95b78
Adding apigen config file.
ycombinator Jan 23, 2015
545c667
Docs said 'COMPLETE' but code uses 'COMPLETED'
gecampbell Feb 7, 2015
f5dfde5
Adding explanation for prefixing user-agents
Feb 25, 2015
6e2e786
Install entire Guzzle package
Feb 25, 2015
37ce5b3
Add example outputs
Feb 25, 2015
e2433c0
Return array of DataObjects if such is requested.
ycombinator Feb 25, 2015
da68b2d
Adding documentation.
ycombinator Feb 26, 2015
5bb0ae4
Adding more test data.
ycombinator Feb 26, 2015
928a810
Adding inline documentation.
ycombinator Feb 26, 2015
5e42a91
Oops. Forgot to check-in this file!
ycombinator Feb 26, 2015
86c3650
Condensing to one line.
ycombinator Feb 26, 2015
39309d3
Remove debugging statement.
ycombinator Feb 26, 2015
8142bf2
Adding catch block so this works with PHP 5.4.
ycombinator Feb 27, 2015
63118f1
Adding directive to let Travis builds finish fast.
ycombinator Feb 27, 2015
9b98d2c
Duh! PHP5.4 and below don't support finally at all. Removing altogeth…
ycombinator Feb 27, 2015
ac1233e
Add gitignore to prevent builds from being pushed
Mar 3, 2015
310d9c8
Add basic config and make scripts
Mar 3, 2015
745b717
Add initial AutoScale
Mar 3, 2015
bed6315
Add initial Common and Compute
Mar 3, 2015
6a3dacc
Add databases and DNS
Mar 3, 2015
b2276a9
Add Identity and Images
Mar 3, 2015
686a5bf
Add remaining
Mar 3, 2015
f65cda6
Add remaining top-level things
Mar 3, 2015
31b3964
Shuffle structure
Mar 4, 2015
9ece52b
Turn on extension
Mar 4, 2015
5afe71f
Add regions
Mar 4, 2015
0f0a1ae
Add DNS docs
Mar 4, 2015
f46fb83
Add DB docs
Mar 4, 2015
f29826d
Identity docs
Mar 4, 2015
305bd1e
Adding unit tests + implementation for Neutron Security Groups and Se…
ycombinator Mar 5, 2015
7b6a2f0
Adding userguide documentation for security groups and security group…
ycombinator Mar 5, 2015
c5f8630
Adding downloadable code samples for Security Groups and Security Gro…
ycombinator Mar 5, 2015
271f8db
Adding smoke tests for Security Groups and Security Group Rules.
ycombinator Mar 5, 2015
0b0b54e
Forgot to check-in resource classes.
ycombinator Mar 5, 2015
309c01d
Add docs for Images
Mar 5, 2015
fa78206
Add LB docs
Mar 5, 2015
19d081e
Add monitoring docs
Mar 5, 2015
7481ea1
Networking docs
Mar 5, 2015
1bd1c2a
Object Store docs
Mar 5, 2015
b869d8f
Modify toctree
Mar 5, 2015
f441dd6
Add orchestration docs
Mar 5, 2015
4cd5f94
Add Queues docs
Mar 5, 2015
26f3d6f
Fix what properties can be updated.
ycombinator Mar 6, 2015
1e2850e
Fix variable names.
ycombinator Mar 6, 2015
073aef3
Only ingress rules are currently allowed.
ycombinator Mar 6, 2015
aed62d9
Remote groups are not currently allowed.
ycombinator Mar 6, 2015
14099cc
Security group rules don't have names. s/name/direction/.
ycombinator Mar 6, 2015
623f5cc
Appeasing the linter.
ycombinator Mar 6, 2015
1698223
Shuffle setup org
Mar 6, 2015
63a3a2c
Refactor root pages and index page
Mar 6, 2015
10af5c6
Add final links
Mar 6, 2015
21dccc3
Add GS guides
Mar 6, 2015
2c9a7fb
Tweak GS guides
Mar 6, 2015
6493280
Adding descriptions to docblocks.
ycombinator Mar 6, 2015
3409c42
Fixing typo.
ycombinator Mar 6, 2015
78c3dc0
Adding descriptions for Security Groups and Security Group Rules sect…
ycombinator Mar 6, 2015
79f0c78
Moving @see annotations to their own lines.
ycombinator Mar 6, 2015
1b2f049
Appeasing the PSR-2 linter.
ycombinator Mar 6, 2015
48f3beb
Swap support email address for support URL
etoews Mar 6, 2015
43ee542
Swap support email address for support URL
etoews Mar 6, 2015
67cf54e
Use full paths for downloadable samples
Mar 9, 2015
0df0c84
Remove MD links
Mar 9, 2015
59eefc2
Add Security Groups docs
Mar 9, 2015
9ef5e68
Fixing relative links
Mar 9, 2015
916911c
Use :doc: to link to inline documents
Mar 9, 2015
25de01e
Adding sphinx extension
Mar 9, 2015
ba89da5
Use correct ext name
Mar 9, 2015
840c140
Adding sample links
Mar 10, 2015
02eb989
Add list CDN containers sample file
Mar 10, 2015
4839afc
Adding smoke test to apply security group to port.
ycombinator Mar 11, 2015
5c8e38e
Minor formatting fix so code block renders correctly.
ycombinator Mar 11, 2015
f017f31
Add deprecation and redirect links to existing docs
Mar 10, 2015
6655b4a
Add more information about configuring clients
Mar 11, 2015
9b9b3aa
Use correct CNAME record
Mar 16, 2015
9cf735d
Using TLSv1 cipher suite for Cloud Databases client.
ycombinator Mar 16, 2015
ffd884b
Check that critical message is being logged + suppress log output.
ycombinator Mar 16, 2015
b212e21
Removing unnecessary import.
ycombinator Mar 16, 2015
925d5a7
Breaking up log message over several lines.
ycombinator Mar 16, 2015
8d2d1ac
Fixing option value - should be cipher name not integer (constant).
ycombinator Mar 16, 2015
75a4928
Use custom cipher suite stronger than TLSv1 (but still including RC4 …
ycombinator Mar 16, 2015
528b785
Refactoring SSL cipher list into constant; fixing test.
ycombinator Mar 16, 2015
d559ffa
PHP < 5.6 does not like multi-line consts :|
ycombinator Mar 16, 2015
befe7ea
Fixing log message to match reality.
ycombinator Mar 16, 2015
20e05f6
Fixing unit test method name to match reality.
ycombinator Mar 16, 2015
806002d
Refactoring logger into common class to enable reuse.
ycombinator Mar 16, 2015
819e94a
Use mock logger for database service test to supress log output.
ycombinator Mar 16, 2015
078f2d1
Adding reference to cipher list comment in docblock.
ycombinator Mar 16, 2015
5b5766a
[ci skip] Add more links to our official docs
Mar 20, 2015
c3297ae
[ci skip] Fix incorrect method in docs
Mar 20, 2015
20af479
Bump apigen version
Apr 29, 2015
5cf4361
Adding new changes
Apr 29, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ notifications:
- shaunak.kashyap@rackspace.com

env:
- secure: "bdrUeYb3nSGgBB+QtDZxUHVPw6B/wjb3KXLm8TgonWrQm4GPeWKK29qhmDnFZmQjwQPfuebe7wAk1ZxGoZKbEiELVpJJ+8XYVOt6W/6V53H31JL6FqiIE5+7qBwDe+9ziveM6GcTXHT1GI5mUeACIbeBDPZaNubIJH3U6MPim64="
- secure: "bdrUeYb3nSGgBB+QtDZxUHVPw6B/wjb3KXLm8TgonWrQm4GPeWKK29qhmDnFZmQjwQPfuebe7wAk1ZxGoZKbEiELVpJJ+8XYVOt6W/6V53H31JL6FqiIE5+7qBwDe+9ziveM6GcTXHT1GI5mUeACIbeBDPZaNubIJH3U6MPim64="
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Requirements
* PHP >=5.4
* cURL extension for PHP

**Note**: Since PHP 5.3 has reached [end of life](http://php.net/eol.php) and is no longer officially supported, we are moving to 5.4 as a minimum requirement. If upgrading is not an option and you still need a stable version of the SDK for 5.3, please follow [this guide](http://docs.php-opencloud.com/en/latest/using-php-5.3).
**Note**: Since PHP 5.3 has reached [end of life](http://php.net/eol.php) and is no longer officially supported, we are moving to 5.4 as a minimum requirement. If upgrading is not an option and you still need a stable version of the SDK for 5.3, please follow [this guide](http://docs.php-opencloud.com/en/latest/using-php-5.3.html).

Installation
------------
Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@
},
"require": {
"php" : ">=5.4",
"guzzle/guzzle" : "~3.8",
"psr/log": "~1.0"
"guzzle/http" : "~3.8",
"psr/log": "~1.0",
"mikemccabe/json-patch-php": "~0.1"
},
"require-dev" : {
"phpunit/phpunit": "4.3.*",
Expand Down
6 changes: 3 additions & 3 deletions doc/services/object-store/migrating-containers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ Requirements

use Guzzle\Plugin\Backoff\BackoffPlugin;

// set timeout in secs
$timeout = 10;
// maximum number of retries
$maxRetries = 10;

// set HTTP error codes
$httpErrors = array(500, 503, 408);

$backoffPlugin = BackoffPlugin::getExponentialBackoff($timeout, $httpErrors);
$backoffPlugin = BackoffPlugin::getExponentialBackoff($maxRetries, $httpErrors);
$client->addSubscriber($backoffPlugin);


Expand Down
2 changes: 1 addition & 1 deletion doc/services/object-store/objects.rst
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ Get content of file
.. code-block:: php

/** @param $content Guzzle\Http\EntityBody */
$content = $object->getContainer();
$content = $object->getContent();


Get type of file
Expand Down
96 changes: 96 additions & 0 deletions docs/userguide/CDN/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# CDN

**CDN** is a service that you can use to manage your CDN-enabled domains and the origins and assets associated with those domains.

## Concepts

To use the CDN service effectively, you should understand the following key concepts:

* **Content delivery network**: A content delivery network (CDN) is a system of multiple computers that contains copies of data stored at various network nodes. A CDN is designed to improve performance of publicly distributed assets. Assets can be anything from website content, to web application components, to media such as videos, ads, and interactive experiences.  CDNs decrease the load time of these assets by caching them on edge servers, also called points of presence (PoPs).  Edge servers are distributed around the globe, meaning requests only travel to a local location to grab assets, rather than to and from a data center based far from the end user.

* **Edge node**: CDN providers have many points of presence (PoP) servers around the world. These servers are known as edge nodes. These edge nodes cache the content and serve it directly to customers, thus reducing transit time to a customers location.

* **Edge server**: An edge server is the same as an edge node.

* **Origin**: An origin is an address (IP or domain) from which the CDN provider pulls content. A service can have multiple origins.

* **Flavor**: A flavor is a configuration option. A flavor enables you to choose from a generic setting that is powered by one or more CDN providers.

* **Service**: A service represents your web application that has its content cached to the edge nodes.

* **Status**: The status indicates the current state of the service. The time it takes for a service configuration to be distributed amongst a CDN provider cache can vary.

* **Purge**: Purging removes content from the edge servers - thus invalidating the content - so that it can be refreshed from your origin servers.

* **Caching rule**: A caching rule provides you with fine-grained control over the time-to-live (TTL) of an object. When the TTL expires for an object, the edge node pulls the object from the origin again.

* **Restriction**: A restriction enables you to define rules about who can or cannot access content from the cache. Examples of a restriction are allowing requests only from certain domains, geographies, or IP addresses.

## Getting started

### 1. Instantiate an OpenStack or Rackspace client.

To use the CDN service, you must first instantiate a `OpenStack` or `Rackspace` client object.

* If you are working with an OpenStack cloud, instantiate an `OpenCloud\OpenStack` client as follows:

```php
use OpenCloud\OpenStack;

$client = new OpenStack('<OPENSTACK CLOUD IDENTITY ENDPOINT URL>', array(
'username' => '<YOUR OPENSTACK CLOUD ACCOUNT USERNAME>',
'password' => '<YOUR OPENSTACK CLOUD ACCOUNT PASSWORD>'
));
```

* If you are working with the Rackspace cloud, instantiate a `OpenCloud\Rackspace` client as follows:

```php
use OpenCloud\Rackspace;

$client = new Rackspace(Rackspace::US_IDENTITY_ENDPOINT, array(
'username' => '<YOUR RACKSPACE CLOUD ACCOUNT USERNAME>',
'apiKey' => '<YOUR RACKSPACE CLOUD ACCOUNT API KEY>'
));
```

### 2. Obtain a CDN service object from the client.
All CDN operations are done via an _CDN service object_. To
instantiate this object, call the `cdnService` method on the `$client`
object. This method takes one argument:

| Position | Description | Data type | Required? | Default value | Example value |
| -------- | ----------- | ----------| --------- | ------------- | ------------- |
| 1 | Name of the service, as it appears in the service catalog | String | No | `null`; automatically determined when possible | `rackCDN` |


```php
$cdnService = $client->cdnService();
```

### 3. Create a service (to represent your web application).
```php
$service = $cdnService->createService(array(
'name' => 'acme_site',
'domains' => array(
array(
'domain' => 'www.acme.com'
),
array(
'domain' => 'acme.com'
)
),
'origins' => array(
array(
'origin' => 'origin.acme.com'
)
),
'flavorId' => 'cdn'
));
```

[ [Get the executable PHP script for this example](/samples/CDN/create-service.php) ]

## Next steps

Once you have created a service, there is more you can do with it. See [complete user guide for CDN](USERGUIDE.md).
Loading