Skip to content

Commit

Permalink
fixing a typo and also proper handling of build_id for centos/redhat
Browse files Browse the repository at this point in the history
Change-Id: I5e094899faf212d8a2026f4c63d153dfbb89cf33
  • Loading branch information
msudhee committed Aug 6, 2016
1 parent 8522c79 commit fa4f0dc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tools/report_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ def _get_phy_topology_detail(self):
detail += 'Control Nodes : %s %s' % (bgp_nodes, newline)
detail += 'Compute Nodes : %s %s' % (compute_nodes, newline)
if self.orch == 'openstack':
detail += 'Openstack Node : %s %s' % (openstack_node, newline)
detail += 'Openstack Node : %s %s' % (openstack_nodes, newline)
detail += 'WebUI Node : %s %s' % (webui_node, newline)
detail += 'Analytics Nodes : %s %s' % (collector_nodes, newline)
detail += 'Physical Devices : %s %s' % (phy_dev, newline)
Expand Down Expand Up @@ -369,7 +369,11 @@ def get_build_id(self):
build_sku = self.get_os_env("SKU")
if build_sku is None:
build_sku=get_build_sku(self.openstack_ips[0],self.host_data[self.openstack_ip]['password'])
if (build_id.count('.') > 3):
#redhat will have 4 '.' like 3.1.0.0-14.el7
if (build_id.count('.') == 4):
build_id = build_id.rsplit('.', 1)[0]
#centos will have 5 '.' like 3.1.0.0-17.el7.centos
elif (build_id.count('.') == 5):
build_id = build_id.rsplit('.', 2)[0]
return [build_id.rstrip('\n'), build_sku]

Expand Down

0 comments on commit fa4f0dc

Please sign in to comment.