Bug 431395

Summary: Cannot change native_type flag in PedPartition.
Product: [Fedora] Fedora Reporter: George Goh <george.goh>
Component: pypartedAssignee: David Cantrell <dcantrell>
Status: CLOSED CANTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 9   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-02-12 22:18:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description George Goh 2008-02-04 05:49:26 UTC
Description of problem:
I'm writing a tool that needs to change the native_type attribute of a
partition, e.g., from Linux to Linux LVM.

However, I cannot do this as the attribute is not writable.

How reproducible:
Always

Steps to Reproduce:
In [1]: import parted

In [2]: dev = parted.PedDevice.get('/dev/sda')

In [3]: disk = parted.PedDisk.new(dev)

In [4]: sda1 = disk.get_partition(1)

In [5]: sda1.native_type
Out[5]: 131

In [6]: sda1.native_type = 0x8e
---------------------------------------------------------------------------
exceptions.TypeError                                 Traceback (most recent call
last)

/home/george/test/pyparted-1.8.9/<ipython console> 

TypeError: attribute 'native_type' of 'PedPartition' objects is not writable

Comment 1 Bug Zapper 2008-05-14 04:59:40 UTC
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 2 David Cantrell 2009-02-12 22:18:00 UTC
pyparted-2.0.0 has been released and built in rawhide now.

This version of pyparted exposes the entire libparted API to the developer.  The 'native_type' attribute is no longer available as it is not part of the libparted library.

pyparted now has a project page:
http://fedorahosted.org/pyparted/

If you'd like to suggest improvements or report bugs, you can do so in the Red Hat Bugzilla system or at the upstream project.