You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/services/compute/keypairs.rst
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,8 @@ value is automatically generated for you.
21
21
$pubKey = $keypair->getPublicKey();
22
22
$priKey = $keypair->getPrivateKey();
23
23
24
+
`Get the executable PHP script for this example <https://raw.githubusercontent.com/rackspace/php-opencloud/master/samples/Compute/create_new_keypair.php>`_
25
+
24
26
25
27
Upload existing keypair
26
28
-----------------------
@@ -41,6 +43,9 @@ filesystem.
41
43
'publicKey' => $content
42
44
));
43
45
46
+
`Get the executable PHP script for this example <https://raw.githubusercontent.com/rackspace/php-opencloud/master/samples/Compute/upload_existing_keypair.php>`_
Copy file name to clipboardExpand all lines: doc/services/compute/servers.rst
+23-6Lines changed: 23 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,6 +49,9 @@ URL parameters for filtering servers
49
49
| 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 |
`Get the executable PHP script for this example <https://raw.githubusercontent.com/rackspace/php-opencloud/master/samples/Compute/list_servers.php>`_
53
+
54
+
52
55
Create server
53
56
-------------
54
57
@@ -59,19 +62,22 @@ Now we're ready to create our instance:
59
62
60
63
.. code-block:: php
61
64
62
-
$server = $compute->server();
65
+
$server = $compute->server();
63
66
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
+
));
69
72
70
73
It's always best to be defensive when executing functionality over HTTP;
71
74
you can achieve this best by wrapping calls in a try/catch block. It
72
75
allows you to debug your failed operations in a graceful and efficient
73
76
manner.
74
77
78
+
`Get the executable PHP script for this example <https://raw.githubusercontent.com/rackspace/php-opencloud/master/samples/Compute/create_server.php>`_
79
+
80
+
75
81
Using a bootable volume
76
82
~~~~~~~~~~~~~~~~~~~~~~~
77
83
@@ -98,6 +104,9 @@ you can achieve this best by wrapping calls in a try/catch block. It
98
104
allows you to debug your failed operations in a graceful and efficient
99
105
manner.
100
106
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
+
101
110
Create parameters
102
111
~~~~~~~~~~~~~~~~~
103
112
@@ -146,6 +155,8 @@ as usual, with one extra parameter:
146
155
So, as you can see, you specify the **name** of an existing keypair that
147
156
you previously created on the API.
148
157
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
+
149
160
150
161
Creating a server with personality files
151
162
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -176,6 +187,10 @@ attributes are detailed in the next section.
176
187
'name' => 'NEW SERVER NAME'
177
188
));
178
189
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
+
179
194
Updatable attributes
180
195
~~~~~~~~~~~~~~~~~~~~
181
196
@@ -195,3 +210,5 @@ Delete server
195
210
.. code-block:: php
196
211
197
212
$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>`_
Copy file name to clipboardExpand all lines: doc/services/identity/users.rst
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,6 +34,8 @@ List users
34
34
// ...
35
35
}
36
36
37
+
`Get the executable PHP script for this example <https://raw.githubusercontent.com/rackspace/php-opencloud/master/samples/Identity/list_users.php>`_
38
+
37
39
38
40
Retrieve a user by username
39
41
---------------------------
@@ -42,6 +44,8 @@ Retrieve a user by username
42
44
43
45
$user = $service->getUser('jamie');
44
46
47
+
`Get the executable PHP script for this example <https://raw.githubusercontent.com/rackspace/php-opencloud/master/samples/Identity/get_user_by_name.php>`_
`Get the executable PHP script for this example <https://raw.githubusercontent.com/rackspace/php-opencloud/master/samples/Identity/get_user_by_id.php>`_
60
+
55
61
56
62
Retrieve a user by email address
57
63
--------------------------------
@@ -62,6 +68,8 @@ Retrieve a user by email address
`Get the executable PHP script for this example <https://raw.githubusercontent.com/rackspace/php-opencloud/master/samples/Identity/get_user_by_email.php>`_
72
+
65
73
66
74
Create user
67
75
-----------
@@ -98,6 +106,8 @@ automatically generated and provided in the response.
98
106
// show generated password
99
107
echo $user->getPassword();
100
108
109
+
`Get the executable PHP script for this example <https://raw.githubusercontent.com/rackspace/php-opencloud/master/samples/Identity/add_user.php>`_
110
+
101
111
102
112
Update user
103
113
-----------
@@ -129,6 +139,8 @@ Delete user
129
139
130
140
$user->delete();
131
141
142
+
`Get the executable PHP script for this example <https://raw.githubusercontent.com/rackspace/php-opencloud/master/samples/Identity/delete_user.php>`_
143
+
132
144
133
145
List credentials
134
146
----------------
@@ -159,3 +171,5 @@ you:
159
171
160
172
$user->resetApiKey();
161
173
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>`_
Copy file name to clipboardExpand all lines: doc/services/load-balancer/load-balancer.rst
+10-4Lines changed: 10 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,9 +51,11 @@ port number, before submitting to the API:
51
51
For a full list of available `protocols <#protocols>`_ and `algorithms <#algorithms>`_
52
52
please see the sections below.
53
53
54
+
`Get the executable PHP script for this example <https://raw.githubusercontent.com/rackspace/php-opencloud/master/samples/LoadBalancer/create-lb.php>`_
54
55
55
-
List Load Balancer Details
56
-
--------------------------
56
+
57
+
Get Load Balancer Details
58
+
-------------------------
57
59
58
60
You can retrieve a single load balancer's details by using its ID:
59
61
@@ -64,7 +66,7 @@ You can retrieve a single load balancer's details by using its ID:
64
66
65
67
66
68
List Load Balancers
67
-
~~~~~~~~~~~~~~~~~~~
69
+
-------------------
68
70
69
71
You can retrieve a list of all your load balancers:
70
72
@@ -76,6 +78,8 @@ You can retrieve a list of all your load balancers:
`Get the executable PHP script for this example <https://raw.githubusercontent.com/rackspace/php-opencloud/master/samples/LoadBalancer/list-load-balancers.php>`_
82
+
79
83
80
84
Update a Load Balancer
81
85
----------------------
@@ -121,6 +125,8 @@ When you no longer have a need for the load balancer, you can remove it:
121
125
122
126
$loadBalancer->delete();
123
127
128
+
`Get the executable PHP script for this example <https://raw.githubusercontent.com/rackspace/php-opencloud/master/samples/LoadBalancer/delete-lb.php>`_
129
+
124
130
125
131
Protocols
126
132
---------
@@ -159,7 +165,7 @@ You can programmatically list all supported load balancing algorithms:
`Get the executable PHP script for this example <https://raw.githubusercontent.com/rackspace/php-opencloud/master/samples/LoadBalancer/ssl-termination.php>`_
Copy file name to clipboardExpand all lines: doc/services/object-store/access.rst
+9-2Lines changed: 9 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,11 @@ in a global state:
23
23
The string argument of ``setTempUrlSecret()`` is optional - if left out,
24
24
the SDK will generate a random hashed secret for you.
25
25
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
+
26
31
27
32
Create a temporary URL
28
33
----------------------
@@ -32,14 +37,16 @@ your object. To allow GET access to your object for 1 minute:
32
37
33
38
.. code-block:: php
34
39
35
-
$object->getTemporaryUrl(60, 'GET');
40
+
$object->getTemporaryUrl(60, 'GET');
36
41
37
42
38
43
To allow PUT access for 1 hour:
39
44
40
45
.. code-block:: php
41
46
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>`_
0 commit comments