From 238da95a1dc2245405daebf13911e972f426af3b Mon Sep 17 00:00:00 2001
From: Christos Stavrakakis <cstavr@grnet.gr>
Date: Thu, 4 Apr 2013 11:51:05 +0300
Subject: [PATCH] Add uuid and name slots to Disk/NIC ConfigObjects

This patch adds "uuid" and "name" slots to Disk and NIC ConfigObjects.

Signed-off-by: Christos Stavrakakis <cstavr@grnet.gr>
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Reviewed-by: Helga Velroyen <helgav@google.com>
---
 lib/objects.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/objects.py b/lib/objects.py
index e5023ecea..9be79acba 100644
--- a/lib/objects.py
+++ b/lib/objects.py
@@ -513,7 +513,7 @@ class ConfigData(ConfigObject):
 
 class NIC(ConfigObject):
   """Config object representing a network card."""
-  __slots__ = ["mac", "ip", "network", "nicparams", "netinfo"]
+  __slots__ = ["name", "mac", "ip", "network", "nicparams", "netinfo"] + _UUID
 
   @classmethod
   def CheckParameterSyntax(cls, nicparams):
@@ -536,8 +536,8 @@ class NIC(ConfigObject):
 
 class Disk(ConfigObject):
   """Config object representing a block device."""
-  __slots__ = ["dev_type", "logical_id", "physical_id",
-               "children", "iv_name", "size", "mode", "params"]
+  __slots__ = ["name", "dev_type", "logical_id", "physical_id",
+               "children", "iv_name", "size", "mode", "params"] + _UUID
 
   def CreateOnSecondary(self):
     """Test if this device needs to be created on a secondary node."""
-- 
GitLab