Methods
-
Class construct
-
all() : arrayList of all networks.
-
Show information on a network.
-
Create new network.
-
Rename network.
-
Replace network.
-
Update network.
-
Remove network.
-
Delete network - alias of remove.
Methods Details
-
public function __construct(array $config, variable $curl)Class construct
-
public function all()List of all networks.
$lxd->networks->all();
-
public function info(string $name)Show information on a network.
$lxd->networks->info('network-name');
-
public function create(string $name, string $description, array $config, string $type, bool $managed)Create new network.
$lxd->networks->create( 'network-name', 'My Network', [ 'ipv4.address' => '192.168.1.1/8', 'ipv4.nat' => 'true', 'ipv6.address' => '2001:470:b368:4242::1/64', 'ipv6.nat' => 'true' ], 'bridge', true );
-
public function rename(string $name, string $newName)Rename network.
$lxd->networks->remove('network-name', 'new-network-name');
-
public function replace(string $name, string $description, array $config, string $type, bool $managed)Replace network.
$lxd->networks->replace( 'network-name', 'My Network', [ 'ipv4.address' => '192.168.1.1/8', 'ipv4.nat' => 'true', 'ipv6.address' => '2001:470:b368:4242::1/64', 'ipv6.nat' => 'true' ], 'bridge', true );
-
public function update(string $name, string $description, array $config, string $type, bool $managed)Update network.
$lxd->networks->update( 'network-name', 'My Network', [ 'ipv4.address' => '192.168.1.1/8', 'ipv4.nat' => 'true', 'ipv6.address' => '2001:470:b368:4242::1/64', 'ipv6.nat' => 'true' ], 'bridge', true );
-
public function remove(string $name)Remove network.
$lxd->networks->remove('network-name');
-
public function delete(string $name)Delete network - alias of remove.
$lxd->networks->delete('network-name');