LXD PHP Client Documentation v0.0.1
Class Lxd Endpoints

Profiles

Methods
  • __construct(array $config, variable $curl)  :  void
    Class construct
  • all()  :  array
    List of all profiles.
  • info(string $name)  :  array
    Show information on a profile.
  • create(string $name, string $description, array $config, array $devices)  :  array
    Create a new profile.
  • update(string $name, string $description, array $config, array $devices)  :  array
    Update profile.
  • replace(string $name, string $description, array $config, array $devices)  :  array
    Replace profile.
  • rename(string $name, string $newName)  :  array
    Rename profile.
  • remove(string $name)  :  array
    Remove a profile.
  • delete(string $name)  :  array
    Delete a profile - alias of remove.
Methods Details
  • public function __construct(array $config, variable $curl)
    Class construct
  • public function all()
    List of all profiles.
    $lxd->profiles->all();
  • public function info(string $name)
    Show information on a profile.
    $lxd->profiles->info('profile-name');
  • public function create(string $name, string $description, array $config, array $devices)
    Create a new profile.
    $lxd->profiles->create( 'profile-name', 'My new profile', ["limits.memory" => "1GB"], [ "kvm" => [ "type" => "unix-char", "path" => "/dev/kvm" ], ] );
  • public function update(string $name, string $description, array $config, array $devices)
    Update profile.
    $lxd->profiles->update( 'profile-name', 'My new profile', ["limits.memory" => "1GB"], [ "kvm" => [ "type" => "unix-char", "path" => "/dev/kvm" ], ] );
  • public function replace(string $name, string $description, array $config, array $devices)
    Replace profile.
    $lxd->profiles->replace( 'profile-name', 'My new profile', ["limits.memory" => "1GB"], [ "kvm" => [ "type" => "unix-char", "path" => "/dev/kvm" ], ] );
  • public function rename(string $name, string $newName)
    Rename profile.
    $lxd->profiles->rename('profile-name', 'new-profile-name');
  • public function remove(string $name)
    Remove a profile.
    $lxd->profiles->remove('profile-name');
  • public function delete(string $name)
    Delete a profile - alias of remove.
    $lxd->profiles->delete('profile-name');