[lxc-devel] [lxd/master] device/instance/id: Adds instanceIdentifier interface

tomponline on Github lxc-bot at linuxcontainers.org
Mon Jul 15 13:12:47 UTC 2019


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 491 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20190715/c55a12b3/attachment.bin>
-------------- next part --------------
From f85d25d062bfeb463ab3a38e178567c4e5225577 Mon Sep 17 00:00:00 2001
From: Thomas Parrott <thomas.parrott at canonical.com>
Date: Mon, 15 Jul 2019 14:11:26 +0100
Subject: [PATCH] device/instance/id: Adds instanceIdentifier interface

This is used by the device implementations to expose a common subset of functions that are implemented by every instance type.

Signed-off-by: Thomas Parrott <thomas.parrott at canonical.com>
---
 lxd/device/device_instance_id.go | 8 ++++++++
 1 file changed, 8 insertions(+)
 create mode 100644 lxd/device/device_instance_id.go

diff --git a/lxd/device/device_instance_id.go b/lxd/device/device_instance_id.go
new file mode 100644
index 0000000000..10bcaa0815
--- /dev/null
+++ b/lxd/device/device_instance_id.go
@@ -0,0 +1,8 @@
+package device
+
+// instanceIdentifier is an interface that allows us to identify an Instance and its properties.
+type instanceIdentifier interface {
+	Name() string
+	Type() string
+	Project() string
+}


More information about the lxc-devel mailing list