lxd 0.0.4 copy "lxd: ^0.0.4" to clipboard
lxd: ^0.0.4 copied to clipboard

outdated

Provides a client to access lxd, which allows you to manage containers on a Linux system.

example/example.dart

import 'package:lxd/lxd.dart';

void main() async {
  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();
}
8
likes
0
pub points
0%
popularity

Publisher

verified publishercanonical.com

Provides a client to access lxd, which allows you to manage containers on a Linux system.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

http

More

Packages that depend on lxd