Zend_Service_Rackspace.xml 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <sect1 id="zend.service.rackspace">
  3. <title>Zend_Service_Rackspace</title>
  4. <sect2 id="zend.service.rackspace.introduction">
  5. <title>Introduction</title>
  6. <para>
  7. The <classname>Zend_Service_Rackspace</classname> is a class that
  8. provides a simple <acronym>API</acronym> to manage the Rackspace services
  9. Cloud Files and Cloud Servers.
  10. </para>
  11. <note><title>Load balancers service</title>
  12. <para>
  13. The load balancers service of Rackspace is not implemented yet.
  14. We are planning to release it in the next future.
  15. </para>
  16. </note>
  17. </sect2>
  18. <sect2 id="zend.service.rackspace.registering">
  19. <title>Registering with Rackspace</title>
  20. <para>
  21. Before you can get started with <classname>Zend_Service_Rackspace</classname>, you must
  22. first register for an account. Please see the
  23. <ulink url="http://www.rackspace.com/cloud/">Cloud services</ulink>
  24. page on the Rackspace website for more information.
  25. </para>
  26. <para>
  27. After registering, you can get the Username and the API Key from the Rackspace management
  28. console under the menu "Your Account" &gt; "API Access".
  29. These informations are required to use the <classname>Zend_Service_Rackspace</classname>
  30. classes.
  31. </para>
  32. </sect2>
  33. <sect2 id="zend.service.rackspace.feature.files">
  34. <title>Cloud Files</title>
  35. <para>
  36. The Cloud Files is a service to store any files in a cloud environment.
  37. A user can store an unlimited quantity of files and each file can be as
  38. large as 5 gigabytes. The files can be private or public. The private files
  39. can be accessed using the API of Rackspace. The public files are accessed using
  40. a <acronym>CDN</acronym> (Content Delivery Network).
  41. Rackspace exposes a <acronym>REST</acronym> API to manage the Cloud Files.
  42. </para>
  43. <para>
  44. <classname>Zend_Service_Rackspace_Files</classname> provides the following functionality:
  45. <itemizedlist>
  46. <listitem>
  47. <para>
  48. Upload files programmatically for tight integration with your application
  49. </para>
  50. </listitem>
  51. <listitem>
  52. <para>
  53. Enable Cloud Files CDN integration on any container for public distribution
  54. </para>
  55. </listitem>
  56. <listitem>
  57. <para>
  58. Create Containers programmatically
  59. </para>
  60. </listitem>
  61. <listitem>
  62. <para>
  63. Retrieve lists of containers and files
  64. </para>
  65. </listitem>
  66. </itemizedlist>
  67. </para>
  68. </sect2>
  69. <sect2 id="zend.service.rackspace.feature.servers">
  70. <title>Cloud Servers</title>
  71. <para>
  72. Rackspace Cloud Servers is a compute service that provides server capacity in the cloud.
  73. Cloud Servers come in different flavors of memory, disk space, and CPU.
  74. </para>
  75. <para>
  76. <classname>Zend_Service_Rackspace_Servers</classname> provides the following functionality:
  77. <itemizedlist>
  78. <listitem>
  79. <para>
  80. Create/delete new servers
  81. </para>
  82. </listitem>
  83. <listitem>
  84. <para>
  85. List and get information on each server
  86. </para>
  87. </listitem>
  88. <listitem>
  89. <para>
  90. Manage the public/private IP addresses of a server
  91. </para>
  92. </listitem>
  93. <listitem>
  94. <para>
  95. Resize the server capacity
  96. </para>
  97. </listitem>
  98. <listitem>
  99. <para>
  100. Reboot a server
  101. </para>
  102. </listitem>
  103. <listitem>
  104. <para>
  105. Create new images for a server
  106. </para>
  107. </listitem>
  108. <listitem>
  109. <para>
  110. Manage the backup of a server
  111. </para>
  112. </listitem>
  113. <listitem>
  114. <para>
  115. Create a group of server to share the IP addresses for High Availability architecture
  116. </para>
  117. </listitem>
  118. </itemizedlist>
  119. </para>
  120. </sect2>
  121. <sect2 id="zend.service.rackspace.methods">
  122. <title>Available Methods</title>
  123. <para>
  124. Eeach service class (Files, Servers) of Rackspace extends the <classname>Zend_Service_Rackspace</classname> abstract class.
  125. This class contains a set of public methods shared with all the service.
  126. This public methods are reported as follow:
  127. </para>
  128. <variablelist>
  129. <varlistentry id="zend.service.rackspace.files.methods.authenticate">
  130. <term>
  131. <methodsynopsis>
  132. <methodname>authenticate</methodname>
  133. <methodparam>
  134. <funcparams/>
  135. </methodparam>
  136. </methodsynopsis>
  137. </term>
  138. <listitem>
  139. <para>
  140. Authenticate the Rackspace API using the user and the key specified in the concrete class
  141. that extend <classname>Zend_Service_Rackspace</classname>.
  142. Return <emphasis>true</emphasis> in case of success and <emphasis>false</emphasis> in case of error.
  143. </para>
  144. </listitem>
  145. </varlistentry>
  146. <varlistentry id="zend.service.rackspace.files.methods.get-auth-url">
  147. <term>
  148. <methodsynopsis>
  149. <methodname>getAuthUrl</methodname>
  150. <methodparam>
  151. <funcparams/>
  152. </methodparam>
  153. </methodsynopsis>
  154. </term>
  155. <listitem>
  156. <para>
  157. Get the authentication URL of Rackspace.
  158. Returns a string.
  159. </para>
  160. </listitem>
  161. </varlistentry>
  162. <varlistentry id="zend.service.rackspace.files.methods.get-cdn-url">
  163. <term>
  164. <methodsynopsis>
  165. <methodname>getCdnUrl</methodname>
  166. <methodparam>
  167. <funcparams/>
  168. </methodparam>
  169. </methodsynopsis>
  170. </term>
  171. <listitem>
  172. <para>
  173. Get the URL for the CDN.
  174. Returns a string.
  175. </para>
  176. </listitem>
  177. </varlistentry>
  178. <varlistentry id="zend.service.rackspace.files.methods.get-error-code">
  179. <term>
  180. <methodsynopsis>
  181. <methodname>getErrorCode</methodname>
  182. <methodparam>
  183. <funcparams/>
  184. </methodparam>
  185. </methodsynopsis>
  186. </term>
  187. <listitem>
  188. <para>
  189. Get the last HTTP error code.
  190. Returns a string.
  191. </para>
  192. </listitem>
  193. </varlistentry>
  194. <varlistentry id="zend.service.rackspace.files.methods.get-error-msg">
  195. <term>
  196. <methodsynopsis>
  197. <methodname>getErrorMsg</methodname>
  198. <methodparam>
  199. <funcparams/>
  200. </methodparam>
  201. </methodsynopsis>
  202. </term>
  203. <listitem>
  204. <para>
  205. Get the last error message.
  206. Returns a string.
  207. </para>
  208. </listitem>
  209. </varlistentry>
  210. <varlistentry id="zend.service.rackspace.files.methods.get-http-client">
  211. <term>
  212. <methodsynopsis>
  213. <methodname>getHttpClient</methodname>
  214. <methodparam>
  215. <funcparams/>
  216. </methodparam>
  217. </methodsynopsis>
  218. </term>
  219. <listitem>
  220. <para>
  221. Get the HTTP client used to call the API of the Rackspace.
  222. Returns a <classname>Zend_Http_Client</classname> instance.
  223. </para>
  224. </listitem>
  225. </varlistentry>
  226. <varlistentry id="zend.service.rackspace.files.methods.get-key">
  227. <term>
  228. <methodsynopsis>
  229. <methodname>getKey</methodname>
  230. <methodparam>
  231. <funcparams/>
  232. </methodparam>
  233. </methodsynopsis>
  234. </term>
  235. <listitem>
  236. <para>
  237. Get the authentication key.
  238. Returns a string.
  239. </para>
  240. </listitem>
  241. </varlistentry>
  242. <varlistentry id="zend.service.rackspace.files.methods.get-management-url">
  243. <term>
  244. <methodsynopsis>
  245. <methodname>getManagementUrl</methodname>
  246. <methodparam>
  247. <funcparams/>
  248. </methodparam>
  249. </methodsynopsis>
  250. </term>
  251. <listitem>
  252. <para>
  253. Get the URL for the management services.
  254. Returns a string.
  255. </para>
  256. </listitem>
  257. </varlistentry>
  258. <varlistentry id="zend.service.rackspace.files.methods.get-storage-url">
  259. <term>
  260. <methodsynopsis>
  261. <methodname>getStorageUrl</methodname>
  262. <methodparam>
  263. <funcparams/>
  264. </methodparam>
  265. </methodsynopsis>
  266. </term>
  267. <listitem>
  268. <para>
  269. Get the URL for the storage (files) service.
  270. Returns a string.
  271. </para>
  272. </listitem>
  273. </varlistentry>
  274. <varlistentry id="zend.service.rackspace.files.methods.get-token">
  275. <term>
  276. <methodsynopsis>
  277. <methodname>getToken</methodname>
  278. <methodparam>
  279. <funcparams/>
  280. </methodparam>
  281. </methodsynopsis>
  282. </term>
  283. <listitem>
  284. <para>
  285. Get the token returned after a successful authentication.
  286. Returns a string.
  287. </para>
  288. </listitem>
  289. </varlistentry>
  290. <varlistentry id="zend.service.rackspace.files.methods.get-user">
  291. <term>
  292. <methodsynopsis>
  293. <methodname>getUser</methodname>
  294. <methodparam>
  295. <funcparams/>
  296. </methodparam>
  297. </methodsynopsis>
  298. </term>
  299. <listitem>
  300. <para>
  301. Get the user authenticated with the Rackspace service.
  302. Returns a string.
  303. </para>
  304. </listitem>
  305. </varlistentry>
  306. <varlistentry id="zend.service.rackspace.files.methods.is-successful">
  307. <term>
  308. <methodsynopsis>
  309. <methodname>isSuccessful</methodname>
  310. <methodparam>
  311. <funcparams/>
  312. </methodparam>
  313. </methodsynopsis>
  314. </term>
  315. <listitem>
  316. <para>
  317. Return <emphasis>true</emphasis> if the last service call was successful, false otherwise.
  318. </para>
  319. </listitem>
  320. </varlistentry>
  321. <varlistentry id="zend.service.rackspace.files.methods.set-auth-url">
  322. <term>
  323. <methodsynopsis>
  324. <methodname>setAuthUrl</methodname>
  325. <methodparam>
  326. <funcparams>string $url</funcparams>
  327. </methodparam>
  328. </methodsynopsis>
  329. </term>
  330. <listitem>
  331. <para>
  332. Set the authentication URL to be used.
  333. </para>
  334. <para>
  335. <emphasis>$url</emphasis> is the URL for the authentication
  336. </para>
  337. </listitem>
  338. </varlistentry>
  339. <varlistentry id="zend.service.rackspace.files.methods.set-key">
  340. <term>
  341. <methodsynopsis>
  342. <methodname>setKey</methodname>
  343. <methodparam>
  344. <funcparams>string $key</funcparams>
  345. </methodparam>
  346. </methodsynopsis>
  347. </term>
  348. <listitem>
  349. <para>
  350. Set the key for the API authentication.
  351. </para>
  352. <para>
  353. <emphasis>$key</emphasis> is the key string for the authentication
  354. </para>
  355. </listitem>
  356. </varlistentry>
  357. <varlistentry id="zend.service.rackspace.files.methods.set-user">
  358. <term>
  359. <methodsynopsis>
  360. <methodname>setUser</methodname>
  361. <methodparam>
  362. <funcparams>string $user</funcparams>
  363. </methodparam>
  364. </methodsynopsis>
  365. </term>
  366. <listitem>
  367. <para>
  368. Set the user for the API authentication.
  369. </para>
  370. <para>
  371. <emphasis>$user</emphasis> is the user string for the authentication
  372. </para>
  373. </listitem>
  374. </varlistentry>
  375. </variablelist>
  376. </sect2>
  377. </sect1>