FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Development

 
 
LinkBack Thread Tools
 
Old 10-13-2010, 02:04 PM
Peter Jones
 
Default Add a uuid property to DeviceMap and pass the value to dm.map ctor.

On 10/12/2010 06:27 PM, David Lehman wrote:

Related: rhbz#584328


Looks good to me.


---
maps.py | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/maps.py b/maps.py
index 4090422..ccc8ca5 100644
--- a/maps.py
+++ b/maps.py
@@ -149,6 +149,16 @@ class DeviceMap:
self.__name = name
name = property(get_name, set_name, None, "the name of the device map")

+ def get_uuid(self):
+ return self.__uuid
+ def set_uuid(self, uuid):
+ if not self.map is None:
+ if self.map.uuid:
+ raise ValueError("UUID already set for %s" % self.name)
+ self.map.uuid = uuid
+ self.__uuid = uuid
+ uuid = property(get_uuid, set_uuid, None, "the uuid of the device map")
+
def get_map(self):
return self.__map
def set_map(self, map):
@@ -163,6 +173,7 @@ class DeviceMap:
self.__parents = []
self.__map = None
self.__name = None
+ self.__uuid = None

self.start = start
self.size = size
@@ -183,7 +194,8 @@ class DeviceMap:
name = self.name
if self.name is None:
raise ValueError, "DeviceMap name is not set"
- self.map = _dm.map(name = self.name, table = self.table)
+ self.map = _dm.map(name = self.name, uuid=self.uuid,
+ table = self.table)
del _dm
del _device




--
Peter

Computers have already beaten communists at chess. The next thing you
know, they'll be beating humans.
-- Dale

01234567890123456789012345678901234567890123456789 012345678901234567890123456789

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 05:12 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org