Last updated:
0 purchases
lxd
Provides a client to access lxd, which allows you to manage containers on a Linux system.
Example #
import 'package:lxd/lxd.dart';
var client = LxdClient();
print('Looking for image...');
var image = await client.findRemoteImage('https://cloud-images.ubuntu.com/releases', '20.04');
if (image == null) {
print("Can't find image");
return;
}
print('Creating instance...');
var operation = await client.createInstance(image: image);
operation = await client.waitOperation(operation.id);
if (operation.status == 'Success') {
print('Instance ${operation.instanceNames.first} created.');
} else {
print('Failed: ${operation.error}');
}
client.close();
copied to clipboard
Contributing to lxd.dart #
We welcome contributions! See the contribution guide for more details.
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.