From e09572a8e1d9ce77ba3b514bcba706b4fb409d66 Mon Sep 17 00:00:00 2001 From: Jeroen Hoekx Date: Tue, 8 May 2012 09:44:59 +0200 Subject: [PATCH] Inventory: undefined group -> ungrouped. Also change test name collision. --- lib/ansible/inventory_parser.py | 8 ++++---- test/TestInventory.py | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/ansible/inventory_parser.py b/lib/ansible/inventory_parser.py index fa4b3767b2..f7387050f9 100644 --- a/lib/ansible/inventory_parser.py +++ b/lib/ansible/inventory_parser.py @@ -54,12 +54,12 @@ class InventoryParser(object): def _parse_base_groups(self): - undefined = Group(name='undefined') + ungrouped = Group(name='ungrouped') all = Group(name='all') - all.add_child_group(undefined) + all.add_child_group(ungrouped) - self.groups = dict(all=all, undefined=undefined) - active_group_name = 'undefined' + self.groups = dict(all=all, ungrouped=ungrouped) + active_group_name = 'ungrouped' for line in self.lines: if line.startswith("["): diff --git a/test/TestInventory.py b/test/TestInventory.py index fa8568028b..6d8d3bb2a4 100644 --- a/test/TestInventory.py +++ b/test/TestInventory.py @@ -221,11 +221,11 @@ class TestInventory(unittest.TestCase): expected_hosts=['thor', 'odin', 'loki'] self.compare(hosts, expected_hosts) - def test_simple_ungrouped(self): + def test_yaml_ungrouped(self): inventory = self.yaml_inventory() hosts = inventory.list_hosts("ungrouped") - expected_hosts=['jupiter','zeus'] + expected_hosts=['jupiter'] self.compare(hosts, expected_hosts) def test_yaml_combined(self):