Skip to content

Commit

Permalink
Fixes 1489439: Allows multiple disks per volume group.
Browse files Browse the repository at this point in the history
  • Loading branch information
devyanikota committed Oct 16, 2017
1 parent ac9ca3e commit bd953ac
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions gdeployfeatures/vg/vg.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@ def set_default_values(section_dict, pvnames, vgnames):
print "Error: %s"%msg
Global.logger.error(msg)
helpers.cleanup_and_quit()
if section_dict['one-to-one'] == 'no':
vgnames *= len(pvnames)
else:
if section_dict['one-to-one'] == 'yes':
vgs = []
for i in range(1, len(pvnames) + 1):
vgs.append(vgnames[0] + str(i))
Expand All @@ -57,11 +55,19 @@ def set_default_values(section_dict, pvnames, vgnames):

def dictify_pv_vg_names(section_dict, pvnames, vgnames):
data = []
for pv, vg in zip(pvnames, vgnames):
vglist = {}
vglist['brick'] = pv
vglist['vg'] = vg
vglist = {}
vglist['brick'] = ' '
if len(vgnames) == 1 and len(pvnames) > 1:
for p in pvnames:
vglist['brick'] += p+' '
vglist['vg'] = vgnames[0]
data.append(vglist)
else:
for pv, vg in zip(pvnames, vgnames):
vglist = {}
vglist['brick'] = pv
vglist['vg'] = vg
data.append(vglist)
section_dict['vgnames'] = data
return section_dict

Expand Down

0 comments on commit bd953ac

Please sign in to comment.