Commit 1d28212f by Jeroen Hoekx

Inventory: undefined group -> ungrouped.

Also change test name collision.
parent 3b401589
...@@ -54,12 +54,12 @@ class InventoryParser(object): ...@@ -54,12 +54,12 @@ class InventoryParser(object):
def _parse_base_groups(self): def _parse_base_groups(self):
undefined = Group(name='undefined') ungrouped = Group(name='ungrouped')
all = Group(name='all') all = Group(name='all')
all.add_child_group(undefined) all.add_child_group(ungrouped)
self.groups = dict(all=all, undefined=undefined) self.groups = dict(all=all, ungrouped=ungrouped)
active_group_name = 'undefined' active_group_name = 'ungrouped'
for line in self.lines: for line in self.lines:
if line.startswith("["): if line.startswith("["):
......
...@@ -221,11 +221,11 @@ class TestInventory(unittest.TestCase): ...@@ -221,11 +221,11 @@ class TestInventory(unittest.TestCase):
expected_hosts=['thor', 'odin', 'loki'] expected_hosts=['thor', 'odin', 'loki']
self.compare(hosts, expected_hosts) self.compare(hosts, expected_hosts)
def test_simple_ungrouped(self): def test_yaml_ungrouped(self):
inventory = self.yaml_inventory() inventory = self.yaml_inventory()
hosts = inventory.list_hosts("ungrouped") hosts = inventory.list_hosts("ungrouped")
expected_hosts=['jupiter','zeus'] expected_hosts=['jupiter']
self.compare(hosts, expected_hosts) self.compare(hosts, expected_hosts)
def test_yaml_combined(self): def test_yaml_combined(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment