~ubuntu-branches/debian/stretch/fuel-agent/stretch

« back to all changes in this revision

Viewing changes to fuel_agent/objects/partition/parted.py

  • Committer: Package Import Robot
  • Author(s): Thomas Goirand
  • Date: 2016-03-16 17:12:17 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20160316171217-p5b360dfuxm5yidy
Tags: 9.0~0+2016.03.09.git.b1ba4b7747+dfsg1-1
* New upstream release based on commit b1ba4b7747.
* Uploading to unstable.
* Lots of tweaks to make Debian provisionning works.
* Standards-Version: 3.9.7 (no change).

Show diffs side-by-side

added added

removed removed

Lines of Context:
95
95
    def next_name(self):
96
96
        if self.next_type() == 'extended':
97
97
            return None
98
 
        separator = ''
 
98
 
99
99
        special_devices = ('cciss', 'nvme', 'loop', 'md')
100
100
        if any(n in self.name for n in special_devices):
101
101
            separator = 'p'
 
102
        elif '/dev/mapper' in self.name:
 
103
            separator = '-part'
 
104
        else:
 
105
            separator = ''
102
106
        return '%s%s%s' % (self.name, separator, self.next_count())
103
107
 
104
108
    def partition_by_name(self, name):