Skip to content

Commit 3dfe7c4

Browse files
committed
Merge pull request #555 from jamiehannaford/rst-conversion
RST updates
2 parents 21ce8b1 + baef47e commit 3dfe7c4

File tree

21 files changed

+203
-312
lines changed

21 files changed

+203
-312
lines changed

doc/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
sphinxcontrib-phpdomain

doc/services/compute/flavors.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ List flavors
2020
/** @param $flavor OpenCloud\Common\Resource\FlavorInterface */
2121
}
2222
23+
`Get the executable PHP script for this example <https://raw.githubusercontent.com/rackspace/php-opencloud/master/samples/Compute/list_flavors.php>`_
24+
2325

2426
Detailed results
2527
~~~~~~~~~~~~~~~~

doc/services/compute/images.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ Below is the simplest usage for retrieving a list of images:
2323
2424
}
2525
26+
`Get the executable PHP script for this example <https://raw.githubusercontent.com/rackspace/php-opencloud/master/samples/Compute/list_images.php>`_
27+
28+
2629
Detailed results
2730
~~~~~~~~~~~~~~~~
2831

doc/services/compute/keypairs.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ value is automatically generated for you.
2121
$pubKey = $keypair->getPublicKey();
2222
$priKey = $keypair->getPrivateKey();
2323
24+
`Get the executable PHP script for this example <https://raw.githubusercontent.com/rackspace/php-opencloud/master/samples/Compute/create_new_keypair.php>`_
25+
2426

2527
Upload existing keypair
2628
-----------------------
@@ -41,6 +43,9 @@ filesystem.
4143
'publicKey' => $content
4244
));
4345
46+
`Get the executable PHP script for this example <https://raw.githubusercontent.com/rackspace/php-opencloud/master/samples/Compute/upload_existing_keypair.php>`_
47+
48+
4449
List keypairs
4550
-------------
4651

doc/services/compute/servers.rst

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ URL parameters for filtering servers
4949
| RAX-SI:image_schedule | If scheduled images enabled or not. If the value is TRUE, the list contains all servers that have an image schedule resource set on them. If the value is set to FALSE, the list contains all servers that do not have an image schedule. | bool |
5050
+--------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------+
5151

52+
`Get the executable PHP script for this example <https://raw.githubusercontent.com/rackspace/php-opencloud/master/samples/Compute/list_servers.php>`_
53+
54+
5255
Create server
5356
-------------
5457

@@ -59,19 +62,22 @@ Now we're ready to create our instance:
5962

6063
.. code-block:: php
6164
62-
$server = $compute->server();
65+
$server = $compute->server();
6366
64-
$server->create(array(
65-
'name' => 'My lovely server',
66-
'imageId' => '{imageId}',
67-
'flavorId' => '{flavorId}',
68-
));
67+
$server->create(array(
68+
'name' => 'My lovely server',
69+
'imageId' => '{imageId}',
70+
'flavorId' => '{flavorId}',
71+
));
6972
7073
It's always best to be defensive when executing functionality over HTTP;
7174
you can achieve this best by wrapping calls in a try/catch block. It
7275
allows you to debug your failed operations in a graceful and efficient
7376
manner.
7477

78+
`Get the executable PHP script for this example <https://raw.githubusercontent.com/rackspace/php-opencloud/master/samples/Compute/create_server.php>`_
79+
80+
7581
Using a bootable volume
7682
~~~~~~~~~~~~~~~~~~~~~~~
7783

@@ -98,6 +104,9 @@ you can achieve this best by wrapping calls in a try/catch block. It
98104
allows you to debug your failed operations in a graceful and efficient
99105
manner.
100106

107+
`Get the executable PHP script for this example <https://raw.githubusercontent.com/rackspace/php-opencloud/master/samples/Compute/create_server_with_bootable_volume.php>`_
108+
109+
101110
Create parameters
102111
~~~~~~~~~~~~~~~~~
103112

@@ -146,6 +155,8 @@ as usual, with one extra parameter:
146155
So, as you can see, you specify the **name** of an existing keypair that
147156
you previously created on the API.
148157

158+
`Get the executable PHP script for this example <https://raw.githubusercontent.com/rackspace/php-opencloud/master/samples/Compute/create_server_with_keypair.php>`_
159+
149160

150161
Creating a server with personality files
151162
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -176,6 +187,10 @@ attributes are detailed in the next section.
176187
'name' => 'NEW SERVER NAME'
177188
));
178189
190+
191+
`Get the executable PHP script for this example <https://raw.githubusercontent.com/rackspace/php-opencloud/master/samples/Compute/update_server.php>`_
192+
193+
179194
Updatable attributes
180195
~~~~~~~~~~~~~~~~~~~~
181196

@@ -195,3 +210,5 @@ Delete server
195210
.. code-block:: php
196211
197212
$server->delete();
213+
214+
`Get the executable PHP script for this example <https://raw.githubusercontent.com/rackspace/php-opencloud/master/samples/Compute/delete_server.php>`_

doc/services/identity/users.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ List users
3434
// ...
3535
}
3636
37+
`Get the executable PHP script for this example <https://raw.githubusercontent.com/rackspace/php-opencloud/master/samples/Identity/list_users.php>`_
38+
3739

3840
Retrieve a user by username
3941
---------------------------
@@ -42,6 +44,8 @@ Retrieve a user by username
4244
4345
$user = $service->getUser('jamie');
4446
47+
`Get the executable PHP script for this example <https://raw.githubusercontent.com/rackspace/php-opencloud/master/samples/Identity/get_user_by_name.php>`_
48+
4549

4650
Retrieve a user by user ID
4751
--------------------------
@@ -52,6 +56,8 @@ Retrieve a user by user ID
5256
5357
$user = $service->getUser('{userId}', UserConst::MODE_ID);
5458
59+
`Get the executable PHP script for this example <https://raw.githubusercontent.com/rackspace/php-opencloud/master/samples/Identity/get_user_by_id.php>`_
60+
5561

5662
Retrieve a user by email address
5763
--------------------------------
@@ -62,6 +68,8 @@ Retrieve a user by email address
6268
6369
$user = $service->getUser('{emailAddress}', UserConst::MODE_EMAIL);
6470
71+
`Get the executable PHP script for this example <https://raw.githubusercontent.com/rackspace/php-opencloud/master/samples/Identity/get_user_by_email.php>`_
72+
6573

6674
Create user
6775
-----------
@@ -98,6 +106,8 @@ automatically generated and provided in the response.
98106
// show generated password
99107
echo $user->getPassword();
100108
109+
`Get the executable PHP script for this example <https://raw.githubusercontent.com/rackspace/php-opencloud/master/samples/Identity/add_user.php>`_
110+
101111

102112
Update user
103113
-----------
@@ -129,6 +139,8 @@ Delete user
129139
130140
$user->delete();
131141
142+
`Get the executable PHP script for this example <https://raw.githubusercontent.com/rackspace/php-opencloud/master/samples/Identity/delete_user.php>`_
143+
132144

133145
List credentials
134146
----------------
@@ -159,3 +171,5 @@ you:
159171
160172
$user->resetApiKey();
161173
echo $user->getApiKey();
174+
175+
`Get the executable PHP script for this example <https://raw.githubusercontent.com/rackspace/php-opencloud/master/samples/Identity/reset_api_key.php>`_

doc/services/load-balancer/access.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,11 @@ You can add network items to a load balancer's access list very easily:
6868
In the above example, we allowed access for 1 IP address, and used the
6969
"0.0.0.0" wildcard to blacklist all other traffic.
7070

71+
Get the executable PHP scripts for this example:
72+
73+
* `Blacklist IP range <https://raw.githubusercontent.com/rackspace/php-opencloud/master/samples/LoadBalancer/blacklist-ip-range.php>`_
74+
* `Limit access to 1 IP <https://raw.githubusercontent.com/rackspace/php-opencloud/master/samples/LoadBalancer/limit-access-to-1-ip.php>`_
75+
7176

7277
Remove Network Item From Access List
7378
------------------------------------
@@ -76,4 +81,4 @@ You an remove a network item from a load balancer's access list:
7681

7782
.. code-block:: php
7883
79-
$networkItem->delete();
84+
$networkItem->delete();

doc/services/load-balancer/load-balancer.rst

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,11 @@ port number, before submitting to the API:
5151
For a full list of available `protocols <#protocols>`_ and `algorithms <#algorithms>`_
5252
please see the sections below.
5353

54+
`Get the executable PHP script for this example <https://raw.githubusercontent.com/rackspace/php-opencloud/master/samples/LoadBalancer/create-lb.php>`_
5455

55-
List Load Balancer Details
56-
--------------------------
56+
57+
Get Load Balancer Details
58+
-------------------------
5759

5860
You can retrieve a single load balancer's details by using its ID:
5961

@@ -64,7 +66,7 @@ You can retrieve a single load balancer's details by using its ID:
6466
6567
6668
List Load Balancers
67-
~~~~~~~~~~~~~~~~~~~
69+
-------------------
6870

6971
You can retrieve a list of all your load balancers:
7072

@@ -76,6 +78,8 @@ You can retrieve a list of all your load balancers:
7678
/** @var $loadBalancer OpenCloud\LoadBalancer\Resource\LoadBalancer **/
7779
}
7880
81+
`Get the executable PHP script for this example <https://raw.githubusercontent.com/rackspace/php-opencloud/master/samples/LoadBalancer/list-load-balancers.php>`_
82+
7983

8084
Update a Load Balancer
8185
----------------------
@@ -121,6 +125,8 @@ When you no longer have a need for the load balancer, you can remove it:
121125
122126
$loadBalancer->delete();
123127
128+
`Get the executable PHP script for this example <https://raw.githubusercontent.com/rackspace/php-opencloud/master/samples/LoadBalancer/delete-lb.php>`_
129+
124130

125131
Protocols
126132
---------
@@ -159,7 +165,7 @@ You can programmatically list all supported load balancing algorithms:
159165
.. code-block:: php
160166
161167
$algorithms = $service->algorithmList();
162-
168+
163169
foreach ($algorithms as $algorithm) {
164170
/** @var $algorithm OpenCloud\LoadBalancer\Resource\Algorithm **/
165171
}

doc/services/load-balancer/ssl.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ For a full list, with explanations, of required and optional attributes,
4343
please consult the `official
4444
documentation <http://docs.rackspace.com/loadbalancers/api/v1.0/clb-devguide/content/SSLTermination-d1e2479.html>`__
4545

46+
`Get the executable PHP script for this example <https://raw.githubusercontent.com/rackspace/php-opencloud/master/samples/LoadBalancer/ssl-termination.php>`_
47+
4648

4749
Delete configuration
4850
--------------------

doc/services/object-store/access.rst

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ in a global state:
2323
The string argument of ``setTempUrlSecret()`` is optional - if left out,
2424
the SDK will generate a random hashed secret for you.
2525

26+
Get the executable PHP script for this example:
27+
28+
* `Specify a URL secret <https://raw.githubusercontent.com/rackspace/php-opencloud/master/samples/ObjectStore/set-account-temp-url-secret-specified.php>`_
29+
* `Generate random URL secret <https://raw.githubusercontent.com/rackspace/php-opencloud/master/samples/ObjectStore/set-account-temp-url-secret.php>`_
30+
2631

2732
Create a temporary URL
2833
----------------------
@@ -32,14 +37,16 @@ your object. To allow GET access to your object for 1 minute:
3237

3338
.. code-block:: php
3439
35-
$object->getTemporaryUrl(60, 'GET');
40+
$object->getTemporaryUrl(60, 'GET');
3641
3742
3843
To allow PUT access for 1 hour:
3944

4045
.. code-block:: php
4146
42-
$object->getTemporaryUrl(360, 'PUT');
47+
$object->getTemporaryUrl(360, 'PUT');
48+
49+
`Get the executable PHP script for this example <https://raw.githubusercontent.com/rackspace/php-opencloud/master/samples/ObjectStore/create-object-temporary-url.php>`_
4350

4451

4552
Hosting HTML sites on CDN

0 commit comments

Comments
 (0)