Zend_Service_Rackspace.xml 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470
  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.set-service-net">
  147. <term>
  148. <methodsynopsis>
  149. <methodname>setServiceNet</methodname>
  150. <methodparam>
  151. <funcparams>boolean $useServiceNet = true</funcparams>
  152. </methodparam>
  153. </methodsynopsis>
  154. </term>
  155. <listitem>
  156. <para>
  157. Use the Rackspace 'ServiceNet' internal network.
  158. </para>
  159. </listitem>
  160. </varlistentry>
  161. <varlistentry id="zend.service.rackspace.files.methods.get-service-net">
  162. <term>
  163. <methodsynopsis>
  164. <methodname>getServiceNet</methodname>
  165. <methodparam>
  166. <funcparams/>
  167. </methodparam>
  168. </methodsynopsis>
  169. </term>
  170. <listitem>
  171. <para>
  172. Are we using the Rackspace 'ServiceNet' internal network?
  173. Returns a boolean.
  174. </para>
  175. </listitem>
  176. </varlistentry>
  177. <varlistentry id="zend.service.rackspace.files.methods.get-auth-url">
  178. <term>
  179. <methodsynopsis>
  180. <methodname>getAuthUrl</methodname>
  181. <methodparam>
  182. <funcparams/>
  183. </methodparam>
  184. </methodsynopsis>
  185. </term>
  186. <listitem>
  187. <para>
  188. Get the authentication URL of Rackspace.
  189. Returns a string.
  190. </para>
  191. </listitem>
  192. </varlistentry>
  193. <varlistentry id="zend.service.rackspace.files.methods.get-cdn-url">
  194. <term>
  195. <methodsynopsis>
  196. <methodname>getCdnUrl</methodname>
  197. <methodparam>
  198. <funcparams/>
  199. </methodparam>
  200. </methodsynopsis>
  201. </term>
  202. <listitem>
  203. <para>
  204. Get the URL for the CDN.
  205. Returns a string.
  206. </para>
  207. </listitem>
  208. </varlistentry>
  209. <varlistentry id="zend.service.rackspace.files.methods.get-error-code">
  210. <term>
  211. <methodsynopsis>
  212. <methodname>getErrorCode</methodname>
  213. <methodparam>
  214. <funcparams/>
  215. </methodparam>
  216. </methodsynopsis>
  217. </term>
  218. <listitem>
  219. <para>
  220. Get the last HTTP error code.
  221. Returns a string.
  222. </para>
  223. </listitem>
  224. </varlistentry>
  225. <varlistentry id="zend.service.rackspace.files.methods.get-error-msg">
  226. <term>
  227. <methodsynopsis>
  228. <methodname>getErrorMsg</methodname>
  229. <methodparam>
  230. <funcparams/>
  231. </methodparam>
  232. </methodsynopsis>
  233. </term>
  234. <listitem>
  235. <para>
  236. Get the last error message.
  237. Returns a string.
  238. </para>
  239. </listitem>
  240. </varlistentry>
  241. <varlistentry id="zend.service.rackspace.files.methods.get-http-client">
  242. <term>
  243. <methodsynopsis>
  244. <methodname>getHttpClient</methodname>
  245. <methodparam>
  246. <funcparams/>
  247. </methodparam>
  248. </methodsynopsis>
  249. </term>
  250. <listitem>
  251. <para>
  252. Get the HTTP client used to call the API of the Rackspace.
  253. Returns a <classname>Zend_Http_Client</classname> instance.
  254. </para>
  255. </listitem>
  256. </varlistentry>
  257. <varlistentry id="zend.service.rackspace.files.methods.get-key">
  258. <term>
  259. <methodsynopsis>
  260. <methodname>getKey</methodname>
  261. <methodparam>
  262. <funcparams/>
  263. </methodparam>
  264. </methodsynopsis>
  265. </term>
  266. <listitem>
  267. <para>
  268. Get the authentication key.
  269. Returns a string.
  270. </para>
  271. </listitem>
  272. </varlistentry>
  273. <varlistentry id="zend.service.rackspace.files.methods.get-management-url">
  274. <term>
  275. <methodsynopsis>
  276. <methodname>getManagementUrl</methodname>
  277. <methodparam>
  278. <funcparams/>
  279. </methodparam>
  280. </methodsynopsis>
  281. </term>
  282. <listitem>
  283. <para>
  284. Get the URL for the management services.
  285. Returns a string.
  286. </para>
  287. </listitem>
  288. </varlistentry>
  289. <varlistentry id="zend.service.rackspace.files.methods.get-storage-url">
  290. <term>
  291. <methodsynopsis>
  292. <methodname>getStorageUrl</methodname>
  293. <methodparam>
  294. <funcparams/>
  295. </methodparam>
  296. </methodsynopsis>
  297. </term>
  298. <listitem>
  299. <para>
  300. Get the URL for the storage (files) service.
  301. Returns a string.
  302. </para>
  303. </listitem>
  304. </varlistentry>
  305. <varlistentry id="zend.service.rackspace.files.methods.get-token">
  306. <term>
  307. <methodsynopsis>
  308. <methodname>getToken</methodname>
  309. <methodparam>
  310. <funcparams/>
  311. </methodparam>
  312. </methodsynopsis>
  313. </term>
  314. <listitem>
  315. <para>
  316. Get the token returned after a successful authentication.
  317. Returns a string.
  318. </para>
  319. </listitem>
  320. </varlistentry>
  321. <varlistentry id="zend.service.rackspace.files.methods.get-user">
  322. <term>
  323. <methodsynopsis>
  324. <methodname>getUser</methodname>
  325. <methodparam>
  326. <funcparams/>
  327. </methodparam>
  328. </methodsynopsis>
  329. </term>
  330. <listitem>
  331. <para>
  332. Get the user authenticated with the Rackspace service.
  333. Returns a string.
  334. </para>
  335. </listitem>
  336. </varlistentry>
  337. <varlistentry id="zend.service.rackspace.files.methods.is-successful">
  338. <term>
  339. <methodsynopsis>
  340. <methodname>isSuccessful</methodname>
  341. <methodparam>
  342. <funcparams/>
  343. </methodparam>
  344. </methodsynopsis>
  345. </term>
  346. <listitem>
  347. <para>
  348. Return <emphasis>true</emphasis> if the last service call was successful, false otherwise.
  349. </para>
  350. </listitem>
  351. </varlistentry>
  352. <varlistentry id="zend.service.rackspace.files.methods.set-auth-url">
  353. <term>
  354. <methodsynopsis>
  355. <methodname>setAuthUrl</methodname>
  356. <methodparam>
  357. <funcparams>string $url</funcparams>
  358. </methodparam>
  359. </methodsynopsis>
  360. </term>
  361. <listitem>
  362. <para>
  363. Set the authentication URL to be used.
  364. </para>
  365. <para>
  366. <emphasis>$url</emphasis> is the URL for the authentication
  367. </para>
  368. </listitem>
  369. </varlistentry>
  370. <varlistentry id="zend.service.rackspace.files.methods.set-key">
  371. <term>
  372. <methodsynopsis>
  373. <methodname>setKey</methodname>
  374. <methodparam>
  375. <funcparams>string $key</funcparams>
  376. </methodparam>
  377. </methodsynopsis>
  378. </term>
  379. <listitem>
  380. <para>
  381. Set the key for the API authentication.
  382. </para>
  383. <para>
  384. <emphasis>$key</emphasis> is the key string for the authentication
  385. </para>
  386. </listitem>
  387. </varlistentry>
  388. <varlistentry id="zend.service.rackspace.files.methods.set-user">
  389. <term>
  390. <methodsynopsis>
  391. <methodname>setUser</methodname>
  392. <methodparam>
  393. <funcparams>string $user</funcparams>
  394. </methodparam>
  395. </methodsynopsis>
  396. </term>
  397. <listitem>
  398. <para>
  399. Set the user for the API authentication.
  400. </para>
  401. <para>
  402. <emphasis>$user</emphasis> is the user string for the authentication
  403. </para>
  404. </listitem>
  405. </varlistentry>
  406. </variablelist>
  407. </sect2>
  408. </sect1>