Skip to content

Commit 91d4661

Browse files
masonkatzbsanders
authored andcommitted
FEATURE: add host sets the boot action to os
remove test for state that doesn't happen
1 parent e7feab8 commit 91d4661

2 files changed

Lines changed: 4 additions & 10 deletions

File tree

common/src/stack/command/stack/commands/add/host/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,8 @@ def run(self, params, args):
187187
[ host, 'type=os', 'sync=false',
188188
'action=%s' % osaction ])
189189

190+
self.command('set.host.boot', [ host, 'action=os', 'sync=false' ])
191+
190192
if environment:
191193
self.command('set.host.environment',
192194
[ host, "environment=%s" % environment ])

test-framework/test-suites/integration/tests/report/test_report_host_bootfile.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,9 @@ def test_for_host_with_full_IP_config(self, host):
1212
result = host.run('stack add host interface backend-1-1 interface=eth1 ip=192.172.0.2 network=public default=True mac=52:54:00:6e:50:91')
1313
assert result.rc == 0
1414

15-
# When Bootaction is set to None (Doesn't produce a Bootfile and is Skipped)
16-
result = host.run('stack report host bootfile')
17-
assert result.rc == 0
18-
result_specific = host.run('stack report host bootfile backend-1-1')
19-
assert result_specific.rc == 0
20-
assert result.stdout == result_specific.stdout
21-
assert result.stdout == ""
22-
2315
# When Bootaction is set to OS (Produces a Bootfile)
24-
result = host.run('stack set host boot backend-1-1 action=os')
25-
assert result.rc == 0
16+
#
17+
# stack add host does this by default (always start with the os boot action)
2618
result = host.run('stack report host bootfile')
2719
assert result.rc == 0
2820
result_specific = host.run('stack report host bootfile backend-1-1')

0 commit comments

Comments
 (0)